/* Telicolor web prototype. Palette and type from web/direccion-de-arte.md, refined after Christian's
   20-oct review (odd/tasks/web-telicolor.md L7). Mobile first. Colours only through the variables below,
   so the page background can be swapped in one place (--bg). */
:root {
  --azul: #2D4C6D;
  --azul-profundo: #1B202E;
  --pizarra: #6982A0;
  --gris-tela: #B4B5B4;
  --hueso: #F6F3EE;
  --blanco-calido: #FBFBFA;
  --blanco: #FFFFFF;
  --pizarra-texto: #5A7392;   /* #6982A0 one step darker: 4.7:1 on --bg, 4.9:1 on white */
  --wa: #1F7A4D;
  --wa-hover: #165C3A;
  --bajo: #8A5A12;
  --agotado: #6B6C6B;

  --bg: var(--blanco-calido);
  --surface: var(--blanco);
  --ink: var(--azul-profundo);
  --ink-soft: #3B4252;
  --ink-muted: #4A5163;
  --label: var(--pizarra-texto);
  --hairline: rgba(180, 181, 180, .5);
  --rule-soft: #E6E3DD;
  --ink-on-dark: #D9DCE2;

  --font-display: "Archivo", "Arial Black", sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-micro: 360ms;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 10vw, 8rem);
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
  overflow-x: hidden;
}
@media (min-width: 900px) { body { font-size: 1.0625rem; } }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--azul); }

/* Type: Archivo for titles (sentence case), Archivo caps only for the logo's voice (hero title,
   wordmark, family names). Labels and eyebrows are Source Serif italic, sentence case. */
h1, h2, h3, .btn, .site-nav, .menu-toggle, .num { font-family: var(--font-display); }
h1, h2, h3 { font-weight: 800; line-height: 1.05; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 6vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.8rem); letter-spacing: -.01em; }
h3 { font-size: 1.05rem; letter-spacing: 0; }
.num { font-weight: 600; font-variant-numeric: tabular-nums; }
.eyebrow, .label {
  margin: 0 0 .75rem;
  font: italic 400 1rem/1.3 var(--font-body);
  letter-spacing: 0; text-transform: none; color: var(--label);
}

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .9rem var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  position: relative; z-index: 20;
}
.site-header--over {
  position: absolute; inset: 0 0 auto 0;
  background: transparent; border-bottom: 0;
  justify-content: flex-end;
}

/* Brand: the square woven mark plus the wordmark in Archivo 900. */
.brand, .hero__brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; }
/* The paspartú plate around the mark is the one frame in the site. */
.brand__plate, .hero__plate {
  display: block; flex: none; background: var(--blanco);
  outline: 1px solid rgb(27 32 46 / .12);
  box-shadow: 0 1px 2px rgb(27 32 46 / .08), 0 16px 40px -16px rgb(27 32 46 / .28);
}
.brand__plate { padding: 8px; outline-offset: -4px; }
.hero__plate { padding: clamp(14px, 2vw, 24px); outline-offset: -8px; }
.brand__mark { width: 34px; height: 34px; }
.brand__word, .hero__word {
  font: 900 1.15rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--azul);
}
.hero__brand { margin: 0 0 2rem; gap: 1.1rem; }
.hero__mark { width: clamp(44px, 5vw, 60px); height: auto; }
.hero__word { color: var(--blanco); font-size: clamp(1.25rem, 3.4vw, 1.6rem); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }

.menu-toggle {
  display: none;
  font-size: .95rem; font-weight: 600;
  background: none; border: 1px solid currentColor; color: var(--ink);
  padding: .55rem .95rem; border-radius: 2px; cursor: pointer;
}
.site-header--over .menu-toggle { color: var(--blanco); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.6rem; }
.site-nav a {
  position: relative; display: inline-block; padding: .35rem 0;
  font-size: .95rem; font-weight: 600; text-decoration: none; color: var(--ink);
}
/* The one added micro-interaction: the underline grows from the left. */
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
  transition: transform var(--t-micro) var(--ease-out);
}
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header--over .site-nav a { color: var(--blanco); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }

/* With JS the nav collapses into the "Menú" button below 900px. */
@media (max-width: 899px) {
  .js .menu-toggle { display: inline-block; }
  .js .site-nav { display: none; width: 100%; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; padding: .5rem 0; }
  .js .site-nav a { padding: .7rem 0; font-size: 1.05rem; }
  .js .site-header--over .site-nav.is-open {
    background: var(--azul-profundo); margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); width: calc(100% + 2 * var(--pad));
  }
}

