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

/* ── VARIABLES ── */
:root {
  --bg:            #ffffff;
  --bg-raised:     #f7f7f6;
  --bg-card:       #f2f2f1;
  --border:        #e4e4e2;
  --border-bright: #c8c8c8;
  --text-primary:   #111111;
  --text-secondary: #4a4a4a;
  --text-muted:     #595959;
  --blue-text:      #1060A0;
  --rose-text:      #B04450;
  --blue:           #1C8BC7;
  --blue-dark:      #188ACC;
  --blue-light:     #B6DFF9;
  --pink:           #F48F94;
  --pink-light:     #F5CECE;
  --pink-dim:       rgba(244,143,148,0.10);
  --pink-border:    rgba(244,143,148,0.30);
  --accent:         #1060A0;
  --accent-dim:     rgba(16,96,160,0.08);
  --accent-glow:    rgba(16,96,160,0.05);
  --col-width:     1080px;
  --col-wide:      1080px;
  --nav-h:         56px;
  --f-display: 'Fraunces', Georgia, serif;
  --f-body:    'Manrope', sans-serif;
  --f-mono:    'DM Mono', monospace;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 200;
}
.nav-logo {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-decoration: none;
}
.nav-logo span { color: var(--text-primary); }
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--blue-text); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-decoration: none;
}
.footer-logo span { color: var(--text-primary); }
.footer-copy {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 24px; }
  footer {
    padding: 32px 24px;
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ════════════════════════════════════════
   CASE STUDY SHARED PATTERNS
   ════════════════════════════════════════ */

/* ── PROGRESS BAR ── */
#progress-bar { position: fixed; top: var(--nav-h); left: 0; height: 2px; background: var(--blue); width: 0%; z-index: 200; transition: width 0.1s linear; }

/* ── HERO ── */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* ── HERO TWO-COL LAYOUT ── */
.hero-inner {
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 0 40px;
}
.hero-inner.hero-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 80px;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}
.hero > .hero-inner:first-of-type {
  padding-top: calc(var(--nav-h) + 16px);
  padding-bottom: 0;
}
.hero-screenshot {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
}
.hero-screenshot img { width: 100%; display: block; }

/* Stats / meta list in two-col hero */
.hero-stats { display: flex; flex-direction: column; gap: 12px; }
.hero-stat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
}
.hero-stat-icon { font-size: 22px; color: var(--text-primary); flex-shrink: 0; line-height: 1.45; }

@media (max-width: 760px) {
  .hero-inner.hero-two-col { grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; }
}

/* Large single-col hero title */
.hero h1 { font-family: var(--f-display); font-size: clamp(42px, 6vw, 72px); font-weight: 300; line-height: 1.08; letter-spacing: -0.02em; color: var(--text-primary); margin-bottom: 20px; max-width: 780px; }
.hero h1 em { font-style: italic; color: var(--blue-text); }
.hero-subtitle { font-size: 18px; font-weight: 400; color: var(--text-secondary); margin-bottom: 56px; max-width: 560px; line-height: 1.6; }

/* Two-col hero title — must come after .hero h1 to win the cascade */
.hero-text h1 {
  font-family: var(--f-display);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-style: normal;
}
.hero-text h1 em { font-style: italic; color: var(--blue-text); }
.hero-text .hero-subtitle {
  font-family: var(--f-body);
  font-size: 1.0rem;
  font-weight: 400;
  font-style: normal;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 24px;
  max-width: 420px;
}

/* Hero image (full-bleed below hero text) */
.hero-image-wrapper { position: relative; width: 100%; max-width: var(--col-wide); margin: 0 auto; border-radius: 6px 6px 0 0; overflow: hidden; border: 1px solid var(--border); border-bottom: none; }
.hero-image-wrapper img { width: 100%; display: block; }
.hero-image-wrapper::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 60%, #ffffff 100%); pointer-events: none; }

/* ── PROJECT LABEL / BREADCRUMB ── */
.project-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-text); margin-bottom: 28px; }
.project-label::before { content: ''; display: block; width: 20px; height: 1px; background: var(--blue); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; color: var(--text-muted); margin-bottom: 48px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--blue-text); }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--text-secondary); }

/* ── PAGE BODY ── */
.page-body { max-width: var(--col-width); margin: 0 auto; padding: 0 40px 120px; }

/* ── JUMP NAV ── */
.jump-nav { position: sticky; top: calc(var(--nav-h) + 12px); z-index: 50; display: flex; align-items: center; gap: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 80px; width: fit-content; margin-left: auto; margin-right: auto; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.jump-nav-label { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); padding: 10px 16px; border-right: 1px solid var(--border); white-space: nowrap; }
.jump-nav a { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); text-decoration: none; padding: 10px 18px; border-right: 1px solid var(--border); transition: color 0.15s, background 0.15s; white-space: nowrap; }
.jump-nav a:last-child { border-right: none; }
.jump-nav a:hover { color: var(--text-primary); background: var(--bg-raised); }
.jump-nav a.active { color: var(--blue-text); background: #E8F4FD; font-weight: 600; }

/* ── SECTION MARKERS ── */
.section-marker { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; padding-top: 0; margin-top: 80px; }
.section-marker-num { font-family: var(--f-mono); font-size: 12px; color: var(--pink); letter-spacing: 0.08em; opacity: 0.8; }
.section-marker-line { flex: 1; height: 1px; background: var(--pink-light); }
.section-marker-tag { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--pink-light); padding: 4px 10px; border-radius: 2px; }

h2.section-title { font-family: var(--f-display); font-size: clamp(28px, 3.5vw, 42px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; color: var(--text-primary); margin-bottom: 32px; }
h2.section-title em { font-style: italic; color: var(--blue-text); }
h3.subsection-title { font-family: var(--f-body); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; margin-top: 56px; }
h4.content-heading { font-family: var(--f-display); font-size: 22px; font-weight: 400; color: var(--text-primary); margin-bottom: 16px; margin-top: 40px; line-height: 1.3; }

/* ── MISSION LAYOUT ── */
.mission-layout { display: grid; grid-template-columns: 1fr 220px; gap: 64px; align-items: start; }
.mission-main { min-width: 0; }
.mission-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
}
.mission-sidebar-block { margin-bottom: 24px; }
.mission-sidebar-block:last-child { margin-bottom: 0; }
.mission-sidebar-label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.mission-sidebar-value { font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.mission-sidebar-value strong { color: var(--text-primary); font-weight: 600; display: block; margin-bottom: 2px; }
.mission-sidebar-divider { height: 1px; background: var(--border); margin: 16px 0; }
@media (max-width: 720px) { .mission-layout { grid-template-columns: 1fr; } }

/* ── CHALLENGE GRID ── */
.challenge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin: 40px 0; }
.challenge-card { background: var(--bg); padding: 24px; position: relative; }
.challenge-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.challenge-card:nth-child(1)::before { background: var(--pink); }
.challenge-card:nth-child(2)::before { background: var(--blue-light); }
.challenge-card:nth-child(3)::before { background: var(--blue); }
.challenge-num { font-family: var(--f-mono); font-size: 12px; color: var(--text-muted); letter-spacing: 0.1em; margin-bottom: 12px; }
.challenge-title { font-family: var(--f-body); font-size: 15px; font-weight: 500; color: var(--text-primary); line-height: 1.4; }

/* ── SCROLL OFFSET ── */
section[id] { scroll-margin-top: 160px; }

/* ── CASE STUDY RESPONSIVE ── */
@media (max-width: 700px) {
  .hero-inner, .page-body { padding: 0 20px; }
  .challenge-grid { grid-template-columns: 1fr; }
}
