@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #0b0b0d;
  --fg: #f2f1ec;
  --muted: #9a9aa1;
  --faint: #5c5c63;
  --line: rgba(242, 241, 236, 0.1);
  --accent: #c6ff4d;
  --accent-ink: #0b0b0d;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
}

/* WebGL stage sits behind everything. */
#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  pointer-events: none;
}
.no-webgl #stage { display: none; }

main, .site-footer { position: relative; z-index: 1; }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--header-h);
  transition: background-color 240ms ease, backdrop-filter 240ms ease;
}
.site-header.is-scrolled {
  background: rgba(11, 11, 13, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.header-row {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark { width: 22px; height: 22px; color: var(--fg); }
.brand-core { fill: var(--accent); }
.brand-name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.brand-name span { font-weight: 400; color: var(--muted); }
.header-link {
  font-size: 15px;
  color: var(--muted);
  transition: color 160ms ease;
}
.header-link:hover { color: var(--fg); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: none;
  margin: 0;
  padding: 0 6px;
  height: 32px;
  min-width: 32px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--faint);
  cursor: pointer;
  border-radius: 6px;
  transition: color 160ms ease;
}
.lang-toggle button + button { position: relative; }
.lang-toggle button + button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 10px;
  margin-top: -5px;
  background: var(--faint);
  opacity: 0.6;
}
.lang-toggle button:hover { color: var(--muted); }
.lang-toggle button[aria-pressed="true"] { color: var(--fg); cursor: default; }
.lang-toggle button:focus-visible,
.header-link:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* Panels: one full screen per scene. */
.panel {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 24px) 0 48px;
}
.panel .wrap { display: flex; }
.panel[data-side="right"] .copy { margin-left: auto; }
.copy { width: 100%; max-width: 520px; }

/* Hero */
.hero .copy { max-width: 640px; }
h1 {
  /* Sized so the longest headline line fits the 640px hero column (EN ~7.7em, FR ~9em). */
  font-size: clamp(46px, 5.6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 560;
}
html[lang="fr"] h1 { font-size: clamp(40px, 4.8vw, 70px); }
h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}
h1 .line > span {
  display: inline-block;
  transform: translateY(105%);
  animation: rise 1100ms var(--ease-out) forwards;
}
h1 .line:nth-child(2) > span { animation-delay: 90ms; }
h1 .line:nth-child(3) > span { animation-delay: 180ms; }

.lead {
  margin-top: 32px;
  max-width: 44ch;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
  opacity: 0;
  animation: fade-up 900ms var(--ease-out) 520ms forwards;
}
.actions {
  margin-top: 40px;
  opacity: 0;
  animation: fade-up 900ms var(--ease-out) 640ms forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 22px;
  border-radius: 2px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.btn svg { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
.btn:hover { background: #d4ff73; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(0.97); }

/* Section copy */
.kicker {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.copy h2 {
  margin-top: 14px;
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 560;
  text-wrap: balance;
}
.copy .body {
  margin-top: 22px;
  max-width: 42ch;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.reveal > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.reveal.is-in > * { opacity: 1; transform: none; }
.reveal.is-in > :nth-child(2) { transition-delay: 80ms; }
.reveal.is-in > :nth-child(3) { transition-delay: 160ms; }

/* Closing */
.closing .copy { max-width: 640px; }
.closing h2 {
  margin-top: 0;
  font-size: clamp(42px, 5.4vw, 84px);
  line-height: 0.98;
}
.closing-mail {
  display: inline-block;
  margin-top: 32px;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.02em;
  color: var(--accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  padding-bottom: 4px;
  transition: background-size 420ms var(--ease-out);
}
.closing-mail:hover { background-size: 100% 1px; }

/* Footer */
.site-footer { padding: 0 0 32px; }
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--faint);
}

@keyframes rise { to { transform: none; } }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Portrait screens: sculpture on top, copy at the bottom. Matches scene.js (aspect < 0.95). */
@media (max-aspect-ratio: 19/20) {
  .panel {
    align-items: flex-end;
    padding-bottom: clamp(40px, 8vh, 80px);
  }
  .panel[data-side="right"] .copy { margin-left: 0; }
  .panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 62vh;
    margin-top: auto;
    pointer-events: none;
  }
  .copy {
    position: relative;
    padding-top: 40px;
  }
  .copy::before {
    content: "";
    position: absolute;
    inset: -40px -40px -40px -40px;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(11, 11, 13, 0) 0%, rgba(11, 11, 13, 0.82) 28%, rgba(11, 11, 13, 0.92) 100%);
    pointer-events: none;
  }
  .reveal > * { transform: translateY(18px); }
}

@media (max-width: 560px) {
  :root { --header-h: 64px; }
  h1 { font-size: min(40px, calc((100vw - 40px) / 7.9)); }
  html[lang="fr"] h1 { font-size: min(38px, calc((100vw - 40px) / 9.3)); }
  .lead { margin-top: 20px; font-size: 16px; }
  .actions { margin-top: 28px; }
  .copy h2 { font-size: 32px; }
  .btn { width: 100%; justify-content: center; }
  .footer-row { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  h1 .line > span,
  .lead,
  .actions { animation: none; transform: none; opacity: 1; }
  .reveal > * { opacity: 1; transform: none; transition: none; }
  .btn, .btn svg, .closing-mail { transition: none; }
}
