/* Ficha 100 · estilos
   Dirección A: papel y verde botella. Terracota = lo que encontramos; verde = lo corregido. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-opsz.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --papel: #F6F1E7;
  --hueso: #FFFDF8;
  --tinta: #1D2A24;
  --tinta-suave: #34423B;
  --botella: #1F5A44;
  --botella-hover: #174735;
  --salvia: #A9C4B0;
  --terracota: #C8553D;
  --terracota-texto: #A8432E;
  --durazno: #F0B99A;
  --arena: #E3D3B4;
  --linea: #D9CCB2;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(5rem, 11vw, 9.5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
@media (min-width: 64rem) {
  body { font-size: 1.125rem; }
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ol, ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

a { color: var(--botella); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--botella);
  outline-offset: 3px;
  border-radius: 2px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: .75rem 1rem;
  background: var(--tinta);
  color: var(--hueso);
  border-radius: 4px;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.eyebrow,
.row-num,
.card-tag,
.launch-tag {
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--botella);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.25rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  background: var(--botella);
  color: var(--hueso);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s var(--ease);
}
.btn:hover { background: var(--botella-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-small { min-height: 2.75rem; padding: .55rem 1.1rem; font-size: .9375rem; }
.btn-light { background: var(--hueso); color: var(--botella); }
.btn-light:hover { background: var(--papel); }
.btn-icon { width: 1.25rem; height: 1.25rem; flex: none; }

/* Cabecera */
.site-header { padding-block: 1.1rem; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--tinta);
  text-decoration: none;
  min-height: 2.75rem;
}
.brand-name { font-family: var(--serif); font-size: 1.5rem; line-height: 1; }
.brand-num {
  font-family: var(--mono);
  font-size: .875rem;
  line-height: 1;
  padding: .3rem .4rem;
  border: 1.5px solid var(--tinta);
  border-radius: 2px;
}
.nav { display: none; gap: 2rem; font-size: .9375rem; }
.nav a { color: var(--tinta-suave); text-decoration: none; padding-block: .6rem; }
.nav a:hover { color: var(--tinta); text-decoration: underline; }
@media (min-width: 60rem) {
  .nav { display: flex; }
}

/* Hero */
.hero { padding-top: clamp(3rem, 9vw, 7rem); }
.hero .eyebrow { margin-bottom: 1.5rem; }
.hero h1 {
  font-size: clamp(2.75rem, 1.4rem + 6.4vw, 6rem);
  line-height: 1;
  letter-spacing: -.02em;
  max-width: 13ch;
}
.lead {
  margin-top: 1.75rem;
  max-width: 36rem;
  font-size: clamp(1.125rem, 1rem + .5vw, 1.3125rem);
  color: var(--tinta-suave);
}
.cta-row {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.cta-note { font-size: .9375rem; color: var(--tinta-suave); }

.tiles {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.tiles .tile { width: 100%; height: auto; aspect-ratio: 1; }
@media (min-width: 48rem) {
  .tiles { grid-template-columns: repeat(8, 1fr); }
}

/* Secciones */
.section { padding-block: var(--section); }
.section-tint { background: var(--hueso); }
.section-head { max-width: 44rem; margin-bottom: clamp(3rem, 7vw, 5.5rem); }
.section-head .eyebrow { margin-bottom: 1rem; }
.section h2 {
  font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -.015em;
}
.section-intro { margin-top: 1.25rem; color: var(--tinta-suave); max-width: 36rem; }

/* Filas texto + gráfico */
.rows { display: grid; gap: clamp(4.5rem, 10vw, 8rem); }
.row { display: grid; gap: 2rem; align-items: center; }
.row-text { max-width: 30rem; }
.row-num { margin-bottom: .9rem; }
.row h3 {
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.row-text p + p { margin-top: .9rem; }
.row-fix {
  padding-left: 1rem;
  border-left: 3px solid var(--botella);
  color: var(--tinta);
  font-weight: 500;
}
.fig svg { width: 100%; height: auto; }
@media (min-width: 52rem) {
  .row { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 7rem); }
  .row:nth-child(even) .fig { order: -1; }
  .row:nth-child(even) .row-text { justify-self: end; }
}

/* Pasos */
.steps { display: grid; gap: 3rem; counter-reset: paso; }
.step { border-top: 1.5px solid var(--tinta); padding-top: 1.5rem; }
.step-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(3.5rem, 2.8rem + 3vw, 5rem);
  line-height: 1;
  color: var(--botella);
  margin-bottom: 1.25rem;
}
.step h3 { font-size: 1.625rem; line-height: 1.15; margin-bottom: .75rem; }
.step p { color: var(--tinta-suave); }
@media (min-width: 52rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); }
}

