/* ai-writing-picks.com — ALTERNATE theme: "Midnight Brass"
   Dark charcoal + warm white + single brass/amber accent.
   Same class contract as style.css — swap the <link> to switch themes.
   Editorial serif headings kept (Fraunces) on a dark, premium surface.
   Does NOT touch the live light theme. */

:root {
  --bg:        #14130F;   /* charcoal (not pure black) */
  --bg-tint:   #100F0B;   /* deeper section */
  --surface:   #1C1A14;   /* raised card */
  --surface-2: #23211A;   /* table head / callouts */
  --ink:       #ECE6DA;   /* warm white */
  --ink-soft:  #A79E8B;   /* muted warm gray */
  --line:      #322E23;   /* warm hairline on dark */
  --line-strong:#433D2E;
  --accent:    #C99A3F;   /* brass / amber (low saturation) */
  --accent-deep:#DEB665;  /* brighter brass for hover on dark */
  --accent-wash:#221C12;  /* faint brass-tinted surface */
  --accent-2:  #D9B566;   /* light brass (ranks/highlights) */
  --good:      #74C49A;
  --bad:       #E58478;
  --sh:        0, 0, 0;            /* shadows are deep on dark */
  --shadow-sm: 0 1px 2px rgba(var(--sh), .35), 0 2px 8px rgba(var(--sh), .30);
  --shadow-md: 0 10px 24px rgba(var(--sh), .42), 0 20px 48px rgba(var(--sh), .34);
  --edge:      inset 0 1px 0 rgba(255,255,255,.045);  /* top edge refraction */
  --maxw:      71rem;
  --radius:    9px;
  --radius-lg: 15px;
  --radius-sm: 5px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(16px, 1rem + 0.18vw, 18.5px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle grain — light noise, behind content, non-interactive */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .4; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.4rem; }
section { padding-block: clamp(2.75rem, 6.5vw, 5rem) clamp(3rem, 7vw, 5.5rem); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 600; line-height: 1.07; letter-spacing: -0.015em;
  margin: 0 0 0.55em; color: var(--ink); font-optical-sizing: auto; text-wrap: balance;
}
h1 { font-family: 'Space Grotesk', 'Public Sans', sans-serif; font-size: clamp(2.4rem, 1.5rem + 4vw, 4rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.65rem, 1.15rem + 2.2vw, 2.55rem); margin-top: 0.3em; }
h3 { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem); }
p  { margin: 0 0 1.15em; max-width: 66ch; text-wrap: pretty; }
a  { color: var(--accent-deep); text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent-deep) 35%, transparent); transition: color .15s ease, text-decoration-color .15s ease; }
a:hover { color: #EFD08C; text-decoration-color: currentColor; }
.lead { font-size: 1.22em; color: var(--ink-soft); max-width: 54ch; line-height: 1.5; text-wrap: pretty; }
.kicker { font-family: 'Public Sans', sans-serif; text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.73rem; font-weight: 700; color: var(--accent); margin: 0 0 0.9rem; }
.fineprint, small { color: var(--ink-soft); font-size: 0.84rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

table.grid, .facts dd, .price, .tile .price { font-variant-numeric: tabular-nums; }

/* ---------- Header / nav ---------- */
.masthead { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px) saturate(1.1); position: sticky; top: 0; z-index: 20; }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 66px; }
.logo { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.32rem; letter-spacing: -0.025em; color: var(--ink); text-decoration: none; }
.logo b { color: var(--accent); font-weight: 600; }
.nav { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.93rem; font-weight: 600; position: relative; }
.nav a:hover { color: var(--accent-deep); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); border-radius: 2px; }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: 0.82rem; color: var(--ink-soft); padding-top: 1.5rem; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent-deep); }
.crumbs span { margin-inline: 0.45rem; opacity: 0.4; }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; top: -35%; right: -10%; width: 52rem; height: 52rem;
  background: radial-gradient(closest-side, rgba(201,154,63,.13), transparent 70%); pointer-events: none; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 15ch; }

