/* ==========================================================================
   CAIL — Compute & Artificial Intelligence Lab
   Shared stylesheet (home, detail pages, products). Source of truth for the
   look: design_handoff_cail_home (variant A — bento hero), October 2026.
   ========================================================================== */

:root {
    /* Brand (logo.png — binding) */
    --brand-rust: #843B0F;
    --brand-navy: #195078;
    --brand-red: #E62518;

    --bg: #F5F7F9;
    --surface: #FFFFFF;
    --ink: #0D1B26;
    --ink-2: #3A4A58;
    --ink-3: #5A6A77;
    --muted: #A3B1BC;
    --line: #DCE3E9;
    --line-strong: #C3CDD5;
    --tint: #EEF2F5;
    --action: #195078;
    --action-hover: #0F3854;
    --online: #2E9E5B;

    --close-bg: #0D1B26;
    --close-surface: #142634;
    --close-hover: #18324A;
    --close-line: #253A4A;
    --close-ink: #EEF2F5;
    --close-ink-2: #A9B7C2;
    --step-outline: #3A5266;

    --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
    --font-logo: 'Poppins', var(--font-sans);

    --header-h: 71px;
    --gutter: clamp(16px, 3.4vw, 40px);
    --max: 1400px;
    --section-pad: clamp(72px, 9vw, 128px);
    --r-media: 20px;
    --r-card: 22px;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --t-ctl: transform 260ms var(--ease), background-color 240ms, border-color 240ms, color 240ms, box-shadow 300ms;
    --shadow-float: 0 1px 2px rgba(13, 27, 38, 0.08), 0 12px 32px -12px rgba(13, 27, 38, 0.28);
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--action); text-decoration: none; }
a:hover { color: var(--action-hover); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--action); color: #fff; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 500;
    transition: top 200ms var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

