/* ─────────────────────────────────────────────────────────
   SENOTOPIA — Design System
   Same palette and Voyage display face as chronoscope-single-page, but
   flipped: Senotopia is always a light page (D-009), so the two sites
   read as distinct brands. Never add a dark/prefers-color-scheme mode.
   No JavaScript, no third-party requests (see AGENTS.md).
   ───────────────────────────────────────────────────────── */

@font-face {
  font-family: "Voyage";
  src: url("../brand/voyage-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Inter Medium, Latin subset, self-hosted (SIL OFL, see
   assets/brand/inter-LICENSE.txt). The tagline and the pitch text use it: one weight
   is shipped, so everything else keeps the system stack rather than faking
   bold/regular from this file. */
@font-face {
  font-family: "Inter";
  src: url("../brand/inter-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --black:      #080809;
  --charcoal:   #0d0d10;
  --off-white:  #f0f0ee;
  --cream:      #e8e4de;
  --stone:      #a8a29e;
  --slate:      #33373d;
  --muted:      #6b6762;
  --terracotta: #f07a5a;

  --line:       rgba(13, 13, 16, 0.10);
  --line-light: rgba(13, 13, 16, 0.18);
  --glow:       rgba(240, 122, 90, 0.16);

  --display: "Voyage", Didot, "Bodoni 72", Georgia, serif;
  --sans:    system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tagline-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter:    clamp(20px, 5vw, 56px);
  --space-sm:  clamp(12px, 2.4vw, 22px);
  --space-md:  24px;
  /* Vertical spacing also follows the viewport height (vh): on a wide, short
     screen (16:10 laptop, ~850px of page) the footer must still fit. */
  --space-lg:  clamp(20px, min(6vw, 4vh), 64px);
  --space-xl:  clamp(24px, min(10vw, 8vh), 120px);
  --content-w: 1080px;
  --logo-w:    clamp(240px, 60vw, 440px);
  --radius:    4px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
}

body {
  display: grid;
  /* Header and footer hug the edges; <main> takes the flexible middle row. */
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, var(--glow), transparent 70%),
    var(--off-white);
  color: var(--charcoal);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
ul, li { list-style: none; }

/* Charcoal, not terracotta: terracotta on the off-white is ~2.4:1, below
   the 3:1 a focus indicator needs. */
:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 3px;
}

/* ── LANGUAGE ───────────────────────────────────────────── */
/* Both languages are in the HTML; lang.js only sets <html lang>. With JS
   off the page stays French. */
html[lang="fr"] [lang="en"],
html[lang="en"] [lang="fr"] { display: none; }

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: var(--space-xl) var(--gutter) var(--space-lg);
}

/* One block: <h1> logo over <h2> tagline, both exactly --logo-w wide. */
.brand {
  width: var(--logo-w);
}

.brand__logo {
  font-size: inherit;
  line-height: 0;
}

.brand__logo-img {
  width: 100%;
  height: auto;
}

.brand__tagline {
  margin-top: var(--space-sm);
  font-size: inherit;
  font-weight: inherit;
  line-height: 0;
}

/* The SVG viewBox is 1000 wide and the <text> has textLength="1000", so
   the browser spreads the letters to span exactly the logo's width at
   any size, without JavaScript and whichever font actually renders. The
   font-size only sets the glyph size within that fixed width. */
.brand__tagline-svg {
  display: block;
  width: 100%;
  height: auto;
}

.brand__tagline-text {
  fill: var(--slate);
  font-family: var(--tagline-font);
  font-weight: 500;
  font-size: 58px;
}

/* Top-right switcher; only shown once lang.js has run (no dead buttons
   with JS off). */
.lang-switch {
  display: none;
  position: absolute;
  top: var(--space-md);
  right: var(--gutter);
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.js .lang-switch { display: inline-flex; }

.lang-switch button {
  min-width: 28px;
  min-height: 28px;
  padding: 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color 220ms;
}

.lang-switch button:hover { color: var(--charcoal); }
.lang-switch button[aria-pressed="true"] { color: var(--charcoal); }

/* Narrow screens: the logo spans most of the width and would touch the
   corner switcher, so it gets its own row above the logo instead. */
@media (max-width: 760px) {
  .lang-switch {
    position: static;
    width: 100%;
    justify-content: flex-end;
    margin-bottom: var(--space-sm);
  }
}

/* Header of the 404 page: the logo alone, not a heading. */
.site-header__logo {
  width: var(--logo-w);
  height: auto;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  padding: var(--space-xl) var(--gutter) var(--space-lg);
  text-align: center;
}

.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 5.75rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

/* ── MAIN ───────────────────────────────────────────────── */
/* The flexible row: its content is centred vertically between header and
   footer, and the row grows with the viewport. */
main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── PITCH ──────────────────────────────────────────────── */
.pitch {
  width: 100%;
  /* Wide enough for the longest line (~70 characters at 1.25rem) on one line
     from about 1000px of viewport; narrower screens wrap as usual. */
  max-width: 60rem;
  margin: 0 auto 16px;
  padding: 0 var(--gutter);
  text-align: center;
  font-family: var(--tagline-font);
  font-weight: 500;
}

.pitch__lead {
  max-width: 44rem;
  margin-inline: auto;
  font-size: clamp(1.625rem, 4.6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.pitch__line {
  margin-top: var(--space-md);
  color: var(--slate);
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  text-wrap: balance;
}

/* ── CTA ────────────────────────────────────────────────── */
.cta {
  padding: var(--space-lg) var(--gutter);
  text-align: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 28px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 220ms var(--ease-out-expo),
              box-shadow 220ms var(--ease-out-expo);
}

.button:hover { transform: translateY(-2px); }

.button--primary {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--black);
}

.button--primary:hover {
  box-shadow: 0 20px 52px rgba(240, 122, 90, 0.32);
}

/* ── MESSAGE (404) ──────────────────────────────────────── */
.message {
  padding: 0 var(--gutter);
  margin-top: var(--space-md);
  color: var(--muted);
  text-align: center;
}

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px var(--space-md);
  padding: var(--space-md) var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.site-footer__link {
  text-decoration: underline;
  text-decoration-color: var(--line-light);
  text-underline-offset: 3px;
}

.site-footer__link:hover {
  color: var(--charcoal);
  text-decoration-color: var(--terracotta);
}

/* ── REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .button, .lang-switch button { transition: none; }
  .button:hover { transform: none; }
}
