/* ===== Tokens (themes override these in :root) ===== */
:root {
  --bg: #ffffff;
  --fg: #262c30;
  --muted: #676f6b;
  --surface: #f8f8f6;
  --surface-2: #f5f4f1;
  --border: #e6e2dc;
  --accent: #003c50;
  --accent-fg: #ffffff;
  --accent-2: #8fb2be;
  --cta-bg: #e6ff80;
  --cta-fg: #262c30;
  --hero-fg: #ffffff;
  --hero-overlay: linear-gradient(180deg, rgba(0, 60, 80, 0.4), rgba(38, 44, 48, 0.7));
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --font-heading: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --max-width: 1200px;
  --gutter: 16px;
  --section-y: 72px;
  --nav-h: 72px;
  --sidebar-w: 280px;
  --h1: clamp(2rem, 6vw, 4.6rem);
  --h2: clamp(1.75rem, 3.4vw, 2.6rem);
  --h3: 1.25rem;
  --lh: 1.6;
  --transition: 0.25s ease;
}
@media (min-width: 640px) { :root { --gutter: 24px; --section-y: 88px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --section-y: 112px; } }
@media (max-width: 639px) { :root { --h1: clamp(1.7rem, 8vw, 2rem); } }
@media (max-width: 359px) { :root { --h2: 1.6rem; } }

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); line-height: var(--lh); font-size: 1rem; overflow-x: hidden; }
html:has(body.scheme-dark) { color-scheme: dark; }
img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: var(--h1); letter-spacing: -0.02em; }
h2 { font-size: var(--h2); letter-spacing: -0.015em; }
h3 { font-size: var(--h3); }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 1.25em; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, p, li, address, .stat-label { overflow-wrap: break-word; }
.word-grid li { hyphens: auto; }
.hero-title, .hero-eyebrow, .hero-bullets li, h3, .stat-label { hyphens: auto; }
h1, h2 { hyphens: auto; hyphenate-limit-chars: 18 6 6; }
.hero-bullets li { hyphenate-limit-chars: 10 4 4; }
td.num, .site-nav li, .breadcrumb { white-space: nowrap; }
@media (max-width: 639px) { h1, h2, h3 { hyphens: auto; } }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
address { font-style: normal; }
button { font: inherit; color: inherit; }
figure { margin: 0; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hero:not(.hero-split) :focus-visible, .page-hero.has-media :focus-visible { outline-color: var(--hero-fg); }
.site-footer a:not(.btn):focus-visible { outline-color: currentColor; }
.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(--accent); color: var(--accent-fg); padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 16px; }

