/* =============================================================
   tresdé — hoja de estilos
   Paleta del manual: terracota #C64D2B · crema #F4E2AF · carbón #1B2021
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --terracota: #C64D2B;
  --terracota-ink: #A53C1F;   /* terracota más oscura para texto pequeño sobre crema (contraste) */
  --crema: #F4E2AF;
  --paper: #FBF2D8;            /* crema muy clara para fondos de lectura */
  --paper-text: #FFF4D6;       /* texto pequeño sobre terracota / carbón */
  --carbon: #1B2021;
  --field: #FFF9E8;

  --display: "Fredoka", "Berlin Sans FB", "Trebuchet MS", system-ui, sans-serif;
  --sans: "Cabin", "Gill Sans MT", "Gill Sans", "Trebuchet MS", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 72px;
  --radius: 28px;
}

/* =============================================================
   2. Reset y base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
}
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--carbon);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.04; text-wrap: balance; }
[hidden] { display: none !important; }
html.no-scroll { overflow: hidden; }
::selection { background: var(--terracota); color: var(--crema); }
:focus-visible { outline: 3px solid var(--terracota); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible, .process :focus-visible, .contact-copy :focus-visible, .footer :focus-visible { outline-color: var(--crema); }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--carbon); color: var(--crema); border-radius: 12px;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.container { width: min(1240px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section { padding-block: clamp(72px, 10vw, 150px); position: relative; }

.kicker {
  font-family: var(--sans); font-weight: 700; font-size: .92rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--terracota-ink);
  margin-bottom: 1rem;
}
.kicker-cream { color: var(--crema); }
.kicker-terracota { color: var(--terracota-ink); }

.display { font-size: clamp(2.3rem, 5.6vw, 4.8rem); letter-spacing: -.01em; }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.55; font-weight: 500; }
.note { font-size: .92rem; opacity: .8; margin-top: .9rem; }
.note-center { text-align: center; margin-top: 2rem; }
.brand { font-family: var(--display); font-weight: 600; font-style: normal; }

/* =============================================================
   4. Componentes
   ============================================================= */
/* Botones */
.btn {
  --btn-bg: var(--carbon); --btn-fg: var(--crema); --btn-bd: var(--carbon); --btn-sh: var(--carbon);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .95em 1.7em; border-radius: 999px;
  font-family: var(--display); font-weight: 500; font-size: 1.05rem; line-height: 1.1; text-align: center;
  background: var(--btn-bg); color: var(--btn-fg); border: 2px solid var(--btn-bd);
  box-shadow: 0 4px 0 var(--btn-sh);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background .25s, color .25s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--btn-sh); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-sh); }
.btn-sm { padding: .6em 1.2em; font-size: .95rem; box-shadow: 0 3px 0 var(--btn-sh); }
.btn-cream { --btn-bg: var(--crema); --btn-fg: var(--carbon); --btn-bd: var(--crema); --btn-sh: var(--carbon); }
.btn-terracota { --btn-bg: var(--terracota); --btn-fg: var(--paper-text); --btn-bd: var(--terracota); --btn-sh: var(--carbon); }
.btn-ghost-cream { --btn-bg: transparent; --btn-fg: var(--crema); --btn-bd: var(--crema); --btn-sh: rgba(27,32,33,.55); }
.btn-ghost-cream:hover { --btn-bg: var(--crema); --btn-fg: var(--terracota-ink); }
.btn-ghost-carbon { --btn-bg: transparent; --btn-fg: var(--carbon); --btn-bd: var(--carbon); --btn-sh: transparent; box-shadow: none; }
.btn-ghost-carbon:hover { box-shadow: none; background: var(--carbon); color: var(--crema); }

.chip {
  display: inline-block; padding: .25em .8em; border-radius: 999px;
  background: var(--carbon); color: var(--crema); font-family: var(--display); font-weight: 500; font-size: 1rem;
}

