/* ============================================================
   SONGKRATE — shared styles for the Why page and the blog.
   Tokens mirror the inline ones in index.html / screen-time.html
   (source of truth: design/brand/tokens.css). Kept as a real
   stylesheet because the blog ships continuously and duplicating
   CSS into every post doesn't scale.
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:            #F7F2EA;
  --bg-soft:       #EFE9DD;
  --bg-elevated:   #FFFFFF;
  --bg-hover:      #E7E0D0;
  --text:          #2A1F18;
  --text-secondary:#6B6055;
  --text-tertiary: #9E978A;
  --accent:        #6B2D5C;
  --accent-hover:  #4A1F40;
  --accent-subtle: #EFE2EA;
  --secondary:     #E27D34;
  --secondary-subtle: #FCEEDC;
  --border:        #E0D9CA;
  --border-strong: #C9C1AE;
  --font-display:  'Fraunces', serif;
  --font-body:     'Outfit', sans-serif;
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-full:   9999px;
  --shadow-sm:     0 1px 3px rgba(28,25,23,0.06), 0 1px 2px rgba(28,25,23,0.04);
  --shadow-md:     0 4px 12px rgba(28,25,23,0.08), 0 2px 4px rgba(28,25,23,0.04);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* ---- NAV ---- */
nav { padding: 20px 0; border-bottom: 1px solid var(--border); background: var(--bg); }
nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: var(--text); text-decoration: none; letter-spacing: -0.5px; flex-shrink: 0;
}
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--font-body); font-size: 14px; color: var(--text-secondary);
  text-decoration: none; font-weight: 500; transition: color 0.15s; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); font-weight: 600; }
.nav-links a.nav-cta {
  background: var(--accent); color: #fff; padding: 8px 16px;
  border-radius: var(--radius-full); font-weight: 600;
}
.nav-links a.nav-cta:hover { background: var(--accent-hover); color: #fff; }

/* ---- PAGE HERO (blog index) ---- */
.page-hero { padding: 72px 0 40px; text-align: center; }
.page-hero h1 {
  font-family: var(--font-display); font-size: clamp(32px, 5vw, 46px);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 14px;
}
.page-hero .lead {
  font-family: var(--font-body); font-size: 18px; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto;
}

/* ---- POST LIST ---- */
.post-list { padding: 8px 0 88px; }
.post-list .container { max-width: 760px; display: grid; gap: 20px; }
.post-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius-md);
  padding: 28px 32px; box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-date {
  font-size: 13px; color: var(--text-tertiary); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px;
}
.post-card h2 {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 10px;
}
.post-summary { font-size: 15px; color: var(--text-secondary); margin-bottom: 14px; }
.post-more { font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---- POST / WHY BODY ---- */
.post { padding: 56px 0 88px; }
.post .container { max-width: 680px; }
.post .eyebrow {
  font-size: 13px; color: var(--text-tertiary); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 18px;
}
.post .eyebrow a { color: var(--accent); text-decoration: none; font-weight: 600; }
.post h1 {
  font-family: var(--font-display); font-size: clamp(30px, 4.6vw, 42px);
  font-weight: 800; line-height: 1.14; letter-spacing: -0.02em; margin-bottom: 28px;
}
.post h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.3; margin: 44px 0 14px;
}
.post h3 {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  letter-spacing: -0.01em; margin: 32px 0 10px;
}
.post p { font-size: 17px; line-height: 1.75; margin-bottom: 20px; color: var(--text); }
.post a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post a:hover { color: var(--accent-hover); }
.post strong { font-weight: 600; }
.post ul, .post ol { margin: 0 0 22px 22px; }
.post li { font-size: 17px; line-height: 1.7; margin-bottom: 8px; }
.post hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0 28px; }
.post p.note {
  font-size: 15px; color: var(--text-secondary); background: var(--bg-soft);
  border-radius: var(--radius-md); padding: 20px 24px; line-height: 1.65;
}
.post p.note em { font-style: normal; }

/* pull quote */
.post blockquote {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius-md);
  padding: 26px 28px; margin: 32px 0; box-shadow: var(--shadow-sm);
  font-family: var(--font-display); font-size: 20px; font-style: italic;
  line-height: 1.5; color: var(--text);
}

/* crate motif */
.crate-figure { margin: 36px 0 32px; text-align: center; }
.crate-figure svg { width: 100%; max-width: 260px; height: auto; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 24px; }
.post table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
.post th, .post td {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.post th {
  font-weight: 600; color: var(--text-tertiary); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.05em; background: var(--bg-soft);
}

/* ---- END CTA ---- */
.end-cta {
  margin-top: 48px; padding: 36px 32px; text-align: center;
  background: var(--accent-subtle); border-radius: var(--radius-lg);
}
.end-cta h2 {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  margin: 0 0 10px; letter-spacing: -0.015em;
}
.end-cta p { font-size: 16px; color: var(--text-secondary); margin-bottom: 22px; }
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 16px; text-decoration: none;
  padding: 13px 26px; border-radius: var(--radius-full);
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ---- FOOTER ---- */
footer { padding: 32px 0; border-top: 1px solid var(--border); text-align: center; }
footer p { font-family: var(--font-body); font-size: 13px; color: var(--text-tertiary); }
footer a { color: var(--text-tertiary); text-decoration: none; transition: color 0.15s; }
footer a:hover { color: var(--text); }

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  nav .container { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav-links { gap: 16px; }
  .page-hero { padding: 48px 0 28px; }
  .post { padding: 36px 0 64px; }
  .post p, .post li { font-size: 16px; }
  .post-card { padding: 22px 24px; }
  .end-cta { padding: 28px 22px; }
}