/* ===== Layout ===== */
.container { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.container.narrow { margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section-head { max-width: 780px; margin-bottom: 40px; }
.section-head p:last-child { margin-bottom: 0; }
.eyebrow { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.statement { font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 600; line-height: 1.3; }
.lead { font-size: 1.15rem; color: var(--muted); }
.grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.card-pad, .project-card, .job { padding: 28px; }
.card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card-media img, .row-media img, .bento-media img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; }
.card-media { aspect-ratio: 3 / 2; overflow: hidden; }
img[src$="engineer-substation.jpg"] { object-position: 50% 22%; }
.label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.num { font-family: var(--font-heading); font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.num.big { font-size: 2.5rem; line-height: 1; display: block; margin-bottom: 12px; }
.pillar h3 { margin-bottom: 8px; font-size: 1.125rem; }
.pillar p { color: var(--muted); margin: 0; }

/* lists */
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / 100% no-repeat; }
.checks.big li { font-size: 1.1rem; margin-bottom: 14px; }
.grid-list { display: grid; gap: 12px 32px; }
@media (min-width: 768px) { .grid-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 2px 0; }
.word-grid { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .word-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.word-grid li { font-family: var(--font-heading); font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 700; padding: 20px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: var(--radius); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 2px solid transparent; transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition); cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--cta-bg, var(--accent)); color: var(--cta-fg, var(--accent-fg)); border-color: var(--cta-bg, var(--accent)); }
.btn-primary:hover { filter: brightness(0.95); color: var(--cta-fg, var(--accent-fg)); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.link-more { display: inline-block; align-self: flex-start; margin-top: auto; font-weight: 600; color: var(--accent); text-decoration: none; }
.link-more::after { content: " →"; }
.link-more:hover { text-decoration: underline; }

/* ===== Header / navigation ===== */
.site-header { z-index: 50; width: 100%; color: var(--fg); background: var(--bg); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--nav-h); max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }
.logo { display: inline-flex; align-items: center; color: inherit; text-decoration: none; flex-shrink: 0; }
.logo svg { height: 14px; width: auto; max-width: 62vw; }
.logo-mark svg { height: 32px; }
.nav-sidebar .logo svg { height: 12px; max-width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; align-items: center; }
.site-nav a { text-decoration: none; font-weight: 500; }
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav > ul > li > a:hover { color: var(--accent); }
.lang-toggle { margin-left: 28px; font-weight: 700; text-decoration: none; font-size: 0.85rem; letter-spacing: 0.08em; padding: 6px 10px; border: 1px solid currentColor; border-radius: 999px; }
@media (min-width: 1024px) { .site-nav { display: flex; align-items: center; } }
.nav-contact { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; font-size: 0.95rem; }
.nav-burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; padding: 8px; border-radius: var(--radius); position: relative; z-index: 51; }
.nav-burger span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav-solid { position: sticky; top: 0; border-bottom: 1px solid var(--border); }
.nav-transparent { position: fixed; top: 0; left: 0; background: transparent; color: var(--hero-fg); transition: background var(--transition), color var(--transition), box-shadow var(--transition); }
.nav-transparent.is-scrolled { background: color-mix(in srgb, var(--bg) 86%, transparent); color: var(--fg); box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08); }
.nav-pill { position: fixed; top: 16px; left: 0; background: transparent; }
.nav-pill .nav-inner { position: relative; width: calc(100% - 2 * var(--gutter)); min-height: 60px; border-radius: 999px; padding-inline: 24px; }
.nav-pill .nav-inner::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 999px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--border); box-shadow: var(--shadow); }
.nav-hamburger { position: fixed; top: 0; left: 0; background: transparent; color: var(--hero-fg); mix-blend-mode: normal; }
.nav-hamburger.is-scrolled { background: var(--bg); color: var(--fg); }
.nav-hamburger .nav-burger { display: flex; }
.nav-hamburger .nav-tools { display: flex; align-items: center; gap: 8px; }
.nav-hamburger .nav-tools .lang-toggle { margin-left: 0; }
.nav-hamburger .logo, .nav-hamburger .nav-tools { position: relative; z-index: 51; }
.nav-overlay { position: fixed; inset: 0; background: var(--bg); color: var(--fg); display: none; align-items: center; justify-content: center; flex-direction: column; padding: 80px var(--gutter); z-index: 49; }
.nav-overlay.is-open { display: flex; }
.nav-overlay ul { flex-direction: column; gap: 20px; text-align: center; }
.nav-overlay ul a { font-family: var(--font-heading); font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; }
body.menu-open { overflow: hidden; }
body.nav-transparent-layout .page-hero, body.nav-pill-layout .page-hero, body.nav-hamburger-layout .page-hero { padding-top: calc(var(--nav-h) + 40px); }
body.nav-transparent-layout.page-home .site-header:not(.is-scrolled), body.nav-hamburger-layout.page-home .site-header:not(.is-scrolled) { color: var(--hero-fg); }
body.menu-open .nav-burger, body.menu-open .nav-hamburger { color: var(--fg); }
body.nav-transparent-layout:not(.page-home) .nav-transparent:not(.is-scrolled), body.nav-hamburger-layout:not(.page-home) .nav-hamburger:not(.is-scrolled) { background: var(--bg); color: var(--fg); }
@media (max-width: 1023px) {
  .nav-burger { display: flex; }
  .site-nav:not(.nav-overlay) { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 90vw); background: var(--bg); color: var(--fg); padding: 96px 32px 32px; box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15); transform: translateX(100%); visibility: hidden; transition: transform var(--transition), visibility var(--transition); overflow-y: auto; z-index: 49; }
  .site-nav:not(.nav-overlay).is-open { transform: none; visibility: visible; }
  .site-nav:not(.nav-overlay) ul { flex-direction: column; align-items: flex-start; gap: 18px; }
  .site-nav:not(.nav-overlay) a { font-size: 1.25rem; }
  .site-nav:not(.nav-overlay) .lang-toggle { margin: 28px 0 0; display: inline-block; }
}
@media (min-width: 1024px) {
  .nav-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); border-right: 1px solid var(--border); background: var(--surface); }
  .nav-sidebar .nav-inner { flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 32px 28px; gap: 40px; min-height: 100%; }
  .nav-sidebar .site-nav { display: flex; flex-direction: column; align-items: stretch; flex: 1; width: 100%; }
  .nav-sidebar .site-nav ul { flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; }
  .nav-sidebar .site-nav li { width: 100%; }
  .nav-sidebar .site-nav li a { display: block; padding: 10px 12px; border-radius: var(--radius); }
  .nav-sidebar .site-nav li a[aria-current="page"] { background: var(--accent); color: var(--accent-fg); }
  .nav-sidebar .lang-toggle { margin: 28px 0 0; align-self: flex-start; }
  .nav-sidebar .nav-contact { margin-top: auto; padding-top: 24px; }
  body.nav-sidebar-layout main, body.nav-sidebar-layout .site-footer { margin-left: var(--sidebar-w); }
  body.nav-sidebar-layout { --max-width: 1100px; }
}
@media (min-width: 1024px) { body.nav-sidebar-layout .grid-4, body.nav-sidebar-layout .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) and (max-width: 1439px) {
  body.nav-sidebar-layout .grid-3, body.nav-sidebar-layout .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.nav-sidebar-layout .hero-split .hero-content { padding-inline: 28px; }
}