/* Cursor con tilde (solo ratón) */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: var(--carbon); color: var(--crema); border: 2px solid var(--crema);
  font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1;
  opacity: 0; transition: opacity .25s var(--ease-out), background .25s, scale .3s var(--ease-bounce);
}
.cursor span { display: block; transform: translateY(4px); }
.cursor.is-ready { opacity: .95; }
.cursor.is-link { scale: 1.7; background: var(--terracota); }
@media (hover: hover) and (pointer: fine) { .cursor { display: flex; } }

/* Revelado al hacer scroll (el contenido siempre está en el HTML) */
.js .reveal { opacity: 0; translate: 0 32px; transition: opacity .8s var(--ease-out), translate .8s var(--ease-out); }
.js .reveal.is-in { opacity: 1; translate: 0 0; }
.reveal[data-split] { opacity: 1; translate: none; }

/* Inclinación 3D suave en tarjetas (solo con ratón) */
@media (hover: hover) and (pointer: fine) {
  [data-tilt] {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
  }
}

/* Tildes que caen sobre las "e" */
.tw { display: inline-block; white-space: nowrap; }
.te { position: relative; display: inline-block; }
.te i {
  position: absolute; left: .17em; top: .05em; width: .24em; height: .075em; border-radius: .06em;
  background: var(--terracota); font-style: normal;
  opacity: 0; transform: translateY(-1.6em) rotate(-70deg);
  pointer-events: none;
}
.contact .te i { background: var(--crema); }
.is-in .te i { animation: tildeDrop .8s var(--ease-bounce) forwards; animation-delay: calc(var(--i, 0) * 70ms + .25s); }
.te.is-hover i { animation: tildeDrop .7s var(--ease-bounce) forwards; animation-delay: 0s; }
@keyframes tildeDrop {
  0% { opacity: 0; transform: translateY(-1.8em) rotate(-75deg); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) rotate(-34deg); }
}

/* =============================================================
   5. Navegación
   ============================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  transition: background .3s, box-shadow .3s;
  color: var(--crema);
}
.nav-inner { width: min(1320px, calc(100% - 2 * var(--gutter))); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo { display: block; width: 104px; }
.logo-on-light { display: none; }
.nav-links { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 2rem); font-weight: 600; font-size: .98rem; }
.nav-links a:not(.btn) { position: relative; padding: .3rem 0; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav .nav-cta { --btn-bg: var(--crema); --btn-fg: var(--carbon); --btn-bd: var(--crema); }
.nav.is-solid { background: rgba(251, 242, 216, .96); color: var(--carbon); box-shadow: 0 1px 0 rgba(27, 32, 33, .14); }
@supports (backdrop-filter: blur(10px)) { .nav.is-solid { background: rgba(251, 242, 216, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); } }
.nav.is-solid .logo-on-dark { display: none; }
.nav.is-solid .logo-on-light { display: block; }
.nav.is-solid .nav-cta { --btn-bg: var(--terracota); --btn-fg: var(--paper-text); --btn-bd: var(--terracota); }

.nav-toggle { display: none; width: 44px; height: 44px; position: relative; border-radius: 50%; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 3px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease-out), top .35s var(--ease-out); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav.is-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 719px) {
  .js .nav-toggle { display: block; }
  .nav-links { flex-wrap: wrap; justify-content: flex-end; font-size: .88rem; gap: .5rem 1rem; }
  .js .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--terracota); color: var(--crema); padding: 8px var(--gutter) 28px;
    display: none; font-size: 1.4rem; font-family: var(--display);
  }
  .js .nav.is-open .nav-links { display: flex; animation: menuIn .35s var(--ease-out); }
  .js .nav-links a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid rgba(244, 226, 175, .3); }
  .js .nav-links .btn { margin-top: 1.2rem; align-self: flex-start; }
  .js .nav.is-open { background: var(--terracota); color: var(--crema); box-shadow: none; }
  .js .nav.is-open .logo-on-dark { display: block; }
  .js .nav.is-open .logo-on-light { display: none; }
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* =============================================================
   6. Secciones
   ============================================================= */
