/* onefifty.app, every page (docs/plans/website.md). The home page adds home.css.
   Colours are the app's own (apps/mobile/src/theme/palette.json; scripts/check-site.mjs compares them), light and
   dark by the system setting. Headings in Newsreader, text in Schibsted Grotesk, both self-hosted (SIL OFL). */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/newsreader-latin-5.3.0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-5.3.0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Georgia, sized to Newsreader 600's letter widths and line box, so headings keep their shape while the font loads. */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia Bold"), local("Georgia-Bold"), local("Georgia");
  size-adjust: 86.5%;
  ascent-override: 85%;
  descent-override: 30.6%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;
  --background: #F6F4F0;
  --surface: #FFFFFF;
  --pressed: #ECE8E1;
  --content: #1B1A18;
  --content-secondary: #5E5A54;
  --border: #E3DED6;
  --input-border: #8C867D;
  --accent: #2E5E4E;
  --on-accent: #FFFFFF;
  --accent-tint: #D2D9D3;
  --danger: #A33A2A;
  --heart: #B3402F;
  --fill: #E6E2DB;
  --ring-dot: #C9C3B9;
  --notice: #6B4E0E;
  --notice-tint: #F7EDD7;
  /* The site's own, beyond the palette: the paper's grain, the photographic shadows. */
  --paper: url("/img/paper.svg");
  --shadow-ink: 42 31 20;
  --print-edge: 0 0 0 0 transparent;
  --print-shadow: var(--print-edge), 0 1px 1px rgb(var(--shadow-ink) / .08), 0 5px 12px rgb(var(--shadow-ink) / .1), 0 22px 40px -14px rgb(var(--shadow-ink) / .32);
  --card-shadow: var(--print-edge), 0 1px 2px rgb(var(--shadow-ink) / .06), 0 12px 28px -12px rgb(var(--shadow-ink) / .2);

  --font-display: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --font-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --ease-ui: cubic-bezier(.2, 0, 0, 1);
  --spring: cubic-bezier(.2, .9, .3, 1.02);
  --gutter: clamp(16px, 5vw, 72px);
  --header-h: 72px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #121211;
    --surface: #1D1C1A;
    --pressed: #2A2825;
    --content: #F2EFEA;
    --content-secondary: #A9A399;
    --border: #34312D;
    --input-border: #77716A;
    --accent: #8CA69E;
    --on-accent: #121211;
    --accent-tint: #1A2923;
    --danger: #F08A76;
    --heart: #F08A76;
    --fill: #2A2825;
    --ring-dot: #5A554E;
    --notice: #E8C77A;
    --notice-tint: #3A3020;
    --paper: none;
    --shadow-ink: 0 0 0;
    --print-edge: 0 0 0 1px #34312D;
  }
}
@supports (transition-timing-function: linear(0, 1)) {
  /* A spring with under 3% overshoot. */
  :root { --spring: linear(0, .06, .24 9%, .53 18%, .79 28%, .93 37%, 1.01 47%, 1.025 56%, 1.018 66%, 1.004 80%, 1); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--paper), var(--background);
  color: var(--content);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
p, li { text-wrap: pretty; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 30; padding: 10px 16px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }
.wrap {
  width: 100%;
  max-width: calc(1240px + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* The brand: 12 places in a ring, "you" the larger accent dot at 12 o'clock (as the app's DotRing). */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--content); text-decoration: none; border-radius: 8px; }
.brand:hover { text-decoration: none; }
.mark { width: 28px; height: 28px; flex: none; }
.mark circle { fill: var(--content); }
.mark .mark-you { fill: var(--accent); }
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.01em; line-height: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 600 1.0625rem/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 140ms var(--ease-ui), transform 140ms var(--ease-ui);
}
.btn:hover { background: color-mix(in srgb, var(--accent) 86%, var(--content)); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.btn[aria-busy="true"] { cursor: progress; }

/* Pages other than the home page: the waitlist notice, the thank-you and help pages, the legal pages, 404. */
.page > header, .page > main, .page > footer {
  width: 100%; max-width: calc(720px + 2 * var(--gutter)); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.page > header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding-block: 24px 8px;
}
.page nav ul { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; }
.page nav a { display: inline-block; padding: 10px 0; color: var(--content-secondary); }
.page nav a[aria-current="page"] { color: var(--content); font-weight: 600; }
.page > main { padding-block: 24px 16px; }
.page h1 { margin: 24px 0 12px; font-size: clamp(2.25rem, 1.8rem + 2vw, 3.25rem); line-height: 1.06; letter-spacing: -0.02em; }
.page h2 { margin: 40px 0 8px; font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.01em; }
.page h3 { margin: 28px 0 4px; font-size: 1.25rem; line-height: 1.3; }
.page p, .page li { max-width: 64ch; }
.page .lead { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.45; color: var(--content-secondary); }
.page .updated { margin-top: 0; color: var(--content-secondary); font-size: .9375rem; }
.page .draft { padding: 12px 14px; border-radius: 12px; background: var(--notice-tint); color: var(--notice); font-size: .9375rem; }
.page .card { padding: 16px 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--card-shadow); }
.page table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.page th, .page td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.page > footer {
  margin-top: 56px; padding-block: 20px 48px; border-top: 1px solid var(--border);
  color: var(--content-secondary); font-size: .9375rem;
}
.page > footer p { margin: 0 0 6px; }
