/* Layout: bandas horizontales alternas (claro / tinte) con contenido centrado a 1160px; teléfono real como pieza central. */
:root {
  --bg: #F5F9FD;
  --surface: #FFFFFF;
  --tint: #EAF3FB;
  --ink: #1F3550;
  --muted: #5A6D84;
  --line: #D9E6F2;
  --on-pastel: #1F3550;
  --deep: #1A2D45;
  --deep-fg: #EAF2FA;

  --sky: #9CCFF6;
  --sky-strong: #3D8BD9;
  --pink: #F8B4C4;
  --pink-strong: #DD5F84;
  --mint: #AEE5CF;
  --butter: #FFE39E;
  --peach: #FFCBAB;

  --shadow: 0 10px 30px -12px rgba(31, 53, 80, .22);
  --shadow-lg: 0 30px 60px -24px rgba(31, 53, 80, .35);

  --f-display: "Fredoka", "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-sm: 12px; --r-md: 20px; --r-lg: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1B2A; --surface: #172638; --tint: #132132; --ink: #EAF2FA; --muted: #A5B6C9; --line: #263A52;
    --sky-strong: #8CC4F2; --pink-strong: #F5A0B8; --deep: #0A1420;
    --shadow: 0 10px 30px -12px rgba(0,0,0,.6); --shadow-lg: 0 30px 60px -24px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1B2A; --surface: #172638; --tint: #132132; --ink: #EAF2FA; --muted: #A5B6C9; --line: #263A52;
  --sky-strong: #8CC4F2; --pink-strong: #F5A0B8; --deep: #0A1420;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6); --shadow-lg: 0 30px 60px -24px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--sky-strong); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }

.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

.eyebrow { font: 800 .78rem/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--sky-strong); }
.sec-head { display: grid; gap: 12px; max-width: 720px; margin-bottom: 44px; }
.sec-lead { color: var(--muted); font-size: 1.08rem; max-width: 65ch; }
.t-sky { color: var(--sky-strong); } .t-pink { color: var(--pink-strong); }
.small { color: var(--muted); font-size: .9rem; }
.sub { font-size: 1.5rem; margin-top: 64px; }
.hint { color: var(--muted); margin: 6px 0 20px; }