/* ===== Hero ===== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--hero-fg); overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-failed .hero-video { display: none; }
/* Theme overlay on top of a fixed darkening floor, so white hero text stays readable on the palest video frames. */
.hero-overlay { position: absolute; inset: 0; background: var(--hero-overlay), linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)); }
.hero-content { position: relative; z-index: 1; padding-top: calc(var(--nav-h) + 48px); padding-bottom: 14vh; max-width: var(--max-width); }
.hero-eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; opacity: 0.9; }
.hero-title { max-width: 22ch; margin-bottom: 24px; text-wrap: balance; }
.hero-bullets { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 1.05rem; }
.hero-bullets li { position: relative; padding-left: 18px; }
.hero-bullets li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-centered { align-items: center; text-align: center; }
.hero-centered .hero-content { margin-inline: auto; display: flex; flex-direction: column; align-items: center; padding-bottom: 10vh; }
.hero-centered .hero-title { max-width: min(24ch, 100%); }
.hero-centered .hero-bullets, .hero-centered .hero-actions { justify-content: center; }
.hero-glass { align-items: center; }
.hero-glass .hero-content { padding-bottom: 12vh; }
.glass-panel { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.28); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 48px); max-width: 720px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25); }
@media (max-width: 639px) { .glass-panel { padding-inline: 16px; } }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 60svh auto; align-items: stretch; color: var(--fg); min-height: 100svh; }
.hero-split-media { position: relative; min-height: 60svh; overflow: hidden; }
.hero-split .hero-content { padding: 48px var(--gutter); display: flex; flex-direction: column; justify-content: center; background: var(--bg); color: var(--fg); }
.hero-split .hero-bullets li::before { background: var(--accent); }
@media (min-width: 1024px) {
  .hero-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; }
  .hero-split-media { min-height: 100svh; }
  .hero-split .hero-content { padding: calc(var(--nav-h) + 48px) 64px 64px; }
  .hero-split .hero-title { font-size: clamp(1.9rem, 2.5vw, 3rem); }
  .glass-panel .hero-title { font-size: clamp(2rem, 4.2vw, 3.6rem); }
  body.nav-sidebar-layout .hero-split .hero-title { font-size: clamp(1.8rem, 2.2vw, 2.4rem); }
}
@media (min-width: 1366px) {
  .hero-split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  body.nav-sidebar-layout .hero-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.hero-play { position: absolute; right: 24px; top: calc(var(--nav-h) + 24px); z-index: 2; width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.7); background: rgba(0, 0, 0, 0.45); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.hero-play[hidden] { display: none; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 1; width: 28px; height: 44px; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 16px; display: flex; justify-content: center; }
.scroll-cue span { width: 4px; height: 8px; margin-top: 8px; border-radius: 2px; background: #fff; animation: cue 1.8s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
.hero-split .scroll-cue { display: none; }
@media (max-width: 639px) { .scroll-cue { display: none; } }
.hero-centered .hero-bullets li { padding-left: 0; }
.hero-centered .hero-bullets li::before { position: static; display: inline-block; margin-right: 8px; vertical-align: middle; }

/* SpaceX layout: one full-screen panel per inner page below the hero */
.panel { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--hero-fg); overflow: hidden; isolation: isolate; }
.panel-media { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.panel-video, .panel-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel-overlay { position: absolute; inset: 0; background: var(--hero-overlay), linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)); }
.panel-content { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 14vh; }
.panel-label { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; opacity: 0.9; }
.panel-title { font-size: clamp(1.5rem, 2.8vw, 2.4rem); max-width: 36ch; margin-bottom: 24px; text-wrap: balance; hyphens: auto; }
.panel .btn-ghost { border-color: rgba(255, 255, 255, 0.85); color: #ffffff; }
.nav-autohide { transition: transform 0.35s ease, background var(--transition); }
.nav-autohide.is-hidden { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .panel-video { display: none; } }
/* Tesla layout: title at the top, buttons at the bottom of every full-screen panel */
.hero-top-center { align-items: flex-start; }
.hero-top-center .hero-content, .panel-tesla .panel-content { text-align: center; margin-inline: auto; padding-top: calc(var(--nav-h) + 56px); padding-bottom: 0; }
.hero-top-center .hero-title, .panel-tesla .panel-title { margin-inline: auto; }
.hero-top-center .hero-actions, .panel-tesla .panel-actions { position: absolute; left: 0; right: 0; bottom: 9vh; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding-inline: var(--gutter); }
.hero-top-center .btn, .panel-tesla .btn { min-width: min(264px, 100%); justify-content: center; text-align: center; }
.panel-tesla { align-items: flex-start; }
.panel-tesla .panel-label { text-transform: none; letter-spacing: 0; font-size: 1.05rem; font-weight: 400; max-width: 60ch; margin-inline: auto; }
.hero-top-center .scroll-cue { bottom: calc(9vh + 72px); }
html:has(body.hero-tesla-layout.page-home) { scroll-snap-type: y mandatory; }
body.hero-tesla-layout.page-home .hero, body.hero-tesla-layout.page-home .panel { scroll-snap-align: start; }
/* Editorial hero: headline block on the page background, media in an inset box below it */
.hero-editorial { min-height: 0; display: block; color: var(--fg); padding-top: calc(var(--nav-h) + 40px); }
.hero-editorial .hero-content { padding-top: 24px; padding-bottom: 32px; }
.hero-editorial .hero-eyebrow { color: var(--accent); opacity: 1; }
.hero-editorial .hero-title { max-width: 16ch; }
.hero-lead { color: var(--muted); max-width: 62ch; margin-bottom: 24px; }
.hero-editorial .hero-actions { align-items: center; gap: 24px; }
.hero-media-box { position: relative; height: min(68svh, 760px); min-height: 320px; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate; }
.hero-media-box .hero-play { top: 24px; }
/* Apple layout: centered copy over the media inside a sticky stage. In cinematic mode the hero is a 200svh scroll
   stage: the video shrinks into a rounded card, the headline lifts away and the lead with the actions takes over. */
.hero-apple { display: block; min-height: 0; overflow: visible; isolation: auto; }
.hero-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--bg); }
.hero-apple .hero-content { display: flex; flex-direction: column; align-items: center; padding-top: var(--nav-h); padding-bottom: 0; }
.hero-apple .hero-title { max-width: min(18ch, 100%); margin-bottom: 20px; }
.hero-apple .hero-after { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.hero-apple .hero-lead { color: inherit; opacity: 0.92; max-width: 60ch; font-size: 1.15rem; margin-bottom: 28px; }
.hero-apple .hero-actions { justify-content: center; align-items: center; gap: 20px; }
.hero-apple .link-more { color: inherit; }
.hero-apple .hero-play { top: auto; bottom: 24px; }
html.js-motion .motion-cinematic .hero-apple { height: 200svh; }
html.js-motion .motion-cinematic .hero-apple .hero-media { transform: scale(calc(1 - var(--p, 0) * 0.12)); border-radius: calc(var(--p, 0) * 32px); overflow: hidden; }
html.js-motion .motion-cinematic .hero-apple .hero-content { opacity: calc(1 - var(--p, 0) * 2.6); transform: translateY(calc(var(--p, 0) * -90px)); }
html.js-motion .motion-cinematic .hero-apple .hero-after { position: absolute; inset: 0; justify-content: center; padding: var(--nav-h) var(--gutter) 0; opacity: calc((var(--p, 0) - 0.4) * 3); transform: translateY(calc((1 - min(1, var(--p, 0) * 1.35)) * 48px)); visibility: hidden; }
html.js-motion .motion-cinematic .hero-apple.stage-late .hero-after { visibility: visible; }
html.js-motion .motion-cinematic .hero-apple .hero-play { bottom: calc(6vh + 24px); }
/* snap mode */
html:has(body.snap-home) { scroll-snap-type: y proximity; scroll-padding-top: 0; }
body.snap-home main > section { scroll-snap-align: start; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
body.snap-home .site-footer { scroll-snap-align: end; }
.snap-dots { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 40; display: none; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .snap-dots { display: flex; } }
.snap-dots a { width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; }
.snap-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: 0.6; transition: transform var(--transition), background var(--transition); }
.snap-dots a.is-active span { background: var(--accent); transform: scale(1.5); opacity: 1; }

/* ===== Page hero (subpages) ===== */
.page-hero { position: relative; padding: 56px 0 48px; background: var(--surface); overflow: hidden; isolation: isolate; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: 12px; max-width: 28ch; }
.page-hero .lead { max-width: 720px; margin: 0; }
.page-hero.has-media { color: var(--hero-fg); min-height: 52svh; display: flex; align-items: flex-end; }
.page-hero.has-media .lead { color: inherit; opacity: 0.9; }
.page-hero-media { position: absolute; inset: 0; z-index: 0; }
.page-hero-media::after { content: ""; position: absolute; inset: 0; background: var(--hero-overlay), linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)); }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.breadcrumb { display: flex; gap: 10px; font-size: 0.85rem; margin-bottom: 20px; opacity: 0.85; }
.breadcrumb a { text-decoration: none; }