/* Tira de formas */
.strip { overflow: hidden; }
.strip-track { display: flex; width: max-content; }
.strip .tile { width: clamp(5.5rem, 12vw, 10rem); height: auto; aspect-ratio: 1; flex: none; }

/* Tarjetas de hallazgos */
.cards { display: grid; gap: 1.25rem; }
.card {
  background: var(--hueso);
  border: 1px solid var(--linea);
  border-radius: 4px;
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
}
.card-band { width: 6.75rem; height: auto; aspect-ratio: 3 / 1; margin-bottom: 1.5rem; }
.card-tag { color: var(--terracota-texto); margin-bottom: .6rem; }
.card-title {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.25;
  margin-bottom: .9rem;
}
.card-note { color: var(--tinta-suave); font-size: 1rem; margin-top: auto; }
@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 64rem) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .card { padding: 2rem 2rem 2.25rem; }
}

/* Precio */
.section-dark { background: var(--botella); color: var(--hueso); }
.section-dark .eyebrow,
.section-dark .launch-tag { color: var(--arena); }
.section-dark :focus-visible { outline-color: var(--hueso); }
.price { display: grid; gap: 3rem; }
.price-main h2 { margin-block: 1rem 1.25rem; }
.price-main p:not(.eyebrow) { color: var(--papel); max-width: 34rem; }
.launch {
  border: 1.5px solid var(--arena);
  border-radius: 4px;
  padding: 1.75rem;
  align-self: start;
}
.launch-tag { margin-bottom: .75rem; }
.launch-title { font-family: var(--serif); font-size: 1.625rem; line-height: 1.2; margin-bottom: .75rem; }
.launch p:not(.launch-tag):not(.launch-title) { color: var(--papel); }
.launch-slots {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(227, 211, 180, .45);
  font-family: var(--mono);
  font-size: .9375rem;
}
.launch-slots strong { font-weight: 400; color: var(--hueso); background: rgba(255, 253, 248, .12); padding: .15rem .45rem; border-radius: 2px; }
.price-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.price-cta p { color: var(--papel); }
@media (min-width: 52rem) {
  .price { grid-template-columns: 1.3fr 1fr; column-gap: clamp(3rem, 7vw, 7rem); }
  .price-cta { grid-column: 1 / -1; border-top: 1px solid rgba(227, 211, 180, .45); padding-top: 2.5rem; }
}

/* Preguntas frecuentes */
.faq { border-top: 1.5px solid var(--tinta); max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.5rem;
  padding-block: 1.25rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  background:
    linear-gradient(var(--botella), var(--botella)) center / 100% 2px no-repeat,
    linear-gradient(var(--botella), var(--botella)) center / 2px 100% no-repeat;
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--botella); }
.faq details p { padding-bottom: 1.5rem; max-width: 40rem; color: var(--tinta-suave); }
@media (min-width: 64rem) {
  .faq-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: start; }
  .faq-wrap .section-head { margin-bottom: 0; }
}

/* Contacto */
.contact { padding-top: 0; }
.contact-box {
  background: var(--salvia);
  border-radius: 4px;
  padding: clamp(1.5rem, 6vw, 4.5rem);
}
.contact-box .eyebrow { margin-bottom: 1rem; color: var(--tinta); }
.contact-box h2 { max-width: 16ch; }
.contact-box > p:not(.eyebrow) { margin-top: 1.25rem; max-width: 34rem; color: var(--tinta); }
.contact-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.contact-list {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(29, 42, 36, .25);
  display: grid;
  gap: .25rem;
}
.contact-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1rem; }
.contact-label {
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  min-width: 5.5rem;
}
.contact-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--tinta);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* Pie */
.site-footer { border-top: 1px solid var(--linea); padding-block: 3rem 6rem; font-size: .9375rem; color: var(--tinta-suave); }
.footer-inner { display: grid; gap: .5rem; }
.brand-footer { margin-bottom: .75rem; color: var(--tinta); }
.disclaimer { color: var(--tinta); }
.copy { margin-top: .75rem; font-family: var(--mono); font-size: .8125rem; }
@media (min-width: 52rem) {
  .site-footer { padding-bottom: 3rem; }
}

/* Botón flotante (solo celular, lo muestra main.js) */
.fab {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 3rem;
  padding: .7rem 1.15rem;
  border-radius: 999px;
  background: var(--botella);
  color: var(--hueso);
  border: 2px solid var(--papel);
  font-weight: 500;
  font-size: .9375rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(29, 42, 36, .22);
  visibility: hidden;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity .25s ease, transform .25s var(--ease), visibility 0s linear .25s;
}
.fab svg { width: 1.25rem; height: 1.25rem; }
.fab.is-visible {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .25s ease, transform .25s var(--ease), visibility 0s;
}
@media (min-width: 52rem) {
  .fab { display: none; }
}

