/* =====================================================
   CIRCLE 1 LIVING — DESIGN SYSTEM
   Editorial / literary / hardback-on-coffee-table
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Spectral:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&display=swap');

:root {
  /* Brand colors */
  --cream: #F5EFE2;
  --cream-deep: #EBE3D0;
  --paper: #FAF6EC;
  --ink: #1F1A14;
  --ink-soft: #3A3329;
  --ink-mute: #6B6256;
  --gold: #C4941A;
  --gold-deep: #A07910;
  --gold-soft: #E8D08A;
  --rust: #8C3F1B;
  --line: rgba(31, 26, 20, 0.12);
  --line-strong: rgba(31, 26, 20, 0.25);

  /* Typography */
  --display: 'Fraunces', Georgia, serif;
  --body: 'Spectral', 'Iowan Old Style', Georgia, serif;

  /* Spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* Type scale */
  --t-display: clamp(2.4rem, 6vw, 4.8rem);
  --t-h1: clamp(2rem, 4.5vw, 3.4rem);
  --t-h2: clamp(1.5rem, 3vw, 2.2rem);
  --t-h3: 1.35rem;
  --t-body: 1.05rem;
  --t-lead: 1.18rem;
  --t-small: 0.92rem;
  --t-kicker: 0.78rem;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(ellipse at top, rgba(196, 148, 26, 0.04) 0%, transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.10  0 0 0 0 0.08  0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--gold-deep); text-decoration: none; border-bottom: 1px solid var(--gold-soft); transition: color 120ms, border-color 120ms; }
a:hover { color: var(--rust); border-color: var(--rust); }

::selection { background: var(--gold-soft); color: var(--ink); }

/* ==== Navigation ==== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 239, 226, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.nav-logo {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.nav-mark {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-block;
  background: url('/favicon-32.png') center/cover no-repeat;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: var(--s-6);
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink-soft);
  border: none;
  font-weight: 400;
}

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

.nav-cta {
  font-family: var(--body);
  font-size: 0.9rem;
  background: var(--gold);
  color: var(--ink);
  padding: var(--s-3) var(--s-5);
  border: none;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-weight: 600;
}

.nav-cta:hover { background: var(--gold-deep); color: var(--cream); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px auto;
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: var(--s-5);
    border-bottom: 1px solid var(--line);
    gap: var(--s-4);
  }
}

/* ==== Layout primitives ==== */

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--s-5); }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--s-5); }
.wrap-mid { max-width: 920px; margin: 0 auto; padding: 0 var(--s-5); }

.section { padding: var(--s-9) 0; }
.section-tight { padding: var(--s-7) 0; }

.divider {
  text-align: center;
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.5em;
  margin: var(--s-7) 0;
  font-family: var(--display);
}

.divider::before { content: '· · ·'; }

/* ==== Type ==== */

.kicker {
  font-family: var(--body);
  font-size: var(--t-kicker);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
  margin-bottom: var(--s-4);
  display: inline-block;
}

h1, .display-h1 {
  font-family: var(--display);
  font-size: var(--t-display);
  font-weight: 400;
  font-variation-settings: 'opsz' 144;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: var(--s-5);
}

h1 em { font-style: italic; font-weight: 400; color: var(--gold-deep); }

h2 {
  font-family: var(--display);
  font-size: var(--t-h2);
  font-weight: 500;
  font-variation-settings: 'opsz' 60;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: var(--s-7) 0 var(--s-4);
  color: var(--ink);
}

h2 em { font-style: italic; font-weight: 400; color: var(--gold-deep); }

h3 {
  font-family: var(--display);
  font-size: var(--t-h3);
  font-weight: 500;
  line-height: 1.3;
  margin: var(--s-6) 0 var(--s-3);
}

.lead {
  font-family: var(--body);
  font-size: var(--t-lead);
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: var(--s-5);
}

p { margin: 0 0 var(--s-4); }

.prose p { font-size: var(--t-body); line-height: 1.75; color: var(--ink-soft); }
.prose p:has(strong:first-child) { color: var(--ink); }

blockquote {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--ink);
  border-left: 3px solid var(--gold);
  padding: var(--s-3) var(--s-5);
  margin: var(--s-6) 0;
}

