/* =============================================================================
   Ocala Go — ocalago.com
   Shared across every page. Landing-specific layout lives in index.html.

   Colours are the app's own tokens (packages/shared/src/tokens.ts) so the site
   and the app read as one product. Body text is 18px because 12_DesignRules
   sets an 18pt floor in the app and a lot of this audience is over 55.

   The display face is DM Serif Display — the same one the app registers at
   launch — SELF-HOSTED from apps/site/fonts. Not Google Fonts: the privacy page
   says the app talks to no third parties, and a marketing page that quietly
   phones a font CDN to say so is the kind of small hypocrisy that costs more
   than it saves. It also means the CSP can stay locked to 'self'.
   ========================================================================== */

@font-face {
  font-family: 'DM Serif Display';
  src: url('/fonts/DMSerifDisplay-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #FAF8F4;
  --surface: #FFFFFF;
  --sunken: #F1EDE6;
  --ink: #17140F;
  --ink-secondary: #574F45;
  --ink-tertiary: #736A5E;
  --accent: #1E5A3C;
  --accent-soft: #E4EFE7;
  --rust: #8A4B2A;
  --rust-soft: #F3E6DE;
  --rule: #E4DED2;
  --shadow: 0 1px 2px rgba(23,20,15,.04), 0 8px 24px rgba(23,20,15,.06);
  --shadow-lift: 0 2px 4px rgba(23,20,15,.05), 0 18px 48px rgba(23,20,15,.10);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #141311;
    --surface: #1E1C19;
    --sunken: #262320;
    --ink: #F3EFE7;
    --ink-secondary: #BDB5A8;
    --ink-tertiary: #999182;
    --accent: #63B085;
    --accent-soft: #1F3328;
    --rust: #D28A64;
    --rust-soft: #3A2A20;
    --rule: #302C27;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.35), 0 18px 48px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }

/* Responsive image reset. Without `height: auto` the width/height ATTRIBUTES —
   which are there so the browser reserves the right space before the image
   loads — get applied as the literal layout height once CSS overrides the
   width. That stretched the hero phone to 1135px tall and left two screens of
   blank page under it. */
img { max-width: 100%; height: auto; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 18px/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* Focus that is actually visible, on every interactive thing. */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.serif {
  font-family: 'DM Serif Display', Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -.01em;
}

/* ---------- shared chrome ------------------------------------------------ */

.masthead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  /* Always-on hairline. The alternative was a scroll listener, and one line of
     JavaScript would mean loosening script-src from 'none' for a border. */
  border-bottom: 1px solid var(--rule);
}
.masthead-in {
  max-width: 68rem; margin: 0 auto; padding: .85rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.wordmark {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.375rem; color: var(--ink); text-decoration: none;
  margin-right: auto; letter-spacing: -.01em;
}
.masthead nav { display: flex; gap: 1.5rem; }
.masthead nav a {
  color: var(--ink-secondary); text-decoration: none; font-size: 1rem; font-weight: 550;
}
.masthead nav a:hover { color: var(--accent); }
@media (max-width: 33rem) { .masthead nav { display: none; } }

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding: 2.5rem 1.25rem 4rem;
}
.footer-in {
  max-width: 68rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: baseline;
}
.footer-in p { margin: 0; color: var(--ink-tertiary); font-size: 1rem; }
.footer-in nav { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-left: auto; }
.footer-in a { color: var(--ink-secondary); font-size: 1rem; }

/* ---------- prose pages (privacy, guidelines) ---------------------------- */

.wrap { max-width: 44rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.wrap h1 {
  font-family: 'DM Serif Display', Georgia, serif; font-weight: 400;
  font-size: clamp(2.25rem, 7vw, 3rem); line-height: 1.1;
  margin: 2rem 0 .5rem; letter-spacing: -.015em;
}
.wrap h2 {
  font-family: 'DM Serif Display', Georgia, serif; font-weight: 400;
  font-size: clamp(1.4rem, 4vw, 1.75rem); line-height: 1.25;
  margin: 3rem 0 .75rem; padding-top: 1.75rem; border-top: 1px solid var(--rule);
  letter-spacing: -.01em;
}
.updated { color: var(--ink-tertiary); font-size: 1rem; margin: 0 0 2.5rem; }
.lede { font-size: 1.3125rem; line-height: 1.55; color: var(--ink-secondary); }
p, li { color: var(--ink-secondary); }
li { margin-bottom: .5rem; }
strong { color: var(--ink); font-weight: 650; }
a { color: var(--accent); }
a.home {
  display: inline-block; margin-bottom: 1.5rem; color: var(--accent);
  font-weight: 600; text-decoration: none; font-size: 1rem;
}
a.home:hover { text-decoration: underline; }
.note {
  background: var(--surface); border-left: 4px solid var(--rust);
  padding: 1.15rem 1.35rem; margin: 1.75rem 0; border-radius: 0 10px 10px 0;
  box-shadow: var(--shadow);
}
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 1rem; }
th, td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--ink); font-weight: 650; }
td { color: var(--ink-secondary); }
.tablewrap { overflow-x: auto; }
