/* ============================================================
   Noroît — design tokens
   ============================================================ */
:root {
  --bg: #050505;
  --fg: #f4f3ef;
  --fg-dim: rgba(244, 243, 239, 0.62);
  --fg-dimmer: rgba(244, 243, 239, 0.4);
  --line: rgba(244, 243, 239, 0.16);
  --line-strong: rgba(244, 243, 239, 0.4);
  --focus: #ffffff;

  --font-display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --edge: clamp(24px, 6vw, 96px);
  --max-w: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

/* scroll-behavior: smooth is intentionally omitted at the root — combined
   with scroll-snap-type: mandatory it can make a single fast wheel/trackpad
   flick cascade past several sections in Chromium. Anchor links below get
   their own smooth scroll via scrollIntoView() in script.js instead, and
   native snapping (scroll-snap-stop: always on .panel) already gives the
   swipe-like feel between sections. */

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Scroll-snap: whole document, one panel per screen */
html, body {
  height: 100%;
}

body {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  overscroll-behavior-y: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { scroll-snap-type: none; }
}

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 1000;
  background: var(--fg);
  color: #000;
  padding: 12px 20px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

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

/* ============================================================
   Hero wave canvas — lives only in the hero panel, not the whole page
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  /* A hair lighter at the floor than the flat black of the rest of the
     page — just enough for the wave cut below to read as a shape instead
     of vanishing into identical black. Still fully monochrome. */
  background: linear-gradient(to bottom, var(--bg) 0%, #0e0e11 100%);
}

#wave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.hero .panel-inner {
  position: relative;
  z-index: 1;
}

/* The wave-shaped cut at the bottom of the hero — a plain filled shape,
   no stroke/glow lines. It's what hands off from the animated hero into
   the flat panels below. */
.wave-divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 2;
  line-height: 0;
  pointer-events: none;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: clamp(48px, 9vw, 120px);
}

.wave-divider path {
  fill: var(--bg);
  filter: drop-shadow(0 -18px 34px rgba(0, 0, 0, 0.75));
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 3vw, 32px) var(--edge);
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-nav a {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--bg);
  background: var(--fg);
  border-color: var(--fg);
}

@media (max-width: 640px) {
  .site-nav a { display: none; }
}

/* ============================================================
   Section dot navigation
   ============================================================ */
.section-dots {
  position: fixed;
  right: clamp(18px, 2.5vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-dots a {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
}

.section-dots a span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  transform: translate(-50%, -50%);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.section-dots a::before {
  content: attr(data-label);
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--fg-dim);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  background: rgba(5, 5, 5, 0.8);
  padding: 4px 10px;
  border-radius: 4px;
}

.section-dots a:hover::before,
.section-dots a:focus-visible::before {
  opacity: 1;
}

.section-dots a.active span {
  background: var(--fg);
  transform: translate(-50%, -50%) scale(1.35);
}

@media (max-width: 900px) {
  .section-dots { display: none; }
}

/* ============================================================
   Panels (scroll-snap sections)
   ============================================================ */
.panel {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: calc(80px + var(--edge)) 0 var(--edge);
}

.panel-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--edge);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  margin: 0 0 22px;
}

/* Lifts the hero text off the animated waves without resorting to a
   boxed/shadowed card behind it — a soft black glow tight to the
   letterforms. Only the hero needs this: every other panel sits on a
   flat background now. */
.hero h1,
.hero .lede,
.hero .eyebrow {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

/* ============================================================
   Hero
   ============================================================ */
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  max-width: 16ch;
}

.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--fg-dim);
  max-width: 46ch;
  margin: 0 0 48px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 17px 36px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--fg);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease, opacity 0.2s ease;
}

.btn-primary {
  background: var(--fg);
  color: #05050a;
}

.btn-primary:hover {
  background: transparent;
  color: var(--fg);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   Problème / Solution split
   ============================================================ */
.split-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
}

.split-col h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 22px;
}

.split-col p {
  color: var(--fg-dim);
  font-size: 1.05rem;
  max-width: 42ch;
  margin: 0;
}

.split-col:first-child {
  border-left: 1px solid var(--line);
  padding-left: clamp(20px, 3vw, 40px);
}

.split-col:last-child {
  border-left: 1px solid var(--line-strong);
  padding-left: clamp(20px, 3vw, 40px);
}

@media (max-width: 800px) {
  .split-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ============================================================
   Pour qui
   ============================================================ */
.who-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.15;
  max-width: 20ch;
  margin: 0 0 56px;
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.who-card {
  background: var(--bg);
  padding: 36px 30px 40px;
  display: flex;
  flex-direction: column;
}

.who-index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--fg-dimmer);
  margin-bottom: 28px;
}

.who-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 14px;
}

.who-card p {
  color: var(--fg-dim);
  font-size: 0.98rem;
  margin: 0;
}

@media (max-width: 800px) {
  .who-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Download / waitlist
   ============================================================ */
.download h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 20px;
  max-width: 18ch;
}

.download .lede {
  color: var(--fg-dim);
  font-size: 1.1rem;
  max-width: 48ch;
  margin: 0 0 44px;
}

.waitlist-form {
  max-width: 560px;
  margin-bottom: 64px;
}

.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#email {
  flex: 1 1 260px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 16px 24px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--fg);
  min-width: 0;
}

#email::placeholder {
  color: var(--fg-dimmer);
}

#email:focus-visible {
  border-color: var(--fg);
}

.form-message {
  margin: 16px 2px 0;
  font-size: 0.9rem;
  min-height: 1.2em;
  color: var(--fg-dim);
}

.form-message[data-state="success"] {
  color: #d9d9d3;
}

.form-message[data-state="error"] {
  color: #f4a3a3;
}

.os-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
  max-width: 560px;
}

.os-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 10px 10px 20px;
}

.os-name {
  font-size: 0.95rem;
  color: var(--fg-dim);
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-dimmer);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}

.site-footer {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--fg-dimmer);
  font-size: 0.82rem;
  max-width: 560px;
}

.site-footer p {
  margin: 0 0 8px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .panel {
    padding-top: calc(70px + var(--edge));
  }
  .field-row {
    flex-direction: column;
    align-items: stretch;
  }
  .field-row .btn {
    width: 100%;
  }
}
