/* ============================================================
   IMAGORIA — promotional website
   Light on paper. Tokens from docs/design/imagoria-identity-handoff.md §3.
   Nothing on paper emits light: no glow, halo, bloom or gradient —
   only line, fill and shadow. Coral is the point, and nothing else.
   ============================================================ */

/* ── Faune (Alice Savoie for the CNAP, SIL OFL) ───────────────
   Text regular / bold / italic for everything; Display Black and Thin
   at display sizes only. No system sans anywhere. */
@font-face {
  font-family: "Faune Text";
  src: url("assets/fonts/FauneText-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Faune Text";
  src: url("assets/fonts/FauneText-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Faune Text";
  src: url("assets/fonts/FauneText-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Faune Display";
  src: url("assets/fonts/FauneDisplay-Black.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Faune Display";
  src: url("assets/fonts/FauneDisplay-Thin.woff2") format("woff2");
  font-weight: 100; font-style: normal; font-display: swap;
}

:root {
  --paper:  #f1e9de;   /* ground */
  --card:   #f8f3ea;
  --ink:    #2b2420;   /* 12.7:1 on paper */
  --ink2:   #55493f;   /*  7.2:1 — body */
  --ink3:   #6e6157;   /*  5.0:1 — labels; darkened from the brief's #7D7068,
                          which was 4.0:1 and failed AA at label sizes */
  --line:   rgba(43, 36, 32, .16);
  --coral:  #e8875b;   /* the point. never a button, link or hover state */

  --font-text:    "Faune Text", Georgia, "Times New Roman", serif;
  --font-display: "Faune Display", Georgia, "Times New Roman", serif;

  --page-x:    28px;
  --max-w:     1080px;
  --section-y: 96px;
}

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

/* The wordmark is set with dotless ı and drawn tittles, which is a drawing
   rather than a word; this carries the word for assistive technology. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html { color-scheme: light; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }
img, svg, video { display: block; max-width: 100%; }
button { font-family: inherit; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-x);
}

/* ── The wordmark ────────────────────────────────────────────
   HTML text, never an image: `imagoria` in Faune Display Black with
   both i's set as dotless ı and the tittles drawn here — coral on the
   first, ink on the second. */
.wm {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.015em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
}
.wm i { font-style: normal; position: relative; }
.wm i::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: .17em; height: .17em;
  border-radius: 50%;
  background: var(--coral);
  top: .163em;
}
.wm i.k::after { background: var(--ink); }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(241, 233, 222, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
/* Bigger than the canonical 26px, and nudged down: the wordmark is set at
   line-height 1, so its ink hangs ~3.5px below the middle of its own line
   box and centring the mark on that box leaves the mark sitting high. The
   nav mark also carries a heavier stroke than the canonical one (84/73
   rather than 60/52, in the markup) — a hairline reads far lighter than
   Display Black at this size. Every larger instance keeps the real mark. */
.brand .mk { width: 32px; height: 32px; transform: translateY(3.5px); }
.nav .wm { font-size: 24px; }
.nav-right { display: flex; align-items: center; gap: 22px; }
.langs { display: flex; gap: 14px; font-size: 13px; letter-spacing: .08em; }
.langs a { text-decoration: none; color: var(--ink2); }
.langs a:hover { color: var(--ink); }
.langs a.cur { color: var(--ink); border-bottom: 1.5px solid var(--ink); }

/* The four codes across need 110px, and a 375px nav has 319px of room against
   320px of content — one pixel short, with nothing left between the wordmark
   and the buttons. Below 820px they fold into this disclosure instead, which
   shows the current language and costs about 38px. A native <details>: it
   works with scripting off, and the keyboard and screen-reader behaviour come
   with the element. script.js only adds shutting it from outside. */
.langpick { display: none; position: relative; }
.langpick > summary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;          /* the default triangle, in Firefox */
}
.langpick > summary::-webkit-details-marker { display: none; }
/* Drawn rather than a glyph, so the caret carries the same line weight as the
   rest of the furniture and turns over when the panel opens. */
.langpick > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ink2);
  border-bottom: 1.5px solid var(--ink2);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s;
}
.langpick[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.langpick-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 6px;
  min-width: 66px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(43, 36, 32, .12);
}
.langpick-menu a {
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--ink2);
}
.langpick-menu a.cur { color: var(--ink); background: rgba(43, 36, 32, .06); }
.navcta {
  font-size: 14px;
  text-decoration: none;
  border: 1px solid rgba(43, 36, 32, .3);
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
  transition: border-color .2s, background .2s;
}
.navcta:hover { border-color: var(--ink); background: rgba(248, 243, 234, .7); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--paper);
}
/* The poster image and the loop are stacked in the same box. The poster is
   plain markup so the browser can find it in the preload scan: it is the
   hero's first paint and its largest contentful paint, and the loop draws
   over it when it arrives. */
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.hero .in {
  position: relative;
  padding: 80px var(--page-x) 90px;
  max-width: 760px;
}
.hero .wm { font-size: clamp(64px, 9vw, 112px); }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.08;
  margin: 26px 0 0;
  letter-spacing: -.005em;
  text-wrap: balance;
}
/* Both clauses in Display Black: the app never splits the sentence
   across two weights, and Thin read too light at this size. */
.hero h1 .l2 { display: block; margin-top: 2px; }
.hero .lead {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink2);
  max-width: 56ch;
  margin: 22px auto 0;
  /* Balanced so neither sentence leaves a single word stranded on its own
     line at the widths where it doesn't quite fit. */
  text-wrap: balance;
}
/* The second sentence starts its own line: the first says what Imagoria is,
   the second how it works, and the break keeps them from running together. */