/* ---------- NAV ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav__inner { max-width: 1160px; margin: 0 auto; height: var(--nav-h); display: flex; align-items: center; gap: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.25rem var(--f-display); color: var(--ink); }
.brand__shield { width: 30px; height: 34px; transition: transform .5s var(--ease); }
.brand:hover .brand__shield { transform: rotate(-10deg) scale(1.08); }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { text-decoration: none; font-weight: 700; font-size: .95rem; padding: 8px 14px; border-radius: 999px; color: var(--muted); transition: background .25s, color .25s; }
.nav__links a:hover, .nav__links a.is-active { background: var(--tint); color: var(--ink); }
.theme-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: transform .3s var(--ease); }
.theme-btn:hover { transform: rotate(20deg); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .sun { fill: #F6C445; } .theme-btn .moon { fill: var(--sky-strong); display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; } :root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .sun { display: none; } :root:not([data-theme="light"]) .theme-btn .moon { display: block; } }
.menu-btn { display: none; width: 42px; height: 42px; border: 0; background: transparent; padding: 10px; flex-direction: column; justify-content: space-between; }
.menu-btn span { height: 3px; border-radius: 3px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.progress-line { position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--mint), var(--sky), var(--pink), var(--peach)); }
@media (max-width: 900px) {
  .theme-btn { margin-left: auto; }
  .menu-btn { display: flex; }
  .nav__links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px; margin: 0; background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
    clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .4s var(--ease), visibility .4s; }
  .nav__links.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
  .nav__links a { padding: 12px 14px; }
}

/* ---------- BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 999px; font-weight: 800; text-decoration: none; border: 2px solid transparent; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s; }
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--sky { background: var(--sky); color: var(--on-pastel); }
.btn--pink { background: var(--pink); color: var(--on-pastel); }
.btn--ghost { border-color: var(--line); background: var(--surface); }
.btn--sm { padding: 10px 18px; font-size: .95rem; }

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; padding-block: 56px 0; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.blobs .b1 { width: 420px; height: 420px; background: var(--sky); top: -120px; left: -120px; }
.blobs .b2 { width: 360px; height: 360px; background: var(--pink); top: 40px; right: -100px; animation-delay: -6s; }
.blobs .b3 { width: 300px; height: 300px; background: var(--mint); bottom: 40px; left: 30%; animation-delay: -12s; }
.blobs .b4 { width: 220px; height: 220px; background: var(--butter); bottom: 120px; right: 22%; animation-delay: -3s; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.12); } }
.hero__grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero__copy { display: grid; gap: 22px; min-width: 0; }
.hero__title { font-size: clamp(2.6rem, 1.4rem + 5vw, 4.9rem); line-height: 1.02; font-weight: 700; }
.hero__title .word { display: inline-block; animation: pop .9s var(--ease) both; }
.hero__title .word:nth-child(2) { animation-delay: .08s; } .hero__title .word:nth-child(4) { animation-delay: .16s; } .hero__title .word:nth-child(5) { animation-delay: .24s; }
@keyframes pop { from { opacity: 0; transform: translateY(28px) rotate(3deg); } }
.accent-sky { color: var(--sky-strong); position: relative; }
.accent-pink { color: var(--pink-strong); }
.accent-sky::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.04em; height: .16em; background: var(--butter); z-index: -1; border-radius: 4px; transform-origin: left; animation: underline 1s .7s var(--ease) both; }
@keyframes underline { from { transform: scaleX(0); } }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__chips { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero__chips li { background: var(--surface); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font-size: .92rem; color: var(--muted); }
.hero__chips b { color: var(--ink); font-family: var(--f-display); font-weight: 600; margin-right: 2px; }

.hero__phone { position: relative; display: grid; place-items: center; padding: 20px 0 40px; }
.phone { position: relative; width: min(290px, 72vw); aspect-ratio: 574 / 1278; max-width: 100%; border-radius: 42px; padding: 10px; background: var(--ink); box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.08); }
:root[data-theme="dark"] .phone { background: #050B13; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phone { background: #050B13; } }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 70px; height: 18px; border-radius: 12px; background: #050B13; transform: translateX(-50%); z-index: 2; }
.phone__screen { position: relative; width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: #F3F8FC; }
.phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .8s var(--ease), transform 1.2s var(--ease); }
.phone__screen img.is-on { opacity: 1; transform: none; }
.phone--hero { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-12px) rotate(-1deg); } }
.float-card { position: absolute; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px 14px; box-shadow: var(--shadow); animation: floaty 7s ease-in-out infinite; }
.float-card b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 1rem; }
.float-card small { color: var(--muted); font-size: .78rem; }
.float-card .ico { font-size: 1.4rem; }
.fc1 { top: 12%; left: -4%; animation-delay: -1s; }
.fc2 { top: 46%; right: -6%; animation-delay: -3s; }
.fc3 { bottom: 10%; left: 2%; animation-delay: -5s; }

.marquee { position: relative; margin-top: 40px; background: var(--deep); color: var(--deep-fg); overflow: hidden; padding-block: 14px; transform: rotate(-1.2deg) scale(1.02); }
.marquee__track { display: flex; gap: 28px; width: max-content; animation: marquee 38s linear infinite; font: 600 1.15rem var(--f-display); white-space: nowrap; }
.marquee__track span:nth-child(4n+1) { color: var(--sky); } .marquee__track span:nth-child(4n+3) { color: var(--pink); }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__phone { padding-top: 10px; }
  .fc1 { left: 0; } .fc2 { right: 0; } .fc3 { left: 4%; }
}
@media (max-width: 460px) { .float-card { padding: 8px 10px; } .float-card small { display: none; } }

/* ---------- SECTIONS ---------- */
.section { padding-block: 96px; position: relative; }
.section--tint { background: var(--tint); }
@media (max-width: 640px) { .section { padding-block: 68px; } .sec-head { margin-bottom: 32px; } }

/* reveal: visible at rest; plays when it enters view */
.reveal.in { animation: rise .8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }

