/* Shared across every public page (landing, upload, blog) so the site reads
   as one continuous thing instead of four hand-copied look-alikes. Page
   templates link this, then layer their own <style> block on top for
   whatever is specific to that page (hero, article layout, feature grid,
   etc.) — see handlers/chrome.go for how nav/footer markup itself is
   shared too, not just these rules. */

:root {
  --paper: #EFEAE0;
  --paper-deep: #E6DFCE;
  --paper-line: #D9CFB8;
  --ink: #1E2A2A;
  --ink-soft: #5B655F;
  --ink-faint: #8B9089;
  --highlight: #F3C948;
  --highlight-soft: #F8DE8D;
  --navy: #22323F;
  --white: #FFFDF8;
  --on-brand: #FFFDF8;
  --risk-high: #9C4A3A;
  --risk-high-bg: #F2DAD2;
  --risk-med: #B9832A;
  --risk-med-bg: #F2E4C4;
  --risk-low: #54785A;
  --risk-low-bg: #DCE7DA;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", ui-serif, Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; }
p { margin: 0; }
a { text-decoration: none; color: inherit; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--highlight-soft);
  padding: 6px 12px;
  border-radius: 99px;
}

/* ---- nav ---- */
.nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand .mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand .word { color: var(--on-brand); font-weight: 600; font-size: 15px; letter-spacing: 0.01em; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: #C9D2CE;
  font-size: 13.5px;
  font-weight: 600;
}
.nav-links a:hover { color: var(--on-brand); }
.nav-links a.active { color: var(--highlight); }
.nav-links .btn-store {
  background: var(--highlight);
  color: #332404;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 99px;
  white-space: nowrap;
}
.nav-links .btn-try {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: var(--on-brand);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 99px;
  white-space: nowrap;
}
.nav-links .btn-try:hover { border-color: var(--on-brand); }
.nav-links .btn-try.active { border-color: var(--highlight); color: var(--highlight); }
@media (max-width: 720px) {
  .nav-links a:not(.btn-store):not(.btn-try) { display: none; }
}

/* ---- shared buttons (page-specific styles may add .large etc. on top) ---- */
.btn-primary {
  background: var(--navy);
  color: var(--on-brand);
  font-size: 14.5px;
  font-weight: 700;
  padding: 15px 26px;
  border-radius: 14px;
  display: inline-block;
}
.btn-primary.large { padding: 18px 32px; font-size: 15.5px; border-radius: 16px; }
.btn-ghost {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  padding: 15px 6px;
  border-bottom: 2px solid var(--paper-line);
  display: inline-block;
}
.btn-ghost-dark {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: var(--on-brand);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 14px;
  display: inline-block;
}
/* .btn-primary/.btn-ghost are also used on <button> elements (e.g. the
   upload page's JS-rendered "Try again"), which don't inherit font/cursor
   the way <a> does by default. */
button.btn-primary, button.btn-ghost {
  cursor: pointer;
  border: none;
  font-family: var(--sans);
}

/* ---- footer ---- */
footer { flex-shrink: 0; background: var(--paper-deep); border-top: 1px solid var(--paper-line); }
footer .wrap { padding-top: 40px; padding-bottom: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer .brand .word { color: var(--ink); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.footer-links a:hover { color: var(--ink); }
.footer-links a.active { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-note { font-size: 12px; color: var(--ink-faint); width: 100%; margin-top: 8px; }

main { flex: 1 0 auto; }