/* ---------- Movimiento ----------
   Todo vive dentro de prefers-reduced-motion: no-preference.
   El estado natural de cada elemento es el final (corregido); los keyframes describen el "antes".
   Si el navegador soporta animaciones ligadas al scroll, avanzan con el scroll.
   Si no, main.js agrega .is-in al entrar en pantalla y corren una sola vez. */

@media (prefers-reduced-motion: no-preference) {

  /* Hero: los mosaicos se destapan en cascada al cargar */
  .tiles .tile { animation: destapar .9s var(--ease) both; }
  .tiles .tile:nth-child(2) { animation-delay: .08s; }
  .tiles .tile:nth-child(3) { animation-delay: .16s; }
  .tiles .tile:nth-child(4) { animation-delay: .24s; }
  .tiles .tile:nth-child(5) { animation-delay: .32s; }
  .tiles .tile:nth-child(6) { animation-delay: .40s; }
  .tiles .tile:nth-child(7) { animation-delay: .48s; }
  .tiles .tile:nth-child(8) { animation-delay: .56s; }

  .f1-fill   { animation-name: f1-fill; }
  .f2-move   { animation-name: f2-move; }
  .f2-ghost  { animation-name: aparecer; }
  .f3-box    { animation-name: f3-box; }
  .f3-cota   { animation-name: aparecer; }
  .f4-dup    { animation-name: f4-dup; }
  .f4-new    { animation-name: f4-new; }
  .f4-slash  { animation-name: f4-slash; }
  .f5-word   { animation-name: f5-word; }
  .f5-count  { animation-name: f5-count; }
  .f6-line   { animation-name: f6-line; }
  .f6-q      { animation-name: f6-q; }

  .stagger > :nth-child(2) { --d: 1; }
  .stagger > :nth-child(3) { --d: 2; }
  .stagger > :nth-child(4) { --d: 3; }
  .stagger > :nth-child(5) { --d: 4; }
  .stagger > :nth-child(6) { --d: 5; }
  .stagger > :nth-child(7) { --d: 6; }

  @supports (animation-timeline: view()) {
    .fig { view-timeline: --fig block; }
    .fx {
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --fig;
      animation-range: entry calc(45% + var(--d, 0) * 5%) cover calc(52% + var(--d, 0) * 2%);
    }
    .reveal {
      animation: subir linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 75%;
    }
    .strip-track {
      animation: deslizar linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }

  @supports not (animation-timeline: view()) {
    .js .fx {
      animation-duration: 1.3s;
      animation-timing-function: var(--ease);
      animation-fill-mode: both;
      animation-delay: calc(.25s + var(--d, 0) * .12s);
      animation-play-state: paused;
    }
    .js .fig.is-in .fx { animation-play-state: running; }
    .js .reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity .8s ease, transform .8s var(--ease); }
    .js .reveal.is-in { opacity: 1; transform: none; }
  }
}

@keyframes destapar {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes subir {
  from { opacity: 0; transform: translateY(1.75rem); }
}
@keyframes deslizar {
  from { transform: translateX(0); }
  to   { transform: translateX(-18%); }
}
@keyframes aparecer {
  from { opacity: 0; }
}
@keyframes f1-fill {
  from { transform: scaleX(0); }
}
.f1-fill { transform-box: fill-box; transform-origin: 0 50%; }

@keyframes f2-move {
  from { transform: translate(80px, -140px); fill: var(--terracota); }
  45%  { transform: translate(80px, -140px); fill: var(--terracota); }
}
@keyframes f3-box {
  from { transform: scale(3, 2.309); fill: var(--terracota); }
  15%  { transform: scale(3, 2.309); fill: var(--terracota); }
}
.f3-box { transform-box: fill-box; transform-origin: 50% 100%; }

@keyframes f4-dup {
  from, 40% { opacity: 1; }
  to { opacity: 0; }
}
.f4-dup { opacity: 0; }
@keyframes f4-new {
  from, 40% { transform: scaleY(0); }
}
.f4-new { transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes f4-slash {
  from, 70% { opacity: 0; transform: scale(.3); }
}
.f4-slash { transform-box: fill-box; transform-origin: 50% 50%; }

@keyframes f5-word {
  from, 30% { fill: var(--terracota); }
}
@keyframes f5-count {
  from, 20% { transform: scaleX(1.28); fill: var(--terracota); }
}
.f5-count { transform-box: fill-box; transform-origin: 0 50%; }

@keyframes f6-line {
  from { transform: scaleX(0); }
}
.f6-line { transform-box: fill-box; transform-origin: 0 50%; }
@keyframes f6-q {
  from, 30% { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(16px); }
}
.f6-q { opacity: 0; }