/* ---------- buttons, availability, tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.4rem;
  font-size: .95rem; font-weight: 700; letter-spacing: .01em; text-decoration: none;
  background: var(--azul); color: var(--blanco); border: 1px solid var(--azul); border-radius: 2px;
  cursor: pointer; transition: background-color var(--t-micro) var(--ease-out), color var(--t-micro) var(--ease-out);
}
.btn:hover { background: var(--azul-profundo); border-color: var(--azul-profundo); }
.btn--light { background: var(--blanco); color: var(--ink); border-color: var(--blanco); }
.btn--light:hover { background: var(--hueso); border-color: var(--hueso); }
.btn--ghost { background: transparent; color: var(--azul); }
.btn--ghost:hover { background: var(--azul); color: var(--blanco); }
.btn--ghost-light { background: transparent; color: var(--blanco); border-color: var(--blanco); }
.btn--ghost-light:hover { background: var(--blanco); color: var(--ink); border-color: var(--blanco); }
.btn--wa { background: var(--wa); border-color: var(--wa); }
.btn--wa:hover { background: var(--wa-hover); border-color: var(--wa-hover); }
:focus-visible { outline: 2px solid var(--pizarra); outline-offset: 3px; }

/* Availability: plain text with a 6 px dot, no pill. */
.estado { display: inline-flex; align-items: center; gap: .45rem; font: 400 .95rem/1.3 var(--font-body); white-space: nowrap; }
.estado::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.estado--ok { color: var(--azul); }
.estado--low { color: var(--bajo); }
.estado--out { color: var(--agotado); text-decoration: line-through; text-decoration-thickness: 1px; }
.tag-ejemplo {
  display: inline-block; vertical-align: baseline; margin-left: .35rem;
  font: italic 400 .8rem/1 var(--font-body);
  color: var(--label); background: rgba(105, 130, 160, .12); padding: .2rem .4rem; border-radius: 2px;
}

/* ---------- sections ---------- */
section, .ficha { padding: var(--section-y) var(--pad); }
.section-head { max-width: var(--max); margin: 0 auto clamp(2rem, 5vw, 3.5rem); }
.section-lead { max-width: 38rem; margin: 0; color: var(--ink-soft); }

/* hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 92svh; display: flex; align-items: flex-end;
  padding-top: 6rem; color: var(--blanco); background: var(--azul-profundo);
}
.hero__media { position: absolute; inset: -4% 0 auto 0; height: 108%; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
/* Scrim: soft dark gradient that pools behind the text block (bottom-left) and under the nav. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(110% 80% at 0% 100%, rgba(27, 32, 46, .72) 0%, rgba(27, 32, 46, .4) 45%, rgba(27, 32, 46, 0) 75%),
    linear-gradient(to top, rgba(27, 32, 46, .6) 0%, rgba(27, 32, 46, .25) 40%, rgba(27, 32, 46, 0) 65%),
    linear-gradient(to bottom, rgba(27, 32, 46, .45) 0%, rgba(27, 32, 46, 0) 22%),
    rgba(27, 32, 46, .12);
}
.hero__content { width: 100%; max-width: var(--max); margin: 0 auto; }
.hero__title {
  color: var(--blanco); font-weight: 900; text-transform: uppercase; letter-spacing: -.01em;
  font-size: clamp(3.2rem, 15vw, 9rem); line-height: .92; margin-bottom: 1.25rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
/* Text mask: each line clips its inner span, which rises from below. */
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line__inner { display: block; }
.hero__lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 30rem; margin: 0 0 1.75rem; text-wrap: balance; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }

/* families: an editorial list, rows separated by hairlines */
.familias { overflow-x: clip; }
.familias__list { list-style: none; max-width: var(--max); margin: 0 auto; padding: 0; border-bottom: 1px solid var(--hairline); }
.familia { border-top: 1px solid var(--hairline); }
.familia__row {
  display: grid; gap: .6rem 2rem; grid-template-columns: minmax(0, 1fr);
  padding: clamp(1.5rem, 4vw, 2.75rem) 0; color: var(--ink); text-decoration: none;
}
.familia__name {
  font: 800 clamp(2rem, 6vw, 4rem)/1 var(--font-display); text-transform: uppercase; letter-spacing: -.01em;
  overflow-wrap: anywhere;
  transition: transform var(--t-micro) var(--ease-out);
}
.familia__row:hover .familia__name, .familia__row:focus-visible .familia__name { transform: translateX(8px); }
.familia__desc { display: flex; flex-direction: column; gap: .4rem; max-width: 34rem; font-size: 1.05rem; color: var(--ink-soft); }
.familia__meta { font: italic 400 1rem/1.3 var(--font-body); color: var(--label); }
.familia--activa .familia__meta { color: var(--azul); }
.familia--pronto .familia__name { color: var(--ink-muted); }
/* The Camisería swatch bleeds to the right edge of the viewport. */
.familia__swatch {
  display: block; height: clamp(9rem, 22vw, 15rem); overflow: hidden; background: var(--surface);
  margin-right: calc((min(var(--max), 100vw - 2 * var(--pad)) - 100vw) / 2);
}
/* Wider than its frame so the pinked edges of the scan stay outside. */
.familia__swatch img { width: 112%; max-width: none; height: 100%; margin-left: -6%; object-fit: cover; object-position: 50% 40%; }
@media (min-width: 900px) {
  .familia__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; }
  .familia__swatch { grid-column: 2; margin-top: 1rem; }
}

