/* ──────────────────────────────────────────────────────────
   Shared styles for project deep-dive pages.
   Matches the home page's design tokens (Anton Rehan site).
   ────────────────────────────────────────────────────────── */

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

:root {
  --bg:        oklch(97% 0.008 90);
  --bg-sand:   oklch(92% 0.018 80);
  --bg-deep:   oklch(18% 0.03 150);
  --text:      oklch(20% 0.03 150);
  --text-mid:  oklch(42% 0.02 150);
  --text-light:oklch(60% 0.015 150);
  --sage:      oklch(52% 0.09 150);
  --sage-pale: oklch(88% 0.05 148);
  --line:      oklch(88% 0.012 90);
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* NAV ──────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  background: oklch(97% 0.008 90 / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; opacity: 0.7;
  transition: opacity 0.25s;
  font-family: var(--font-serif); font-style: italic;
  font-size: 18px; color: var(--text); letter-spacing: 0.02em;
}
.nav-logo:hover { opacity: 1; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-mid); text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--sage); }

/* BACK LINK ────────────────────────────────────────────── */
.back-link-row {
  padding-top: 112px; /* clear fixed nav */
  padding-bottom: 0;
}
.back-link-row .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.back-link {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-mid);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--sage); gap: 14px; }
.back-link-arrow { font-size: 16px; line-height: 1; }
.crumb-meta {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-light);
}

/* PROJECT HERO ─────────────────────────────────────────── */
.project-hero {
  padding: 48px 0 96px;
}
.project-hero .container { max-width: 1180px; }
.project-eyebrow {
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage);
  margin-bottom: 24px;
}
.project-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: normal; line-height: 1.05;
  color: var(--text); margin-bottom: 32px;
  max-width: 900px;
  text-wrap: pretty;
}
.project-title em { font-style: italic; color: var(--sage); }
.project-lede {
  font-size: 18px; line-height: 1.65;
  color: var(--text-mid); font-weight: 300;
  max-width: 680px;
  text-wrap: pretty;
}

/* META STRIP ───────────────────────────────────────────── */
.meta-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 32px 0;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.meta-item {
  display: flex; flex-direction: column; gap: 8px;
}
.meta-label {
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-light);
}
.meta-value {
  font-family: var(--font-serif);
  font-size: 17px; line-height: 1.3;
  color: var(--text);
}

/* HERO VISUAL ──────────────────────────────────────────── */
.hero-visual {
  margin-top: 0;
  padding: 0;
}
.hero-visual-frame {
  width: 100%;
  aspect-ratio: 21/9;
  position: relative; overflow: hidden;
}
.hero-visual-frame.dark {
  background: var(--bg-deep);
}
.hero-visual-pattern {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    var(--bg-sand) 0px, var(--bg-sand) 1px,
    transparent 1px, transparent 28px
  );
}
.hero-visual-pattern.tone-cool {
  background: repeating-linear-gradient(
    60deg,
    var(--bg-sand) 0px, var(--bg-sand) 1px,
    oklch(94% 0.02 80) 1px, oklch(94% 0.02 80) 22px
  );
}
.hero-visual-pattern.tone-warm {
  background: repeating-linear-gradient(
    120deg,
    var(--bg-sand) 0px, var(--bg-sand) 1px,
    oklch(90% 0.025 100) 1px, oklch(90% 0.025 100) 22px
  );
}
.placeholder-label {
  position: absolute; top: 24px; right: 24px;
  font-family: var(--font-sans);
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 2px;
  background: oklch(97% 0.008 90 / 0.85);
  backdrop-filter: blur(6px);
}
.placeholder-instr {
  position: absolute; left: 24px; bottom: 24px;
  font-family: var(--font-sans);
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--text-light);
  font-style: italic;
  max-width: 60%;
}

/* SECTIONS ─────────────────────────────────────────────── */
section.story {
  padding: 96px 0;
}
section.story.alt { background: var(--bg-sand); }
section.story.deep { background: var(--bg-deep); color: oklch(78% 0.02 150); }
section.story.deep .section-label { color: oklch(65% 0.07 148); }
section.story.deep h2,
section.story.deep h3 { color: oklch(94% 0.01 90); }
section.story.deep h2 em,
section.story.deep h3 em { color: oklch(65% 0.07 148); }
section.story.deep p { color: oklch(78% 0.02 150); }
section.story.deep .pull-quote { color: oklch(94% 0.01 90); border-left-color: oklch(65% 0.07 148); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 48px; }

.section-label {
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: normal; line-height: 1.1;
  color: var(--text); margin-bottom: 40px;
  max-width: 800px; text-wrap: pretty;
}
.section-title em { font-style: italic; color: var(--sage); }

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 96px;
  align-items: start;
}
.story-aside {
  position: sticky; top: 96px;
}
.story-aside .section-label { margin-bottom: 12px; }
.story-aside-title {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: normal;
  line-height: 1.3; color: var(--text);
  text-wrap: pretty;
}
.prose p {
  font-size: 17px; line-height: 1.75;
  color: var(--text-mid); font-weight: 300;
  margin-bottom: 22px;
  text-wrap: pretty;
}
.prose p strong { color: var(--text); font-weight: 500; }
.prose p em { font-style: italic; }
.prose ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 14px;
  margin: 8px 0 24px;
}
.prose ul li {
  font-size: 16px; line-height: 1.6;
  color: var(--text-mid); font-weight: 300;
  padding-left: 24px; position: relative;
}
.prose ul li::before {
  content: '—';
  position: absolute; left: 0; top: 0;
  color: var(--sage);
}
.pull-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px; line-height: 1.45;
  color: var(--text);
  padding-left: 28px;
  border-left: 3px solid var(--sage);
  margin: 8px 0 0;
  text-wrap: pretty;
}

