/* frodi.org (D-100): the Storybook look of the app (app/src/theme/tokens.ts + fixes.ts): Forest by day, Night in
   dark mode, Fraunces headings, Inter text. Fonts are self-hosted (SIL Open Font License, see fonts/). */
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --paper: #EEF3EC; --surface: #FBF8F0; --sunk: #E2EBE1; --line: #CFE0D3;
  --ink: #1A1A1A; --ink2: #3F3D38; --ink3: #5E5A50;
  --pri: #1F4D3A; --pri-ink: #FBF8F0; --pri-soft: #DCE9DF;
  --sec: #826213; --sec-soft: #F1E6C4;
  --card-edge: #9CC4AA; --btn-edge: #0F2A1F; --focus: #1d6fd6;
  --link: #1F4D3A;
  --shadow: 0 3px 0 var(--card-edge), 0 8px 18px rgba(31, 77, 58, 0.12);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1B2438; --surface: #222D45; --sunk: #28344F; --line: #34466A;
    --ink: #F4EFE3; --ink2: #D3D9E4; --ink3: #AEB7C8;
    --pri: #E8CF7A; --pri-ink: #15151C; --pri-soft: #33405C;
    --sec: #9CC4AA; --sec-soft: #243A33;
    --card-edge: #121A2B; --btn-edge: #9C7A1E; --focus: #7fb2ff;
    --link: #E8CF7A;
    --shadow: 0 3px 0 var(--card-edge), 0 8px 18px rgba(0, 0, 0, 0.28);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--ui);
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; color: var(--ink); margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 4vw, 2.1rem); margin-top: 0.2em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin: 0.3em 0; }
strong { font-weight: 600; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--ink); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* header and footer */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font: 600 1.6rem/1 var(--display); }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-weight: 600; font-size: 0.98rem; }
.nav a { color: var(--ink2); text-decoration: none; padding: 6px 2px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--link); text-decoration: underline; }
.site-footer { margin-top: 64px; padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--ink2); font-size: 0.95rem; }
.site-footer .wrap { display: flex; gap: 12px 28px; flex-wrap: wrap; align-items: baseline; justify-content: space-between; }
.site-footer nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }

/* panels and type helpers */
.panel { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 24px; }
.eyebrow { font: 600 0.8rem/1.2 var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sec); margin: 0 0 10px; }
.lede { font-size: 1.2rem; color: var(--ink2); max-width: 38em; }
.muted { color: var(--ink2); }
.small { font-size: 0.92rem; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--sec-soft); color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.scene { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: var(--sunk); }
.scene img { width: 100%; height: auto; aspect-ratio: 12 / 5; }
section { margin: 56px 0; }

/* home */
.hero { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.05fr 1fr; } }
.hero h1 { margin-bottom: 16px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.lang { display: flex; flex-direction: column; gap: 2px; }
.lang .name { font: 600 1.25rem/1.2 var(--display); }
.lang .levels { color: var(--ink2); font-size: 0.95rem; }
.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); list-style: none; padding: 0; }
.steps li { margin: 0; }
.steps .scene { margin-bottom: 16px; }
.steps h3::before { counter-increment: step; content: counter(step) ". "; color: var(--sec); }
.shots { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); list-style: none; padding: 0; }
.shots li { margin: 0; }
.shots figure { margin: 0; }
.shots img { border-radius: 22px; box-shadow: var(--shadow); width: 100%; max-width: 260px; margin: 0 auto; }
.shots figcaption { text-align: center; color: var(--ink2); font-size: 0.95rem; margin-top: 12px; }
.contact { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; }
.email { font: 600 1.15rem/1.3 var(--ui); user-select: all; -webkit-user-select: all; background: var(--sunk); padding: 6px 12px; border-radius: 10px; }
.button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--pri); color: var(--pri-ink); font: 600 1rem/1.2 var(--ui); text-decoration: none; box-shadow: 0 3px 0 var(--btn-edge); }
.button.plain { background: var(--surface); color: var(--ink); box-shadow: 0 2px 0 var(--card-edge); border: 1px solid var(--line); }
.button:active { transform: translateY(2px); box-shadow: none; }
.raven { width: 120px; height: auto; }
.bare { list-style: none; padding: 0; }
.contact-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: min(100%, 260px); }
.contact-card h1, .contact-card h2 { margin-top: 0; }

/* text pages (privacy, support, credits) */
.doc h2 { margin-top: 1.6em; }
.doc h3 { margin-top: 1.3em; }
.doc .meta { color: var(--ink2); font-size: 0.95rem; }
.note { background: var(--sec-soft); border-radius: 14px; padding: 14px 18px; }
details { background: var(--surface); border-radius: 16px; box-shadow: 0 2px 0 var(--card-edge); padding: 4px 18px; margin: 12px 0; }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; min-height: 44px; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
dl.sources dt { font-weight: 600; margin-top: 1em; }
dl.sources dd { margin: 0.2em 0 0; color: var(--ink2); }
.copied { color: var(--sec); font-weight: 600; min-height: 1.6em; }