/* fabric grid */
.fichas { background: var(--surface); }
.tela-grid { max-width: var(--max); margin: 0 auto; display: grid; gap: 2.25rem 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .tela-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem 2rem; } }
.tela-card__media {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface);
  -webkit-tap-highlight-color: transparent;
}
.tela-card__zoom { position: absolute; inset: 0; display: block; }
.tela-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tela-card__muestra { object-fit: cover; }
/* Wider than its frame so the pinked edges of the scan stay outside. */
.tela-card__media .tela-card__muestra { left: -6%; width: 112%; max-width: none; }
/* Swatch to shirt: a 350 ms crossfade, on hover with a mouse, on tap with a finger (app.js). */
.tela-card__camisa { object-fit: contain; background: var(--surface); opacity: 0; transition: opacity 350ms ease; }
.tela-card__media:focus-visible .tela-card__camisa,
.tela-card.is-swapped .tela-card__camisa { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .tela-card__media:hover .tela-card__camisa { opacity: 1; }
}
.tela-card__body { padding-top: .9rem; }
.tela-card__codigo { margin: 0 0 .2rem; font: italic 400 .9rem/1.2 var(--font-body); color: var(--label); overflow-wrap: anywhere; }
.tela-card h3 { margin: 0 0 .45rem; font: 600 clamp(1rem, 2.6vw, 1.2rem)/1.25 var(--font-body); letter-spacing: 0; }
.tela-card h3 a { color: var(--ink); text-decoration: none; }
.tela-card__estado { margin: 0; }
.tela-card__cta {
  display: inline-block; margin-top: .55rem; font: 600 .95rem/1.2 var(--font-display); color: var(--azul); text-decoration: none;
  transition: opacity var(--t-micro) var(--ease-out), transform var(--t-micro) var(--ease-out);
}
/* "Ver ficha" shows on hover with a mouse; on touch, and without JS, it is always there. */
@media (hover: hover) and (pointer: fine) {
  .js .tela-card__cta { opacity: 0; transform: translateX(-6px); }
  .js .tela-card:hover .tela-card__cta, .js .tela-card:focus-within .tela-card__cta { opacity: 1; transform: none; }
}

