/* Site theme: dark navy + cinnamon.
   Applied through <html data-theme="cinnamon"> in base.html (admin pages opt
   out). Every colour role used by style.css and the templates is defined here;
   without the attribute, each use falls back to the original gold palette.

   Cinnamon (#C37F60 -> #D19D85) comes from the #33120B family: same warm
   brown, lower saturation, lightened until readable. #33120B is the text on
   accent surfaces. Contrast on #0D1B2A: accent 5.4:1, partner 7.3:1, body
   text 14.3:1, muted labels 6.8:1; #33120B on the accent 5.3:1. */

/* ---- Base: surfaces and neutral text ---- */
:root[data-theme] {
  /* Palette surfaces */
  --clr-bg: #0D1B2A;
  --clr-navy: #13263A;              /* panels (CTA boxes, PDF card) */
  --clr-navy-rgb: 19, 38, 58;
  --clr-surface: #13263A;           /* cards */
  --clr-surface-alt: #162B42;       /* modals, form panels */
  --clr-surface-deep: #0F2133;
  --clr-text-soft: #CBD5E1;
  --clr-ticker-bg: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-hover));

  /* Neutral roles */
  --clr-text: #E2EAF3;
  --clr-heading: #E2EAF3;
  --clr-title: #F1F5F9;
  --clr-nav: #CBD5E1;
  --clr-label: #94A3B8;
  --clr-label-rgb: 148, 163, 184;
  --clr-on-accent: #0D1B2A;
  --clr-border: #24405C;
  --clr-border-rgb: 148, 163, 184;  /* faint slate lines */
  --clr-brand: #D4AF37;             /* site name on the badge + footer stays the original gold */
  --clr-footer-bg: #0F2133;
  --clr-on-footer: #94A3B8;
}

/* ---- Accent ---- */
:root[data-theme="cinnamon"] {
  --clr-accent: #C37F60;       --clr-accent-rgb: 195, 127, 96;
  --clr-accent-hover: #D19D85; --clr-accent-hover-rgb: 209, 157, 133;
  --clr-on-accent: #33120B;
}
/* links and focus borders follow the accent */
:root[data-theme] {
  --clr-link: var(--clr-accent);
  --clr-link-hover: var(--clr-accent-hover);
  --clr-border-hover: var(--clr-accent);
}

/* ---- Site name ("AW Dev Rethought") on the badges and the footer ---- */
:root[data-theme] .footer-title {
  color: var(--clr-brand);          /* was inheriting the footer's grey */
}

/* ---- Colours hard-coded outside the variables ---- */
:root[data-theme] .ny-ticker {
  color: var(--clr-on-accent);      /* was #223027 */
}
:root[data-theme] .blog-badge,
:root[data-theme] .mobile-blog-badge {
  background: var(--clr-surface);   /* was near-black #1a1a1a */
  border-color: var(--clr-border);  /* was gold */
}
:root[data-theme] #tetris,
:root[data-theme] .score-value {    /* easter-egg game: was old-palette blues #08243D / #0C365A */
  background-color: var(--clr-surface-deep);
  border-color: var(--clr-border);
}
:root[data-theme] .score-box {
  border-color: var(--clr-border);
}
:root[data-theme] #aw-cursor-dot {  /* colour is set inline by base.html JS */
  background: rgba(var(--clr-accent-rgb), 0.85) !important;
}
:root[data-theme] .footer-subscribe-bar {
  /* one footer block: same surface as the footer, split by a hairline */
  background: var(--clr-footer-bg);
  border-top: 1px solid rgba(var(--clr-border-rgb), 0.12);
  border-bottom: 1px solid rgba(var(--clr-border-rgb), 0.12);
}
:root[data-theme] .footer-subscribe-bar input {
  background: var(--clr-bg);        /* was browser-default white */
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}
:root[data-theme] .footer-subscribe-bar input::placeholder { color: #64748B; }
:root[data-theme] .footer-subscribe-bar input:focus { border-color: var(--clr-accent); }
:root[data-theme] .footer-links a:hover,
:root[data-theme] .footer-vertical-dock a:hover {
  color: var(--clr-accent);         /* icons: neutral at rest, cinnamon on hover */
}
:root[data-theme] .comment-input {
  background: #0F2133;              /* was browser-default white */
  color: #E2EAF3;
  border: 1px solid #24405C;
  border-radius: 6px;
  padding: 8px 10px;
}
:root[data-theme] .comment-input::placeholder { color: #64748B; }
:root[data-theme] .comment-input:focus {
  outline: none;
  border-color: var(--clr-accent);
}
:root[data-theme] .comment-submit-btn {
  color: var(--clr-on-accent);      /* white on the accent fails contrast */
  font-weight: 700;
}