.hero .lead .l2 { display: block; }
.ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  border: 1px solid rgba(43, 36, 32, .3);
  background: rgba(248, 243, 234, .7);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 16px;
  transition: border-color .2s, background .2s;
}
.btn:hover { border-color: var(--ink); background: var(--card); }
.btn .ic { width: 16px; height: 16px; flex: none; }
.meta { font-size: 13px; color: var(--ink3); margin-top: 14px; letter-spacing: .04em; }

/* ── Sections ────────────────────────────────────────────────── */
section.s { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.kick {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 14px;
}
h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -.005em;
  text-wrap: balance;
  max-width: 22ch;
}
p { max-width: 60ch; color: var(--ink2); margin: 0 0 14px; }
p b { color: var(--ink); }
.note { font-size: 13px; color: var(--ink3); }

.two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.two.flip { direction: rtl; }
.two.flip > * { direction: ltr; }

.phone {
  width: min(300px, 80%);
  height: auto;   /* the width/height attributes are a presentational hint */
  margin: 0 auto;
  border-radius: 38px;
  box-shadow: 0 30px 60px rgba(43, 36, 32, .16);
}

.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; margin-top: 34px; }
.step .kk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink3);
}
.g { width: 16px; height: 16px; flex: none; }
.step h3 { font-size: 22px; font-weight: 700; margin: 8px 0 6px; }
.step p { font-size: 16px; margin: 0; }

.quote {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  max-width: 30ch;
  color: var(--ink);
  margin: 0 0 22px;
}
/* One opening mark above the line, not a pair around it: it says a person is
   speaking without boxing the sentence in. Ink3, the label colour — coral is
   the point in the mark and stays there. */
.quote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4em;
  line-height: .62;
  color: var(--ink3);
  margin-bottom: .1em;
}
/* The second half of the note: what using it actually did. Body size, so the
   quote above stays the thing that is being said and this reads as the person
   carrying on. */
.quote-after {
  max-width: 46ch;
  color: var(--ink2);
  margin: 0 0 24px;
}
.who { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--ink2); }
.who .av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }

/* Two up, beside the widget picture — four across would leave each column
   about 125px wide inside the text half. */
.also { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 32px; margin-top: 34px; }
.also h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.also p { font-size: 15px; margin: 0; }

/* ── Closing ─────────────────────────────────────────────────── */
.close { text-align: center; padding: 110px 0 100px; border-top: 1px solid var(--line); }
.close .mk { width: 120px; height: 120px; margin: 0 auto 18px; }
.close .wm { font-size: 64px; }
.close p { margin: 12px auto 0; }
.close .ctas { margin-top: 26px; }

/* ── Footer ──────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: 13px; color: var(--ink3); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
.foot-langs { display: flex; gap: 12px; }
.foot-langs a { color: var(--ink2); }
.foot-langs a.cur { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── Support, legal and 404 ──────────────────────────────────── */
.doc-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 96px var(--page-x) 56px;
  border-bottom: 1px solid var(--line);
}
.doc-hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin-top: 10px;
}
.doc-nav { display: flex; gap: 24px; margin-top: 28px; }
.doc-nav a {
  font-size: 14px;
  color: var(--ink2);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  transition: color .2s, border-color .2s;
}
.doc-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.doc-body { max-width: 680px; margin: 0 auto; padding: 0 var(--page-x) var(--section-y); }
.doc { padding-top: var(--section-y); }
.doc + .doc { border-top: 1px solid var(--line); }
.doc h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 8px; }
.doc-updated { font-size: 13px; color: var(--ink3); margin-bottom: 40px; }

.doc-section { margin-bottom: 36px; }
/* Support has no document-level title between its h1 and these, so its
   section headings are h2 and legal's, which sit under a document h2, are
   h3. Both are the same label. */
.doc-section h2,
.doc-section h3 {
  font-family: var(--font-text);
  font-weight: 400;
  max-width: none;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 10px;
}
.doc-section p { font-size: 16px; color: var(--ink2); line-height: 1.7; max-width: none; }
.doc-section p + p { margin-top: 12px; }
.doc-section a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.doc-highlight {
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 36px;
}
.doc-highlight p { font-size: 15px; color: var(--ink2); line-height: 1.65; margin: 0; }

.not-found {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px var(--page-x);
  gap: 16px;
}
.not-found .mk { width: 64px; height: 64px; }
.not-found-num {
  font-family: var(--font-display);
  font-weight: 100;
  font-size: clamp(80px, 15vw, 160px);
  line-height: 1;
  color: var(--ink);
}
.not-found p { color: var(--ink2); margin-bottom: 8px; }

/* ── Narrow ──────────────────────────────────────────────────── */
@media (max-width: 820px) {
  :root { --section-y: 72px; }
  .two { grid-template-columns: 1fr; gap: 40px; }
  .steps, .also { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
  .nav .langs { display: none; }
  .langpick { display: block; }
}

@media (max-width: 480px) {
  .nav .wm { font-size: 21px; }
  .brand .mk { width: 28px; height: 28px; transform: translateY(3px); }
  .hero .in { padding: 64px var(--page-x) 72px; }
  .close { padding: 84px 0 76px; }
  .close .mk { width: 92px; height: 92px; }
  .close .wm { font-size: 48px; }
  footer .wrap { flex-direction: column; }
}

/* Below ~380px the bar runs out of room: at 320 the wordmark meets the
   language picker with nothing between them. Pull in the nav's own gutter and
   the gap before the button — the rest of the page keeps its 28px. */
@media (max-width: 380px) {
  .nav .wrap { padding: 0 18px; }
  .nav-right { gap: 12px; }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #hero-video { display: none; }   /* the poster image stands alone */
}