/* ---------- STATS ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 8px; justify-items: start; }
.stat p { color: var(--muted); }
.ring { position: relative; width: 120px; height: 120px; margin-bottom: 8px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; stroke: var(--tint); }
.ring .ring__bar { stroke: var(--c); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.6s var(--ease); }
.ring__num { position: absolute; inset: 0; display: grid; place-items: center; font: 600 1.5rem var(--f-display); font-variant-numeric: tabular-nums; }
.ring__num { display: flex; align-items: center; justify-content: center; }
.gaps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.gap { display: flex; gap: 14px; align-items: flex-start; padding: 6px; }
.gap h3 { margin-bottom: 4px; }
.gap p { color: var(--muted); font-size: .97rem; }
.gap__ico { flex: none; width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 16px; background: var(--c); }
@media (max-width: 860px) { .stats, .gaps { grid-template-columns: 1fr; } .stat { grid-template-columns: auto 1fr; align-items: center; column-gap: 20px; } .stat .ring { grid-row: span 2; margin: 0; width: 100px; height: 100px; } }

/* ---------- ORIGEN ---------- */
.field { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: start; }
.field__groups { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 14px; }
.grade { display: flex; align-items: center; gap: 10px; }
.grade__label { font: 600 1.6rem var(--f-display); width: 56px; }
.pill { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font: 600 1.15rem var(--f-display); background: var(--sky); color: var(--on-pastel); transition: transform .35s var(--ease); }
.grade:nth-child(2) .pill { background: var(--pink); }
.field__groups:hover .pill { transform: translateY(-4px) rotate(-4deg); }
.field__groups:hover .pill:nth-child(3) { transition-delay: .05s; } .field__groups:hover .pill:nth-child(4) { transition-delay: .1s; }
.field__note { color: var(--muted); border-top: 1px dashed var(--line); padding-top: 14px; }
.field__note b { color: var(--ink); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.steps p { color: var(--muted); font-size: .97rem; margin-top: 4px; }
.steps__n { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 600 1.05rem var(--f-display); background: var(--mint); color: var(--on-pastel); }
@media (max-width: 820px) { .field { grid-template-columns: 1fr; } }

.flips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.flip { border: 0; padding: 0; background: none; perspective: 900px; height: 210px; text-align: left; }
.flip__in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.flip[aria-pressed="true"] .flip__in { transform: rotateY(180deg); }
.flip:hover .flip__in { transform: rotateY(8deg); }
.flip[aria-pressed="true"]:hover .flip__in { transform: rotateY(172deg); }
.flip__front, .flip__back { position: absolute; inset: 0; border-radius: var(--r-md); padding: 20px; display: flex; flex-direction: column; justify-content: space-between; backface-visibility: hidden; -webkit-backface-visibility: hidden; font: 600 1.15rem/1.25 var(--f-display); }
.flip__front { background: var(--c); color: var(--on-pastel); }
.flip__front::after { content: "↻"; align-self: flex-end; font-size: 1.2rem; opacity: .6; }
.flip__back { background: var(--surface); border: 1px solid var(--line); transform: rotateY(180deg); font: 600 .98rem/1.45 var(--f-body); color: var(--ink); justify-content: flex-start; gap: 10px; }
.flip small { font: 800 .7rem var(--f-body); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
@media (max-width: 1000px) { .flips { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }

/* ---------- SHOWCASE ---------- */
.showcase { --mode: var(--sky); --mode-strong: var(--sky-strong); }
.showcase[data-mode="tutor"] { --mode: var(--pink); --mode-strong: var(--pink-strong); }
.mode-switch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px; margin-bottom: 32px; }
.mode-switch button { position: relative; z-index: 1; border: 0; background: none; padding: 10px 30px; font-weight: 800; border-radius: 999px; color: var(--muted); transition: color .3s; }
.mode-switch button[aria-selected="true"] { color: var(--on-pastel); }
.mode-switch__knob { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--mode); transition: transform .5s var(--ease), background .4s; }
.showcase[data-mode="tutor"] .mode-switch__knob { transform: translateX(100%); }
.showcase__grid { display: grid; grid-template-columns: 1fr auto 1.1fr; gap: 40px; align-items: center; }
.screens { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.screens button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid transparent; background: transparent; padding: 12px 16px; border-radius: 16px; font-weight: 700; color: var(--muted); transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.screens button:hover { background: var(--surface); color: var(--ink); transform: translateX(4px); }
.screens button[aria-current="true"] { background: var(--surface); border-color: var(--mode); color: var(--ink); box-shadow: var(--shadow); }
.screens .dot { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--tint); font-size: 1.05rem; transition: background .3s; }
.screens button[aria-current="true"] .dot { background: var(--mode); }
.showcase__phone { display: grid; justify-items: center; gap: 16px; }
.showcase .phone { width: min(300px, 70vw); transition: box-shadow .4s; }
.showcase .phone::after { content: ""; position: absolute; inset: -18px; z-index: -1; border-radius: 60px; background: var(--mode); opacity: .45; filter: blur(30px); transition: background .5s; }
.phone__screen #showImg { opacity: 1; transform: none; transition: opacity .35s var(--ease), transform .45s var(--ease); }
.phone__screen #showImg.swap { opacity: 0; transform: translateY(14px) scale(.98); }
.phone-nav { display: flex; align-items: center; gap: 14px; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.phone-nav button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.5rem; line-height: 1; transition: background .3s, transform .3s var(--ease); }
.phone-nav button:hover { background: var(--mode); color: var(--on-pastel); transform: scale(1.08); }
.screen-info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; display: grid; gap: 12px; min-width: 0; }
.screen-info .eyebrow { color: var(--mode-strong); }
.screen-info h3 { font-size: 1.7rem; }
.screen-info > p { color: var(--muted); }
.info-points { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; }
.info-points li { display: flex; gap: 10px; align-items: flex-start; font-size: .97rem; }
.info-points li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--mode); }
.screen-info.swap { animation: fadeSwap .5s var(--ease); }
@keyframes fadeSwap { from { opacity: 0; transform: translateX(12px); } }
@media (max-width: 1000px) {
  .showcase__grid { grid-template-columns: 1fr; gap: 28px; }
  .screens { order: 3; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .showcase__phone { order: 1; } .screen-info { order: 2; }
}

/* ---------- FEATURES ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: grid; gap: 8px; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.feature::before { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: var(--c); right: -60px; top: -60px; opacity: .35; transition: transform .6s var(--ease); }
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature:hover::before { transform: scale(1.6); }
.feature > * { position: relative; }
.feature__ico { width: 54px; height: 54px; border-radius: 16px; background: var(--c); display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .97rem; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.routines { margin-top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.routines__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.routines__tabs button { border: 1px solid var(--line); background: var(--bg); padding: 10px 20px; border-radius: 999px; font-weight: 800; transition: background .3s, transform .3s var(--ease); }
.routines__tabs button[aria-selected="true"] { background: var(--mint); color: var(--on-pastel); border-color: transparent; transform: translateY(-2px); }
.routines__body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.move { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-md); background: var(--tint); animation: rise .5s var(--ease) both; }
.move:nth-child(2) { animation-delay: .07s; } .move:nth-child(3) { animation-delay: .14s; }
.move__ico { font-size: 2rem; flex: none; }
.move b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; }
.move small { color: var(--muted); }
.routines__note { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.routines__note b { color: var(--ink); }
@media (max-width: 760px) { .routines__body { grid-template-columns: 1fr; } }

/* ---------- PLAY ---------- */
.play { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
.play__side { display: grid; gap: 20px; }
.play__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 14px; }
.play__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pts-badge { background: var(--butter); color: var(--on-pastel); padding: 6px 14px; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums; transition: transform .3s var(--ease); }
.pts-badge.bump { animation: bump .6s var(--ease); }
@keyframes bump { 40% { transform: scale(1.25) rotate(-6deg); } }
.challenges { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ch { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; transition: border-color .3s, background .3s; }
.ch__ico { grid-row: span 2; font-size: 1.9rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--tint); }
.ch b { font-family: var(--f-display); font-weight: 600; font-size: 1.08rem; }
.ch small { color: var(--muted); }
.ch__btn { grid-column: 1 / -1; margin-top: 8px; border: 0; border-radius: 14px; padding: 12px; font-weight: 800; background: var(--sky); color: var(--on-pastel); transition: background .3s, transform .2s; }
.ch__btn:hover { transform: translateY(-2px); }
.ch[data-state="waiting"] { border-color: var(--pink); }
.ch[data-state="waiting"] .ch__btn { background: var(--pink); }
.ch[data-state="done"] { background: color-mix(in srgb, var(--mint) 22%, var(--surface)); border-color: var(--mint); }
.ch[data-state="done"] .ch__btn { background: var(--mint); cursor: default; }
.ch[data-state="done"] .ch__btn:hover { transform: none; }
.xp { height: 16px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.xp__bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--sky)); transition: width .9s var(--ease); }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.badge { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 10px 4px; border-radius: 16px; background: var(--tint); filter: grayscale(1); opacity: .5; transition: filter .5s, opacity .5s, transform .5s var(--ease); }
.badge span { font-size: 1.6rem; }
.badge small { font-size: .72rem; font-weight: 700; line-height: 1.2; }
.badge.is-on { filter: none; opacity: 1; background: color-mix(in srgb, var(--butter) 45%, var(--surface)); }
.badge.unlock { animation: unlock .9s var(--ease); }
@keyframes unlock { 30% { transform: scale(1.3) rotate(10deg); } 60% { transform: scale(.95) rotate(-4deg); } }
.water { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.glasses { display: flex; gap: 6px; }
.glass { width: 26px; height: 36px; border: 2px solid var(--sky-strong); border-top: 0; border-radius: 0 0 8px 8px; position: relative; overflow: hidden; }
.glass::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--sky); transition: height .6s var(--ease); }
.glass.full::after { height: 85%; }
.moods { display: flex; flex-wrap: wrap; gap: 8px; }
.moods button { display: grid; justify-items: center; gap: 2px; border: 1px solid var(--line); background: var(--bg); border-radius: 16px; padding: 10px 8px; min-width: 72px; font-size: .78rem; font-weight: 700; transition: transform .3s var(--ease), background .3s, border-color .3s; }
.moods button span { font-size: 1.6rem; transition: transform .4s var(--ease); }
.moods button:hover span { transform: scale(1.2) rotate(-8deg); }
.moods button[aria-checked="true"] { background: color-mix(in srgb, var(--peach) 45%, var(--surface)); border-color: var(--peach); transform: translateY(-3px); }
.mood-msg { color: var(--muted); font-size: .95rem; min-height: 3em; }
.toast { visibility: hidden; position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 70; transform: translate(-50%, calc(100% + 60px)); background: var(--deep); color: var(--deep-fg); padding: 12px 20px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-lg); transition: transform .5s var(--ease); max-width: calc(100% - 32px); text-align: center; }
.toast.show { visibility: visible; transform: translate(-50%, 0); }
.toast { transition: transform .5s var(--ease), visibility .5s; }
.confetti { position: fixed; top: 0; left: 0; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; z-index: 80; }
@media (max-width: 880px) { .play { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .badges { grid-template-columns: repeat(2, 1fr); } }

/* ---------- RECETARIO ---------- */
.plate-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: center; }
.plate { display: grid; gap: 20px; justify-items: center; }
.plate svg { width: min(300px, 80vw); overflow: visible; }
.plate__rim { fill: var(--surface); stroke: var(--line); stroke-width: 4; }
.plate__seg { stroke: var(--surface); stroke-width: 3; transform-origin: 100px 100px; transition: transform .5s var(--ease), opacity .4s; cursor: pointer; }
.seg-veg { fill: var(--mint); } .seg-cer { fill: var(--butter); } .seg-leg { fill: var(--peach); }
.plate.has-sel .plate__seg { opacity: .35; }
.plate.has-sel .plate__seg.sel { opacity: 1; transform: scale(1.06); }
.plate svg { animation: spinIn 1.4s var(--ease) both; }
@keyframes spinIn { from { transform: rotate(-90deg) scale(.9); } }
.plate__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lg { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px 8px 10px; font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; transition: transform .3s var(--ease), border-color .3s; }
.lg::before { content: ""; width: 14px; height: 14px; border-radius: 50%; }
.lg-veg::before { background: var(--mint); } .lg-cer::before { background: var(--butter); } .lg-leg::before { background: var(--peach); }
.lg[aria-pressed="true"] { border-color: var(--ink); transform: translateY(-2px); }
.recipes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.recipe { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; transition: opacity .4s, transform .4s var(--ease), box-shadow .4s; }
.recipe:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.recipe.dim { opacity: .35; transform: scale(.97); }
.recipe__ico { flex: none; width: 56px; height: 56px; border-radius: 18px; background: var(--tint); display: grid; place-items: center; font-size: 1.8rem; }
.recipe h3 { font-size: 1.05rem; }
.recipe p { color: var(--muted); font-size: .85rem; margin-top: 4px; }
@media (max-width: 900px) { .plate-wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .recipes { grid-template-columns: 1fr; } }

