/* Palette and type: docs/DESIGN.md in audioguide-everything-mobile. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-600-soft-latin.woff2") format("woff2");
}

:root {
  --bg: #F4F2EE;
  --card: #FFFFFF;
  --surface: #E9E6E0;     /* raised: pills, notices */
  --ink: #1C1C1A;
  --muted: #5E5B54;
  --line: #D9D5CD;
  --accent: #E2571B;      /* the spark: never under white text */
  --accent-text: #A63A0C; /* orange text on light backgrounds */
  --guide: #3A5A6E;       /* dusty blue block: "Guide me here" */
  --guide-line: #3A5A6E;
  --guide-muted: #C3D3DC;
  --guide-track: #557587;
  --photo: #6B4A68;       /* dusty plum block: "Explain a photo" */
  --photo-line: #6B4A68;
  --photo-muted: #E3CFE0;
  --on-block: #F2F2EE;
  --accent-on-block: #FF9157;
  --todo-bg: #FFE9A8;
  --todo-ink: #5A4300;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101214;
    --card: #191B1E;
    --surface: #23262A;
    --ink: #F2F2EE;
    --muted: #A4A9B0;
    --line: #33373C;
    --guide: #3A596B;
    --guide-line: #466679;
    --photo: #6E4D6B;
    --photo-line: #7B5A78;
    --accent: #FF9157;
    --accent-text: #FF9157;
    --todo-bg: #4A3A0A;
    --todo-ink: #FFE9A8;
  }
}

:root[data-theme="dark"] {
  --bg: #101214;
  --card: #191B1E;
  --surface: #23262A;
  --ink: #F2F2EE;
  --muted: #A4A9B0;
  --line: #33373C;
  --guide: #3A596B;
  --guide-line: #466679;
  --photo: #6E4D6B;
  --photo-line: #7B5A78;
  --accent: #FF9157;
  --accent-text: #FF9157;
  --todo-bg: #4A3A0A;
  --todo-ink: #FFE9A8;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }

p, ul, ol, table { margin: 0 0 1em; }
ul { padding-left: 1.25em; }
li + li { margin-top: 0.35em; }

a { color: var(--accent-text); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
}
.site-header .logo { display: block; line-height: 0; }
.site-header .logo img { height: 44px; width: auto; }
/* Language switch: a two-part pill */
.lang {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
}
.lang a {
  padding: 2px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}
.lang a:hover { color: var(--ink); }
.lang [aria-current] { background: var(--surface); color: var(--ink); font-weight: 600; }

/* Home */
.wrap.wide { max-width: 60rem; }
.hero { display: grid; gap: 32px; align-items: center; padding: 32px 0 0; }
@media (min-width: 52rem) { .hero { grid-template-columns: 1.15fr 0.85fr; } }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.hero .lede { font-size: 1.2rem; color: var(--muted); }
.badge {
  display: inline-block;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.95rem;
}
.badge::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.5em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.05em;
}

/* App screenshot */
.shot { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 20px; }
.shot.phone { max-width: 260px; margin: 0 auto; border-radius: 28px; }

/* Audio sample: the app's narration player (components/Player.tsx) */
.sample { max-width: 26rem; margin: 0 0 1.2em; background: var(--guide); border: 1px solid var(--guide-line); border-radius: 20px; color: var(--on-block); }
.sample .row[hidden] { display: none; }
.sample .row { display: flex; align-items: center; gap: 14px; padding: 16px; }
.sample .listen { width: 100%; border: 0; border-radius: 20px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sample .disc { flex: none; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: var(--accent-on-block); color: #1C1C1A; display: grid; place-items: center; }
.sample .toggle { cursor: pointer; }
.sample svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sample.playing .i-play, .sample:not(.playing) .i-pause { display: none; }
.sample b { display: block; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.25rem; line-height: 1.2; }
.sample small { display: block; color: var(--guide-muted); font-size: 0.95rem; }
.sample .grow { flex: 1; min-width: 0; }
.sample .times { display: flex; justify-content: space-between; margin-top: -6px; color: var(--guide-muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.sample .rate { flex: none; width: 64px; min-height: 36px; border: 1px solid var(--guide-muted); border-radius: 999px; background: none; color: var(--on-block); font: inherit; font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.sample button:focus-visible, .sample .seek:focus-visible { outline: 2px solid var(--accent-on-block); outline-offset: 3px; }
.seek { --p: 0%; display: block; width: 100%; height: 28px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent-on-block) var(--p), var(--guide-track) var(--p)); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--accent-on-block); }
.seek::-moz-range-track { height: 4px; border-radius: 2px; background: var(--guide-track); }
.seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent-on-block); }
.seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--accent-on-block); }