/* ---- Hero ---- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  background: var(--terracota); color: var(--crema);
  padding: calc(var(--nav-h) + 28px) var(--gutter) clamp(170px, 27vw, 320px);
  overflow: clip;
}
.hero-inner { position: relative; z-index: 3; width: min(760px, 100%); display: flex; flex-direction: column; align-items: center; }
.hero .kicker { margin-bottom: 1.2rem; }
.hero-logo { width: 100%; }
.hero-logo img { width: 100%; }
.hero-line { width: 100%; margin-top: .4rem; }
.hero-line img { width: 100%; clip-path: inset(0 100% 0 0); animation: lineDraw 1.7s var(--ease-soft) .55s forwards; }
@keyframes lineDraw { to { clip-path: inset(0 0 0 0); } }
.hero-lema { margin-top: 1.4rem; font-family: var(--display); font-weight: 500; font-size: clamp(1.25rem, 2.6vw, 1.9rem); line-height: 1.2; color: var(--paper-text); }
.hero-actions { margin-top: 1.8rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }
.hero-in { animation: heroIn .95s var(--ease-out) var(--d, 0s) both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hero-crew {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; justify-content: center; align-items: flex-end; gap: clamp(20px, 9vw, 150px);
  pointer-events: none;
}
.crew { width: auto; height: clamp(120px, 20vw, 270px); margin-bottom: -10px; transform-origin: 50% 100%; animation: crewPop .9s var(--ease-bounce) both; }
.crew-1 { animation-delay: 1.15s; }
.crew-2 { animation-delay: 1.3s; height: clamp(130px, 22vw, 295px); }
.crew-3 { animation-delay: 1.45s; }
@keyframes crewPop { from { transform: translateY(75%) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (hover: hover) { .hero-crew { pointer-events: auto; } .crew:hover { animation: crewJump .6s var(--ease-bounce); } }
@keyframes crewJump { 0% { transform: none; } 40% { transform: translateY(-22px) rotate(3deg) scale(1.03); } 100% { transform: none; } }

.hero-tiles { display: none; }
@media (min-width: 960px) {
  .hero-tiles { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
  .tile {
    position: absolute; width: clamp(130px, 14vw, 230px); height: auto;
    filter: drop-shadow(0 22px 22px rgba(27, 32, 33, .38));
    translate: calc(var(--mx, 0) * var(--depth, 10) * 1px) calc(var(--my, 0) * var(--depth, 10) * 1px);
    animation: tilePop 1s var(--ease-bounce) both, tileBob 7s ease-in-out 2s infinite alternate;
  }
  .tile-1 { left: 4%; top: 19%; rotate: -12deg; animation-delay: 1.2s, 2s; }
  .tile-2 { right: 5%; top: 16%; rotate: 9deg; animation-delay: 1.35s, 2.4s; }
  .tile-3 { left: 11%; top: 49%; rotate: 7deg; animation-delay: 1.5s, 2.8s; }
  .tile-4 { right: 12%; top: 47%; rotate: -8deg; animation-delay: 1.65s, 3.2s; }
}
@keyframes tilePop { from { opacity: 0; scale: .5; } to { opacity: 1; scale: 1; } }
@keyframes tileBob { from { margin-top: 0; } to { margin-top: -14px; } }

/* ---- Marquee ---- */
.marquee { background: var(--carbon); color: var(--crema); overflow: hidden; padding: 18px 0; border-block: 3px solid var(--crema); }
.marquee-track { display: flex; align-items: center; gap: 2rem; width: max-content; font-family: var(--display); font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 2rem); white-space: nowrap; padding-right: 2rem; }
.marquee-track img { width: 34px; height: 34px; flex: none; }
.js .marquee-track { animation: marquee 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- Tenemos tilde ---- */
.manifesto { background: var(--crema); }
.manifesto-grid { display: grid; gap: 2rem; align-items: center; }
.manifesto-mark { display: grid; place-items: center; }
.mark-circle { width: min(280px, 56vw); filter: drop-shadow(0 18px 0 rgba(27, 32, 33, .12)); }
.manifesto-copy .display { margin-bottom: 1.6rem; }
.manifesto-copy p + p { margin-top: 1rem; }
.manifesto-copy .lead { max-width: 34em; }
.manifesto-copy p { max-width: 36em; }
.sign { font-family: var(--display); font-size: 1.35rem; font-weight: 500; color: var(--terracota-ink); }
@media (min-width: 960px) {
  .manifesto-grid { grid-template-columns: .55fr 1.45fr; gap: clamp(2rem, 6vw, 6rem); }
  .manifesto-mark { align-self: start; padding-top: 3.2rem; }
  .mark-circle { width: min(340px, 100%); }
}

.pillars { display: grid; gap: 1.2rem; margin-top: clamp(48px, 7vw, 96px); }
.pillar {
  position: relative; display: block; padding: 1.8rem 1.8rem 1.6rem; border-radius: var(--radius);
  background: var(--paper); border: 2px solid var(--carbon); box-shadow: 0 6px 0 var(--carbon);
}
.pillar:nth-child(2) { background: var(--terracota); color: var(--paper-text); }
.pillar:nth-child(3) { background: var(--carbon); color: var(--paper-text); border-color: var(--carbon); box-shadow: 0 6px 0 var(--terracota); }
.pillar-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--crema); color: var(--carbon); font-family: var(--display); font-weight: 600; margin-bottom: 1rem; }
.pillar h3 { font-size: 1.8rem; margin-bottom: .5rem; }
.pillar p { font-size: 1.02rem; }
.pillar-go { display: inline-block; margin-top: 1.1rem; font-family: var(--display); font-weight: 500; transition: transform .3s var(--ease-out); }
.pillar:hover .pillar-go { transform: translateX(6px); }
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, 1fr); } }