/* ---------- Buttons / CTA ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: #1A1407;
  font-family: 'Public Sans', sans-serif; font-weight: 700; font-size: 1rem;
  padding: 0.8rem 1.5rem; border-radius: var(--radius);
  text-decoration: none; border: 1px solid var(--accent); cursor: pointer;
  box-shadow: 0 2px 14px rgba(201,154,63,.20);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #1A1407; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(201,154,63,.30); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(201,154,63,.22); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; font-weight: 700; padding: 0.8rem 1.5rem; border-radius: var(--radius); display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; transition: border-color .15s ease, color .15s ease, background .15s ease, transform .12s ease; font-family: 'Public Sans', sans-serif; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-wash); transform: translateY(-2px); }
.btn-outline:active { transform: translateY(0); }
.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ---------- */
.deck { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem 1.45rem 1.55rem; position: relative; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm), var(--edge);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md), var(--edge); border-color: var(--line-strong); }
.tile .label { display: inline-block; font-family: 'Public Sans', sans-serif; font-size: 0.69rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 0.55rem; }
.tile h3 { margin-bottom: 0.2rem; }
.tile .price { font-weight: 700; color: var(--ink); }
.tile ul { margin: 0.7rem 0 1.2rem; padding-left: 1.1rem; color: var(--ink-soft); }
.tile .btn, .tile .btn-outline { margin-top: auto; align-self: flex-start; }
.tile .rank { position: absolute; top: -0.85rem; right: 1.2rem; font-family: 'Fraunces', serif; font-size: 1.7rem; color: var(--accent-2); font-weight: 600; line-height: 1; }
.tile.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 36px rgba(201,154,63,.12), var(--shadow-md); background: linear-gradient(180deg, #241D12, var(--surface) 42%); }
.tile.featured .label { color: var(--accent-deep); }

/* ---------- Comparison table ---------- */
.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table.grid { width: 100%; border-collapse: collapse; min-width: 40rem; font-size: 0.95rem; }
table.grid th, table.grid td { padding: 0.9rem 1.05rem; text-align: left; border-bottom: 1px solid var(--line); }
table.grid thead th { background: var(--surface-2); font-family: 'Public Sans', sans-serif; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); white-space: nowrap; position: sticky; top: 0; }
table.grid tbody th { position: sticky; left: 0; background: var(--surface); font-weight: 700; white-space: nowrap; color: var(--ink); }
table.grid tbody tr:last-child td, table.grid tbody tr:last-child th { border-bottom: 0; }
table.grid tbody tr:hover td { background: #221F17; }
table.grid .win { color: var(--good); font-weight: 700; }

/* ---------- Verdict / pros-cons ---------- */
.verdict { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 1.5rem 1.6rem; box-shadow: var(--shadow-sm), var(--edge); }
.split { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 0.4rem; }
.split ul { list-style: none; margin: 0; padding: 0; }
.split li { padding-left: 1.6rem; position: relative; margin-bottom: 0.55rem; color: var(--ink-soft); }
.plus li::before { content: '✦'; position: absolute; left: 0; color: var(--good); font-weight: 700; font-size: .85em; top: .12em; }
.minus li::before { content: '–'; position: absolute; left: .15rem; color: var(--bad); font-weight: 800; }

/* ---------- Spec list ---------- */
.facts { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); box-shadow: var(--shadow-sm); }
.facts div { background: var(--surface); padding: 0.95rem 1.15rem; }
.facts dt { font-family: 'Public Sans', sans-serif; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); margin-bottom: 0.22rem; }
.facts dd { margin: 0; font-weight: 700; font-size: 1.06rem; color: var(--ink); }

/* ---------- Use-case / nav grid ---------- */
.picks { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.picks a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm), var(--edge); transition: border-color .15s ease, color .15s ease, transform .14s ease, box-shadow .15s ease; }
.picks a::after { content: "→"; color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease; }
.picks a:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-2px); box-shadow: var(--shadow-md), var(--edge); }
.picks a:hover::after { opacity: 1; transform: translateX(0); }

/* ---------- Callouts ---------- */
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.35rem; }
.note.update { border-left: 4px solid var(--accent-2); background: linear-gradient(180deg, #262013, var(--surface-2)); }
.asof { color: var(--accent-2); font-size: 0.85rem; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 1.05rem 0; }
.faq summary { cursor: pointer; font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.14rem; list-style: none; color: var(--ink); display: flex; gap: .65rem; align-items: baseline; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '›'; color: var(--accent); font-weight: 800; display: inline-block; transition: transform 0.2s ease; }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq details p { margin-top: 0.75rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.colophon { background: #0E0D0A; color: var(--ink-soft); border-top: 1px solid var(--line); margin-top: 3rem; }
.colophon .wrap { padding-block: 2.75rem; }
.colophon .logo { color: var(--ink); }
.colophon .logo b { color: var(--accent); }
.colophon .nav { margin-bottom: 1.3rem; }
.colophon .nav a { color: var(--ink-soft); }
.colophon .nav a:hover { color: var(--accent-deep); }
.disclose { color: #8A8170; font-size: 0.85rem; max-width: 66ch; }

/* ---------- Utilities ---------- */
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.stack > * + * { margin-top: 1.2rem; }
.mt0 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
