/* =========================================================
   Abril Estrada — Portafolio v5 · Tendedero
   ========================================================= */

:root {
  --bg: #f1f1f1;
  --ink: #09070d;
  --pink: #ff4fb0;
  --pink-soft: #ffe0f0;
  --muted: #7c7088;
  --ghost: #efd9dd;
  --white: #ffffff;
  --green: #2e8f00;

  /* casos */
  --case-bg: #f9f9f9;
  --case-muted: #6f647c;

  --f-mono: "Share Tech Mono", ui-monospace, monospace;
  --f-goth: "UnifrakturCook", "Old English Text MT", serif;
  --f-jp: "Noto Serif JP", serif;
  --f-body: "Chakra Petch", system-ui, sans-serif;
  --f-orb: "Orbitron", system-ui, sans-serif;
  --f-lex: "Lexend", system-ui, sans-serif;
  --f-code: "Nanum Gothic Coding", ui-monospace, monospace;

  /* motion tokens (guía de motion en Figma) */
  --fast: .2s;
  --base: .45s;
  --slow: .7s;
  --ambient: 3.2s;
  --ease-out: cubic-bezier(0, 0, .58, 1);
  --ease-in-out: cubic-bezier(.42, 0, .58, 1);
  --back-out: cubic-bezier(.34, 1.56, .64, 1);
  --spring: cubic-bezier(.45, 1.45, .8, 1);

  --s: 1; /* escala del escenario 1440 × 900, la calcula script.js */
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: none; }

:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- tipografía ---------- */
.mono  { font-family: var(--f-mono); font-weight: 400; line-height: normal; }
.goth  { font-family: var(--f-goth); font-weight: 700; line-height: normal; }
.jp    { font-family: var(--f-jp); font-weight: 900; line-height: normal; }
.body  { font-family: var(--f-body); font-weight: 400; line-height: normal; }
.orb   { font-family: var(--f-orb); font-weight: 700; line-height: normal; }
.nowrap { white-space: nowrap; }
.c-pink  { color: var(--pink); }
.c-muted { color: var(--muted); }
.c-white { color: var(--white); }

/* Enlace rosa: subrayado que crece de izquierda a derecha en 0.2 s */
.ulink {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--fast) ease-out;
  padding-bottom: 1px;
}
.ulink:hover, .ulink:focus-visible { background-size: 100% 1px; }

/* =========================================================
   PORTAFOLIO — escenarios de 1440 × 900
   ========================================================= */