/* ---- Catálogo ---- */
.catalog { background: var(--paper); }
.catalog .display { max-width: 18em; }
.tabs {
  display: flex; flex-wrap: wrap; gap: .5rem; margin: 2.2rem 0 2.8rem; padding: .4rem;
  width: fit-content; max-width: 100%; border: 2px solid var(--carbon); border-radius: 999px; background: var(--crema);
}
.tab { padding: .7em 1.3em; border-radius: 999px; font-family: var(--display); font-weight: 500; font-size: 1.02rem; transition: background .3s var(--ease-out), color .3s var(--ease-out), transform .3s var(--ease-out); }
.tab:hover { transform: translateY(-2px); }
.tab[aria-selected="true"] { background: var(--carbon); color: var(--crema); }
@media (max-width: 539px) { .tabs { border-radius: 28px; width: 100%; } .tab { flex: 1 1 100%; } }

.js .panel { display: none; }
.js .panel.is-active { display: block; animation: panelIn .6s var(--ease-out); }
.panel + .panel { margin-top: 4rem; }
.js .panel + .panel { margin-top: 0; }
@keyframes panelIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.panel-intro { max-width: 40em; margin-bottom: 1rem; }
.panel-title { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: .8rem; }

/* Cápsula */
.capsule-head { display: grid; gap: 2.4rem; align-items: start; }
.capsule-title { font-size: clamp(3.6rem, 12vw, 8.5rem); line-height: .9; color: var(--terracota); margin-bottom: 1.2rem; letter-spacing: -.02em; }
.capsule-copy .lead { max-width: 30em; }
.price-box { margin: 1.8rem 0 1.6rem; padding: 1.2rem 1.4rem; border-radius: 24px; background: var(--crema); border: 2px dashed var(--carbon); max-width: 26rem; }
.price-main { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; }
.price-main span { font-weight: 600; }
.price-main strong { font-family: var(--display); font-weight: 600; font-size: 2.4rem; line-height: 1; color: var(--terracota-ink); }
.price-alt { margin-top: .4rem; font-size: .98rem; }
.capsule-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ph { border-radius: var(--radius); overflow: hidden; box-shadow: 0 26px 40px -22px rgba(27, 32, 33, .55); background: var(--crema); }
.ph img { width: 100%; }
.ph-b { margin-top: clamp(28px, 6vw, 70px); }
@media (min-width: 960px) { .capsule-head { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); } }