/* FIGURE GRID ──────────────────────────────────────────── */
.figure-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: 16px;
}
.figure-grid.three-up { grid-template-columns: repeat(3, 1fr); }
.figure-grid.one-up { grid-template-columns: 1fr; }
.figure {
  display: flex; flex-direction: column; gap: 12px;
}
.figure-frame {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-sand);
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
}
.figure-frame.tall { aspect-ratio: 3/4; }
.figure-frame.wide { aspect-ratio: 16/9; }
.figure-frame.tone-cool {
  background: repeating-linear-gradient(
    60deg,
    var(--bg-sand) 0px, var(--bg-sand) 1px,
    oklch(94% 0.02 80) 1px, oklch(94% 0.02 80) 18px
  );
}
.figure-frame.tone-warm {
  background: repeating-linear-gradient(
    120deg,
    var(--bg-sand) 0px, var(--bg-sand) 1px,
    oklch(90% 0.025 100) 1px, oklch(90% 0.025 100) 18px
  );
}
.figure-frame.tone-sage {
  background: repeating-linear-gradient(
    45deg,
    var(--sage-pale) 0px, var(--sage-pale) 1px,
    oklch(94% 0.02 80) 1px, oklch(94% 0.02 80) 18px
  );
}
.figure-caption {
  font-size: 12px; line-height: 1.5;
  color: var(--text-light);
  letter-spacing: 0.02em;
}
.figure-caption strong {
  display: inline-block;
  font-weight: 500; color: var(--text-mid);
  margin-right: 6px;
}

/* TOOLS / TAGS ─────────────────────────────────────────── */
.tag-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 16px;
}
.tag {
  font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage); background: var(--sage-pale);
  padding: 6px 14px; border-radius: 2px;
}

/* TIMELINE ─────────────────────────────────────────────── */
.timeline {
  display: flex; flex-direction: column;
  margin-top: 16px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.timeline-row:last-child { border-bottom: 1px solid var(--line); }
.timeline-date {
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-light);
  padding-top: 4px;
}
.timeline-title {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: normal;
  line-height: 1.3; color: var(--text);
  margin-bottom: 6px;
}
.timeline-desc {
  font-size: 14px; line-height: 1.6;
  color: var(--text-mid); font-weight: 300;
}

/* NEXT PROJECT ─────────────────────────────────────────── */
.next-project {
  background: var(--bg-deep);
  padding: 96px 0;
  color: oklch(78% 0.02 150);
}
.next-project .container {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.next-eyebrow {
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: oklch(65% 0.07 148);
  margin-bottom: 16px;
}
.next-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: normal; line-height: 1.1;
  color: oklch(94% 0.01 90);
  margin-bottom: 24px; text-wrap: pretty;
}
.next-title em { font-style: italic; color: oklch(65% 0.07 148); }
.next-desc {
  font-size: 15px; line-height: 1.65;
  color: oklch(72% 0.02 150);
  margin-bottom: 32px; font-weight: 300;
}
.next-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: oklch(94% 0.01 90); text-decoration: none;
  border: 1px solid oklch(35% 0.04 150);
  padding: 14px 28px; border-radius: 2px;
  transition: border-color 0.2s, gap 0.2s;
}
.next-cta:hover { border-color: oklch(65% 0.07 148); gap: 16px; }
.next-visual {
  aspect-ratio: 4/3;
  position: relative; overflow: hidden;
  border: 1px solid oklch(30% 0.04 150);
}
.next-visual .placeholder-label {
  background: oklch(18% 0.03 150 / 0.7);
  color: oklch(70% 0.03 150);
  border-color: oklch(35% 0.04 150);
}

/* FOOTER ───────────────────────────────────────────────── */
footer {
  background: var(--bg-deep);
  padding: 48px;
  display: flex;
  align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 16px;
}
.back-to-top {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  color: oklch(70% 0.03 150);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid oklch(35% 0.04 150);
  border-radius: 2px;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.back-to-top:hover {
  color: oklch(94% 0.01 90);
  border-color: oklch(65% 0.07 148);
  transform: translateY(-2px);
}
.back-to-top-arrow { font-size: 16px; line-height: 1; }

/* RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .container { padding: 0 24px; }
  .story-grid { grid-template-columns: 1fr; gap: 32px; }
  .story-aside { position: static; }
  .figure-grid, .figure-grid.three-up { grid-template-columns: 1fr; }
  .meta-strip { grid-template-columns: 1fr 1fr; }
  .timeline-row { grid-template-columns: 1fr; gap: 8px; }
  .next-project .container { grid-template-columns: 1fr; gap: 32px; }
  .project-hero { padding: 32px 0 64px; }
  section.story { padding: 64px 0; }
  footer { padding: 32px 24px; }
  .back-link-row { padding-top: 96px; }
}