.scene {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.stage {
  position: relative;
  width: 1440px;
  height: 900px;
  margin-inline: auto;
}
@media (min-width: 1024px) {
  .stage { zoom: var(--s); }
}
.stage > * { position: absolute; margin: 0; }

/* encabezado de cada sección */
.kicker { left: 64px; top: 46px; font-size: 12px; letter-spacing: 3px; white-space: nowrap; }
.rule   { left: 64px; top: 82px; width: 1312px; height: 1px; background: var(--ink); transform-origin: 50% 50%; }
.stage > nav { left: 1136px; top: 40px; }
.nav    { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }
.nav li { width: 40px; }
.nav a, .nav span {
  display: inline-block; position: relative;
  font-family: var(--f-jp); font-weight: 900; font-size: 17px; line-height: normal; color: var(--ink);
}
.nav a:hover { color: var(--pink); }
.nav [aria-current] { color: var(--pink); }
.nav [aria-current]::after {
  content: ""; position: absolute; left: 0; top: 26px; width: 17px; height: 2px; background: var(--pink);
  transform-origin: 0 50%;
}

.ghost { font-family: var(--f-jp); font-weight: 900; color: var(--ghost); white-space: nowrap; pointer-events: none; user-select: none; }
.h-section { left: 56px; top: 100px; font-size: 54px; white-space: nowrap; }
.sub { left: 66px; top: 166px; font-size: 11px; letter-spacing: 2px; color: var(--muted); white-space: nowrap; }
.foot-note { font-size: 11px; letter-spacing: 2px; color: var(--muted); white-space: pre; }

/* globo */
.balloon { display: block; cursor: pointer; transform-origin: 50% 50%; }
.balloon img { position: absolute; left: 0; top: 0; }

/* cuerdas del tendedero */
.line { pointer-events: none; }
.line > span { position: absolute; display: block; }
.line img { width: 100%; height: 100%; }

/* confeti */
.confetti img { width: 100%; height: 100%; }

/* ---------- tarjetas colgadas ---------- */
.hang { display: flex; align-items: center; justify-content: center; transform-origin: 50% 0; }
.card {
  position: relative; flex: none;
  border: 1px solid var(--ink); border-radius: 16px; background: var(--white);
  transform: rotate(var(--r, 0deg));
  transition: transform var(--fast) ease-out;
}
.card > * { position: absolute; }
a.card { display: block; color: inherit; }
.card:hover, a.card:focus-visible { transform: translateY(-4px) rotate(0deg); }
.card--pink { background: var(--pink); }
.card--soft { background: var(--pink-soft); }
.card--dark { background: var(--ink); }
.card--hot  { border: 2px solid var(--pink); }

/* El pin vive en una capa aparte: no se mueve con el hover de la tarjeta */
.pins {
  position: absolute; pointer-events: none; z-index: 2;
  transform: rotate(var(--r, 0deg));
}
.pin {
  position: absolute; left: calc(50% - 7px); top: -18px;
  width: 14px; height: 38px; border-radius: 5px; background: var(--pink);
}
.pin::after {
  content: ""; position: absolute; left: 3px; top: 9px; width: 8px; height: 2px; background: var(--ink);
}

.lbl  { font-family: var(--f-mono); font-size: 9px; letter-spacing: 2px; color: var(--muted); white-space: nowrap; line-height: normal; }
.cap  { font-family: var(--f-body); font-size: 12px; line-height: normal; }
.copy { font-family: var(--f-body); font-size: 12.5px; line-height: 18px; white-space: pre-wrap; }

/* sello 承認 */
.hanko { display: flex; align-items: center; justify-content: center; }
.hanko__in { position: relative; flex: none; transform: rotate(var(--r, 0deg)); }
.hanko__in img { position: absolute; }
.hanko__in p { position: absolute; font-family: var(--f-jp); font-weight: 900; color: var(--pink); white-space: nowrap; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.chip {
  border: 1px solid var(--ink); border-radius: 999px; padding: 5px 11px;
  font-family: var(--f-body); font-size: 12px; line-height: normal; white-space: nowrap;
}

/* ---------- 1 · Inicio ---------- */
.hero-name { left: 56px; top: 90px; font-size: 330px; white-space: nowrap; }
.quote {
  left: 64px; top: 520px; width: 560px;
  font-family: var(--f-code); font-size: 36px; line-height: 50px;
}
.quote p { white-space: pre-wrap;
}
.pills { left: 64px; top: 720px; display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
.pills li {
  height: 34px; border: 1px solid var(--ink); border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 1.5px; line-height: normal;
}
.tate-group { left: 1152px; top: 120px; width: 160px; height: 520px; }
.tate-group > * { position: absolute; }
.tate {
  top: 10px; font-family: var(--f-jp); font-weight: 900; font-size: 30px;
  writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 10px; line-height: 30px;
  white-space: nowrap;
}
.tate-rule { top: 0; width: 1px; height: 520px; background: var(--ink); }
.ver { left: 1300px; top: 850px; font-size: 12px; letter-spacing: 2px; transition: opacity var(--base) ease-out; }
.is-scrolled .ver { opacity: 0; pointer-events: none; }

/* ---------- 2 · Sobre mí ---------- */
.foto {
  position: relative; flex: none; width: 280px; height: 400px; overflow: hidden;
  border: 1px solid var(--ink); border-radius: 140px; background: #000;
  transform: rotate(var(--r, 0deg));
}
.foto > * { position: absolute; }

/* ---------- 3 · Trabajo ---------- */
.thumb { overflow: hidden; border-radius: 10px; }
.thumb img { position: absolute; }
.btn-visit {
  display: flex; align-items: center; justify-content: center;
  padding: 12px 20px; border: 1px solid var(--ink); border-radius: 26px; background: var(--pink);
  font-family: var(--f-mono); font-size: 14px; letter-spacing: 2.52px; line-height: normal; white-space: nowrap;
  transition: transform var(--fast) ease-out, box-shadow var(--fast) ease-out;
}
.btn-visit:hover { transform: translateY(-2px); box-shadow: 0 2px 0 var(--ink); }

/* =========================================================
   CASOS — Tomatoo y Parco
   ========================================================= */
.case { background: var(--case-bg); }
.case-page {
  position: relative; max-width: 1440px; margin-inline: auto; overflow: clip;
}
.case-sec { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.case-sec > * { position: relative; }
.label { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.label .jp { font-size: 15px; color: var(--pink); }
.label .mono { font-size: 12px; color: var(--case-muted); letter-spacing: 1.44px; }
.h64 { font-family: var(--f-goth); font-weight: 700; font-size: 64px; line-height: 76px; letter-spacing: -1.28px; }
.lead { font-family: var(--f-body); font-size: 18px; line-height: 30px; }
.muted { color: var(--case-muted); }
.rule-b { border-bottom: 1px solid var(--ink); }
.rule-t { border-top: 1px solid var(--ink); }
.back { font-size: 13px; letter-spacing: 1.3px; color: var(--pink); }

.shot { position: relative; border: 1px solid var(--ink); overflow: hidden; }
.shot > img { width: 100%; height: 100%; object-fit: cover; }
.shot--contain > img { object-fit: contain; }

/* ---------- Tomatoo ---------- */
.t-hero { padding: 34px 160px 110px 80px; gap: 56px; width: 100%; }
.t-title { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.t-title .name { font-size: 210px; line-height: 200px; color: var(--pink); white-space: nowrap; }
.t-title .claim { font-size: 46px; line-height: 58px; letter-spacing: -.92px; }
.t-title .intro { font-size: 19px; line-height: 30px; width: 700px; max-width: 100%; color: var(--case-muted); }
.btn-proto {
  display: inline-flex; align-items: center; margin-top: 14px; padding: 14px 26px; background: var(--pink);
  font-family: var(--f-orb); font-weight: 700; font-size: 13px; letter-spacing: 1.3px; color: var(--ink); white-space: nowrap;
  transition: transform var(--fast) ease-out, box-shadow var(--fast) ease-out;
}
.btn-proto:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn-proto--line { margin: 0; background: transparent; border: 1.5px solid var(--pink); color: var(--pink); }
.btn-proto--line:hover { box-shadow: 4px 4px 0 var(--pink); }

.t-meta { display: flex; width: 100%; }
.t-meta > div {
  flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 10px;
  padding: 18px 24px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink);
}
.t-meta > div:first-child { padding-left: 0; border-left: 0; }
.t-meta .mono { font-size: 11px; letter-spacing: 1.32px; color: var(--pink); }
.t-meta .body { font-size: 15px; line-height: 23px; max-width: 250px; }

.t-shot {
  width: 919px; max-width: 100%; height: 560px; display: flex; align-items: center; justify-content: center;
  background: #020202; border: 2px solid var(--ink); border-radius: 24px; overflow: hidden;
  box-shadow: 14px 14px 0 var(--pink);
}
.t-shot .frame { position: relative; flex: none; width: 703px; height: 506px; }
.t-shot .frame img { position: absolute; left: 0; top: -.21%; width: 100%; height: 100.4%; }
.t-shot .app {
  position: absolute; left: 167px; top: 102px;
  width: 582px; height: 379px; border-radius: 59px; object-fit: cover;
}

.seeds {
  position: absolute !important; left: 840px; top: 118px; width: 440px;
  display: flex; flex-direction: column; gap: 16px; padding: 24px;
  background: var(--white); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--pink);
}
.seeds .mono { font-size: 12px; letter-spacing: 1.44px; color: var(--pink); }
.seeds img { width: 100%; height: 244px; object-fit: cover; }
.seeds .orb { font-size: 20px; letter-spacing: 1.2px; }
.seeds .body { font-size: 15px; color: var(--case-muted); }

.t-sec { width: 100%; padding: 120px 160px 120px 80px; gap: 50px; }
.t-sec--line { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.t-row { display: flex; gap: 90px; width: 100%; align-items: flex-start; }
.t-row > * { flex: 1 0 0; min-width: 0; }
.t-left { display: flex; flex-direction: column; gap: 24px; }
.t-left p { max-width: 500px; }

.cmp-head { font-size: 11px; letter-spacing: 1.32px; color: var(--case-muted); }
.cmp { display: flex; gap: 26px; padding: 20px 0; border-bottom: 1px solid var(--ink); }
.cmp .orb { width: 110px; flex: none; font-size: 14px; letter-spacing: 1.12px; }
.cmp .body { width: 330px; max-width: 100%; font-size: 16px; line-height: 25px; color: var(--case-muted); }
.cmp--me .orb { color: var(--pink); }
.cmp--me .body { color: var(--ink); }

.principles { display: flex; gap: 24px; width: 100%; padding: 0 160px 120px 80px; }
.principle {
  flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 14px;
  padding: 26px 26px 28px; border: 1px solid var(--ink);
}
.principle .mono { font-size: 12px; letter-spacing: 1.2px; color: var(--pink); }
.principle .orb { font-size: 16px; letter-spacing: 1.28px; white-space: nowrap; }
.principle .body { font-size: 15px; line-height: 24px; color: var(--case-muted); max-width: 300px; }

.t-sec--dec { gap: 48px; }
.decisions { width: 100%; }
.decision { display: flex; gap: 60px; align-items: flex-start; padding: 44px 0; border-bottom: 1px solid var(--ink); }
.decision__title { width: 260px; flex: none; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.decision__title .mono { font-size: 12px; letter-spacing: 1.44px; color: var(--pink); }
.decision__title .jp { font-size: 32px; line-height: 42px; letter-spacing: -.32px; }
.pill-ok {
  display: inline-flex; padding: 3px 10px; border: 1px solid var(--green);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .88px; color: var(--green); white-space: nowrap;
}
.decision__text { width: 330px; flex: none; display: flex; flex-direction: column; gap: 20px; }
.decision__text div { display: flex; flex-direction: column; gap: 6px; }
.decision__text .mono { font-size: 11px; letter-spacing: 1.32px; color: var(--pink); }
.decision__text .pick { font-family: var(--f-body); font-weight: 500; font-size: 18px; line-height: 27px; }
.decision__text .why { font-size: 15px; line-height: 24px; color: var(--case-muted); }
.decision__media { width: 460px; flex: none; }

.specimen {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  padding: 28px; background: #f4f2ef; border-radius: 24px; overflow: hidden;
  font-family: var(--f-lex); color: #262021;
}
.specimen .aa { font-weight: 700; font-size: 110px; line-height: 120px; }
.specimen .big { font-weight: 700; font-size: 26px; white-space: nowrap; }
.specimen .note { font-weight: 400; font-size: 15px; line-height: 22px; color: #6a5f5c; max-width: 400px; }
.specimen .note--sm { font-size: 14px; line-height: 21px; }
.specimen .tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: .8px; color: #6a5f5c; white-space: nowrap; }
.swatches { display: flex; gap: 8px; }
.swatches div { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.swatches i { display: block; width: 40px; height: 40px; border: 1px solid #e3dfda; border-radius: 12px; }
.swatches span { font-family: var(--f-mono); font-size: 7px; color: #6a5f5c; }
.tchips { display: flex; gap: 8px; }
.tchips span { padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.radii { display: flex; gap: 12px; align-items: flex-end; }
.radii div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.radii i { display: block; width: 80px; height: 56px; background: #f6d7d4; border: 1.5px solid #b3261e; }
.spacing { display: flex; flex-direction: column; gap: 8px; }
.spacing div { display: flex; align-items: center; gap: 12px; }
.spacing i { display: block; height: 8px; border-radius: 4px; background: #262021; }
.btn-states { display: flex; gap: 24px; }
.btn-states > div { display: flex; flex-direction: column; gap: 10px; }
.fat { position: relative; width: 172.2px; height: 62.32px; }
.fat i { position: absolute; left: 0; width: 172.2px; height: 52.48px; border-radius: 26.24px; }
.fat i:first-child { top: 6.56px; background: #8a1b15; }
.fat i:nth-child(2) { top: 0; background: #b3261e; }
.fat span { position: absolute; left: 19.68px; top: 16.81px; font-weight: 700; font-size: 14.76px; color: #fff; white-space: nowrap; }
.fat--down i:nth-child(2) { top: 6.56px; }
.fat--down span { top: 23.37px; }
.expr { display: flex; gap: 6px; flex-wrap: wrap; }
.expr span { padding: 3px 7px; border: 1px solid var(--ink); font-family: var(--f-mono); font-size: 9px; letter-spacing: .36px; color: var(--case-muted); }
.crop { position: relative; overflow: hidden; }
.crop > img { position: absolute; }

.t-head { display: flex; align-items: flex-end; justify-content: space-between; width: 100%; gap: 24px; }
.t-head > div { display: flex; flex-direction: column; gap: 16px; }
.flow { display: flex; gap: 24px; width: 100%; }
.flow > li { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 2px solid var(--pink); }
.flow .mono { font-size: 12px; letter-spacing: 1.2px; color: var(--pink); }
.flow .orb { font-size: 16px; letter-spacing: 1.28px; white-space: nowrap; }
.flow .body { font-size: 15px; line-height: 24px; color: var(--case-muted); max-width: 340px; }
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; }
.screen { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.screen .shot { height: 250px; width: 100%; }
.screen figcaption { display: flex; gap: 12px; }
.screen figcaption .mono { font-size: 12px; letter-spacing: .96px; color: var(--pink); }
.screen figcaption .jp { font-size: 22px; }
.screen figcaption .body { font-size: 14px; line-height: 21px; color: var(--case-muted); max-width: 300px; margin-top: 4px; }
figure { margin: 0; }
.voice { display: flex; gap: 60px; align-items: center; width: 100%; padding-top: 44px; border-top: 1px solid var(--ink); }
.voice > div:first-child { width: 260px; flex: none; display: flex; flex-direction: column; gap: 10px; }
.voice .mono { font-size: 11px; letter-spacing: 1.32px; color: var(--pink); }
.voice .jp { font-size: 30px; line-height: 40px; letter-spacing: -.3px; white-space: nowrap; }
.voice .body { font-size: 15px; line-height: 24px; color: var(--case-muted); max-width: 560px; }

/* sistema de diseño */
.ds { width: 100%; padding: 80px 80px 224px; }
.ds-kick { font-family: var(--f-mono); font-size: 12px; color: var(--pink); white-space: pre; }
.ds-title { font-size: 96px; line-height: 104px; margin-top: 16px; }
.ds-intro { font-size: 15px; line-height: 23px; color: var(--case-muted); width: 560px; max-width: 100%; margin-top: 32px; }
.ds-div { width: 1200px; max-width: 100%; height: 1px; background: var(--ink); }
.ds-case-kick { font-family: var(--f-mono); font-size: 12px; color: var(--pink); white-space: nowrap; margin-top: 40px; }
.ds-h { font-size: 56px; margin-top: 12px; }
.ds-cols { display: grid; grid-template-columns: repeat(3, 400px); column-gap: 40px; margin-top: 31px; }
.ds-cols h4 { margin: 0 0 8px; font-family: var(--f-body); font-weight: 600; font-size: 14px; line-height: 18px; }
.ds-cols p { font-size: 15px; line-height: 23px; }
.ds-states { display: grid; grid-template-columns: repeat(5, 260px); row-gap: 0; margin-top: 135px; }
.ds-states .mono { font-size: 12px; color: var(--case-muted); white-space: nowrap; }
.ds-states .row-lbl { grid-column: 1 / -1; color: var(--pink); margin: 26px 0 10px; }
.ds-states .row-lbl:first-of-type { margin-top: 26px; }
.tbtn {
  display: inline-flex; align-items: center; justify-content: center; justify-self: start;
  padding: 14px 28px; border-radius: 16px; white-space: nowrap;
  font-family: var(--f-lex); font-weight: 600; font-size: 16px; line-height: normal; color: #fff;
}
.tbtn--primary { background: #b3261e; filter: drop-shadow(0 4px 0 #8e1b15); }
.tbtn--primary.is-hover { background: #c73a31; }
.tbtn--primary.is-pressed { background: #8e1b15; filter: drop-shadow(0 1px 0 #8e1b15); }
.tbtn--done { background: #3f7a4a; filter: drop-shadow(0 4px 0 #2f5e39); }
.tbtn--done.is-pressed { background: #2f5e39; filter: drop-shadow(0 1px 0 #2f5e39); }
.tbtn--sec { background: #f6eee9; color: var(--ink); border: 2px solid var(--ink); filter: drop-shadow(0 4px 0 rgba(9, 7, 13, .25)); }
.tbtn--sec.is-pressed { background: #e3d8d4; filter: drop-shadow(0 1px 0 rgba(9, 7, 13, .25)); }
.tbtn.is-focus { border: 3px solid var(--pink); }
.tbtn.is-disabled { background: #e3d8d4; color: #7c7088; border: 0; filter: none; }
.tbtn--dark-primary { background: #d4453c; filter: drop-shadow(0 4px 0 #8e1b15); }
.tbtn--dark-done { background: #4f9a5d; filter: drop-shadow(0 4px 0 #2f5e39); }
.tbtn--dark-sec { background: #17121a; color: #ede6f2; border: 2px solid #ede6f2; filter: drop-shadow(0 4px 0 rgba(9, 7, 13, .25)); }

.ds-icons { display: flex; gap: 260px; margin-top: 31px; align-items: flex-start; }
.ds-icons .grid { width: 288px; }
.ds-icons .grid img { width: 288px; height: 288px; }
.ds-icons .grid p { font-family: var(--f-mono); font-size: 12px; color: var(--case-muted); margin-top: 14px; }
.ds-icons .crop { width: 495px; height: 288px; border: 1px solid var(--ink); border-radius: 16px; background: #f4f2ef; }
.ds-icons .crop img { left: -2.17%; top: -19.07%; width: 123.14%; height: 373.72%; }

.ds-tokens { display: flex; gap: 50px; margin-top: 31px; align-items: flex-start; }
.tokens { width: 390px; flex: none; }
.tokens .hd, .tokens .tr { display: grid; grid-template-columns: 250px 70px 70px; align-items: center; }
.tokens .hd { font-family: var(--f-mono); font-size: 12px; color: var(--case-muted); margin-bottom: 12px; }
.tokens .tr { padding: 4px 0; border-bottom: 1px solid #e9dcd8; height: 38px; }
.tokens .tr span:first-child { font-family: var(--f-mono); font-size: 13px; }
.tokens i { display: block; width: 56px; height: 28px; border: 1px solid var(--ink); border-radius: 6px; }
.tokens .note { font-family: var(--f-mono); font-size: 12px; color: var(--case-muted); margin-top: 12px; white-space: nowrap; }
.panels { display: flex; gap: 20px; }
.panel-col { width: 360px; display: flex; flex-direction: column; gap: 19px; }
.panel {
  position: relative; height: 300px; padding: 21px 23px; border: 1px solid var(--ink); border-radius: 20px; overflow: clip;
  display: flex; flex-direction: column; align-items: flex-start; gap: 22px;
}
.panel .mono { font-size: 12px; margin-bottom: 14px; }
.panel--light { background: #f6eee9; }
.panel--dark { background: #17121a; color: #ede6f2; }
.panel-col .body { font-size: 15px; line-height: 23px; }

/* hilo del tomate */
.tomato { position: absolute; right: 0; top: 56px; width: 171px; height: 158px; z-index: 3; transform-origin: 50% 50%; }
.tomato img { width: 171px; height: 158px; }
.thread { position: absolute; top: 196px; right: 75.92px; width: 8.08px; height: 14322px; z-index: 1; pointer-events: none; }
.thread img { width: 100%; height: 100%; }
.marker-wrap { position: absolute !important; right: 65px; width: 30px; height: 30px; z-index: 2; }
.marker {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: #f6eee9; border: 1.5px solid var(--pink); border-radius: 15px;
  font-family: var(--f-mono); font-size: 11px; color: var(--pink);
}

.t-cta { width: 100%; padding: 130px 160px 100px 80px; gap: 30px; }
.t-cta .label .mono { letter-spacing: 1.44px; }
.t-cta .h88 { font-size: 88px; line-height: 100px; letter-spacing: -2.64px; white-space: nowrap; }
.t-cta .body { font-size: 19px; line-height: 30px; color: var(--case-muted); width: 600px; max-width: 100%; }
.t-cta .mail { font-family: var(--f-body); font-weight: 500; font-size: 32px; color: var(--pink); text-decoration: underline; text-underline-position: from-font; }
.t-cta .back { color: var(--case-muted); }

/* ---------- Parco ---------- */
.p-hero { padding: 34px 80px 120px; gap: 56px; width: 100%; overflow: clip; }
.p-ghost { position: absolute !important; left: 880px; top: 140px; font-size: 520px; line-height: 520px; }
.p-top { display: flex; justify-content: space-between; align-items: center; width: 100%; white-space: nowrap; }
.p-top .back { color: var(--case-muted); font-size: 13px; letter-spacing: 2px; }
.p-top .estado { display: flex; gap: 8px; font-family: var(--f-mono); font-size: 12px; color: var(--case-muted); letter-spacing: 2px; }
.p-top .estado b { font-weight: 400; color: var(--pink); letter-spacing: 0; }
.p-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.p-head .label .mono { letter-spacing: 3px; }
.p-head .name { font-size: 210px; line-height: 220px; white-space: nowrap; }
.p-head .claim { font-size: 46px; line-height: 56px; }
.p-head .body { font-size: 19px; line-height: 30px; width: 780px; max-width: 100%; }
.p-meta { display: flex; gap: 32px; width: 100%; }
.p-meta > div { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--ink); }
.p-meta .mono { font-size: 11px; letter-spacing: 2px; color: var(--case-muted); }
.p-meta .body { font-size: 15px; line-height: 23px; }
.p-shot {
  width: 1280px; max-width: 100%; aspect-ratio: 1280 / 727; position: relative; overflow: hidden;
  border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: 10px 10px 0 var(--pink);
}
.p-shot img { position: absolute; left: 0; top: 0; width: 100%; height: 110.04%; }

.p-sec { width: 100%; padding: 120px 80px; gap: 50px; }
.p-sec .label .mono { letter-spacing: 3px; }
.resolver .row { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--ink); }
.resolver .orb { width: 140px; flex: none; font-size: 14px; }
.resolver .body { flex: 1 0 0; font-size: 16px; line-height: 25px; color: var(--case-muted); }
.steps { display: flex; gap: 20px; width: 100%; height: 345px; }
.step {
  flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 14px;
  padding: 24px 22px; background: var(--white); border: 1px solid var(--ink); border-radius: 16px;
}
.step .orb { font-size: 20px; color: var(--pink); }
.step .goth { font-size: 28px; line-height: 34px; }
.step .body { font-size: 15px; line-height: 23px; }
.step .mono { margin-top: auto; font-size: 10px; line-height: 15px; letter-spacing: 2px; color: var(--case-muted); }
.p-screens { display: flex; gap: 48px; align-items: flex-end; width: 100%; }
.p-screens figure, .p-og figure { display: flex; flex-direction: column; gap: 14px; }
.p-screens figure:first-child { flex: 1 0 0; min-width: 0; }
.p-img { position: relative; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-screens figcaption, .p-og figcaption { font-family: var(--f-mono); font-size: 11px; line-height: 16px; letter-spacing: 2px; color: var(--case-muted); }
.p-og { display: flex; gap: 48px; align-items: center; width: 100%; }
.p-og > div { flex: 1 0 0; display: flex; flex-direction: column; gap: 16px; }
.p-og .goth { font-size: 34px; line-height: 42px; }
.p-og .body { font-size: 17px; line-height: 28px; }

/* ---------- casos: pantallas más chicas ---------- */
@media (max-width: 1280px) {
  .seeds { position: relative !important; left: auto; top: auto; }
  .ds-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds-states { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .ds-icons { gap: 40px; flex-wrap: wrap; }
  .ds-tokens { flex-wrap: wrap; }
}
@media (max-width: 1100px) {
  .t-hero, .t-sec, .t-cta { padding-right: 80px; }
  .principles { padding-right: 80px; }
  .thread, .marker-wrap, .tomato { display: none; }
  .t-title .name, .p-head .name { font-size: 150px; line-height: 150px; }
  .decision { flex-wrap: wrap; gap: 32px; }
  .decision__title { width: 100%; }
  .t-row { flex-direction: column; gap: 48px; }
  .p-ghost { left: auto; right: -80px; }
}
@media (max-width: 760px) {
  .t-hero, .t-sec, .t-cta, .p-hero, .p-sec, .ds { padding-left: 20px; padding-right: 20px; }
  .t-sec, .p-sec { padding-top: 72px; padding-bottom: 72px; }
  .principles { padding: 0 20px 72px; flex-direction: column; }
  .t-title .name, .p-head .name { font-size: 96px; line-height: 100px; }
  .t-title .claim, .p-head .claim { font-size: 32px; line-height: 40px; white-space: normal; }
  .h64, .ds-title { font-size: 42px; line-height: 50px; white-space: normal; }
  .h64 p, .ds-h { white-space: normal; }
  .t-meta, .p-meta, .flow, .steps, .p-screens, .p-og { flex-direction: column; height: auto; }
  .t-meta > div { padding-left: 0; border-left: 0; }
  .t-shot { height: auto; aspect-ratio: 919 / 560; }
  .t-shot .frame { width: 100%; height: 100%; }
  .t-shot .app { left: 18%; top: 18%; width: 64%; height: 68%; border-radius: 24px; }
  .seeds { width: 100%; }
  .decision__text, .decision__media { width: 100%; }
  .screens { grid-template-columns: 1fr; }
  .voice { flex-direction: column; align-items: flex-start; gap: 20px; }
  .ds-cols, .ds-states { grid-template-columns: 1fr; gap: 20px; }
  .ds-states > .mono:not(.row-lbl) { display: none; }
  .tokens { width: 100%; }
  .panels { flex-direction: column; }
  .panel-col { width: 100%; }
  .t-cta .h88 { font-size: 52px; line-height: 60px; white-space: normal; }
  .t-cta .mail { font-size: 22px; }
  .p-img { width: 100% !important; }
  .p-og figure { width: 100%; }
  .swatches { flex-wrap: wrap; }
  .p-ghost { font-size: 260px; line-height: 260px; top: 200px; }

  .case-sec > *, .t-title > *, .p-head > * { max-width: 100%; }
  .t-title, .p-head, .t-left, .t-head > div { width: 100%; }
  .t-head { flex-direction: column; align-items: flex-start; }
  .cmp { gap: 16px; }
  .cmp .orb { width: 86px; }
  .cmp .body { flex: 1 1 0; width: auto; }
  .resolver .orb { width: 100px; }
  .seeds img { height: auto; object-fit: contain; }
  .specimen { max-width: 100%; padding: 22px; }
  .specimen .big { white-space: normal; }
  .specimen .aa { font-size: 88px; line-height: 96px; }
  .radii, .btn-states { flex-wrap: wrap; }
  .decision__media.shot, .decision__media.crop { height: 240px !important; }
  .p-screens figure:first-child { flex: none; }
  .p-screens figure, .p-og figure { width: 100%; }
  .p-img { height: auto !important; }
  .p-img img { height: auto; object-fit: initial; }
  .p-img--phone { width: min(280px, 100%) !important; align-self: center; }
  .p-screens figcaption.nowrap { align-self: center; }
  .ds-icons .crop { width: 100%; height: auto; aspect-ratio: 495 / 288; }
  .tokens .hd, .tokens .tr { grid-template-columns: 1fr 64px 64px; }
}

/* =========================================================
   MOTION
   Los estados iniciales sólo existen con html.js (lo agrega JS),
   así el contenido se ve aunque el JS falle.
   ========================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(var(--y, 18px)); } to { opacity: 1; transform: none; } }
@keyframes rule-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw-x { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes draw-y { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes drop {
  0%   { opacity: 0; transform: translateY(-70px) rotate(0deg); animation-timing-function: ease-out; }
  30%  { opacity: 1; transform: translateY(0) rotate(calc(7deg * var(--dir, 1))); animation-timing-function: ease-in-out; }
  55%  { transform: rotate(calc(-2.5deg * var(--dir, 1))); animation-timing-function: ease-in-out; }
  78%  { transform: rotate(calc(.8deg * var(--dir, 1))); animation-timing-function: ease-in-out; }
  100% { opacity: 1; transform: none; }
}
@keyframes pop { from { opacity: 0; transform: scale(.1); } to { opacity: 1; transform: scale(1); } }
@keyframes chip-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: scale(1.9) rotate(-18deg); } to { opacity: 1; transform: none; } }
@keyframes float { to { transform: translateY(-16px) rotate(-2.5deg); } }
@keyframes float-tomato { to { transform: translateY(-16px) rotate(2.5deg); } }
@keyframes bob { 50% { transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

html.js [data-a] { opacity: 0; }
html.js [data-a="rope"] { opacity: 1; clip-path: inset(0 100% 0 0); }
html.js [data-a="thread"] { opacity: 1; clip-path: inset(0 0 100% 0); }
html.js [data-a="rule"] { opacity: 1; transform: scaleX(0); }

html.js .is-in [data-a] { animation: rise var(--base) var(--ease-out) var(--d, 0s) both; }
html.js .is-in [data-a="h"]     { --y: 36px; animation-duration: var(--slow); }
html.js .is-in [data-a="k"]     { --y: 60px; animation-duration: 1.5s; }
html.js .is-in [data-a="rule"]  { animation: rule-draw var(--slow) var(--ease-out) var(--d, 0s) both; }
html.js .is-in [data-a="rope"]  { animation: draw-x .9s var(--ease-in-out) var(--d, .45s) both; }
html.js .is-in [data-a="thread"]{ animation: draw-y .9s var(--ease-in-out) var(--d, .45s) both; }
html.js .is-in [data-a="card"]  { animation: drop 1.2s linear var(--d, 1s) both; }
html.js .is-in [data-a="conf"],
html.js .is-in [data-a="mark"]  { animation: pop .35s var(--spring) var(--d, 1.7s) both; }
html.js .is-in [data-a="chip"]  { animation: chip-in .3s var(--back-out) var(--d, 1.3s) both; }
html.js .is-in [data-a="hanko"] { animation: stamp .35s var(--back-out) var(--d, 2s) both; }

/* loops: globo y flecha "ver ↓" (el globo se pausa fuera de pantalla) */
.balloon, .tomato { animation: float 1.6s var(--ease-in-out) infinite alternate paused; }
.tomato { animation-name: float-tomato; }
.is-visible .balloon, .tomato.is-visible { animation-play-state: running; }
.ver span { display: inline-block; animation: bob .8s var(--ease-in-out) infinite; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-a],
  html.js [data-a="rope"],
  html.js [data-a="thread"],
  html.js [data-a="rule"] { clip-path: none; transform: none; }
  html.js .is-in [data-a] { animation: fade var(--fast) ease-out both !important; }
  html.js [data-a="rope"], html.js [data-a="thread"], html.js [data-a="rule"] { opacity: 1; }
  html.js .is-in [data-a="rope"], html.js .is-in [data-a="thread"], html.js .is-in [data-a="rule"] { animation: none !important; }
  .balloon, .tomato, .ver span { animation: none !important; }
  .card, .btn-visit, .btn-proto { transition: none; }
}

/* =========================================================
   PORTAFOLIO EN TABLET Y CELULAR (< 1024 px)
   Los frames de 1440 × 900 pasan a una columna: encabezado,
   título, y las tarjetas colgadas una por una de su cuerda.
   ========================================================= */
@media (max-width: 1023px) {
  .scene { isolation: isolate; padding: 24px 20px 80px; }
  .scene + .scene { border-top: 1px solid rgba(9, 7, 13, .12); }

  .stage {
    width: auto; height: auto; max-width: 760px;
    display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 28px;
  }
  .stage > * {
    position: static !important;
    width: auto !important; height: auto !important;
    flex: 0 0 100%; min-width: 0; margin-top: 20px;
  }
  .stage > :not(.hanko):not(.confetti):not(.balloon) { left: auto !important; top: auto !important; }
  .stage > .balloon { left: auto !important; }

  /* encabezado: kicker y nav en una fila (el nav baja si no cabe) */
  .stage > .kicker { order: -3; flex: 1 1 auto; margin-top: 0; font-size: 11px; letter-spacing: 2.4px; white-space: normal; padding: 8px 0; }
  .stage > nav { order: -2; flex: 0 0 auto; margin: 0 0 0 auto; }
  .stage > .rule { order: -1; height: 1px !important; margin-top: 10px; }
  .nav li { width: 34px; text-align: center; }
  .nav a, .nav span { padding: 6px 0 10px; }
  .nav [aria-current]::after { top: 32px; left: calc(50% - 8.5px); }

  /* decorado: kanji fantasma, globos, confeti y sellos fuera del flujo */
  .stage > .ghost {
    position: absolute !important; z-index: -1; margin: 0;
    left: auto !important; top: auto !important; right: -6vw; bottom: 2%;
    font-size: min(72vw, 520px) !important; line-height: 1 !important;
  }
  .stage > .balloon {
    position: absolute !important; z-index: -1; margin: 0; flex: none;
    left: auto !important; top: 150px !important; right: 18px;
    width: 64px !important; height: 150px !important; overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 62%, transparent);
            mask-image: linear-gradient(#000 62%, transparent);
  }
  .stage > .balloon img { width: 100%; height: auto; }
  .stage > .confetti { position: absolute !important; margin: 0; flex: none; width: 10px !important; height: 10px !important; }
  .stage > .hanko {
    position: absolute !important; z-index: 3; margin: 0; flex: none;
    left: auto !important; right: 22px; width: auto !important; height: auto !important;
  }
  .stage > .line { display: none; }

  /* títulos */
  .stage > .h-section,
  .stage > h2.goth { font-size: clamp(38px, 10.5vw, 54px) !important; line-height: 1.12 !important; white-space: normal; padding-right: 76px; margin-top: 28px; }
  .stage > .sub { white-space: normal; line-height: 1.6; margin-top: 10px; padding-right: 76px; }
  .stage > .foot-note { white-space: pre-wrap; margin-top: 36px; }

  /* ---------- tarjetas colgadas ---------- */
  .stage > .hang {
    position: relative !important; display: block;
    margin-top: 64px; transform-origin: 50% 0;
  }
  .hang::before {
    content: ""; position: absolute; z-index: -1; left: -20px; right: -20px; top: -16px; height: 30px;
    background: url("img/line-3.svg") center / 100% 100% no-repeat;
  }
  .hang .card {
    width: 100% !important; max-width: 440px; height: auto !important; margin-inline: auto;
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 26px 20px 22px;
  }
  .hang .card > * { position: static !important; width: auto !important; max-width: 100%; }
  .hang .card .lbl { white-space: normal; }
  .hang .card > .thumb,
  .hang .card > img:first-child {
    position: relative !important; width: 100% !important; height: auto !important;
    aspect-ratio: 236 / 162; margin-bottom: 10px;
  }
  .hang .card > img:first-child { aspect-ratio: 238 / 180; }
  .hang .card > img[data-a="chip"] { width: 52px !important; height: 52px !important; margin: 10px 0; }
  .hang .card > .btn-visit { width: 100% !important; margin-top: 8px; }
  .hang .card > .goth { line-height: 1.1 !important; }
  .hang .card .chips { margin-top: 6px; }
  .hang .pins {
    left: 50%; top: 0; width: 0 !important; height: 0 !important; transform: none;
  }
  .hang .pin { left: -7px; }
  .hang .foto { margin-inline: auto; }

  /* ---------- 1 · Inicio ---------- */
  #inicio .stage { min-height: min(calc(100svh - 104px), 780px); align-content: flex-start; }
  #inicio .stage > .balloon { right: -18px; top: 96px !important; width: min(44vw, 240px) !important; height: min(92vw, 500px) !important; }
  .stage > .hero-name { position: relative !important; font-size: min(44vw, 300px); line-height: 1.05; margin-top: 18px; }
  .stage > .quote { font-size: clamp(20px, 5.6vw, 30px); line-height: 1.45; margin-top: 18px; max-width: 560px; }
  .stage > .pills { flex-wrap: wrap; gap: 10px; margin-top: 24px; }
  .stage > .pills li { padding: 0 16px; width: auto !important; }
  .stage > .tate-group {
    display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 16px;
    margin-top: 32px;
  }
  .tate-group > * { position: static !important; }
  .tate { font-size: 24px; letter-spacing: 8px; line-height: 24px; }
  .tate-rule { width: 1px; height: auto; align-self: stretch; }
  .stage > .ver { display: none; }

  /* ---------- 6 · Contacto ---------- */
  #contacto .stage > .body { padding-right: 84px; }
  #contacto .stage > .balloon { right: -6px; top: 196px !important; width: min(20vw, 130px) !important; height: min(46vw, 300px) !important; }
  #contacto .stage > h2.goth { font-size: clamp(60px, 17vw, 120px) !important; padding-right: 0; }
  #contacto .stage > .hanko { position: static !important; flex: 0 0 auto; margin: 28px 0 0 auto; }
  #seeds .stage > .hanko,
  #trabajo .stage > .hanko { position: static !important; flex: 0 0 auto; margin: 28px 0 0 auto; }
  #contacto .hang .card .body { font-size: clamp(24px, 7vw, 32px) !important; line-height: 1.2 !important; word-break: break-word; }
  #contacto .hang .card--dark .body, #contacto .hang .card:not(.card--pink) .body { font-size: 20px !important; }
  #contacto .stage > .jp { flex: 0 0 auto; margin-top: 12px; }
  #contacto .stage > .foot-note:last-of-type { flex: 1 1 200px; align-self: center; margin-top: 12px; }
}

/* tablet: dos columnas de tarjetas */
@media (min-width: 640px) and (max-width: 1023px) {
  .stage > .hang { flex: 0 0 calc(50% - 14px); }
  .hang::before { left: -14px; right: -14px; }
}

/* motion en tablet / celular: cada tarjeta cae cuando entra en pantalla */
@keyframes drop-m {
  0%   { opacity: 0; transform: translateY(-70px) rotate(var(--r, 0deg)); animation-timing-function: ease-out; }
  30%  { opacity: 1; transform: translateY(0) rotate(calc(var(--r, 0deg) + 7deg * var(--dir, 1))); animation-timing-function: ease-in-out; }
  55%  { transform: rotate(calc(var(--r, 0deg) - 2.5deg * var(--dir, 1))); animation-timing-function: ease-in-out; }
  78%  { transform: rotate(calc(var(--r, 0deg) + .8deg * var(--dir, 1))); animation-timing-function: ease-in-out; }
  100% { opacity: 1; transform: rotate(var(--r, 0deg)); }
}
@media (max-width: 1023px) {
  html.js [data-a="card"] { opacity: 1; }
  html.js .is-in [data-a="card"] { animation: none; }
  html.js [data-a="card"] > .card,
  html.js [data-a="card"] > .foto { opacity: 0; transform-origin: 50% 0; }
  html.js [data-a="card"] > .pins { opacity: 0; }
  html.js [data-a="card"].is-on > .card,
  html.js [data-a="card"].is-on > .foto { opacity: 1; animation: drop-m 1.2s linear var(--dm, 0s) backwards; }
  html.js [data-a="card"].is-on > .pins { opacity: 1; animation: fade .3s ease-out var(--dm, 0s) backwards; }
  html.js [data-a="card"] [data-a="chip"],
  html.js .is-in [data-a="card"] [data-a="chip"] { opacity: 0; animation: none; }
  html.js .is-in [data-a="card"].is-on [data-a="chip"],
  html.js [data-a="card"].is-on [data-a="chip"] { opacity: 1; animation: chip-in .3s var(--back-out) var(--dcm, .45s) both; }
}
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  html.js [data-a="card"].is-on > .card,
  html.js [data-a="card"].is-on > .foto,
  html.js [data-a="card"].is-on > .pins,
  html.js [data-a="card"].is-on [data-a="chip"] { animation: fade var(--fast) ease-out both !important; }
}