em { font-style: italic; }
strong { font-weight: 500; color: var(--ink); }

/* ==== Buttons / CTAs ==== */

.btn {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-3);
  font-family: var(--body);
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: var(--s-4) var(--s-6);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 150ms, background 150ms, color 150ms;
  white-space: nowrap;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  font-weight: 500;
}
.btn-gold:hover { background: var(--gold-deep); color: var(--cream); transform: translateY(-1px); }

.btn-ink {
  background: var(--ink);
  color: var(--cream);
}
.btn-ink:hover { background: var(--gold-deep); color: var(--cream); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }

.btn-arrow::after { content: '→'; font-family: var(--display); }

.btn-meta {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-top: var(--s-3);
  display: block;
  font-style: italic;
}

/* CTA blocks (primary inline CTAs in pillars) */
.cta-block {
  background: linear-gradient(135deg, rgba(196, 148, 26, 0.07), rgba(196, 148, 26, 0.02));
  border-left: 3px solid var(--gold);
  padding: var(--s-6);
  margin: var(--s-7) 0;
  border-radius: 2px;
}
.cta-block .btn { margin-bottom: var(--s-3); }
.cta-block-meta {
  font-size: 0.98rem;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.5;
  margin: 0;
}

/* ==== Hero ==== */

.hero {
  padding: var(--s-9) 0 var(--s-8);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(196, 148, 26, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner { position: relative; z-index: 1; }

.hero-display {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-5);
  max-width: 18ch;
}

.hero-display em { font-style: italic; color: var(--gold-deep); }

.hero-lead {
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: var(--s-6);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
  margin-top: var(--s-5);
}

/* ==== Three Circles diagram ==== */

.circles {
  display: flex;
  justify-content: center;
  gap: var(--s-6);
  flex-wrap: wrap;
  margin: var(--s-7) 0;
}

.circle-card {
  flex: 1 1 240px;
  max-width: 320px;
  padding: var(--s-6);
  background: var(--paper);
  border: 1px solid var(--line);
  text-align: center;
  position: relative;
}

.circle-card.featured {
  background: var(--cream-deep);
  border-color: var(--gold);
  box-shadow: 0 8px 30px rgba(196, 148, 26, 0.12);
}

.circle-num {
  font-family: var(--display);
  font-size: 3.4rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--s-3);
  font-style: italic;
}

.circle-card.featured .circle-num { color: var(--gold-deep); }

.circle-card h3 { margin: 0 0 var(--s-3); font-size: 1.15rem; letter-spacing: 0.04em; text-transform: uppercase; }
.circle-card p { font-size: 0.97rem; color: var(--ink-soft); margin: 0; }

/* ==== Five patterns / SPARK ==== */

.patterns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
  margin: var(--s-6) 0;
}

.pattern {
  padding: var(--s-5);
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 200ms, transform 200ms;
}

.pattern:hover { border-color: var(--gold); transform: translateY(-2px); }

.pattern-letter {
  font-family: var(--display);
  font-size: 2.6rem;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-deep);
  line-height: 1;
  margin-bottom: var(--s-3);
}

.pattern h4 { font-family: var(--display); font-size: 1.08rem; margin-bottom: var(--s-2); font-weight: 500; }
.pattern p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* ==== Series grid ==== */

.series {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--s-5);
  margin: var(--s-6) 0;
}

.series-book {
  padding: var(--s-6) var(--s-5);
  background: var(--paper);
  border: 1px solid var(--line);
  text-align: left;
  position: relative;
  transition: border-color 200ms;
}

.series-book.featured {
  background: var(--cream-deep);
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(31, 26, 20, 0.06);
}

.series-icon {
  font-size: 1.8rem;
  margin-bottom: var(--s-3);
  display: block;
}

.series-title {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: var(--s-2);
  color: var(--ink);
}

.series-tagline {
  font-style: italic;
  color: var(--gold-deep);
  font-size: 0.95rem;
  margin-bottom: var(--s-3);
}

.series-blurb {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: var(--s-4);
  line-height: 1.5;
}

.series-date {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.series-book.featured .series-date {
  color: var(--gold-deep);
  font-weight: 500;
}

/* ==== Pillar list (used on hub pages) ==== */

.pillar-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-5);
  margin: var(--s-6) 0;
}