.band { padding: 32px 0 0; }
.band > h2:first-child, .band > .eyebrow + h2 { margin-top: 0; }

/* Free vs Premium */
.plans { width: 100%; table-layout: fixed; border-collapse: collapse; line-height: 1.45; }
.plans col:first-child { width: 34%; }
.plans col.pick { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.plans th, .plans td { padding: 14px 16px; text-align: left; vertical-align: top; font-weight: 400; }
.plans tbody tr { border-top: 1px solid var(--line); }
.plans thead th { padding-top: 18px; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.2rem; }
.plans thead th:last-child { color: var(--accent-text); }
.plans tbody th { color: var(--muted); }
.plans .tick { color: var(--accent-text); font-weight: 700; }
@media (max-width: 30rem) {
  .plans { font-size: 0.95rem; }
  .plans th, .plans td { padding: 12px 8px; }
  .plans col:first-child { width: 31%; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow {
  margin: 0 0 0.4em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-text);
}
/* The two ways in carry the colour, as on the app's home screen. */
.mode-title { display: flex; align-items: center; gap: 10px; margin-top: 1.6em; }
.mode-title::before { content: ""; width: 14px; height: 14px; border-radius: 4px; }
.mode-title.photo::before { background: var(--photo); }
.mode-title.guide::before { background: var(--guide); }

/* Explain a photo: the photo, and the first line of its guide */
/* Five cards: 2 + a wide last one on phones, 3 + 2 in between, one row of 5 when wide */
.shots { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 35.99rem) {
  .shots li:last-child { grid-column: 1 / -1; flex-direction: row; }
  .shots li:last-child img { width: calc(50% - 8px); flex: none; }
}
@media (min-width: 36rem) { .shots { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 60rem) { .shots { grid-template-columns: repeat(5, 1fr); } }
.shots li { margin: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--photo); color: var(--on-block); border-radius: 14px; }
.shots img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.shots .txt { padding: 12px 14px 14px; }
.shots b { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-on-block); }
.shots p { margin: 4px 0 0; font-family: "Fraunces", Georgia, serif; font-size: 0.98rem; line-height: 1.35; }

/* Guide me here: situations */
.moments { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.moments li { margin: 0; padding: 18px; background: var(--guide); color: var(--on-block); border-radius: 14px; }
.moments h3 { margin: 0 0 0.3em; font-size: 1.1rem; }
.moments p { margin: 0; color: var(--guide-muted); font-size: 0.95rem; }

.steps { list-style: none; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps > li { margin: 0; counter-increment: step; }
.steps > li::before { content: counter(step); font-family: "Fraunces", Georgia, serif; font-size: 2rem; color: var(--accent-text); }
.steps .shot { max-width: 300px; margin: 8px 0 12px; }
.steps p { margin: 0; color: var(--muted); }

/* Pills: example questions, languages */
.chips, .langs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips { margin: 12px 0 0; }
.langs { margin: 0 0 12px; }
.chips li, .langs li {
  margin: 0;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
}
.langs b { margin-right: 4px; color: var(--accent-text); }
.langs .soon { background: none; border-style: dashed; color: var(--muted); }

.pair { display: grid; gap: 16px; }
@media (min-width: 52rem) { .pair { grid-template-columns: 1fr 1fr; } }
.pair > div { padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.pair h3 { margin-top: 0; }
.pair ul { color: var(--muted); }

/* Where it comes from */
.story-text { max-width: 40rem; }
.route { display: block; width: 100%; max-width: 48rem; height: auto; margin: 8px auto; }
.route .path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.route .dot { fill: var(--card); stroke: var(--ink); stroke-width: 2; }
.route .end { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.route text { fill: var(--ink); font: 600 13px system-ui, sans-serif; }
.route text.big { font: 600 17px "Fraunces", Georgia, serif; }
/* The map scales down with the page: larger labels keep them readable on phones */
@media (max-width: 36rem) {
  .route text { font-size: 21px; }
  .route text.big { font-size: 25px; }
}
.photos-row { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); max-width: 38rem; margin: 16px auto 0; }
.photos-row a { display: block; }
.photos-row img { display: block; width: 100%; height: auto; border-radius: 14px; }
.more { margin: 12px 0 0; text-align: center; }

.cta { text-align: center; padding: 56px 0 0; }
.cta h2 { font-size: 2rem; margin-top: 0; }

.note { color: var(--muted); font-size: 0.95rem; }

/* Policy */
.policy h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-top: 24px; }
.meta { color: var(--muted); font-size: 0.95rem; }
.policy table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.policy th, .policy td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}
.policy th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Placeholders that must be filled before publishing */
mark.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  padding: 0 0.25em;
  border-radius: 4px;
}

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0 0 0.5em; }
.site-footer a { color: inherit; }
