/* Shared styles for Celah's blog pages (hub + posts).
   Tokens mirror site/index.html so the blog reads as part of celah.us. */
:root {
  --gold:       #B8924E;
  --gold-deep:  #8F6F3A;
  --gold-soft:  #E3CE9E;
  --cream:      #FAF7F0;
  --cream-warm: #F2EBDA;
  --ink:        #1A1A1A;
  --ink-soft:   #4A4A4A;
  --ink-faint:  #8A8275;
  --line:       rgba(26, 26, 26, 0.08);
  --line-gold:  rgba(184, 146, 78, 0.25);
  --nav-bg:     rgba(250, 247, 240, 0.92);
  --surface:    #ffffff;

  --serif: 'Newsreader', 'Georgia', 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1080px;
  --measure: 720px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Dark theme (driven site-wide by the home-page toggle) ---------- */
:root[data-theme="dark"] {
  --gold:       #C9A86A;
  --gold-deep:  #D8BC82;
  --gold-soft:  #E3CE9E;
  --cream:      #14110B;
  --cream-warm: #1C1813;
  --ink:        #F3ECDD;
  --ink-soft:   #C3BBAA;
  --ink-faint:  #8C8678;
  --line:       rgba(243, 236, 221, 0.10);
  --line-gold:  rgba(201, 168, 106, 0.30);
  --nav-bg:     rgba(20, 17, 11, 0.85);
  --surface:    #211C15;
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-underline-offset: 2px; }
a:hover { color: var(--gold); }

/* ---------- Top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.wordmark img { height: 22px; width: auto; display: block; }
.topbar .spacer { flex: 1; }
.topbar nav a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-faint);
  margin-left: 20px;
  transition: color 0.2s var(--ease);
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a.active { color: var(--gold-deep); }

/* ---------- Article ---------- */
.article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 28px clamp(72px, 10vw, 120px);
}
.article .eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 16px;
}
.article h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 14px;
  text-wrap: balance;
}
.article .dateline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-faint);
  margin: 0 0 36px;
}
.article h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3.5vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 52px 0 16px;
}
.article h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.25;
  color: var(--ink);
  margin: 36px 0 8px;
}
.article p { margin: 0 0 1.1em; max-width: 70ch; }
.article strong { color: var(--ink); font-weight: 600; }
.article em { font-style: italic; }
.article .fine {
  font-size: 14px;
  font-style: italic;
  color: var(--ink-faint);
}
.article .closing {
  font-style: italic;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Comparison table ---------- */
.table-scroll {
  overflow-x: auto;
  /* Break out of the article measure so the table gets the room it needs */
  width: min(1000px, calc(100vw - 44px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 28px 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.compare {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}
.compare th, .compare td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.compare tr:last-child th, .compare tr:last-child td { border-bottom: none; }
.compare thead th {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  background: var(--cream-warm);
  white-space: nowrap;
}
.compare thead th:first-child { background: var(--cream-warm); }
.compare tbody th {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
}
.compare td:nth-child(2) { background: rgba(184, 146, 78, 0.06); }
:root[data-theme="dark"] .compare td:nth-child(2) { background: rgba(201, 168, 106, 0.08); }

/* ---------- App Store CTA (mirrors the homepage button) ---------- */
.app-store-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--cream);
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1;
  margin-top: 6px;
  box-shadow: 0 1px 2px rgba(26,26,26,0.05), 0 20px 40px -20px rgba(184,146,78,0.35);
  transition: background 0.2s var(--ease), transform 0.05s var(--ease), box-shadow 0.2s var(--ease);
}
.app-store-cta:hover {
  background: var(--gold-deep);
  color: var(--cream);
  box-shadow: 0 2px 4px rgba(26,26,26,0.06), 0 22px 44px -18px rgba(184,146,78,0.5);
}
.app-store-cta:active { transform: translateY(1px); }
.app-store-cta svg { flex-shrink: 0; }
.app-store-cta .as-text { display: flex; flex-direction: column; text-align: left; }
.app-store-cta .as-text small { font-size: 10px; font-weight: 400; letter-spacing: 0.02em; opacity: 0.85; }
.app-store-cta .as-text strong { font-size: 19px; font-weight: 500; letter-spacing: 0.01em; color: inherit; }

/* ---------- Hub (post list) ---------- */
.hub-head { text-align: center; max-width: 640px; margin: 0 auto; }
.hub-head h1 { margin-bottom: 18px; }
.hub-head .lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; }
.post-list {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.post-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.post-card:hover { background: var(--surface); border-color: var(--line-gold); }
.post-card a {
  display: block;
  padding: 30px 32px;
  text-decoration: none;
  color: inherit;
}
.post-card .post-kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 10px;
}
.post-card h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 8px;
}
.post-card p { margin: 0; font-size: 15px; color: var(--ink-soft); max-width: 62ch; }
.post-card .read {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gold-deep);
}
.post-card a:hover .read { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
}
.site-footer .inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-faint);
}
.site-footer .tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}
.site-footer nav a {
  color: var(--ink-faint);
  text-decoration: none;
  margin-left: 18px;
}
.site-footer nav a:hover { color: var(--gold-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .article { padding-left: 22px; padding-right: 22px; }
  .post-card a { padding: 24px 22px; }
  .site-footer .inner { flex-direction: column; align-items: flex-start; }
  .site-footer nav a { margin-left: 0; margin-right: 18px; }
}
