/* ============================================================
   KONCEPTO · BASE  (reset · type · buttons · surfaces · a11y · motion base)
   ============================================================ */

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

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

body {
  font-family: var(--font);
  font-weight: var(--fw-regular);
  font-size: var(--fs-18);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}
html { overflow-x: clip; }

img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}
/* the lime ring is invisible on light and lime bands (≈1:1 contrast) — keyboard-only,
   swaps the outline colour per theme; nothing changes for pointer users */
.theme-light :focus-visible,
.svc-panel--intro :focus-visible,
.site-header.is-light :focus-visible { outline-color: var(--ink); }
.theme-lime :focus-visible,
.final-cta :focus-visible { outline-color: var(--lime-ink); }

/* ---------- Layout shell ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

/* ---------- Fixed background canvas (dark base + off-white reveal) ---------- */
.bg-canvas { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.bg-canvas__dark  { position: absolute; inset: 0; background: var(--bg-1); }
.bg-canvas__light {
  position: absolute; inset: 0; background: var(--light-bg);
  opacity: var(--lp, 0);
  will-change: opacity;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--lime); color: var(--lime-ink); font-weight: var(--fw-bold);
  transform: translateY(-150%); transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.eyebrow--dark { color: var(--ink-dim); }
.eyebrow__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime);
  box-shadow: var(--edge-dark);
}

.section__title {
  font-weight: var(--fw-black);
  font-size: var(--fs-section);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 15ch;
}
.theme-light .section__title { color: var(--ink); }

.section__lead {
  font-size: var(--fs-24);
  line-height: 1.45;
  color: var(--ink-dim);
  max-width: 44ch;
}

/* ============================================================
   TACTILE / ENGINEERED BUTTONS
   Glass/metal feel: flat surface + thin edges + ONE shadow.
   Feedback: overshoot-settle on hover, press depth on active.
   NO glow anywhere.
   ============================================================ */
/* FLAT buttons. Hover = a second colour sweeps up from the bottom (no shadow,
   no 3D). Done with a hard-stop gradient slid via background-position. */
.btn {
  --btn-base: var(--surface-2);
  --btn-fill: var(--lime);
  --btn-fg: var(--text);
  --btn-fg-hover: var(--lime-ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  min-height: 52px;
  padding: 0 var(--s-6);
  border-radius: var(--r-pill);
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--btn-fg);
  background-color: var(--btn-base);
  background-image: linear-gradient(var(--btn-fill), var(--btn-fill));
  background-repeat: no-repeat;
  background-position: 50% 100%;           /* anchored to the bottom */
  background-size: 100% 0%;                /* fill grows up on hover */
  transition: background-size 0.5s var(--ease-out), color 0.32s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn--sm { min-height: 44px; padding: 0 var(--s-5); font-size: var(--fs-14); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background-size: 100% 100%; color: var(--btn-fg-hover); }
}
.btn:active { background-size: 100% 100%; color: var(--btn-fg-hover); }

/* PRIMARY — flat lime; fills dark from the bottom (inverts). A lime ring
   stays so the inverted (dark) hover state still reads against dark bg. */
.btn--primary { --btn-base: var(--lime); --btn-fill: var(--lime-ink); --btn-fg: var(--lime-ink); --btn-fg-hover: var(--lime); box-shadow: inset 0 0 0 1.5px var(--lime); }
/* GHOST — flat dark; fills lime from the bottom */
.btn--ghost   { --btn-base: var(--surface-2); --btn-fill: var(--lime); --btn-fg: var(--text); --btn-fg-hover: var(--lime-ink); box-shadow: inset 0 0 0 1px var(--hairline-strong); }
/* INK (on the lime band) — flat dark; fills lime; ink ring keeps the shape */
.btn--ink     { --btn-base: var(--lime-ink); --btn-fill: var(--lime); --btn-fg: var(--lime); --btn-fg-hover: var(--lime-ink); box-shadow: inset 0 0 0 1.5px var(--lime-ink); }
/* INK-GHOST (on the lime band) — flat outline; fills dark from the bottom */
.btn--ink-ghost {
  --btn-base: transparent; --btn-fill: var(--lime-ink); --btn-fg: var(--lime-ink); --btn-fg-hover: var(--lime);
  box-shadow: inset 0 0 0 1.5px rgba(10,14,7,0.55);
}
/* SOLID-LIME — filled near-black + off-white text + a brand-lime ring at rest
   (hero "Contanos qué querés resolver"). Hover keeps the lime sweep + dark text. */