/* ===== Services variants ===== */
.services .card-body h3 { margin-bottom: 10px; }
.services .card-body p { color: var(--muted); }
.num-list { list-style: none; padding: 0; margin: 0; }
.num-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 32px 0; border-top: 1px solid var(--border); }
.num-item:last-child { border-bottom: 1px solid var(--border); }
.num-item .num { font-size: 2rem; line-height: 1; }
.num-item h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
@media (max-width: 639px) { .num-item { grid-template-columns: 48px minmax(0, 1fr); } .num-item .num { font-size: 1.6rem; } }
@media (min-width: 768px) { .num-item { grid-template-columns: 96px minmax(0, 1fr); gap: 32px; } }
.bento-grid { display: grid; gap: 20px; }
.bento-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.bento-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.bento-body .num { font-size: 0.9rem; letter-spacing: 0.1em; margin-bottom: 8px; }
@media (min-width: 640px) { .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bento-wide { grid-column: span 2; } }
@media (min-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bento-item { grid-column: span 2; }
  .bento-wide { grid-column: span 4; flex-direction: row; }
  .bento-wide .bento-media { flex: 1; }
  .bento-wide .bento-media img { height: 100%; aspect-ratio: auto; }
  .bento-wide .bento-body { flex: 1; }
  .bento-item:nth-child(5), .bento-item:nth-child(6) { grid-column: span 3; }
}
.scroll-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 24px; margin-inline: -4px; scrollbar-width: thin; }
.scroll-card { flex: 0 0 min(82vw, 380px); scroll-snap-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; }
.scroll-card .card-media { border-radius: var(--radius); margin-bottom: 16px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; padding-block: 32px; border-top: 1px solid var(--border); }
.row-media { border-radius: var(--radius-lg); overflow: hidden; }
.row-body .num { font-size: 0.9rem; letter-spacing: 0.1em; }
.row-body h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
@media (min-width: 768px) { .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } .row-reverse .row-media { order: 2; } }
.tl { list-style: none; padding: 0; margin: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 19px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 40px 64px; }
.tl-marker { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; }
.tl-body h2, .tl-body h3 { margin-bottom: 8px; }
.tl-body h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }

