/* ============================================================
   CRUSH COMPASS — Editorial Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600&display=swap');

/* --- Custom Properties --- */
:root {
  --bg:           #F9F7F2;
  --bg-alt:       #f0ede6;
  --text:         #2C3333;
  --text-muted:   #7a8585;
  --text-faint:   #b0baba;
  --accent:       #3E5641;
  --accent-light: rgba(62, 86, 65, 0.08);
  --warm:         #D68C7A;
  --border:       rgba(44, 51, 51, 0.1);
  --border-mid:   rgba(44, 51, 51, 0.18);
  --border-strong:rgba(44, 51, 51, 0.28);

  --font-display: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-sans:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --container:    1160px;
  --prose:        700px;
  --nav-h:        64px;

  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  2rem;
  --sp-lg:  4rem;
  --sp-xl:  7rem;
}

[data-theme="dark"] {
  --bg:           #191d1d;
  --bg-alt:       #1f2626;
  --text:         #F0EDE6;
  --text-muted:   #8a9696;
  --text-faint:   #4a5858;
  --accent:       #72ad78;
  --accent-light: rgba(114, 173, 120, 0.08);
  --warm:         #d68c7a;
  --border:       rgba(240, 237, 230, 0.07);
  --border-mid:   rgba(240, 237, 230, 0.14);
  --border-strong:rgba(240, 237, 230, 0.24);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
  transition: background-color 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* --- Containers --- */
.wrap {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}
.prose-wrap {
  width: min(var(--prose), 100% - 3rem);
  margin-inline: auto;
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 100%;
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}
.nav__logo:hover { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__links a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }
.nav__links a.active { color: var(--text); }

.nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}
.theme-toggle svg { flex-shrink: 0; }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 4px;
}
.nav__hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 490;
  padding: 2rem 1.5rem;
  overflow-y: auto;
  transition: background-color 0.35s ease;
}
.mobile-menu.is-open { display: flex; flex-direction: column; }
.mobile-menu__links { flex: 1; }
.mobile-menu__links li { border-bottom: 1px solid var(--border); }
.mobile-menu__links a {
  display: block;
  padding: 1.25rem 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color 0.2s;
}
.mobile-menu__links a:hover { color: var(--accent); }

/* ============================================================
   HERO — Homepage
   ============================================================ */
.hero {
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--border);
}

.hero__vol {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4.5rem, 13vw, 11rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 2.5rem;
}

.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.55;
  margin-bottom: 2.5rem;
}

.hero__topics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.hero__topic {
  font-family: var(--font-sans);
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.25rem 1.1rem;
  border-right: 1px solid var(--border-mid);
}
.hero__topic:first-child { padding-left: 0; }
.hero__topic:last-child { border-right: none; }

/* ============================================================
   FEATURED ARTICLE — Homepage lead
   ============================================================ */
.featured {
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3rem;
}

.featured__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.featured__ghost {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(7rem, 16vw, 14rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--border);
  user-select: none;
  padding-top: 1rem;
}

.featured__body { display: flex; flex-direction: column; gap: 1.4rem; }

.featured__category {
  font-family: var(--font-sans);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warm);
}

.featured__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
}
.featured__title a { transition: color 0.2s; }
.featured__title a:hover { color: var(--accent); }

.featured__excerpt {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.featured__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.featured__meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.read-link {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s;
}
.read-link:hover { gap: 0.9rem; }

/* ============================================================
   ARTICLE INDEX LIST — Used on both homepage + articles page
   ============================================================ */
.articles-list { padding: var(--sp-lg) 0; }

.list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 0;
}