.btn--solid-lime {
  --btn-base: var(--lime-ink);          /* #0A0E07 solid near-black */
  --btn-fill: var(--lime);              /* lime fill grows on hover */
  --btn-fg: var(--lime);                /* lime text at rest (matches the ring) */
  --btn-fg-hover: var(--lime-ink);      /* dark text once the lime covers it */
  box-shadow: inset 0 0 0 1.5px var(--lime);  /* visible brand-lime ring */
}

/* Inline arrow link */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: var(--fw-semibold); font-size: var(--fs-16);
  color: var(--ink);
  transition: gap var(--dur) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.link-arrow:hover { gap: 12px; color: var(--lime-deep); }

/* ============================================================
   SURFACES (flat glass/metal)
   ============================================================ */
.surface {
  background: var(--surface-1);
  border-radius: var(--r-lg);
  box-shadow: var(--edge-dark), var(--shadow-1);
}

/* ============================================================
   LANGUAGE TOGGLE (segmented pill — competitor pattern)
   ============================================================ */
.lang-toggle {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(22,22,24,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--edge-dark);
}
.lang-toggle__btn {
  position: relative; z-index: 1;
  min-width: 44px; min-height: 44px; padding: 0 var(--s-3);
  font-size: var(--fs-14); font-weight: var(--fw-bold);
  color: var(--text-dim);
  border-radius: var(--r-pill);
  transition: color var(--dur) var(--ease-out);
}
.lang-toggle__btn.is-active { color: var(--lime-ink); }
/* hover feedback on the inactive option */
@media (hover: hover) and (pointer: fine) {
  .lang-toggle__btn:not(.is-active):hover { color: var(--text); }
  .site-header.is-light .lang-toggle__btn:not(.is-active):hover { color: var(--ink); }
}
/* On the light theme give the toggle a solid surface for AA contrast */
.site-header.is-light .lang-toggle {
  background: var(--light-surface);
  box-shadow: var(--edge-light), var(--shadow-light-1);
}
.site-header.is-light .lang-toggle__btn { color: var(--ink-dim); }
.site-header.is-light .lang-toggle__btn.is-active { color: var(--lime-ink); }
.lang-toggle__thumb {
  position: absolute; top: 4px; left: 4px; z-index: 0;
  width: calc(50% - 4px); height: calc(100% - 8px);
  border-radius: var(--r-pill);
  background: var(--lime);
  transform: translateX(var(--thumb-x, 0));
  transition: transform var(--dur) var(--ease-overshoot);
}
.lang-toggle.lang--en .lang-toggle__thumb { --thumb-x: 100%; }
/* footer toggle on dark mirrors header */
.lang-toggle--footer { background: rgba(28,28,31,0.7); }

/* ============================================================
   HEADER — full-width bar at the top (nav · logo · actions);
   on scroll it detaches into a small logo PILL that expands on hover.
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: 0;
  pointer-events: none;                 /* only the bar/pill is interactive */
  transition: padding-top var(--dur-slow) var(--ease-out);
}
.header__inner {
  pointer-events: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  width: 100%; max-width: var(--shell); margin-inline: auto;
  padding: 14px var(--shell-pad);
  border-radius: 0;
  transition: max-width var(--dur-slow) var(--ease-out),
              padding var(--dur-slow) var(--ease-out),
              border-radius var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.nav { grid-column: 1; justify-self: start; display: flex; gap: var(--s-6); }
.brand { grid-column: 2; display: inline-flex; align-items: center; }
.header__actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: var(--s-4); }

.brand__word {
  height: 46px; width: auto; object-fit: contain;
  filter: invert(1);                 /* black wordmark -> white on dark bg */
  transition: height var(--dur) var(--ease-out);
}
/* on the light theme keep it black (no invert) — identical size either way */
.site-header.is-light .brand__word { filter: none; }