/* ---------- TIMELINE ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--mint), var(--pink), var(--butter), var(--sky), var(--peach)); }
.tl { position: relative; display: grid; gap: 18px; justify-items: start; }
.tl__dot { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--c); }
.tl--now .tl__dot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--c); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { transform: scale(1.8); opacity: 0; } }
.tl--next .tl__dot { background: var(--bg); border-style: dashed; border-color: var(--c); box-shadow: none; }
.tl__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; display: grid; gap: 8px; height: 100%; transition: transform .4s var(--ease), box-shadow .4s; }
.tl__card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.tl--now .tl__card { border: 2px solid var(--c); }
.tl--next .tl__card { border-style: dashed; }
.tl__tag { justify-self: start; background: var(--c); color: var(--on-pastel); padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: .74rem; letter-spacing: .04em; }
.tl p { color: var(--muted); font-size: .93rem; }
@media (max-width: 980px) {
  .timeline { grid-template-columns: 1fr; gap: 18px; padding-left: 40px; }
  .timeline::before { left: 11px; right: auto; top: 0; bottom: 0; width: 4px; height: auto; background: linear-gradient(180deg, var(--mint), var(--pink), var(--butter), var(--sky), var(--peach)); }
  .tl__dot { position: absolute; left: -40px; top: 20px; }
}

/* ---------- TECH ---------- */
.tech { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.tech > div:first-child { display: grid; gap: 14px; }
.chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: .9rem; transition: transform .3s var(--ease), background .3s; }
.chips li:hover { transform: translateY(-3px) rotate(-2deg); background: var(--sky); color: var(--on-pastel); }
.chips small { color: var(--muted); font-weight: 600; }
.chips li:hover small { color: inherit; }
.code { background: #16263A; color: #E6EEF7; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); min-width: 0; }
.code__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: #1E3149; font: 600 .85rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #9FB4CC; }
.code__bar i { width: 12px; height: 12px; border-radius: 50%; background: #F8B4C4; } .code__bar i:nth-child(2) { background: #FFE39E; } .code__bar i:nth-child(3) { background: #AEE5CF; }
.code__bar span { margin-left: 8px; }
.code__files { list-style: none; margin: 0; padding: 10px; display: grid; }
.code__files li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; transition: background .3s; }
.code__files li:hover { background: rgba(156, 207, 246, .12); }
.code__files code { font: 600 .92rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #9CCFF6; overflow-wrap: anywhere; }
.code__files li:nth-child(even) code { color: #F8B4C4; }
.code__files span { font-size: .88rem; color: #B5C5D6; }
@media (max-width: 880px) { .tech { grid-template-columns: 1fr; } }

/* ---------- CONFIANZA ---------- */
.promises { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 36px; }
.promise { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; display: grid; gap: 10px; }
.promise span { font-size: 1.7rem; }
.promise p { font-weight: 700; font-size: .95rem; line-height: 1.4; }
@media (max-width: 1000px) { .promises { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.accordion { display: grid; gap: 10px; }
.accordion details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: border-color .3s; }
.accordion details[open] { border-color: var(--sky); }
.accordion summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 18px 22px; flex-wrap: wrap; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; margin-left: auto; font: 600 1.5rem var(--f-display); color: var(--sky-strong); transition: transform .4s var(--ease); }
.accordion details[open] summary::after { transform: rotate(45deg); }
.acc__code { background: var(--tint); border-radius: 8px; padding: 4px 10px; font: 700 .82rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.acc__t { font: 600 1.08rem var(--f-display); }
.accordion details p { padding: 0 22px 20px; color: var(--muted); max-width: 75ch; }
.accordion details[open] p { animation: rise .45s var(--ease); }

/* ---------- CALIDAD ---------- */
.quality { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.sprint { display: grid; place-items: center; padding: 30px 0; }
.sprint__ring { position: relative; width: min(340px, 78vw); aspect-ratio: 1; border-radius: 50%; border: 3px dashed var(--line); }
.sprint__ring::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--sky-strong); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sp { position: absolute; transform: translate(-50%, -50%); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-weight: 800; font-size: .8rem; white-space: nowrap; box-shadow: var(--shadow); }
.sp1 { left: 50%; top: 0; background: var(--sky); color: var(--on-pastel); border: 0; }
.sp2 { left: 97%; top: 35%; background: var(--mint); color: var(--on-pastel); border: 0; }
.sp3 { left: 80%; top: 90%; background: var(--butter); color: var(--on-pastel); border: 0; }
.sp4 { left: 20%; top: 90%; background: var(--peach); color: var(--on-pastel); border: 0; }
.sp5 { left: 3%; top: 35%; background: var(--pink); color: var(--on-pastel); border: 0; }
.sprint__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.sprint__center b { font: 700 4rem/1 var(--f-display); }
.sprint__center small { color: var(--muted); font-weight: 700; }
.metrics { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 14px; }
.metric { display: grid; grid-template-columns: 1fr 120px 64px; gap: 12px; align-items: center; font-size: .95rem; }
.metric b { text-align: right; font-variant-numeric: tabular-nums; }
.metric--plain { grid-template-columns: 1fr auto; border-top: 1px dashed var(--line); padding-top: 12px; }
.bar { height: 10px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--sky)); transform-origin: left; }
.metrics.in .bar i { animation: grow 1.3s .2s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
@media (max-width: 880px) { .quality { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .metric { grid-template-columns: 1fr 64px; } .metric .bar { grid-column: 1 / -1; grid-row: 2; } .sp { font-size: .7rem; padding: 6px 9px; } }

/* ---------- EQUIPO ---------- */
.team { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 18px; display: grid; justify-items: center; text-align: center; gap: 8px; transition: transform .4s var(--ease), box-shadow .4s; }
.member:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.avatar { width: 76px; height: 76px; border-radius: 26px; background: var(--c); color: var(--on-pastel); display: grid; place-items: center; font: 600 1.5rem var(--f-display); margin-bottom: 6px; transition: border-radius .5s var(--ease), transform .5s var(--ease); }
.member:hover .avatar { border-radius: 50%; transform: rotate(-8deg); }
.member h3 { font-size: 1rem; }
.member p { color: var(--muted); font-size: .88rem; font-weight: 700; }
@media (max-width: 1000px) { .team { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }

.schedule { margin-top: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.schedule__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.schedule__head h3 { font-size: 1.4rem; }
.cost { background: color-mix(in srgb, var(--mint) 40%, var(--surface)); padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .92rem; }
.cost b { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; }
.cost small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.gantt-scroll { overflow-x: auto; }
.gantt { position: relative; min-width: 620px; display: grid; gap: 8px; --label: 260px; }
@media (max-width: 640px) { .gantt { --label: 170px; min-width: 540px; } }
.g-row { display: grid; grid-template-columns: var(--label) repeat(5, 1fr); align-items: center; min-height: 34px; font-size: .9rem; }
.g-row > span:first-child { padding-right: 12px; color: var(--muted); font-weight: 600; }
.g-months span { font-weight: 800; text-align: center; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.g-row i { grid-column: calc(var(--s) + 1) / calc(var(--e) + 1); grid-row: 1; height: 22px; border-radius: 999px; background: var(--c); margin: 0 4px; transform-origin: left; }
.schedule.in .g-row i { animation: grow 1s var(--ease) both; }
.schedule.in .g-row:nth-child(3) i { animation-delay: .08s; } .schedule.in .g-row:nth-child(4) i { animation-delay: .16s; } .schedule.in .g-row:nth-child(5) i { animation-delay: .24s; } .schedule.in .g-row:nth-child(6) i { animation-delay: .32s; } .schedule.in .g-row:nth-child(7) i { animation-delay: .4s; } .schedule.in .g-row:nth-child(8) i { animation-delay: .48s; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--pink-strong); left: calc(var(--label) + (100% - var(--label)) * (var(--m) / 5)); }
.g-today span { position: absolute; top: -2px; left: 6px; font-size: .72rem; font-weight: 800; color: var(--pink-strong); }

/* ---------- FOOTER ---------- */
.footer { background: var(--deep); color: var(--deep-fg); padding-block: 48px; }
.footer .brand { color: var(--deep-fg); }
.footer .brand__shield path:first-child { stroke: var(--deep-fg); }
.footer__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.footer__inner > div { display: grid; gap: 6px; }
.footer__inner > div p { opacity: .75; }
.footer__note { opacity: .75; font-size: .9rem; max-width: 70ch; }
.to-top { width: 48px; height: 48px; border-radius: 50%; background: var(--sky); color: var(--on-pastel); display: grid; place-items: center; text-decoration: none; font-weight: 800; font-size: 1.2rem; transition: transform .3s var(--ease); }
.to-top:hover { transform: translateY(-4px); }
@media (max-width: 760px) { .footer__inner { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
}