/* about teaser and contact strip */
.teaser { max-width: 52rem; margin: 0 auto; }
.teaser p { font-size: 1.15rem; }
.contact-strip { background: var(--azul); color: var(--blanco); display: flex; flex-direction: column; gap: 1.25rem; }
.contact-strip__title { margin: 0; font: 800 clamp(1.6rem, 5vw, 2.6rem)/1.05 var(--font-display); letter-spacing: -.01em; }
.contact-strip__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 900px) { .contact-strip { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- product sheet ---------- */
.ficha { max-width: var(--max); margin: 0 auto; }
.breadcrumb { font: italic 400 .95rem/1.4 var(--font-body); color: var(--label); margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.breadcrumb a { color: var(--label); }
.ficha__head h1 { font-size: clamp(1.9rem, 5.5vw, 3.4rem); overflow-wrap: anywhere; }
.ficha__estado { margin: 0 0 2rem; }
.ficha__fotos { display: grid; gap: 1.5rem; }
.ficha__fotos figure { margin: 0; }
.ficha__fotos figcaption { font-size: .9rem; color: var(--ink-muted); margin-top: .6rem; }
.ficha__camisa img { background: var(--surface); }
.lupa-target {
  position: relative; background: var(--surface); cursor: crosshair;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.lupa-target img { -webkit-user-drag: none; pointer-events: none; }
.hint-mouse { display: none; }
@media (hover: hover) and (pointer: fine) { .hint-mouse { display: inline; } .hint-touch { display: none; } }
.lupa {
  position: absolute; z-index: 50; pointer-events: none;
  border: 3px solid var(--blanco); box-shadow: 0 10px 30px rgba(27, 32, 46, .35);
  background: var(--blanco);
}
.lupa[hidden] { display: none; }
.ficha__info { margin-top: 2.5rem; display: grid; gap: 2rem; }
.ficha__tabla { width: 100%; border-collapse: collapse; background: var(--surface); }
.ficha__tabla caption { text-align: left; font: italic 400 1rem/1.2 var(--font-body); color: var(--label); padding: 0 0 .9rem; }
.ficha__tabla th, .ficha__tabla td { text-align: left; vertical-align: top; padding: .85rem 1rem; border-bottom: 1px solid var(--rule-soft); }
.ficha__tabla th { width: 38%; font: italic 400 .95rem/1.4 var(--font-body); color: var(--label); }
.ficha__tabla ul { margin: 0; padding-left: 1.1rem; }
.ficha__side { display: flex; flex-direction: column; gap: 1.25rem; }
.ficha__acciones { display: flex; flex-direction: column; gap: .75rem; }
.ficha__nota { margin: 0; font-size: .9rem; color: var(--ink-muted); }
.ficha-acceso:has(> [hidden]) { display: none; }
.ficha-acceso > section { padding: 0; }
.ficha-acceso button { min-height: 48px; }
@media (min-width: 900px) {
  .ficha__fotos { grid-template-columns: 1fr 1fr; align-items: start; }
  .ficha__info { grid-template-columns: 1.4fr 1fr; align-items: start; gap: 3rem; }
  .ficha__side { position: sticky; top: 2rem; }
}

/* ---------- catalogue ---------- */
.catalogo { max-width: var(--max); margin: 0 auto; }
.book-wrap { max-width: 1040px; margin: 0 auto; background: var(--surface); padding: clamp(.75rem, 3vw, 1.25rem); }
.book { margin: 0 auto; }
.book-page { background: var(--blanco); overflow: hidden; }
.book-page img { width: 100%; height: 100%; object-fit: contain; }
.book-page[data-density="hard"] { background: var(--hueso); box-shadow: inset 0 0 0 1px rgba(180, 181, 180, .6); }
.book:not(.is-ready) { display: grid; gap: 1rem; }
.book-controls { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.book-controls .btn { padding: .7rem 1rem; }
.book-count { font: 600 .95rem/1 var(--font-display); font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: center; }

/* ---------- about ---------- */
.about > section { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; }
.about__title {
  max-width: 36ch; margin: 0 0 1.25rem; text-wrap: balance;
  font: 400 clamp(1.9rem, 4.4vw, 3.6rem)/1.15 var(--font-body); letter-spacing: -.01em; color: var(--ink);
}
.about__sub { margin: 0; color: var(--ink-soft); }
.about__image { margin: 0; height: 46vh; min-height: 18rem; overflow: hidden; background: var(--azul-profundo); }
.about__image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
/* Three short lines with air between them: no numbering, no separators. */
.about__facts .facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(1.25rem, 3vw, 2rem); grid-template-columns: minmax(0, 1fr);
}
.fact { margin: 0; max-width: 24ch; font: 400 clamp(1.3rem, 2.4vw, 1.75rem)/1.3 var(--font-body); color: var(--ink); }
@media (min-width: 900px) {
  .about__facts .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
}
.about .about__how { padding-top: 0; }
.about__how h2, .about__how p { max-width: 40rem; }
.about__how p { color: var(--ink-soft); }
.about__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ---------- contact ---------- */
.contacto { max-width: var(--max); margin: 0 auto; }
.contacto__grid { display: grid; gap: 1rem; }
.contacto__card { background: var(--surface); padding: 1.5rem; display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.contacto__card h2 { margin: 0; font: italic 400 1.05rem/1.3 var(--font-body); color: var(--label); }
.contacto__card--main { background: var(--azul-profundo); color: var(--blanco); }
.contacto__card--main h2 { color: var(--gris-tela); }
.contacto__card--main .tag-ejemplo { color: var(--blanco); background: rgba(255, 255, 255, .15); }
.contacto__dato { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.contacto__card--main .contacto__dato { font-size: clamp(1.5rem, 5vw, 2.1rem); }
.horario { list-style: none; margin: 0; padding: 0; width: 100%; }
.horario li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule-soft); padding: .4rem 0; }
@media (min-width: 900px) { .contacto__grid { grid-template-columns: 1.3fr 1fr 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--azul-profundo); color: var(--ink-on-dark); padding: 3rem var(--pad) 2rem; font-size: .95rem; }
.site-footer a { color: var(--blanco); }
.site-footer .tag-ejemplo { color: var(--blanco); background: rgba(255, 255, 255, .15); }
.footer-grid { max-width: var(--max); margin: 0 auto; display: grid; gap: 1.25rem; }
.footer-grid p { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.footer-logo { width: 200px; background: var(--blanco); padding: .5rem .75rem; margin-bottom: 1rem; }
.footer-note { max-width: var(--max); margin: 2rem auto 0; font-size: .85rem; color: var(--gris-tela); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1fr 1.3fr 1.3fr; } }

/* Reduced motion: no smooth scroll, transitions become instant (GSAP is skipped in app.js). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
