/* Express French site: the app's "Boreal Survey Map" world (french-fries DESIGN.md).
   Nordique palette, Literata for headings and numerals only, system sans for
   everything read quickly. Flat, tonal surfaces: no shadows anywhere. Light
   tokens each have a designed night pair; nothing is inverted. */

@font-face {
  font-family: "Literata Display"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/literata-display-600.woff2") format("woff2");
}
@font-face {
  font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/literata-text-600.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --ground: #F4F6F7;
  --ink: #1F3B33;
  --ink-2: #3F534C;
  --lake: #2E5E7E;
  --card: #D9CFC1;
  --track: #C6BAA8;
  --rule: #BFB3A1;
  --lichen: #D3D8DA;
  --lichen-track: #BCC3C6;
  --cranberry: #A23B3B;
  --target-tint: rgba(31, 59, 51, .09);
  --on-ink: #F4F6F7;

  --serif-display: "Literata Display", "Literata", Georgia, "Times New Roman", serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-control: 12px;
  --r-action: 14px;
  --r-card: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0F1F1A;
    --ink: #D9CFC1;
    --ink-2: #A9B3AE;
    --lake: #7FA9C9;
    --card: #1A2D27;
    --track: #2A3F38;
    --rule: #2E433C;
    --lichen: #30373A;
    --lichen-track: #4D5558;
    --cranberry: #E07A7A;
    --target-tint: rgba(217, 207, 193, .09);
    --on-ink: #0F1F1A;
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lake); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible {
  outline: 2px solid var(--lake);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 14px; border-radius: var(--r-control); z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 720px; }

/* Header with the contour field: faint topographic rings that fade out
   before the content starts. */
.masthead { position: relative; overflow: hidden; }
.masthead > * { position: relative; }
.masthead::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 340px;
  pointer-events: none;
  background: url("img/contours-light.svg") center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
}
@media (prefers-color-scheme: dark) {
  .masthead::before { background-image: url("img/contours-dark.svg"); }
}

.topbar {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--serif); font-weight: 600; font-size: 1.125rem;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.topbar nav { display: flex; gap: 18px; font-size: .9375rem; }
.topbar nav a { color: var(--ink-2); text-decoration: none; }
.topbar nav a:hover { color: var(--ink); text-decoration: underline; }

h1, h2, h3 { color: var(--ink); font-weight: 600; text-wrap: balance; }
h1 {
  font-family: var(--serif-display);
  font-size: clamp(2.125rem, 7vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 16px;
}
h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.2vw, 2rem);
  line-height: 1.2;
  margin: 0 0 12px;
}
h3 { font-family: var(--sans); font-size: 1.0625rem; line-height: 1.35; margin: 0 0 6px; }

p { margin: 0 0 14px; }
.muted { color: var(--ink-2); }