.product-grid { display: flex; gap: 1rem; margin-top: clamp(40px, 6vw, 72px); overflow-x: auto; overflow-y: visible; scroll-snap-type: x mandatory; padding: 1rem var(--gutter) 2rem; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: thin; }
.product { position: relative; flex: 0 0 76%; scroll-snap-align: center; padding: 1.1rem 1.1rem 1.3rem; border-radius: var(--radius); background: var(--crema); border: 2px solid var(--carbon); transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); transform-style: preserve-3d; }
.product-img { aspect-ratio: 1; display: grid; place-items: center; margin-bottom: .8rem; }
.product-img img { width: 88%; filter: drop-shadow(0 18px 16px color-mix(in srgb, var(--glow, #333) 55%, transparent)); transition: transform .5s var(--ease-out); }
@supports not (color: color-mix(in srgb, red 50%, blue)) { .product-img img { filter: drop-shadow(0 18px 16px rgba(27, 32, 33, .3)); } }
.product h4 { font-size: 1.55rem; }
.product-open { font: inherit; text-align: left; }
.product-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.product-meta { display: flex; align-items: center; justify-content: space-between; margin-top: .7rem; }
.product-ask { position: relative; z-index: 2; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; color: var(--terracota-ink); }
.product-ask:hover { color: var(--carbon); }
@media (hover: hover) and (pointer: fine) {
  .product:hover { box-shadow: 0 22px 0 -8px var(--glow, #333), 0 32px 40px -20px rgba(27, 32, 33, .5); }
  .product:hover .product-img img { transform: translateZ(40px) scale(1.07) rotate(-3deg); }
}
@media (min-width: 720px) {
  .product-grid { display: grid; grid-template-columns: repeat(2, 1fr); overflow: visible; padding: 0; margin-inline: 0; }
  .product { flex: none; }
}
@media (min-width: 960px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 1.2rem; } .product:nth-child(even) { margin-top: 36px; } }

/* Encargos */
.case { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: clamp(48px, 7vw, 100px); }
.case-media { position: relative; }
.case-media-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.frame { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--crema); box-shadow: 0 28px 40px -24px rgba(27, 32, 33, .6); border: 2px solid var(--carbon); }
.frame img { width: 100%; }
.frame-down { margin-top: clamp(24px, 6vw, 64px); }
.frame-figure { background: #e6e6e8; max-width: 640px; }
.badge-wip { position: absolute; top: 14px; left: 14px; rotate: -6deg; padding: .35em .9em; border-radius: 999px; background: var(--terracota); color: var(--paper-text); font-family: var(--display); font-weight: 500; font-size: .95rem; box-shadow: 0 3px 0 var(--carbon); }
.case-copy h3 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: 1rem; }
.case-copy p { max-width: 34em; }
.mini-steps { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; counter-reset: ms; }
.mini-steps li { counter-increment: ms; display: inline-flex; align-items: center; gap: .5em; padding: .35em .9em .35em .45em; border-radius: 999px; border: 2px solid var(--carbon); font-size: .92rem; font-weight: 600; background: var(--paper); }
.mini-steps li::before { content: counter(ms); display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--carbon); color: var(--crema); font-family: var(--display); font-size: .85em; }
.mini-steps li.is-now { background: var(--terracota); color: var(--paper-text); border-color: var(--terracota); }
.mini-steps li.is-now::before { background: var(--crema); color: var(--carbon); }
@media (min-width: 960px) {
  .case { grid-template-columns: 1.1fr 1fr; }
  .case-flip .case-media { order: 2; }
}
.cta-band { margin-top: clamp(56px, 8vw, 110px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; padding: clamp(1.4rem, 3vw, 2.2rem) clamp(1.4rem, 4vw, 3rem); border-radius: var(--radius); background: var(--terracota); color: var(--paper-text); }
.cta-band p { font-family: var(--display); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.1; }
.cta-band em { font-style: normal; color: var(--crema); }

/* Modelos 3D */
.files-card { display: grid; gap: 2rem; padding: clamp(1.6rem, 4vw, 3.4rem); border-radius: 36px; background: var(--terracota); color: var(--paper-text); overflow: hidden; align-items: end; }
.files-card .panel-title { color: var(--crema); }
.files-list { margin: 1.6rem 0 2rem; display: grid; gap: .8rem; }
.files-list li { display: flex; gap: .8rem; align-items: center; font-weight: 600; }
.files-list li span { flex: none; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--crema); color: var(--carbon); font-family: var(--display); }
.files-crew { display: flex; justify-content: center; align-items: flex-end; gap: 1.2rem; }
.files-crew img { height: clamp(150px, 26vw, 280px); width: auto; margin-bottom: -2.2rem; }
@media (min-width: 960px) { .files-card { grid-template-columns: 1.3fr 1fr; } .files-card .files-crew { margin-bottom: -3.4rem; } }

/* ---- Proceso ---- */
.process { background: var(--carbon); color: var(--paper-text); overflow: clip; }
.process .display { color: var(--crema); max-width: 14em; }
.scribble { position: absolute; left: 0; width: 100%; height: 300px; top: 16%; opacity: .22; pointer-events: none; }
.scribble path { fill: none; stroke: var(--crema); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.js .scribble path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 3s var(--ease-soft); }
.js .process.is-in .scribble path { stroke-dashoffset: 0; }
.process-grid { position: relative; display: grid; gap: 3rem; align-items: center; }
.steps-list { margin-top: 2.4rem; display: grid; gap: 1.8rem; }
.steps-list li { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; }
.step-n { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--terracota); color: var(--paper-text); font-family: var(--display); font-weight: 600; font-size: 1.5rem; }
.steps-list h3 { font-size: 1.6rem; color: var(--crema); margin-bottom: .3rem; }
.steps-list p { max-width: 32em; }
.process-photo { position: relative; rotate: 2deg; border-radius: var(--radius); overflow: hidden; border: 4px solid var(--crema); background: var(--crema); }
.process-photo img { width: 100%; }
.process-photo figcaption { padding: 1rem 1.2rem; background: var(--crema); color: var(--carbon); font-family: var(--display); font-weight: 500; font-size: 1.15rem; }
@media (min-width: 960px) { .process-grid { grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 6rem); } }

/* ---- Contacto ---- */
.contact { background: var(--terracota); color: var(--paper-text); }
.contact .display { color: var(--crema); margin-bottom: 1.2rem; }
.contact-grid { display: grid; gap: 2.6rem; align-items: start; }
.contact-lines { margin-top: 2rem; display: grid; gap: .8rem; font-weight: 600; }
.contact-lines li { display: flex; flex-wrap: wrap; gap: .2rem 1rem; padding-bottom: .8rem; border-bottom: 1px solid rgba(244, 226, 175, .4); }
.contact-lines span { min-width: 7.5rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .82rem; color: var(--crema); padding-top: .3em; }
.contact-lines a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; word-break: break-word; }
.contact-crew { display: none; }
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); }
  .contact-crew { display: block; margin-top: 2.5rem; }
  .contact-crew img { height: 230px; width: auto; }
}