/* --- Logotype ------------------------------------------------------------- */
.logo-cail { font-family: var(--font-logo); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.c-rust { color: var(--brand-rust); }
.a-navy, .i-navy { color: var(--brand-navy); }
.l-red { color: var(--brand-red); }
.tri-rule { height: 3px; background: linear-gradient(90deg, var(--brand-rust) 0 21.5%, var(--brand-navy) 21.5% 78.5%, var(--brand-red) 78.5% 100%); }

/* --- Controls (pills) ------------------------------------------------------- */
.pill {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px; border-radius: 999px; border: 0;
    font-size: 0.9375rem; font-weight: 500; white-space: nowrap; cursor: pointer;
    transition: var(--t-ctl);
}
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: scale(0.96); transition-duration: 80ms; }
.pill svg { width: 16px; height: 16px; flex: none; }
.pill-primary { background: var(--action); color: #fff; }
.pill-primary:hover { background: var(--action-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(25, 80, 120, 0.65); }
.pill-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pill-outline:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pill-lg { height: 56px; padding: 0 26px; font-size: 1.0625rem; }
.pill-lg.has-chip { padding: 0 10px 0 26px; gap: 16px; }
.pill .chip { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--action); display: grid; place-items: center; }
.pill-white { background: #fff; color: var(--ink); }
.pill-white:hover { color: var(--ink); }
.round {
    width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line-strong); display: grid; place-items: center; cursor: pointer; color: var(--ink);
    transition: var(--t-ctl);
}
.round:hover { transform: translateY(-1px); }
.round:active { transform: scale(0.96); transition-duration: 80ms; }
.round svg { width: 18px; height: 18px; }

/* --- Header ------------------------------------------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245, 247, 249, 0.86);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.header-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .logo-cail { font-size: 1.5rem; }
.brand-sub { font-size: 0.6875rem; line-height: 1.25; color: var(--ink-3); max-width: 17ch; }
.nav-pill { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.nav-pill a { padding: 8px 16px; border-radius: 999px; font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); transition: var(--t-ctl); }
.nav-pill a:hover, .nav-pill a[aria-current="true"] { background: var(--tint); color: var(--ink); }
.nav-pill a:hover { transform: translateY(-1px); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang { position: relative; }
.lang-toggle { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); cursor: pointer; transition: var(--t-ctl); }
.lang-toggle:hover { transform: translateY(-1px); color: var(--ink); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px; padding: 6px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-float); z-index: 60; }
.lang-option { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font-size: 0.9375rem; color: var(--ink-2); text-align: left; cursor: pointer; }
.lang-option:hover { background: var(--tint); color: var(--ink); }
.lang-option[aria-checked="true"] { color: var(--ink); font-weight: 600; }
.lang-option .mono { font-size: 0.75rem; color: var(--ink-3); }
.menu-toggle { display: none; }
.mobile-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); height: calc(100vh - var(--header-h)); z-index: 49;
    background: var(--bg); padding: 16px var(--gutter) 32px; display: flex; flex-direction: column;
}
.mobile-nav a { padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.mobile-nav .pill { margin-top: 28px; align-self: flex-start; height: 52px; padding: 0 24px; font-size: 1rem; }

/* --- Hero (A: split headline + photo bento) -------------------------------- */
/* Hero runway: with the intro door the hero stays pinned while the door opens */
.hero-run { min-height: calc(100dvh - var(--header-h)); }
.has-intro .hero-run { height: calc(100dvh - var(--header-h) + 90vh); }
.hero-stage { transform-origin: 50% 30%; }
.has-intro .hero-stage { position: sticky; top: var(--header-h); transform: scale(0.9); will-change: transform; }
.hero { position: relative; max-width: var(--max); margin: 0 auto; min-height: calc(100dvh - var(--header-h)); padding: clamp(32px, 5vw, 72px) var(--gutter) clamp(40px, 5vw, 64px); display: flex; overflow: hidden; }
.hero-copy { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.hero-title { font-size: clamp(3rem, 1rem + 8vw, 9.5rem); font-weight: 600; line-height: 0.98; letter-spacing: -0.055em; max-width: 14ch; will-change: transform; }
.hero-title em { font-style: normal; color: var(--action); }
.hero-title .w { display: inline-block; overflow: hidden; padding-bottom: 0.06em; vertical-align: top; }
.hero-title em .w:last-child { padding-right: 0.04em; }
.hero-title .w > span { display: inline-block; }
.js .hero-title .w > span { transform: translateY(110%); transition: transform 1100ms var(--ease) var(--d, 0ms); }
.js .is-mounted .hero-title .w > span { transform: none; }
.status { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 4px rgba(46, 158, 91, 0.16); flex: none; }
.hero-lead { margin-top: 24px; max-width: 44ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.55; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.js .enter { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.js .enter.late { transform: translateY(40px); transition-duration: 1100ms; transition-delay: 120ms; }
.js .is-mounted .enter { opacity: 1; transform: none; }
.hero-trail { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-trail img { position: absolute; left: 0; top: 0; width: clamp(160px, 16vw, 260px); aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; opacity: 0; will-change: transform, opacity; box-shadow: 0 24px 48px -24px rgba(13, 27, 38, 0.45); }
.hero-hint { position: absolute; right: var(--gutter); bottom: clamp(24px, 3vw, 40px); display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--ink-3); pointer-events: none; }
.js .hero-hint.enter { transition-delay: 600ms; }
.hint-dot { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px #C3CDD5; display: grid; place-items: center; }
.hint-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--action); }
@media (max-width: 759px), (hover: none) { .hero-hint, .hero-trail { display: none; } }

/* Intro door: split CAIL logotype that opens on scroll */
.door { display: none; }
.has-intro .door { display: block; position: fixed; inset: 0; z-index: 300; perspective: 2200px; }
.door-bg { position: absolute; inset: 0; background: #0D1B26; opacity: 0; pointer-events: none; }
.door-leaf { position: absolute; inset: 0; background: var(--bg); will-change: transform; backface-visibility: hidden; display: grid; place-items: center; }
.door-leaf[data-door="L"] { clip-path: inset(0 calc(50% - 1px) 0 0); transform-origin: 0% 50%; }
.door-leaf[data-door="R"] { clip-path: inset(0 0 0 calc(50% - 1px)); transform-origin: 100% 50%; }
.door-logo { display: flex; font-family: Poppins, sans-serif; font-weight: 800; font-size: clamp(6rem, 2rem + 18vw, 20rem); letter-spacing: -0.045em; white-space: nowrap; will-change: transform; }
.door-logo > span { display: inline-block; overflow: hidden; line-height: 1; padding: 0.04em 0.012em 0.02em; }
.door-logo > span > span { display: inline-block; transform: translateY(105%); transition: transform 1400ms var(--ease); }
.door-logo > span:nth-child(1) > span { color: #843B0F; }
.door-logo > span:nth-child(2) > span { color: #195078; transition-delay: 110ms; }
.door-logo > span:nth-child(3) > span { color: #195078; transition-delay: 220ms; }
.door-logo > span:nth-child(4) > span { color: #E62518; transition-delay: 330ms; }
.door.letters-in .door-logo > span > span { transform: none; }
.door-edge { position: absolute; top: 0; bottom: 0; width: 140px; opacity: 0; }
[data-door="L"] .door-edge { right: 50%; background: linear-gradient(270deg, rgba(13, 27, 38, 0.16), rgba(13, 27, 38, 0)); }
[data-door="R"] .door-edge { left: 50%; background: linear-gradient(90deg, rgba(13, 27, 38, 0.16), rgba(13, 27, 38, 0)); }
.door-ui { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 3vw, 36px) var(--gutter); color: var(--ink); }
.door-top { display: flex; justify-content: space-between; gap: 16px; font-size: 0.8125rem; color: var(--ink-3); opacity: 0; transition: opacity 900ms; }
.door-top > span:last-child { white-space: nowrap; }
.door-bottom { display: flex; flex-direction: column; gap: 16px; opacity: 0; transform: translateY(16px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.door.is-ready .door-top, .door.is-ready .door-bottom { opacity: 1; transform: none; }
.door-hint { display: flex; justify-content: center; transition: opacity 500ms; }
.door.is-moving .door-hint { opacity: 0; }
.door-pill { display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 18px 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); box-shadow: inset 0 0 0 1px #DCE3E9; font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.mouse { width: 18px; height: 28px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink-2); display: flex; justify-content: center; padding-top: 5px; }
.mouse-dot { width: 3px; height: 6px; border-radius: 3px; background: var(--action); animation: mouse-bob 1600ms cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes mouse-bob { from { transform: translateY(0); opacity: 1; } to { transform: translateY(12px); opacity: 0; } }
.door-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.door-chapter { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.door-num { font-size: 0.8125rem; color: var(--ink-3); white-space: nowrap; }
.door-words { display: grid; overflow: hidden; font-size: clamp(1.375rem, 1rem + 1.4vw, 2.25rem); font-weight: 500; font-style: italic; letter-spacing: -0.03em; line-height: 1.15; padding: 0 0.08em; }
.door-words > span { grid-area: 1 / 1; white-space: nowrap; transform: translateY(110%); transition: transform 700ms var(--ease); }
.door-words > span:first-child { transform: none; }
.door-pct { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.5rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.door-pct-sign { color: #A3B1BC; }
.door-track { height: 3px; border-radius: 3px; background: #DCE3E9; overflow: hidden; }
.door-bar { height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, #843B0F 0 21.5%, #195078 21.5% 78.5%, #E62518 78.5% 100%); }

/* --- Facts row ---------------------------------------------------------------- */
.facts { border-top: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.fact { padding: 28px 24px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line); }
.fact:first-child { padding-left: 0; border-left: 0; }
.fact strong { font-size: 2.25rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.fact span { font-size: 0.9375rem; color: var(--ink-3); }

/* --- Projects: scroll-pinned stage ----------------------------------------------- */
.stage-section { position: relative; border-top: 1px solid var(--line); }
.stage-pin { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow: hidden; isolation: isolate; }
.stage-bg { position: absolute; inset: -80px; z-index: -1; background-size: cover; background-position: center; filter: blur(70px) saturate(1.2); opacity: 0; transition: opacity 900ms ease; }
.stage-bg.is-current { opacity: 0.55; }
.stage-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(245, 247, 249, 0.5), rgba(245, 247, 249, 0.88)); }
.stage-inner { height: 100%; padding-top: clamp(20px, 2.6vw, 36px); padding-bottom: 84px; display: flex; flex-direction: column; gap: 16px; }
.stage-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-title { font-size: clamp(2rem, 1.35rem + 2.2vw, 3.25rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; }
.stage-top .section-title { line-height: 1; white-space: nowrap; }
.counter-text { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); white-space: nowrap; }
.stage-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr); gap: clamp(20px, 2.6vw, 56px); }
.stage-col { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.stage-right { gap: 32px; }
.stack { display: grid; }
.stack > * { grid-area: 1 / 1; align-self: center; opacity: 0; transform: translateY(24px); pointer-events: none; transition: opacity 500ms var(--ease), transform 700ms var(--ease); }
.stack > .is-before { transform: translateY(-24px); }
.stack > .is-current { opacity: 1; transform: none; pointer-events: auto; }
.p-id { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--action); }
.stage-title { margin-top: 14px; font-size: clamp(1.5rem, 0.6rem + 2.2vw, 3.25rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.7); font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.stage-desc { font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.stage-media { position: relative; width: calc(min(48vh, 27vw) * 1.6); height: 100%; }
.stage-track { position: absolute; left: 0; right: 0; top: calc(50% - min(24vh, 13.5vw)); display: flex; flex-direction: column; gap: 28px; transform: translateY(calc(var(--p, 0) * -1 * (min(48vh, 27vw) + 28px))); will-change: transform; }
.stage-card { position: relative; flex: none; width: 100%; height: min(48vh, 27vw); padding: 0; border: 0; border-radius: var(--r-card); overflow: hidden; background: var(--line); cursor: pointer; will-change: transform, opacity; box-shadow: 0 30px 70px -40px rgba(13, 27, 38, 0.45); }
.stage-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); will-change: transform; }
.media-empty { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-3); background: repeating-linear-gradient(135deg, #DCE3E9 0 12px, #E6ECF0 12px 24px); }
.stage-card .more { position: absolute; right: 16px; bottom: 16px; height: 44px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: var(--ink); display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 500; opacity: 0; transition: opacity 400ms; }
.stage-card.is-current .more { opacity: 1; }
.stage-card .more svg { width: 14px; height: 14px; }
.scroll-hint { display: flex; align-items: center; gap: 16px; }
.scroll-hint > span { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); text-align: right; line-height: 1.5; }
.ring { position: relative; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(var(--action) var(--pct, 0%), var(--line) 0); flex: none; transition: background 400ms; }
.ring b { position: absolute; inset: 2px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 1.875rem; font-weight: 500; letter-spacing: -0.04em; font-style: italic; color: var(--ink); }
.stage-list { padding-block: 56px; }
.stage-list-items { margin-top: 32px; display: flex; flex-direction: column; gap: 40px; }
.stage-list-item { cursor: pointer; }
.stage-list-item .thumb { aspect-ratio: 16 / 10; border-radius: var(--r-media); overflow: hidden; background: var(--line); }
.stage-list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.stage-list-item .p-id { margin-top: 16px; }
.stage-list-item h3 { margin-top: 8px; font-size: 1.625rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.stage-list-item p { margin-top: 10px; color: var(--ink-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stage-section.is-list .stage-pin { display: none; }
.stage-section:not(.is-list) .stage-list { display: none; }
.state-msg { padding: 32px 0; color: var(--ink-2); }

/* --- Services (word list) ---------------------------------------------------------- */
.services { border-top: 1px solid var(--line); }
.services-inner { padding-block: var(--section-pad); display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 72px); align-items: center; }
.svc-col { flex: 1.2 1 380px; min-width: 0; }
.svc-col .section-title { max-width: 16ch; }
.svc-list { margin-top: 40px; display: flex; flex-direction: column; }
.svc { position: relative; display: flex; align-items: center; gap: 18px; padding: 16px 16px 16px 0; cursor: pointer; isolation: isolate; }
.svc .rv-line { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-strong); transform: scaleX(0); transform-origin: left; transition: transform 1300ms var(--ease); }
.svc .fill { position: absolute; inset: 0 -16px; z-index: -1; border-radius: 16px; background: rgba(25, 80, 120, 0.045); opacity: 0; transition: opacity 400ms var(--ease); }
.svc .underline { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--action); transform: scaleX(0); transform-origin: left; transition: transform 700ms var(--ease); z-index: 1; }
.svc .code { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); width: 40px; flex: none; transition: color 300ms; }
.svc .name { flex: 1; min-width: 0; font-size: clamp(1.9rem, 1rem + 3vw, 4rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; color: var(--muted); transition: color 400ms, transform 500ms var(--ease); }
.svc .go { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); transition: transform 500ms var(--ease), background-color 300ms, color 300ms, box-shadow 300ms; }
.svc .go svg { width: 18px; height: 18px; }
.svc.is-active .name { color: var(--ink); transform: translateX(4px); }
.svc.is-active .code { color: var(--action); }
.svc.is-active .go { color: var(--ink); }
.svc:hover .fill, .svc:focus-visible .fill { opacity: 1; }
.svc:hover .underline, .svc:focus-visible .underline { transform: scaleX(1); }
.svc:hover .name { color: var(--ink); transform: translateX(8px); }
.svc:hover .code { color: var(--action); }
.svc:hover .go { background: var(--action); color: #fff; box-shadow: inset 0 0 0 1px var(--action); transform: rotate(45deg); }
.svc-aside { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: clamp(28px, 3vw, 40px); border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.svc-num { font-size: 0.8125rem; color: var(--action); }
.svc-title { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.svc-desc { font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); max-width: 52ch; min-height: 5em; }

/* --- Team ------------------------------------------------------------------------ */
.team { border-top: 1px solid var(--line); }
.team-inner { padding-block: var(--section-pad); }
.team-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.team-grid { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: clamp(32px, 3.5vw, 48px) clamp(12px, 1.6vw, 20px); }
.member { min-width: 0; }
.member-photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-media); overflow: hidden; background: var(--line); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; filter: grayscale(0.3); transition: filter 600ms, transform 900ms var(--ease); }
.member:hover .member-photo img { filter: grayscale(0); transform: scale(1.03); }
.member-initials { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.25rem; font-weight: 600; color: var(--ink-3); }
.member h3 { margin-top: 16px; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.member .role { margin-top: 4px; font-size: 0.9375rem; font-weight: 500; color: var(--action); }
.member .bio { margin-top: 8px; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.skeleton { background: var(--line); border-radius: var(--r-media); animation: pulse 1.6s ease-in-out infinite; }
.skeleton.photo { aspect-ratio: 4 / 5; }
.skeleton.line { height: 12px; margin-top: 14px; border-radius: 6px; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* --- Close region (Launch) ------------------------------------------------------------ */
.close { background: var(--close-bg); color: var(--close-ink); border-radius: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px) 0 0; }
.close a { color: var(--close-ink); }
.close ::selection { background: #fff; color: var(--close-bg); }
.close :focus-visible { outline-color: #fff; }
.order { padding-top: var(--section-pad); }
.close-title { font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.25rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.04; max-width: 18ch; }
.steps { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.step { position: relative; overflow: hidden; padding: 28px; border-radius: var(--r-card); background: var(--close-surface); transition: background-color 300ms; }
.step:hover { background: var(--close-hover); }
.step .rv-line { position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--brand-rust), var(--brand-navy) 40%, var(--brand-red)); transform: scaleX(0); transform-origin: left; transition: transform 1400ms var(--ease); }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--step-outline); font-family: var(--font-mono); font-size: 0.8125rem; }
.step:first-child .step-num { background: var(--close-ink); color: var(--close-bg); box-shadow: none; }
.step h3 { margin-top: 40px; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; }
.step p { margin-top: 10px; color: var(--close-ink-2); line-height: 1.6; }
.cta { margin-top: clamp(64px, 8vw, 112px); padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--close-line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta:hover { color: #fff; }
.cta-words { font-size: clamp(2.75rem, 1rem + 8vw, 9rem); font-weight: 600; letter-spacing: -0.055em; line-height: 1.02; display: flex; flex-wrap: wrap; column-gap: 0.22em; }
.cta-words .mask { display: inline-block; overflow: hidden; padding-bottom: 0.08em; }
.cta-words .mask:last-child { padding-right: 0.06em; }
.cta-words .word { display: inline-block; }
.cta-words .word.it { font-style: italic; font-weight: 500; }
.js .cta-words .word { transform: translateY(110%); transition: transform 1200ms var(--ease); }
.js .cta-words .mask:last-child .word { transition-delay: 140ms; }
.js .cta.is-in .cta-words .word { transform: none; }
.cta .pill-white { height: 64px; padding: 0 12px 0 28px; gap: 16px; font-size: 1.0625rem; }
.cta .pill-white .chip { width: 42px; height: 42px; background: var(--action); color: #fff; }
.js .cta .pill-white { opacity: 0; transform: translateY(20px) scale(0.96); transition: opacity 800ms var(--ease) 380ms, transform 1000ms var(--ease) 380ms; }
.js .cta.is-in .pill-white { opacity: 1; transform: none; }
.contact-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.contact-pill { padding: 22px 24px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--close-line); display: flex; align-items: center; justify-content: space-between; gap: 16px; transition: var(--t-ctl); }
.contact-pill:hover { background: var(--close-surface); color: #fff; transform: translateY(-1px); }
.contact-pill small { display: block; font-family: var(--font-mono); font-size: 0.75rem; color: var(--close-ink-2); }
.contact-pill strong { display: block; margin-top: 2px; font-size: 1.125rem; font-weight: 600; }
.contact-pill svg { width: 18px; height: 18px; flex: none; }
.site-footer { padding-top: clamp(56px, 7vw, 88px); padding-bottom: 96px; color: var(--close-ink-2); font-size: 0.9375rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; max-width: 38ch; }
.logo-plate { align-self: flex-start; padding: 10px 14px; border-radius: 12px; background: #fff; display: block; }
.logo-plate img { width: 180px; height: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-nav a { padding: 8px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--close-line); transition: var(--t-ctl); }
.footer-nav a:hover { color: #fff; background: var(--close-surface); transform: translateY(-1px); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--close-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.8125rem; }
.motto { font-family: var(--font-mono); font-size: 0.75rem; }
.motto b { color: var(--close-ink); font-weight: 500; }

/* --- Reveals ---------------------------------------------------------------------------- */
.js [data-rv] { opacity: 0; transform: translateY(var(--rv-y, 36px)); transition: opacity 900ms var(--ease) var(--rv-d, 0ms), transform 1100ms var(--ease) var(--rv-d, 0ms); }
.js [data-rv].is-in { opacity: 1; transform: none; }
.js [data-rv] .rv-line { transition-delay: var(--rv-d, 0ms); }
.js [data-rv].is-in .rv-line { transform: scaleX(1); }
.js [data-rv-wrap] { opacity: 1; transform: none; }

/* --- Chapter bar ------------------------------------------------------------------------ */
.chapter-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-float); max-width: calc(100vw - 24px); }
.chapter-bar button { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-family: var(--font-mono); font-size: 0.8125rem; cursor: pointer; display: flex; align-items: center; gap: 1px; white-space: nowrap; transition: var(--t-ctl); }
.chapter-bar button:hover { transform: translateY(-1px); }
.chapter-bar button:active { transform: scale(0.96); transition-duration: 80ms; }
.chapter-bar b { font-weight: 500; }
.chapter-bar [data-chapter="create"] b { color: var(--brand-rust); }
.chapter-bar [data-chapter="automate"] b, .chapter-bar [data-chapter="innovate"] b { color: var(--brand-navy); }
.chapter-bar [data-chapter="launch"] b { color: var(--brand-red); }
.chapter-bar button.is-active { background: var(--ink); color: #fff; }
.chapter-bar button.is-active b { color: #fff; }

/* --- Drawer ------------------------------------------------------------------------------ */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(13, 27, 38, 0.42); opacity: 0; pointer-events: none; transition: opacity 400ms; }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; z-index: 90; width: min(600px, 100vw); background: var(--surface); overflow-y: auto; transform: translateX(-102%); transition: transform 600ms var(--ease); box-shadow: 0 32px 80px -24px rgba(13, 27, 38, 0.45); }
.drawer.is-open { transform: none; }
.drawer-media { position: relative; aspect-ratio: 16 / 11; background: var(--line); }
.drawer-media img { width: 100%; height: 100%; object-fit: cover; }
.drawer-close { position: absolute; top: 16px; left: 16px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.94); display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: var(--t-ctl); }
.drawer-close:hover { transform: translateY(-1px); }
.drawer-close svg { width: 18px; height: 18px; }
.drawer-body { padding: clamp(24px, 4vw, 40px); }
.drawer-body h3 { margin-top: 12px; font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; }
.drawer-body .desc { margin-top: 20px; font-size: 1.0625rem; line-height: 1.65; color: var(--ink-2); white-space: pre-line; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.drawer-actions .pill { height: 52px; padding: 0 24px; font-size: 1rem; }
.play-pill { padding: 0 22px 0 8px !important; gap: 12px; }
.play-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-red); color: #fff; display: grid; place-items: center; }
.play-dot svg { width: 14px; height: 14px; }

/* --- Video dialog -------------------------------------------------------------------------- */
.video-dialog { width: min(960px, calc(100vw - 32px)); margin: auto; padding: 0; border: 0; border-radius: var(--r-card); background: #000; overflow: hidden; box-shadow: 0 32px 80px -24px rgba(0, 0, 0, 0.6); }
.video-dialog::backdrop { background: rgba(13, 27, 38, 0.78); }
.video-dialog .round { position: absolute; top: 12px; right: 12px; z-index: 1; background: rgba(255, 255, 255, 0.94); box-shadow: none; }
.video-embed { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-media); overflow: hidden; }
.video-dialog .video-embed { border-radius: 0; }
.video-embed.is-portrait { aspect-ratio: 9 / 16; max-height: 80vh; margin-inline: auto; }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Detail pages ---------------------------------------------------------------------------- */
.detail-head { padding-top: clamp(32px, 5vw, 64px); }
.back { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); font-size: 0.9375rem; font-weight: 500; transition: var(--t-ctl); }
.back:hover { color: var(--ink); transform: translateY(-1px); }
.back svg { width: 16px; height: 16px; }
.detail-title { margin-top: 28px; font-size: clamp(2.4rem, 1.3rem + 4vw, 5rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.02; max-width: 16ch; }
.detail-lead { margin-top: 20px; max-width: 56ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.55; color: var(--ink-2); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.detail-hero-media { margin-top: clamp(32px, 5vw, 56px); aspect-ratio: 16 / 8; border-radius: var(--r-card); overflow: hidden; background: var(--line); }
.detail-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { padding-block: clamp(48px, 6vw, 88px) var(--section-pad); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.detail-side { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 24px; }
.side-card { padding: 24px; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.side-card h2 { font-size: 0.8125rem; font-family: var(--font-mono); font-weight: 500; color: var(--ink-3); }
.prose { max-width: 70ch; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 48px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; color: var(--ink); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 32px; font-size: 1.1875rem; font-weight: 600; color: var(--ink); letter-spacing: -0.015em; }
.prose ul { display: flex; flex-direction: column; }
.prose li { position: relative; padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); }
.prose li::before { content: ""; position: absolute; left: 2px; top: 1.45em; width: 8px; height: 8px; border-radius: 50%; background: var(--action); }
.prose strong { color: var(--ink); font-weight: 600; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.9375rem; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 40%; padding-right: 12px; font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; color: var(--ink-3); }
.video-grid { margin-top: 48px; display: grid; gap: 16px; }
.gallery { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-media); background: var(--line); }
.product-grid { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(24px, 3vw, 40px) 16px; }
.product { display: block; color: var(--ink); }
.product:hover { color: var(--ink); }
.product .thumb { aspect-ratio: 4 / 3; border-radius: var(--r-media); overflow: hidden; background: var(--surface); }
.product .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.product:hover .thumb img { transform: scale(1.03); }
.product h3 { margin-top: 16px; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.product p { margin-top: 6px; color: var(--ink-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.page-end { padding-bottom: var(--section-pad); }

/* --- Responsive ------------------------------------------------------------------------------- */
@media (max-width: 899px) {
    .nav-pill, .brand-sub { display: none; }
    .menu-toggle { display: grid; }
    .header-actions .pill-primary { display: none; }
    .chapter-bar button:not(.is-active) span { display: none; }
    .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
    .fact:first-child { border-top: 0; }
    .detail-body { grid-template-columns: 1fr; }
    .detail-side { position: static; }
}
@media (min-width: 900px) {
    .mobile-nav { display: none !important; }
}
@media (max-width: 640px) {
    .hero-actions .pill { flex: 1 1 auto; }
    .detail-hero-media { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
    .js .hero-title .w > span { transform: none; }
    .js .enter, .js [data-rv], .js .cta-words .word, .js .cta .pill-white { opacity: 1; transform: none; }
}
