/* Craptain's Log — site styles.
   Palette and type mirror the app: mobile/src/theme/colors.ts + typography.ts
   (espresso brown primary, gold secondary, Nunito body, Pirata One display). */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/nunito-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Pirata One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/pirata-one-latin.woff2') format('woff2');
}

:root {
  --bg: #FFF8F0;            /* background */
  --surface: #FFFBFE;       /* surface */
  --surface-variant: #F5F0EB;
  --fg: #1C1B1F;            /* onBackground */
  --muted: #49454F;         /* onSurfaceVariant */
  --primary: #5D4037;       /* cool espresso brown */
  --on-primary: #FFFFFF;
  --primary-container: #D7CCC8;
  --gold: #FFB300;          /* secondary */
  --gold-soft: #FFECB3;     /* secondaryContainer */
  --green: #6B8E23;         /* tertiary */
  --border: #E5DFD8;        /* elevation.level5 */
  --error: #BA1A1A;
  --error-container: #FFDAD6;
  --on-error-container: #410002;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141316;
    --surface: #2B2930;
    --surface-variant: #302E36;
    --fg: #E6E1E5;
    --muted: #CAC4D0;
    --primary: #BCAAA4;
    --on-primary: #3E2723;
    --primary-container: #5D4037;
    --gold: #FFD54F;
    --gold-soft: #F57F17;
    --green: #9CCC65;
    --border: #45424D;
    --error: #FFB4AB;
    --error-container: #93000A;
    --on-error-container: #FFDAD6;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
header.site {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
header.site .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  font-family: 'Pirata One', cursive;
  font-size: 26px;
  letter-spacing: 0.5px;
}
header.site .brand img { width: 36px; height: auto; }
header.site nav { margin-left: auto; font-weight: 700; font-size: 14px; }
header.site nav a { color: var(--primary); text-decoration: none; }
header.site nav a:hover { color: var(--gold); }

/* Page hero: mascot + title */
.hero { display: flex; align-items: center; gap: 20px; margin: 8px 0 4px; }
.hero img { width: 96px; height: auto; flex-shrink: 0; }
.hero.center { flex-direction: column; text-align: center; gap: 8px; }
.hero.center img { width: 180px; }

main { max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; }

h1 {
  font-family: 'Pirata One', cursive;
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  margin: 0;
  color: var(--primary);
}
h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 40px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold);
}
h3 { font-size: 17px; font-weight: 700; margin-top: 24px; }

.meta { color: var(--muted); margin: 4px 0 32px; }

a { color: var(--primary); font-weight: 700; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
a:hover { color: var(--gold); }

table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--surface-variant); }

ul, ol { padding-left: 22px; }
li { margin: 5px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 16px 0;
}
.card.warn {
  border-left: 5px solid var(--gold);
  background: var(--surface-variant);
}

footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}
footer a { color: var(--muted); }

/* Landing page */
.links { display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin: 0 auto; }
.links a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--gold);
  border-radius: 14px;
  padding: 14px 20px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}
.links a:hover { border-color: var(--gold); background: var(--surface-variant); }
.tagline { color: var(--muted); font-size: 18px; margin: 8px 0 40px; }