/* accordion (services + faq) */
.acc-list { border-top: 1px solid var(--border); }
.acc { border-bottom: 1px solid var(--border); }
.acc-heading { margin: 0; font-size: 1.05rem; }
.acc-trigger { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; padding: 20px 0; background: none; border: 0; cursor: pointer; font-weight: 600; font-family: var(--font-heading); font-size: 1.05rem; }
.acc-trigger .num { flex-shrink: 0; }
.acc-label { flex: 1 1 0; min-width: 0; hyphens: auto; overflow-wrap: break-word; }
.acc-icon { flex-shrink: 0; width: 24px; height: 24px; position: relative; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; background: currentColor; left: 50%; top: 50%; transform: translate(-50%, -50%); transition: transform var(--transition); }
.acc-icon::before { width: 14px; height: 2px; }
.acc-icon::after { width: 2px; height: 14px; }
.acc-trigger[aria-expanded="true"] .acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc-panel { padding: 0 0 24px; color: var(--muted); max-width: 820px; }
.acc-panel p:last-child { margin-bottom: 0; }

/* ===== Feature ===== */
.feature .pillar, .culture .pillar { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.tabs .tablist { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tabs [role="tab"] { padding: 12px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; }
.tabs [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.tabs [role="tabpanel"] { padding: 32px; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.tabs [role="tabpanel"] p { margin: 0; font-size: 1.1rem; }
.stats { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 40px; }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.stat-value { display: block; font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.stat-label { color: var(--muted); }

/* ===== Projects ===== */
.project-card h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
.table th, .table td { text-align: left; vertical-align: top; padding: 18px 16px; border-bottom: 1px solid var(--border); }
.table thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.table th[scope="row"] { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; }
.table td.num { width: 48px; }
@media (max-width: 639px) {
  .projects-table .table, .projects-table tbody, .projects-table tr, .projects-table th, .projects-table td { display: block; }
  .projects-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .projects-table tr { border-top: 1px solid var(--border); padding: 20px 0; }
  .projects-table .table th, .projects-table .table td { border: 0; padding: 4px 0; }
  .projects-table .table td.num { width: auto; font-size: 0.8rem; color: var(--muted); }
  .projects-table td[data-label]::before { content: attr(data-label); display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 8px 0 4px; }
}
.masonry { columns: 1; column-gap: 24px; }
@media (min-width: 768px) { .masonry { columns: 2; } }
.masonry .card { break-inside: avoid; margin-bottom: 24px; display: block; }

/* ===== FAQ two-column ===== */
.faq h2 { margin-bottom: 32px; }
.faq-two-column .container { max-width: var(--max-width); }
.faq-grid { display: grid; gap: 32px 48px; }
@media (min-width: 768px) { .faq-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.faq-item h3 { font-size: 1.1rem; margin-bottom: 8px; }
.faq-item p { color: var(--muted); }

/* ===== Calm / CTA ===== */
.calm { background: var(--surface); }
.cta-box { background: var(--accent); color: var(--accent-fg); border-radius: var(--radius-lg); padding: clamp(32px, 6vw, 72px); text-align: center; }
.cta-box h2 { max-width: 20ch; margin-inline: auto; }
.cta-box p { max-width: 60ch; margin: 0 auto 28px; opacity: 0.92; }
.cta-box .btn-primary { background: var(--cta-bg, var(--accent-fg)); color: var(--cta-fg, var(--accent)); border-color: var(--cta-bg, var(--accent-fg)); }
.cta-box :focus-visible { outline-color: var(--accent-fg); }

/* ===== Footer ===== */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 56px 32px; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 32px; margin-bottom: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } }
.footer-mega .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .footer-mega .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } }
.tagline { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; margin: 16px 0 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a { text-decoration: none; }
.footer-links.inline { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.footer-copy { margin: 0; color: var(--muted); font-size: 0.85rem; }
.footer-iso { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; }
.iso-badge { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-size: 0.7rem; font-weight: 800; }
.footer-minimal { text-align: center; }
.footer-minimal .footer-address, .footer-minimal .footer-iso, .footer-minimal .tagline, .footer-minimal nav { margin-bottom: 20px; justify-content: center; }
.footer-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--border); }
.tagline-big { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; margin: 0; letter-spacing: -0.02em; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.contact-block { margin-bottom: 32px; }
.contact-value { display: block; font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; text-decoration: none; margin-bottom: 6px; word-break: break-word; }
.contact-block p:last-child { color: var(--muted); margin: 0; }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); }
.form label { display: block; margin-bottom: 18px; font-weight: 600; }
.form label > span { display: block; margin-bottom: 6px; font-size: 0.9rem; }
.form label:not(.check):has([required]) > span::after { content: " *"; color: var(--accent); }
.form .check:has([required]) > span::before { content: "* "; color: var(--accent); }
.form button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; }
.form input:not([type="checkbox"]), .form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--muted); border-radius: var(--radius); background: var(--bg); color: var(--fg); font: inherit; }
.form-grid { display: grid; gap: 0 20px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 0.9rem; color: var(--muted); }
.form .check input { margin-top: 4px; }
.form-success { margin: 20px 0 0; padding: 14px 16px; border-radius: var(--radius); background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.form-note { margin: 16px 0 0; font-size: 0.8rem; color: var(--muted); }
.contact-centered .narrow { margin-inline: auto; }

/* ===== Company / Careers / Legal ===== */
.mission-vision .card h2 { font-size: 1.5rem; }
.quality .checks { margin-top: 12px; }
.job h3 { font-size: 1.3rem; }
.job h4 { font-size: 0.8rem; }
.job-actions { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step .num { font-size: 2rem; display: block; margin-bottom: 12px; }
.step p { color: var(--muted); margin: 0; }
.benefits .grid-list li { font-size: 1.05rem; }
.apply { background: var(--surface); text-align: center; }
.legal h2 { font-size: 1.4rem; margin-top: 1.5em; }
.notice { padding: 14px 18px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: var(--radius); font-weight: 600; }

/* ===== Demo badge ===== */
.demo-badge-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 4px; background: #003c50; color: #fff; border-radius: 999px; padding: 4px 4px 4px 14px; font-size: 0.8rem; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3); font-family: system-ui, sans-serif; }
.demo-badge-wrap[hidden] { display: none; }
.demo-badge { color: #fff; text-decoration: none; font-weight: 600; }
.demo-badge-close { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.15); color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }

/* ===== Motion: refined (every demo) =====
   html.js-motion is set by an inline head script when the visitor has not asked for reduced motion and
   IntersectionObserver exists. base.js tags reveal candidates with data-reveal and adds is-visible as they
   scroll into view; without JS nothing is ever hidden. Reveals use opacity + translate, hovers use transform,
   so the two never fight over one property. */
:root { --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1); }
html.js-motion [data-reveal] { opacity: 0; translate: 0 28px; transition: opacity 0.8s var(--ease-out), translate 0.8s var(--ease-out), transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out); transition-delay: calc(var(--reveal-i, 0) * 70ms), calc(var(--reveal-i, 0) * 70ms), 0s, 0s; }
html.js-motion [data-reveal].is-visible { opacity: 1; translate: 0 0; }
@keyframes rise { from { opacity: 0; translate: 0 24px; } }
html.js-motion :is(.hero-content, .hero-after, .page-hero .container) > *, html.js-motion .hero-top-center > .hero-actions { animation: rise 0.9s var(--ease-out) backwards; animation-delay: 0.15s; }
html.js-motion :is(.hero-content, .hero-after, .page-hero .container) > :nth-child(2) { animation-delay: 0.27s; }
html.js-motion :is(.hero-content, .hero-after, .page-hero .container) > :nth-child(3) { animation-delay: 0.39s; }
html.js-motion :is(.hero-content, .hero-after, .page-hero .container) > :nth-child(4) { animation-delay: 0.51s; }
html.js-motion :is(.hero-content, .hero-after, .page-hero .container) > :nth-child(5) { animation-delay: 0.63s; }
html.js-motion .hero-top-center > .hero-actions { animation-delay: 0.55s; }
html.js-motion :is(.hero-media, .page-hero-media) { scale: 1.08; transition: scale 2.4s var(--ease-out); }
html.js-motion .is-ready :is(.hero-media, .page-hero-media) { scale: 1; }
.card, .bento-item, .step, .stat, .pillar, .scroll-card { transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out); }
.card:hover, .bento-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media img, .bento-media img, .row-media img { transition: transform 1.1s var(--ease-out); }
.card:hover .card-media img, .bento-item:hover .bento-media img, .row:hover .row-media img { transform: scale(1.04); }
.link-more::after { display: inline-block; white-space: pre; transition: translate 0.3s var(--ease-out); }
.link-more:hover::after { translate: 4px 0; }
.nav-transparent.is-scrolled::before, .nav-solid::before, .nav-hamburger.is-scrolled::before { content: ""; position: absolute; inset: 0; z-index: -1; backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); }
.nav-solid { background: color-mix(in srgb, var(--bg) 85%, transparent); }
/* Page transitions between the pages of a demo (same-origin cross-document view transitions; older browsers simply swap). */
@view-transition { navigation: auto; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; translate: 0 12px; } }
::view-transition-old(root) { animation: 0.2s ease-in both vt-out; }
::view-transition-new(root) { animation: 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both vt-in; }

/* ===== Motion: cinematic (demos with "motion": "cinematic") =====
   kit/motion-cinematic.js adds Lenis inertia scrolling (kit/vendor, MIT), splits headlines into words that rise
   out of a clipped line, and drives the Apple-style hero stage (--p = scroll progress 0..1). */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent], .lenis [data-lenis-prevent-wheel], .lenis [data-lenis-prevent-touch] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis.lenis-autoToggle { transition-property: overflow; transition-duration: 1ms; transition-behavior: allow-discrete; }
.motion-cinematic .split .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0.08em 0 0.16em; margin: -0.08em 0 -0.16em; }
.motion-cinematic .split .wi { display: inline-block; translate: 0 115%; transition: translate 1s var(--ease-out); transition-delay: calc(var(--wi, 0) * 50ms); }
.motion-cinematic .split.is-visible .wi { translate: 0 0; }
html.js-motion .motion-cinematic .split { animation: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
@media print { html.js-motion [data-reveal], .motion-cinematic .split .wi { opacity: 1 !important; translate: none !important; } }