.pillar-card {
  padding: var(--s-6);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-soft);
  transition: border-left-color 200ms, transform 200ms;
}

.pillar-card:hover {
  border-left-color: var(--gold);
  transform: translateX(2px);
}

.pillar-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--gold-deep);
  letter-spacing: 0.08em;
  margin-bottom: var(--s-2);
  display: block;
}

.pillar-title {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 500;
  margin-bottom: var(--s-3);
  color: var(--ink);
}

.pillar-card a.pillar-title { display: block; border: none; color: var(--ink); }
.pillar-card:hover .pillar-title { color: var(--gold-deep); }

.pillar-teaser { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: var(--s-3); line-height: 1.55; }

.pillar-link {
  font-size: 0.88rem;
  color: var(--gold-deep);
  border: none;
  font-style: italic;
}

/* ==== Pre-order / Founding Readers blocks ==== */

.offer-block {
  background: var(--cream-deep);
  padding: var(--s-7) var(--s-6);
  margin: var(--s-7) 0;
  border-left: 4px solid var(--gold);
  position: relative;
}

.offer-tag {
  position: absolute;
  top: -12px;
  left: var(--s-6);
  background: var(--gold);
  color: var(--ink);
  padding: 3px var(--s-3);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 500;
  text-transform: uppercase;
}

.offer-block h2 { margin-top: 0; }

.offer-list {
  list-style: none;
  margin: var(--s-5) 0;
  padding: 0;
}

.offer-list li {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
}

.offer-list li::before {
  content: '·';
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
}

.offer-list li:last-child { border-bottom: none; }

/* ==== Footer ==== */

footer {
  background: var(--ink);
  color: var(--cream-deep);
  padding: var(--s-8) 0 var(--s-6);
  margin-top: var(--s-9);
}

footer a { color: var(--gold-soft); border-color: rgba(232, 208, 138, 0.3); }
footer a:hover { color: var(--gold); border-color: var(--gold); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-7);
  margin-bottom: var(--s-7);
}

.footer-brand { font-family: var(--display); font-size: 1.4rem; margin-bottom: var(--s-3); color: var(--cream); }
.footer-tagline { color: var(--ink-mute); font-size: 0.95rem; max-width: 32ch; line-height: 1.6; }

.footer-col h4 {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: var(--s-4);
  font-weight: 500;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--s-3); }
.footer-col a { font-size: 0.95rem; }

.footer-bottom {
  border-top: 1px solid rgba(245, 239, 226, 0.1);
  padding-top: var(--s-5);
  font-size: 0.85rem;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand-col { grid-column: 1 / -1; }
}

/* ==== Inline pillar prose styling ==== */

.pillar-body {
  max-width: 720px;
  margin: 0 auto;
}

.pillar-body p { font-size: 1.08rem; line-height: 1.78; color: var(--ink-soft); margin-bottom: var(--s-5); }
.pillar-body p strong { color: var(--ink); font-weight: 500; }
.pillar-body h2 { margin-top: var(--s-8); font-size: 1.6rem; }
.pillar-body h3 { margin-top: var(--s-7); }

.pillar-body .cold-open p { font-size: 1.12rem; line-height: 1.65; color: var(--ink); }
.pillar-body .cold-open p:last-child { font-style: italic; color: var(--gold-deep); }

.pillar-body ul.signs {
  list-style: none;
  padding: 0;
  margin: var(--s-5) 0;
}

.pillar-body ul.signs li {
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
}
.pillar-body ul.signs li:last-child { border-bottom: none; }

.cross-link-box {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: var(--s-5);
  margin: var(--s-7) 0;
  font-size: 0.97rem;
  border-radius: 2px;
}

.cross-link-box strong { display: block; font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: var(--s-3); font-weight: 500; }

/* ==== Page meta header (small banner above hero on inner pages) ==== */

.page-banner {
  background: var(--cream-deep);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.page-banner-inner {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.page-banner a { color: var(--gold-deep); border: none; font-style: italic; }

/* ==== Utility ==== */

.center { text-align: center; }
.muted { color: var(--ink-mute); }
.italic { font-style: italic; }
.mb-0 { margin-bottom: 0; }
.mt-7 { margin-top: var(--s-7); }