.form-card { position: relative; padding: clamp(1.4rem, 4vw, 2.8rem); border-radius: 36px; background: var(--paper); color: var(--carbon); border: 3px solid var(--carbon); box-shadow: 0 10px 0 var(--carbon); }
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: .6rem; }
.stepper li { position: relative; flex: 1; display: flex; align-items: center; }
.stepper li:last-child { flex: none; }
.stepper li::after { content: ""; flex: 1; height: 3px; margin: 0 .5rem; border-radius: 2px; background: rgba(27, 32, 33, .2); }
.stepper li:last-child::after { display: none; }
.stepper span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--carbon); font-family: var(--display); font-weight: 500; background: var(--paper); transition: background .3s, color .3s; }
.stepper .is-done span { background: var(--carbon); color: var(--crema); }
.stepper .is-done::after { background: var(--carbon); }
.stepper .is-current span { background: var(--terracota); color: var(--paper-text); border-color: var(--terracota); }
.step-count { font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--terracota-ink); margin-bottom: 1.4rem; }

.fstep { border: 0; padding: 0; margin: 0; min-width: 0; }
.fstep + .fstep { margin-top: 2rem; }
.fstep legend { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.1; margin-bottom: 1.2rem; padding: 0; }
.js .fstep { display: none; margin-top: 0; }
.js .fstep.is-active { display: block; animation: stepIn .45s var(--ease-out); }
@keyframes stepIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .3rem; }
.field label small { font-weight: 500; opacity: .7; }
.help { font-size: .92rem; opacity: .8; margin-bottom: .5rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; padding: .85em 1em; border-radius: 16px; border: 2px solid var(--carbon); background: var(--field); font: inherit; color: var(--carbon);
  transition: border-color .25s, box-shadow .25s;
}
textarea { resize: vertical; min-height: 7.5em; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--terracota); box-shadow: 0 0 0 4px rgba(198, 77, 43, .22); }
.field.has-error input, .field.has-error textarea { border-color: #b3261e; }
.form-error { margin: .4rem 0 1rem; padding: .7em 1em; border-radius: 14px; background: #fbe3df; color: #7a1a13; font-weight: 600; }

.choices { display: grid; gap: .8rem; }
.choice { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-box { display: block; padding: 1rem 1.2rem; border-radius: 20px; border: 2px solid var(--carbon); background: var(--field); transition: transform .3s var(--ease-out), background .25s, color .25s, box-shadow .25s; }
.choice-box strong { display: block; font-family: var(--display); font-weight: 500; font-size: 1.2rem; }
.choice-box small { display: block; font-size: .95rem; opacity: .8; }
.choice:hover .choice-box { transform: translateY(-2px); box-shadow: 0 4px 0 var(--carbon); }
.choice input:checked + .choice-box { background: var(--carbon); color: var(--crema); box-shadow: 0 4px 0 var(--terracota); }
.choice input:focus-visible + .choice-box { outline: 3px solid var(--terracota); outline-offset: 3px; }

.form-nav { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: flex-end; margin-top: 1.6rem; }
.js [data-submit] { display: none; }
.js .is-last [data-submit] { display: inline-flex; }
.js .is-last [data-next] { display: none; }
html:not(.js) [data-next], html:not(.js) [data-prev], html:not(.js) .stepper, html:not(.js) .step-count { display: none; }

.form-done { text-align: center; padding: 1rem 0; }
.form-done h3 { font-size: 2.2rem; margin: 1rem 0 .6rem; }
.form-done .form-nav { justify-content: center; }
.done-check { width: 120px; height: 120px; margin-inline: auto; }
.done-check circle, .done-check path { fill: none; stroke: var(--terracota); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.form-done:not([hidden]) .done-check circle { animation: draw .9s var(--ease-soft) forwards; }
.form-done:not([hidden]) .done-check path { animation: draw .7s var(--ease-soft) .8s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---- Footer ---- */
.footer { position: relative; background: var(--carbon); color: var(--paper-text); padding: clamp(56px, 8vw, 100px) 0 28px; overflow: clip; text-align: center; }
.footer-grid { display: grid; gap: 2.4rem; text-align: left; align-items: start; }
.footer-brand img { width: clamp(180px, 22vw, 260px); }
.footer-brand p { margin-top: .6rem; font-family: var(--display); font-size: 1.15rem; color: var(--crema); }
.footer-links, .footer-contact { display: grid; gap: .5rem; font-weight: 600; justify-items: start; }
.footer-links a, .footer-contact a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 2px; transition: text-decoration-color .25s; }
.footer-links a:hover, .footer-contact a:hover { text-decoration-color: var(--crema); }
.footer-crew { display: flex; justify-content: center; align-items: flex-end; gap: clamp(16px, 6vw, 80px); margin-top: clamp(40px, 6vw, 80px); }
.footer-crew img { height: clamp(90px, 14vw, 170px); width: auto; margin-bottom: -4px; }
.footer-line { margin-top: 0; opacity: .85; }
.footer-line img { width: 100%; max-width: none; }
.footer-copy { margin-top: 1.4rem; font-size: .92rem; opacity: .85; padding-inline: var(--gutter); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }

/* ---- Diálogo de producto ---- */
.pdialog { border: 0; padding: 0; border-radius: 36px; width: min(980px, 94vw); max-height: 92vh; max-height: 92svh; overflow: auto; background: var(--paper); color: var(--carbon); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .55); margin: auto; }
.pdialog::backdrop { background: rgba(27, 32, 33, .66); }
.pdialog[open] { animation: pdIn .45s var(--ease-bounce); }
.pdialog[open]::backdrop { animation: fadeIn .35s ease-out; }
@keyframes pdIn { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pd-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; background: var(--carbon); color: var(--crema); font-size: 1.8rem; line-height: 1; display: grid; place-items: center; transition: transform .3s var(--ease-bounce); }
.pd-close:hover { transform: rotate(90deg) scale(1.08); }
.pd-grid { display: grid; }
.pd-media { padding: 1.2rem; background: var(--crema); }
.pd-main { display: grid; place-items: center; border-radius: 24px; overflow: hidden; background: var(--paper); aspect-ratio: 1; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-main img.is-photo { object-fit: cover; }
.pd-thumbs { display: flex; gap: .6rem; margin-top: .8rem; }
.pd-thumb { width: 68px; height: 68px; border-radius: 16px; overflow: hidden; border: 3px solid transparent; background: var(--paper); flex: none; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb[aria-current="true"] { border-color: var(--terracota); }
.pd-info { padding: clamp(1.4rem, 4vw, 2.8rem); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.pd-title { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: .8rem; }
.pd-desc { font-size: 1.1rem; max-width: 28em; }
.pd-price { margin: 1.2rem 0 1.4rem; font-size: 1.05rem; }
.pd-price strong { font-family: var(--display); font-weight: 600; font-size: 1.7rem; color: var(--terracota-ink); }
.pd-pack { margin-top: 1rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
@media (min-width: 720px) { .pd-grid { grid-template-columns: 1fr 1fr; } .pd-media { padding: 1.6rem; } }

/* =============================================================
   7. Responsive extra
   ============================================================= */
@media (min-width: 540px) { body { font-size: 17.5px; } }
@media (min-width: 1600px) { body { font-size: 18px; } .container { width: min(1320px, calc(100% - 2 * var(--gutter))); } }
@media (max-width: 539px) {
  .hero-actions .btn { width: 100%; }
  .btn { padding: .9em 1.3em; }
  .form-nav .btn { flex: 1 1 auto; }
}

/* =============================================================
   8. Movimiento reducido: solo se frena lo realmente intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile { animation: tilePop 1s var(--ease-bounce) both; }   /* sin flotar en bucle */
  .js .marquee-track { animation-duration: 90s; }             /* más lenta, pero se mueve */
}