/* Hero */
.hero { position: relative; padding-top: 24px; padding-bottom: 40px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero .icon { width: 88px; height: 88px; border-radius: 20px; display: block; margin-bottom: 20px; }
.lede { font-size: 1.1875rem; color: var(--ink-2); max-width: 34ch; margin-bottom: 24px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.badge { display: inline-block; height: 48px; width: auto; }
.badge-note { font-size: .875rem; color: var(--ink-2); }
/* The official badge is black-on-white artwork; in dark mode it sits on a
   birch-ink plate so its white keyline stays visible. */
@media (prefers-color-scheme: dark) {
  .badge-plate { background: var(--ink); border-radius: 10px; padding: 3px; display: inline-block; line-height: 0; }
}

/* Survey map illustration (sample data, labelled as such) */
.map-card {
  background: var(--card);
  border-radius: var(--r-card);
  padding: 14px 16px 16px;
}
.map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.map-head strong { font-size: .9375rem; }
.map-head span { font-size: .75rem; color: var(--ink-2); }
.axis, .bar { position: relative; }
.axis { height: 30px; margin-bottom: 4px; }
.axis .n {
  position: absolute; top: 0; transform: translateX(-50%);
  font-family: var(--serif); font-weight: 600; font-size: .8125rem;
  font-variant-numeric: tabular-nums lining-nums; color: var(--ink-2);
}
.axis .n.target { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.meridian {
  position: absolute; top: 24px; bottom: 4px; left: 42.857%; z-index: 1;
  border-left: 1px solid var(--ink); opacity: .45;
}
.map-body { position: relative; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: 8px 0; }
.rows li + li { border-top: 1px solid var(--rule); }
.row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.row-top .fr { font-weight: 600; font-size: .9375rem; }
/* Text runs knock the meridian out with the card colour, as in the app. */
.row-top .fr, .row-top .band { position: relative; z-index: 2; background: var(--card); padding: 0 3px; margin: 0 -3px; }
.row-top .band {
  font-family: var(--serif); font-weight: 600; font-size: 1.0625rem;
  font-variant-numeric: tabular-nums lining-nums; color: var(--lake); white-space: nowrap;
}
.row-top .band.na { font-family: var(--sans); font-weight: 400; font-size: .8125rem; color: var(--ink-2); }
.bar {
  height: 8px; border-radius: 99px;
  background: linear-gradient(to right, transparent 42.857%, var(--target-tint) 42.857%), var(--track);
}
.bar.na { background: var(--lichen-track); }
.rows li.na .fr, .rows li.na .band { background: var(--card); }
.bar .range { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--lake); }
.bar .short { position: absolute; top: 2.5px; height: 3px; border-radius: 99px; background: var(--cranberry); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .75rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 16px; height: 6px; border-radius: 99px; vertical-align: middle; margin-right: 6px; }
.map-caption { font-size: .8125rem; color: var(--ink-2); margin: 10px 2px 0; }

/* Sections */
section { padding: 40px 0; }
section, .hero + section { border-top: 1px solid var(--rule); }
.section-lede { color: var(--ink-2); max-width: 60ch; }

.features { display: grid; gap: 12px; margin-top: 20px; }
.feature { background: var(--card); border-radius: var(--r-card); padding: 16px; }
.feature p { margin: 0; color: var(--ink-2); font-size: .9688rem; }

/* Course ruler: levels 0-8 */
.levels { margin-top: 20px; }
.level-row { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.level {
  text-align: center; padding: 10px 0;
  border-radius: 10px; background: var(--card);
  font-family: var(--serif); font-weight: 600; font-size: 1.125rem;
  font-variant-numeric: tabular-nums lining-nums;
}
.level.free { background: var(--lake); color: var(--ground); }
.level-key { display: grid; grid-template-columns: 3fr 6fr; gap: 4px; margin-top: 8px; font-size: .8125rem; color: var(--ink-2); }
.level-key span { border-top: 2px solid var(--rule); padding-top: 6px; }
.level-key .k-free { border-top-color: var(--lake); color: var(--ink); }

/* Long-form pages (privacy, support) */
.doc { padding-top: 16px; padding-bottom: 48px; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.75rem); }
.doc h2 { font-size: 1.375rem; margin-top: 32px; }
.doc .updated { color: var(--ink-2); font-size: .9375rem; }
.doc ul { padding-left: 1.2em; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.faq { margin-top: 20px; }
.faq details {
  background: var(--card); border-radius: var(--r-card);
  padding: 0 16px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 14px 28px 14px 0; position: relative;
  font-weight: 600; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 14px; color: var(--ink-2); }
.faq details > div p:last-child { margin-bottom: 0; }

.contact-card {
  background: var(--card); border-radius: var(--r-card);
  padding: 18px 16px; margin-top: 28px;
}
.contact-card p { margin: 0 0 6px; }
.button {
  display: inline-flex; align-items: center; min-height: 50px;
  padding: 7px 18px; border-radius: var(--r-action);
  background: var(--ink); color: var(--on-ink);
  font-weight: 600; text-decoration: none;
}
.button:hover { opacity: .85; text-decoration: none; }

footer.site {
  border-top: 1px solid var(--rule);
  padding: 24px 0 40px;
  font-size: .875rem; color: var(--ink-2);
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer.site a { color: var(--ink-2); }

@media (min-width: 720px) {
  body { font-size: 1.125rem; }
  .hero { padding-top: 40px; padding-bottom: 64px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
  .features { grid-template-columns: repeat(3, 1fr); }
  section { padding: 56px 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .meridian { animation: draw .4s ease-out both; transform-origin: top; }
  @keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