.list-header__title {
  font-family: var(--font-sans);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.list-header__count {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* Article Row */
.article-row {
  display: grid;
  grid-template-columns: 80px 1fr 110px;
  gap: 0 2.5rem;
  padding: 3.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.article-row__left {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.2rem;
}

.article-row__num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.article-row__cat {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.3;
}

.article-row__main {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.article-row__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.article-row__title a { transition: color 0.2s; }
.article-row__title a:hover { color: var(--accent); }

.article-row__excerpt {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 62ch;
}

.article-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  padding-top: 0.25rem;
}

.article-row__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.article-row__time {
  font-size: 0.7rem;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ============================================================
   PAGE HEADER — Articles index, About
   ============================================================ */
.page-header {
  padding: 5rem 0 4rem;
}

.page-header__eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.page-header__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.page-header__desc {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.6;
}

/* ============================================================
   INDIVIDUAL ARTICLE PAGE
   ============================================================ */
.article-page { padding: 4rem 0 8rem; }

.article-header { margin-bottom: 5rem; }

.article-header__eyebrow {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.article-header__back {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.article-header__back:hover { color: var(--text); }

.article-header__divider {
  width: 1px;
  height: 12px;
  background: var(--border-mid);
  flex-shrink: 0;
}

.article-header__cat {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warm);
}

.article-header__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 22ch;
}

.article-header__meta {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.article-header__meta span { color: var(--text-faint); }

/* Article Body */
.article-body {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.8vw, 1.08rem);
  line-height: 1.82;
  color: var(--text);
}

.article-body section { margin-bottom: 0; }

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 4.5rem;
  margin-bottom: 0.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.article-body h2:first-child,
.article-body section:first-child h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.article-body h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.35;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 0.65rem;
}

.article-body h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
}

.article-body p {
  margin-bottom: 1.5rem;
  max-width: 68ch;
}
.article-body p:last-child { margin-bottom: 0; }

/* The Directional Perspective Callout */
.directional-note {
  margin: 5rem 0;
  padding: 2.75rem 0;
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

.directional-note__label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.directional-note__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.directional-note p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.72;
  color: var(--text);
  max-width: 64ch;
  margin-bottom: 0 !important;
}

/* Next article nav */
.article-next {
  margin-top: 6rem;
  padding-top: 3rem;
  border-top: 2px solid var(--text);
}

.article-next__label {
  font-family: var(--font-sans);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}

.article-next__link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color 0.2s;
  display: block;
}
.article-next__link:hover { color: var(--accent); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-intro {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.about-intro__kicker {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.about-intro__headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 7vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 2rem;
}

.about-intro__lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: var(--text-muted);
  max-width: 58ch;
  line-height: 1.6;
}

.about-body { padding: 5rem 0; }

.about-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-top: 4.5rem;
  margin-bottom: 1.25rem;
  color: var(--text);
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}
.about-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.about-body p {
  font-size: clamp(1rem, 1.8vw, 1.08rem);
  line-height: 1.82;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 64ch;
}
.about-body strong { color: var(--text); font-weight: 600; }

.principles { margin: 4rem 0; }

.principle {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 2.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.principle:first-child { border-top: 1px solid var(--border); }

.principle__num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-faint);
  padding-top: 0.2rem;
}

.principle__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.principle__text {
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--text-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 2px solid var(--text);
  padding: 3rem 0 2.5rem;
  transition: border-color 0.35s;
}

.footer__main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer__brand {}

.footer__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  display: block;
  margin-bottom: 0.5rem;
}

.footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.footer__links a {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--text); }

.footer__copy {
  font-size: 0.7rem;
  color: var(--text-faint);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .featured__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .featured__ghost { display: none; }

  .article-row {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
  }
  .article-row__right {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    padding-top: 0.75rem;
  }
}

@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  .hero { padding: 3.5rem 0 3rem; }
  .hero__topics { gap: 0; }
  .hero__topic { font-size: 0.6rem; padding: 0.2rem 0.7rem; }

  .article-row {
    grid-template-columns: 1fr;
    gap: 1rem 0;
  }
  .article-row__left {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  .article-row__right {
    grid-column: 1;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding-top: 0;
  }

  .principle { grid-template-columns: 2.5rem 1fr; gap: 0 1.5rem; }

  .footer__main { flex-direction: column; }
  .footer__links { gap: 1.5rem; }

  .article-header__title { max-width: 100%; }
}