/* ---- STUCK: detach + collapse to a logo pill (desktop) ---- */
.site-header.is-stuck { padding-top: 14px; }
@media (min-width: 861px) {
  .site-header.is-stuck .header__inner {
    max-width: 264px;
    padding: 8px 26px;
    border-radius: var(--r-pill);
    overflow: hidden;
    background: rgba(14,14,17,0.74);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    box-shadow: var(--shadow-3);
  }
  .site-header.is-stuck .brand__word { height: 30px; }
  .site-header.is-stuck .nav,
  .site-header.is-stuck .header__actions {
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur) var(--ease-out);
  }
  /* hover the pill → expand to the sides, bring nav + actions back.
     :focus-within mirrors it for keyboard users (the hidden links are tabbable —
     without this the focus ring would land inside an invisible collapsed pill) */
  .site-header.is-stuck:hover .header__inner,
  .site-header.is-stuck:focus-within .header__inner { max-width: min(1160px, 92vw); padding-inline: var(--s-7); }
  .site-header.is-stuck:hover .nav,
  .site-header.is-stuck:hover .header__actions,
  .site-header.is-stuck:focus-within .nav,
  .site-header.is-stuck:focus-within .header__actions { opacity: 1; pointer-events: auto; transition-delay: 0.12s; }

  /* themed pill backgrounds */
  .site-header.is-light.is-stuck .header__inner {
    background: rgba(244,244,242,0.9); box-shadow: var(--shadow-light-2);
  }
  .site-header.is-onlime.is-stuck .header__inner {
    background: rgba(14,14,17,0.85); box-shadow: var(--shadow-3);
  }
}
/* ---- mobile: logo left · actions right (centred logo is a desktop look) ---- */
@media (max-width: 860px) {
  .header__inner { grid-template-columns: auto 1fr; }
  .brand { grid-column: 1; justify-self: start; }
  .header__actions { grid-column: 2; justify-self: end; }
  /* on scroll: detach into a floating rounded bar (no collapse/hover) */
  .site-header.is-stuck .header__inner {
    max-width: calc(100% - 28px);
    border-radius: var(--r-pill);
    background: rgba(14,14,17,0.78);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    box-shadow: var(--shadow-3);
    padding: 8px 10px 8px 18px;
  }
  .site-header.is-light.is-stuck .header__inner { background: rgba(244,244,242,0.92); box-shadow: var(--shadow-light-2); }
  .site-header.is-onlime.is-stuck .header__inner { background: rgba(14,14,17,0.85); }
  .brand__word { height: 34px; }
  .site-header.is-stuck .brand__word { height: 32px; }
}

/* nav links: NO underline, NO pill — pure color state changes.
   idle = muted gray · hover = brand green (no background) · active = near-black/white. */
.nav__link {
  position: relative; font-size: var(--fs-16); font-weight: var(--fw-medium);
  color: rgba(244,244,245,0.52); padding: 6px 0;
  transition: color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav__link:hover { color: var(--lime); }
}
.nav__link.is-current { color: var(--text); }
/* light header (post-hero): dark grayscale idle, deeper green on hover */
.site-header.is-light .nav__link { color: rgba(18,18,20,0.48); }
@media (hover: hover) and (pointer: fine) {
  .site-header.is-light .nav__link:hover { color: var(--lime-deep); }
}
.site-header.is-light .nav__link.is-current { color: var(--ink); }

/* LIGHT-HEADER CTA — in the light (cream) header the CTA must have a LIGHT background
   (user: "fondo claro"). The inherited .btn--primary inverts to a near-black fill on
   hover = a heavy dark blob on cream. Here at REST it mirrors the lang-toggle exactly:
   a plain light-surface chip set off by only a soft edge + small shadow — NO lime ring
   (user: "sin la línea verde de contorno... igual al de cambio de lenguaje"). On HOVER
   it sweeps BRIGHT lime (never dark) with dark text. Dark-header .btn--primary untouched. */
.site-header.is-light .header__cta {
  --btn-base: var(--light-surface);   /* #FBFBF9 — light bg, not lime, not dark */
  --btn-fill: var(--lime);            /* bright lime sweep on hover */
  --btn-fg: var(--ink);               /* dark text at rest */
  --btn-fg-hover: var(--lime-ink);    /* dark text once the lime covers it */
  box-shadow: var(--edge-light), var(--shadow-light-1);  /* same as .lang-toggle: edge + soft shadow, no ring */
}
@media (hover: hover) and (pointer: fine) {
  /* fills lime + a touch more lift so it reads as a pressable primary */
  .site-header.is-light .header__cta:hover {
    box-shadow: var(--edge-light), var(--shadow-light-2);
  }
}
.site-header.is-light .header__cta:active {
  box-shadow: var(--edge-light), var(--shadow-light-1);
}

.header__actions { display: flex; align-items: center; gap: var(--s-4); }

