/* The Davis Current — editorial design system.
   Goal: feel like a real local publication, not a SaaS template or AI slop.
   Palette: warm cream paper + charcoal ink + one evergreen accent (see ops/brand.md). Two colors.
   Type: system serif for masthead/headlines (editorial), system sans for UI. No web-font cost. */

:root {
  --paper: #faf6ee;
  --paper-2: #f3ecdd;
  --ink: #26231d;
  --ink-soft: #5a5447;
  --accent: #1f4d3a;       /* deep evergreen */
  --accent-soft: #356b51;
  --line: #e3dac6;
  --maxw: 64rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* Paper feel: a hand-authored SVG fractal-noise grain (no AI image; ~1KB) over warm cream,
     plus a faint uneven warm wash for depth. Tune intensity via the rect opacity (0.06) below. */
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.14'/%3E%3C/svg%3E"),
    radial-gradient(135% 95% at 50% -10%, #fff7e9 0%, var(--paper) 50%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 42rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

/* ---- Masthead ---- */
.masthead {
  border-bottom: 2px solid var(--ink);
  padding: 1.1rem 0 0.9rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand .name { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.01em; }
.brand .name small { display: block; font-family: var(--sans); font-weight: 500; font-size: 0.62rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-top: 1px; }
.nav { margin-left: auto; display: flex; gap: 1.25rem; font-size: 0.92rem; }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--accent); }

/* ---- Hero / sections ---- */
.hero { padding: 4rem 0 3rem; }
h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 0.9rem; }
h2 { font-family: var(--serif); font-weight: 700; font-size: 1.7rem; margin: 2.5rem 0 0.6rem; }
h3 { font-family: var(--serif); font-size: 1.25rem; margin: 1.4rem 0 0.3rem; }
.lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 36rem; margin: 0 0 1.8rem; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  font-weight: 600; margin: 0 0 0.6rem; }

/* ---- Subscribe / forms ---- */
.form { display: flex; gap: 0.6rem; flex-wrap: wrap; max-width: 30rem; }
.form.stack { flex-direction: column; max-width: 34rem; }
label { display: block; font-size: 0.86rem; font-weight: 600; color: var(--ink-soft); margin: 0.8rem 0 0.25rem; }
input, textarea, select {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: 8px; padding: 0.7rem 0.85rem; width: 100%;
}
.form:not(.stack) input[type=email] { flex: 1 1 14rem; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,77,58,0.12); }
textarea { min-height: 7rem; resize: vertical; }

.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 0.72rem 1.3rem; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--ink); color: #fff; }
.fineprint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.7rem; }
.msg { margin-top: 0.9rem; font-weight: 600; }
.msg.ok { color: var(--accent); }
.msg.err { color: #9a3412; }

/* ---- Feature row ---- */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 2.5rem 0; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.3rem; }
.card .ico { font-size: 1.4rem; }
.card h3 { margin: 0.4rem 0 0.2rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* ---- Rate / placement list ---- */
.rates { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 0.8rem; }
.rates li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.rates b { font-family: var(--serif); }

/* ---- Footer ---- */
footer { border-top: 2px solid var(--ink); margin-top: 4rem; padding: 2rem 0 3rem; color: var(--ink-soft); font-size: 0.9rem; }
footer .row { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
footer a { color: var(--ink-soft); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .cols { grid-template-columns: 1fr; }
  .nav { gap: 0.9rem; }
}
