/* CA Watch Club — Editorial Design System */

:root {
  --parchment: #f6f1e8;
  --card-bg: #fffaf3;
  --ink: #1f1a17;
  --gold: #b5852c;
  --gold-light: #d4a84b;
  --nav-bg: #e8decf;
  --border: #d4c8b5;
  --muted: #6b5b47;
  --sidebar-bg: #ede5d8;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.7;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold); }
img { display: block; max-width: 100%; height: auto; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: normal; line-height: 1.25; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.05rem; }

.label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.gold-rule {
  border: none;
  border-top: 1px solid var(--gold);
  margin: 2rem 0;
  opacity: 0.4;
}

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Navigation ── */
.site-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-wordmark {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-weight: normal;
}

.nav-wordmark span {
  color: var(--gold);
  font-style: italic;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

/* ── Footer ── */
.site-footer {
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 80px;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand { font-size: 1rem; letter-spacing: 0.04em; }
.footer-brand em { color: var(--gold); font-style: italic; }
.footer-tagline { font-size: 0.82rem; color: var(--muted); font-family: var(--sans); }
.footer-copy { font-size: 0.75rem; color: var(--muted); font-family: var(--sans); }

/* ── Hero (homepage) ── */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: #2c2419;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(31,26,23,0.15) 0%, rgba(31,26,23,0.65) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
}

.hero-overlay .label { color: var(--gold-light); margin-bottom: 12px; }
.hero-overlay h1 { color: #fff; font-size: 2.8rem; max-width: 700px; margin-bottom: 12px; }
.hero-overlay .hero-dek { color: rgba(255,255,255,0.82); font-size: 1.05rem; max-width: 600px; }

/* ── Article Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(31,26,23,0.12);
  transform: translateY(-2px);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--border);
}

.card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--border) 0%, var(--nav-bg) 100%);
}

.card-body { padding: 20px; }
.card-body .label { margin-bottom: 8px; }
.card-body h3 { margin-bottom: 10px; font-size: 1.15rem; line-height: 1.3; }
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--gold); }
.card-dek { font-size: 0.88rem; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.card-meta { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); }

/* ── Section headers ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 56px 0 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.section-header h2 { font-size: 1.35rem; }
.section-header a { font-family: var(--sans); font-size: 0.78rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Recent list (homepage) ── */
.recent-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }

.recent-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.recent-item:nth-child(odd) { padding-right: 32px; }
.recent-item:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--border); }

.recent-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 700;
  min-width: 24px;
  padding-top: 3px;
}

.recent-text h4 { font-size: 0.95rem; margin-bottom: 4px; line-height: 1.35; }
.recent-text h4 a { color: var(--ink); }
.recent-text h4 a:hover { color: var(--gold); }
.recent-text .label { display: inline; }

/* ── Category tiles ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0;
}

.category-tile {
  position: relative;
  height: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--nav-bg);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.category-tile:hover img { opacity: 0.9; }

.category-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(31,26,23,0.7) 0%, transparent 60%);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

/* ── Article page ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  margin: 48px 0;
}

.article-hero {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--border);
  margin-bottom: 32px;
}

.article-hero-placeholder {
  width: 100%;
  height: 420px;
  background: linear-gradient(135deg, var(--border) 0%, var(--nav-bg) 100%);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.breadcrumb {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 6px; }

.article-headline {
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-dek {
  font-size: 1.15rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 24px;
}

.article-byline {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.article-body p {
  margin-bottom: 1.4em;
  font-size: 1rem;
  line-height: 1.8;
}

.pull-quote {
  border-left: 3px solid var(--gold);
  padding: 8px 24px;
  margin: 32px 0;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Sidebar ── */
.article-sidebar { position: sticky; top: 80px; }

.sidebar-panel {
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.sidebar-panel .label { margin-bottom: 14px; display: block; }

.sidebar-related-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-related-item:last-child { border-bottom: none; }
.sidebar-related-item h4 { font-size: 0.9rem; line-height: 1.3; margin-bottom: 4px; }
.sidebar-related-item h4 a { color: var(--ink); }
.sidebar-related-item h4 a:hover { color: var(--gold); }

.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input[type=email] {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--ink);
  width: 100%;
}
.newsletter-form input[type=email]:focus { outline: none; border-color: var(--gold); }

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  width: 100%;
}
.btn:hover { background: #9a6d20; color: #fff; }

/* ── Vault page ── */
.vault-hero {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: #2c2419;
  border-radius: var(--radius);
  margin: 32px 0;
}
.vault-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0.65; }
.vault-hero-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}
.vault-hero-text h1 { color: #fff; font-size: 2rem; }
.vault-hero-text p { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin-top: 8px; font-family: var(--sans); }

.vault-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}

/* ── Recent page ── */
.page-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.page-hero .label { margin-bottom: 10px; }
.page-hero h1 { font-size: 2rem; }

.numbered-list { list-style: none; }
.numbered-item {
  display: grid;
  grid-template-columns: 40px 96px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.numbered-item:last-child { border-bottom: none; }
.numbered-thumb {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.num-badge {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gold);
  opacity: 0.7;
  line-height: 1;
  padding-top: 4px;
}
.numbered-text h3 { font-size: 1.1rem; margin-bottom: 6px; line-height: 1.3; }
.numbered-text h3 a { color: var(--ink); }
.numbered-text h3 a:hover { color: var(--gold); }
.numbered-text .dek { font-size: 0.88rem; color: var(--muted); margin-bottom: 6px; line-height: 1.5; }
.numbered-text .meta { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); }

/* ── Search page ── */
.search-bar-wrap {
  margin: 32px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}
.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
}
.search-input:focus { outline: none; border-color: var(--gold); }

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.pill {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.15s;
}
.pill:hover, .pill.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.search-result {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.search-result:last-child { border-bottom: none; }
.search-result h3 { font-size: 1.1rem; margin-bottom: 6px; }
.search-result h3 a { color: var(--ink); }
.search-result h3 a:hover { color: var(--gold); }
.search-result .dek { font-size: 0.88rem; color: var(--muted); margin-bottom: 6px; }
.search-result .meta { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); }
.no-results { color: var(--muted); font-style: italic; padding: 32px 0; }

/* ── Signup page ── */
.signup-wrap {
  max-width: 560px;
  margin: 80px auto;
}
.signup-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.signup-card .label { margin-bottom: 16px; }
.signup-card h1 { font-size: 1.8rem; margin-bottom: 12px; }
.signup-card p { color: var(--muted); margin-bottom: 32px; font-size: 0.95rem; }
.signup-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.signup-form label { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; display: block; margin-bottom: 4px; }
.signup-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--parchment);
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink);
}
.signup-form input:focus { outline: none; border-color: var(--gold); }
.signup-form .btn { margin-top: 8px; padding: 14px; font-size: 0.82rem; }
.signup-note { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 16px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .vault-grid { grid-template-columns: 1fr 1fr; }
  .recent-list { grid-template-columns: 1fr; }
  .recent-item:nth-child(even) { padding-left: 0; border-left: none; }
  .hero-overlay h1 { font-size: 2rem; }
}

@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .vault-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .hero { height: 380px; }
  .hero-overlay { padding: 24px; }
  .hero-overlay h1 { font-size: 1.6rem; }
  .site-footer .container { flex-direction: column; text-align: center; }
  .numbered-item { grid-template-columns: 28px 72px 1fr; gap: 12px; }
  .numbered-thumb { width: 72px; height: 56px; }
}