/* ---- i18n layout stability: reserve fixed widths so ES↔EN never shifts
   buttons or nav (labels just re-center within the reserved box) ---- */
@media (min-width: 861px) {
  .header__cta { min-width: 212px; }
  .nav__link { text-align: center; }
  .nav__link[href="#servicios"]    { min-width: 90px; }
  .nav__link[href="#inmobiliario"] { min-width: 116px; }
  .nav__link[href="#proceso"]      { min-width: 78px; }
  .hero__actions .btn[data-i18n="cta.solve"] { min-width: 322px; }
  .hero__actions .btn[data-i18n="cta.book"]  { min-width: 248px; }
  .final-cta__actions .btn[data-i18n="cta.book"]  { min-width: 248px; }
  .final-cta__actions .btn[data-i18n="cta.write"] { min-width: 276px; }
}

/* ============================================================
   BURGER + MOBILE MENU (mobile only)
   ============================================================ */
.burger {
  display: none;                       /* shown ≤860 */
  width: 46px; height: 46px; border-radius: 50%;
  place-items: center; position: relative; z-index: 120;
  background: rgba(35,35,39,0.0);
}
.burger__ico, .burger__ico::before, .burger__ico::after {
  content: ""; position: absolute; left: 50%; width: 22px; height: 2px; border-radius: 2px;
  background: currentColor; transform: translateX(-50%);
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.burger__ico { top: 50%; margin-top: -1px; color: var(--text); }
.site-header.is-light .burger__ico { color: var(--ink); }
.burger__ico::before { top: -7px; }
.burger__ico::after  { top: 7px; }
/* open → X (the menu controls its own colour so force light lines) */
body.menu-open .burger__ico { background: transparent; color: var(--text); }
body.menu-open .burger__ico::before { transform: translateX(-50%) translateY(7px) rotate(45deg); }
body.menu-open .burger__ico::after  { transform: translateX(-50%) translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 110;
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-7);
  padding: clamp(2rem, 8vh, 5rem) var(--shell-pad) calc(2rem + env(safe-area-inset-bottom));
  background: var(--bg-1);
  /* circular reveal from the burger (top-right) */
  clip-path: circle(0px at calc(100% - 47px) 47px);
  visibility: hidden;
  transition: clip-path 0.55s var(--ease-out), visibility 0s linear 0.55s;
}
body.menu-open .mobile-menu {
  clip-path: circle(150% at calc(100% - 47px) 47px);
  visibility: visible;
  transition: clip-path 0.6s var(--ease-out), visibility 0s;
}
.mobile-menu__nav { display: flex; flex-direction: column; gap: var(--s-4); }
.mobile-menu__nav a {
  font-size: clamp(2.25rem, 11vw, 3.5rem); font-weight: var(--fw-black);
  letter-spacing: -0.03em; color: var(--text); line-height: 1.02;
  opacity: 0; transform: translateX(-16px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.mobile-menu__nav a:active { color: var(--lime); }
body.menu-open .mobile-menu__nav a { opacity: 1; transform: none; }
body.menu-open .mobile-menu__nav a:nth-child(1) { transition-delay: 0.14s; }
body.menu-open .mobile-menu__nav a:nth-child(2) { transition-delay: 0.20s; }
body.menu-open .mobile-menu__nav a:nth-child(3) { transition-delay: 0.26s; }
body.menu-open .mobile-menu__nav a:nth-child(4) { transition-delay: 0.32s; }
.mobile-menu__foot {
  display: flex; flex-direction: column; gap: var(--s-5); align-items: flex-start;
  opacity: 0; transition: opacity var(--dur) var(--ease-out) 0.34s;
}
body.menu-open .mobile-menu__foot { opacity: 1; }
.mobile-menu__foot .btn { width: 100%; }
body.menu-open { overflow: hidden; }

/* explicit close (X) — lives INSIDE the menu so it's always above the opaque overlay and
   tappable. The header burger sits in the header's z-100 stacking context (its local
   z-120 can't escape it), so it ends up trapped UNDER the z-110 menu and can't be used
   to close. This button is the reliable close affordance, aligned to the reveal origin. */
.mobile-menu__close {
  position: absolute; top: 24px; right: 24px; z-index: 2;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; color: var(--text);
  background: rgba(244,244,245,0.06);
  opacity: 0; transform: scale(0.9);
  transition: opacity var(--dur) var(--ease-out) 0.18s,
              transform var(--dur) var(--ease-overshoot) 0.18s,
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
body.menu-open .mobile-menu__close { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .mobile-menu__close:hover { background: rgba(244,244,245,0.12); color: var(--lime); }
}
.mobile-menu__close:active { color: var(--lime); }
.mobile-menu__close-ico { position: relative; width: 22px; height: 22px; }
.mobile-menu__close-ico::before, .mobile-menu__close-ico::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 22px; height: 2px; border-radius: 2px; background: currentColor;
}
.mobile-menu__close-ico::before { transform: translate(-50%, -50%) rotate(45deg); }
.mobile-menu__close-ico::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ============================================================
   REVEAL ON SCROLL (lateral slide-ins — ecloud model)
   ============================================================ */
/* Scroll-linked reveals: JS sets opacity + transform inline every frame,
   tied to scroll position so they build on the way down and reverse on the
   way up. No CSS transition (it would lag the scrub). */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* ============================================================
   IGNITION / ENGINE-START (first paint cascade)
   ============================================================ */
.ignite-item {
  opacity: 0;
  transform: translateY(18px);
}
body.ignite .ignite-item {
  animation: ignite-seat 720ms var(--ease-overshoot) forwards;
  animation-delay: calc(120ms + var(--ignite-step, 0) * 60ms);
}
@keyframes ignite-seat {
  from { opacity: 0; transform: translateY(18px); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: translateY(0); }
}
/* finished / skipped state */
body.ignited .ignite-item { opacity: 1; transform: none; animation: none; }

/* preload guard: hide hero gradient drift until JS boots to avoid flash */
body.preload * { animation-play-state: paused !important; }

/* ============================================================
   REDUCED MOTION — present finished states instantly
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ignite-item { opacity: 1 !important; transform: none !important; animation: none !important; }
  .btn, .nav__link::after, .link-arrow { transition: none !important; }
  /* services: unpin the blocks and stack them as normal sections.
     margin-top:-100vh exists only for the pinned overlap over the hero tail — with the
     panels static it would drag them ON TOP of the hero (dark text over dark frame). */
  .svc-stage { height: auto !important; margin-top: 0 !important; }
  .svc-pin { position: static !important; height: auto !important; overflow: visible !important; }
  .svc-panel { position: relative !important; inset: auto !important; transform: none !important; min-height: 78vh; }
  .svc-panel--intro { background: var(--light-bg) !important; }
  .chev, .svc-intro__title { transform: none !important; opacity: 1 !important; }
  .tw__caret { display: none !important; }
  /* outro: unpin exactly like services — otherwise the final block (opaque, z5,
     translateY(0) under reduced-motion) sits over the process and hides it entirely */
  .outro-stage { height: auto !important; }
  .outro-pin { position: static !important; height: auto !important; overflow: visible !important; }
  .outro-pin .process { position: static !important; inset: auto !important; padding-block: var(--section-pad) !important; }
  .final-block { position: static !important; transform: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- utilities ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   SKELETON LOADER — short, decorative "app is loading" overlay that mirrors the
   hero 1:1, lit by one diagonal sheen, then fades and hands off to the ignition.
   GPU-cheap: animates background-position (sheen) + opacity (exit) only.
   ============================================================ */
.skeleton {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-1);
  display: flex; flex-direction: column;
  opacity: 1;
  transition: opacity 450ms var(--ease-out), visibility 0s linear 450ms;
  will-change: opacity;
  overflow: hidden;
  --sheen: linear-gradient(100deg,
            transparent 0%, transparent 30%,
            rgba(244,244,245,0.06) 46%, rgba(244,244,245,0.11) 50%, rgba(244,244,245,0.06) 54%,
            transparent 70%, transparent 100%);
}
/* parked: the loader is disabled via [hidden] on the markup (see index.html). This keeps
   the whole system intact but never paints it. Removing `hidden` re-enables it. */
.skeleton[hidden] { display: none; }
/* shared placeholder: charcoal card + sweeping sheen */
.skeleton .sk {
  position: relative; border-radius: var(--r-md);
  background-color: var(--surface-1);
  background-image: var(--sheen);
  background-repeat: no-repeat; background-size: 220% 100%; background-position: 120% 0;
  box-shadow: inset 0 0 0 1px var(--hairline);
  animation: sk-sheen 1.05s linear infinite;
}
.skeleton .sk--d1 { animation-delay: .08s }
.skeleton .sk--d2 { animation-delay: .16s }
.skeleton .sk--d3 { animation-delay: .24s }
.skeleton .sk--pill { border-radius: var(--r-pill) }
@keyframes sk-sheen { from { background-position: 120% 0 } to { background-position: -120% 0 } }
/* keep the sheen running even before JS boots (overrides the body.preload pause) */
body.preload .skeleton .sk { animation-play-state: running !important; }

/* header mirror: .header__inner 3-col grid */
.skeleton .sk-header {
  width: 100%; max-width: var(--shell); margin-inline: auto;
  padding: 14px var(--shell-pad);
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center;
}
.skeleton .sk-nav { justify-self: start; display: flex; gap: 2rem; }
.skeleton .sk-nav .sk { height: 14px; border-radius: var(--r-pill); box-shadow: none; background-color: var(--surface-2); }
.skeleton .sk-nav .sk:nth-child(1) { width: 74px }
.skeleton .sk-nav .sk:nth-child(2) { width: 92px }
.skeleton .sk-nav .sk:nth-child(3) { width: 64px }
.skeleton .sk-logo { justify-self: center; width: 150px; height: 26px; border-radius: 8px; }
.skeleton .sk-actions { justify-self: end; display: flex; align-items: center; gap: 1rem; }
.skeleton .sk-lang { width: 74px; height: 40px; }
.skeleton .sk-cta { width: 200px; height: 44px; }

/* hero mirror: giant title + aside pinned to the bottom */
.skeleton .sk-hero {
  flex: 1 1 auto; width: 100%; max-width: var(--shell); margin-inline: auto;
  padding-inline: var(--shell-pad);
  padding-block: clamp(102px,14.5vh,168px) clamp(24px,5vh,52px);
  display: flex; flex-direction: column;
}
.skeleton .sk-title { display: flex; flex-direction: column; gap: clamp(.6rem,1.4vh,1.1rem); }
.skeleton .sk-titlebar { height: clamp(3rem,7.4vw,8rem); border-radius: var(--r-lg); }
.skeleton .sk-titlebar--a { width: min(62%,560px) }
.skeleton .sk-titlebar--b {
  width: min(52%,470px);
  background-color: var(--surface-1);
  box-shadow: inset 0 0 0 1px rgba(203,242,78,0.16);  /* faint lime hairline (2nd hero line is lime) */
}
.skeleton .sk-aside {
  margin-top: auto;
  display: grid; grid-template-columns: minmax(0,38ch) auto;
  align-items: end; justify-content: space-between; gap: 1.5rem 3rem;
}
.skeleton .sk-sub { display: flex; flex-direction: column; gap: .7rem; width: 100%; max-width: 46ch; }
.skeleton .sk-subbar { height: 15px; border-radius: var(--r-pill); }
.skeleton .sk-subbar:nth-child(1) { width: 100% }
.skeleton .sk-subbar:nth-child(2) { width: 94% }
.skeleton .sk-subbar:nth-child(3) { width: 60% }
.skeleton .sk-ctas { display: flex; flex-wrap: wrap; gap: .75rem; align-self: end; }
.skeleton .sk-ctapill { height: 52px; }
.skeleton .sk-ctapill--a { width: clamp(220px,22vw,300px) }
.skeleton .sk-ctapill--b { width: clamp(200px,18vw,250px) }

/* exit (JS toggles .is-done) */
.skeleton.is-done { opacity: 0; pointer-events: none; visibility: hidden; }
.skeleton.is-done .sk { animation-play-state: paused; }

@media (max-width: 860px) {
  .skeleton .sk-header { grid-template-columns: auto 1fr; }
  .skeleton .sk-nav { display: none; }
  .skeleton .sk-logo { grid-column: 1; justify-self: start; width: 120px; }
  .skeleton .sk-actions { grid-column: 2; }
  .skeleton .sk-cta { width: 150px; }
  .skeleton .sk-titlebar--a { width: 86% }
  .skeleton .sk-titlebar--b { width: 70% }
  .skeleton .sk-aside { grid-template-columns: 1fr; align-items: start; }
  .skeleton .sk-ctas { width: 100%; }
  .skeleton .sk-ctapill { flex: 1 1 auto; }
}
/* reduced motion: skip the decorative loader entirely (also enforced in JS) */
@media (prefers-reduced-motion: reduce) {
  .skeleton { display: none; }
  .skeleton .sk { animation: none; }
  .skeleton.is-done { transition: none; }
}
