/*
 * The landing, privacy, and support pages (#197), in the design system's "Absinthe Garden" look
 * (docs/design/system/styles.css): parchment and aubergine ink by day, absinthe night in dark mode, peacock links,
 * gilt ornament, Federant headings, Fraunces text. The fonts are the app's own files; their OFL texts sit beside them.
 */

@font-face { font-family: "Federant"; src: url("/fonts/Federant-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  color-scheme: light dark;
  --color-bg: #F3E7CF;
  --color-surface: #FAF3E3;
  --color-text: #2A1B2D;
  --color-text-secondary: #62505C;
  --color-divider: rgba(42, 27, 45, 0.16);
  --color-accent: #1C6A64;
  --color-accent-2: #A87B22;
  --color-vine: #3F6B34;
  --color-leaf: #7A9A4E;
  --color-blossom: #B8475F;
  --color-lead: #2A1B2D;
  --color-glass: rgba(214, 229, 236, 0.55);
  --drink-ruby: #7A1530;
  --font-heading: "Federant", "Iowan Old Style", Georgia, serif;
  --font-body: "Fraunces", "Iowan Old Style", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #111A17;
    --color-surface: #1A2622;
    --color-text: #F2E6CD;
    --color-text-secondary: #BBAE95;
    --color-divider: rgba(242, 230, 205, 0.16);
    --color-accent: #6CC3B3;
    --color-accent-2: #D9B45A;
    --color-vine: #86B868;
    --color-leaf: #5E8A47;
    --color-blossom: #E7879B;
    --color-lead: #0A0F0D;
    --color-glass: rgba(214, 232, 226, 0.88);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 1.0625rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.page { max-width: 38rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

svg { display: block; overflow: visible; }

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

/* The bar: the mark and "Bittermuse", home, then the other pages. */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.5rem; color: var(--color-text); text-decoration: none; font: 400 1.4rem/1 var(--font-heading); }
.brand svg { width: 2.25rem; height: 2.25rem; }
.bar nav { display: flex; gap: 1.25rem; font-weight: 600; }
.bar nav a { text-decoration: none; }
.bar nav a[aria-current="page"] { color: var(--color-text); }

/* The TestFlight banner across the top of every page, until the App Store release: the surface with a gilt rule. */
.banner {
  padding: 0.7rem 1.25rem; background: var(--color-surface); border-bottom: 1px solid var(--color-accent-2);
  text-align: center; font-size: 0.9375rem; line-height: 1.45;
}
.banner p { max-width: 38rem; margin: 0 auto; }
/* Each sentence wraps as a unit when it fits on a line, so a wide screen doesn’t split the link across two lines. */
.banner span { display: inline-block; }
.banner a { font-weight: 600; overflow-wrap: anywhere; }

.vine { height: 24px; width: 100%; max-width: 320px; margin: 0.75rem auto; }

h1 { font: 400 2.5rem/1.1 var(--font-heading); letter-spacing: 0.01em; margin: 2rem 0 0.5rem; }
h2 {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 2.25rem 0 0.75rem;
  color: var(--color-text-secondary);
  font: 600 0.8125rem/1.4 var(--font-body); letter-spacing: 0.09em; text-transform: uppercase;
}
h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, var(--color-accent-2), transparent); opacity: 0.6; }
h3 { font: 600 1.0625rem/1.4 var(--font-body); margin: 1.5rem 0 0.25rem; }
p, ul, ol { margin: 0 0 0.9rem; }
ul, ol { padding-left: 1.25rem; }
li { margin: 0.3rem 0; }
strong { font-weight: 600; }

.lede { font-size: 1.2rem; line-height: 1.5; }
.dateline { color: var(--color-text-secondary); font-size: 0.9375rem; margin-top: 0; }

/* A phone screenshot on the support page: phone-sized on a wide screen, with the device's rounded corners. */
.screenshot {
  display: block; width: 100%; max-width: 18rem; height: auto; margin: 1.25rem auto;
  border-radius: 1.75rem; box-shadow: 0 0 0 1px var(--color-divider);
}

/* Two or three screenshots of one step side by side, wrapping onto a second row on a phone. */
.screenshots { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 1.25rem 0; }
/* A crop of one part of a screen, not a whole phone: smaller corners. */
.screenshot.is-crop { border-radius: 0.75rem; }
.screenshots .screenshot { flex: 1 1 9.5rem; max-width: 15rem; margin: 0; border-radius: 1.25rem; }
@media (min-width: 40rem) { .screenshots .screenshot { min-width: 0; } }   /* a row of three fits the column */

/* The landing page: the mark in a gilt ring, the name, the two paragraphs. */
.hero { text-align: center; padding-top: 2.5rem; }
.hero .mark {
  width: 9rem; height: 9rem; margin: 0 auto; padding: 1.1rem; border-radius: 50%;
  background: var(--color-surface); box-shadow: 0 0 0 1.5px var(--color-accent-2), 0 0 0 5px var(--color-bg), 0 0 0 6px var(--color-accent-2);
}
.hero h1 { font-size: 3.25rem; margin-top: 1.75rem; }
/* The wordmark (#232): outlined paths in the ink colour, as wide as the name would be set at the heading size. */
.hero h1 .wordmark { display: block; width: min(18.5rem, 82vw); height: auto; margin: 0 auto; fill: currentColor; stroke: currentColor; }
.hero .lede { max-width: 30rem; margin: 0 auto 1.5rem; }
/* The demo video in Video.js's player (index.html), under the wordmark: the column's width at the video's 16:9,
   centered, before the player loads and after, so nothing below it moves. Its controls take the peacock and Fraunces. */
.hero .demo {
  display: block; width: 100%; aspect-ratio: 16 / 9; margin: 1.5rem auto 0.75rem; text-align: start;
  --media-accent-color: var(--color-accent); --media-font-family: var(--font-body); --media-border-radius: 1rem;
}
.hero .demo video-skin,
.hero .demo video { display: block; width: 100%; height: 100%; }
/* The demo's credit, just under it in the footnote's size and secondary ink. */
.hero .credit { margin: 0 0 2rem; color: var(--color-text-secondary); font-size: 0.875rem; }
/* The App Store images (scripts/render-store-images.sh): wider than the text column, four across on a wide screen,
   two on a phone. */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem;
  width: min(56rem, calc(100vw - 2.5rem)); margin: 2rem 0 1rem 50%; translate: -50%; padding: 0; list-style: none;
}
.gallery img { display: block; width: 100%; height: auto; border-radius: 1rem; box-shadow: 0 0 0 1px var(--color-divider), 0 10px 30px rgba(42, 27, 45, 0.18); }
.links { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; margin: 1.5rem 0; padding: 0; list-style: none; }
.links a {
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.5rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; color: var(--color-accent); box-shadow: inset 0 0 0 1.5px var(--color-accent);
}

footer { margin-top: 3rem; color: var(--color-text-secondary); font-size: 0.9375rem; text-align: center; }
footer p { margin: 0.4rem 0; }
