/*
 * case-study.css — Amanda Morgan Portfolio: Case Study page
 * Inherits surrealism.css variables. Loaded only on Case Study template pages.
 */

@font-face {
  font-family: 'King Basil Lite';
  src: url('assets/fonts/King-Basil-Lite.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Re-declare variables for standalone context (surrealism.css may not be loaded) */
:root {
  --void:       #08090F;
  --deep:       #0E0F1A;
  --surface:    #14162B;
  --surface-2:  #1C1F36;
  --accent:     #D44F2E;
  --accent-dim: rgba(212,79,46,0.4);
  --pale:       #EDE8DF;
  --pale-dim:   rgba(237,232,223,0.6);
  --pale-ghost: rgba(237,232,223,0.08);
  --ink:        rgba(237,232,223,0.92);
  --ink-muted:  rgba(237,232,223,0.5);
  --ink-ghost:  rgba(237,232,223,0.1);
  --mono:       'DM Mono', monospace;
  --serif:      'Instrument Serif', serif;
  --sans:       'Outfit', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── NAV ────────────────────────────────────────────────────────────────── */
nav.am-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  border-bottom: 1px solid var(--ink-ghost);
  background: rgba(8,9,15,0.85);
  backdrop-filter: blur(16px);
}
nav.am-nav .nav-mark {
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
nav.am-nav .nav-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
nav.am-nav .nav-avatar {
  position: relative;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  z-index: 1;
}
nav.am-nav .nav-avatar img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
nav.am-nav .nav-avatar-shape {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  background: linear-gradient(160deg, #6dc5fd 40%, #b3fff1 70%);
  transform: rotate(18deg);
  top: 17px;
  left: -18px;
  z-index: 0;
  pointer-events: none;
}
nav.am-nav .nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
nav.am-nav .nav-identity {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  flex: 1 !important;
  min-width: 0 !important;
  overflow: visible !important;
}
nav.am-nav .nav-name {
  font-family: 'King Basil Lite', serif !important;
  font-style: normal !important;
  font-size: 16px !important;
  font-weight: 300 !important;
  color: var(--pale) !important;
  line-height: 1.56 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  white-space: nowrap !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  border-radius: 0 !important;
}
nav.am-nav .nav-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 12px !important;
  font-weight: 200 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--ink-muted) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  border-radius: 0 !important;
}
nav.am-nav .nav-links {
  display: flex !important;
  gap: 32px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
nav.am-nav .nav-links a {
  font-family: 'Outfit', sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--ink-muted) !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  transition: color 0.2s;
}
nav.am-nav .nav-links a:hover { color: var(--pale) !important; }


/* ─── MAIN LAYOUT ────────────────────────────────────────────────────────── */
.cs-main {
  padding-top: 80px; /* nav height */
  max-width: 860px;
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
  padding-bottom: 120px;
}


/* ─── HERO IMAGE ─────────────────────────────────────────────────────────── */
.cs-hero {
  margin-bottom: 48px;
}
.cs-hero__image {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--ink-ghost);
}
.cs-hero__image img {
  width: 100%;
  display: block;
  height: auto;
}


/* ─── TITLE BLOCK ────────────────────────────────────────────────────────── */
.cs-title-block {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--ink-ghost);
}
.cs-categories {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
.cs-title {
  font-family: var(--sans);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--pale);
  margin-bottom: 16px;
}
.cs-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 640px;
}


/* ─── METADATA GRID ──────────────────────────────────────────────────────── */
.cs-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--ink-ghost);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 64px;
}
.cs-meta-cell {
  padding: 20px 24px;
  border-right: 1px solid var(--ink-ghost);
  border-bottom: 1px solid var(--ink-ghost);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-meta-cell:nth-child(2n) { border-right: none; }
.cs-meta-cell:nth-last-child(-n+2) { border-bottom: none; }

.cs-meta-label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cs-meta-value {
  font-size: 13px;
  font-weight: 400;
  color: var(--pale);
  line-height: 1.5;
}


/* ─── CONTENT SECTIONS ───────────────────────────────────────────────────── */
.cs-section {
  margin-bottom: 64px;
}
.cs-section__label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-ghost);
}
.cs-section__heading {
  font-family: var(--sans);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--pale);
  line-height: 1.15;
  margin-bottom: 8px;
}
.cs-section__subheading {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 600px;
}
.cs-section__body {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-muted);
  line-height: 1.75;
}

/* Challenge quote block */
.cs-challenge {
  margin: 64px 0;
  padding: 48px 0;
  border-top: 1px solid var(--ink-ghost);
  border-bottom: 1px solid var(--ink-ghost);
}
.cs-challenge__label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 24px;
  display: block;
}
.cs-challenge__text {
  font-family: var(--sans);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--pale);
  line-height: 1.2;
  margin-bottom: 16px;
}
.cs-challenge__sub {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* Actors / stakeholder grid */
.cs-actors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}
.cs-actor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-actor__label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cs-actor__value {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.55;
}

/* Principles grid */
.cs-principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  margin: 32px 0;
}
.cs-principle__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.cs-principle__text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
}

/* Constraint columns */
.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 48px;
  margin: 32px 0;
}
.cs-two-col__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.cs-two-col__text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.65;
}

/* HMW / question block */
.cs-hmw {
  margin: 64px 0 48px;
}
.cs-hmw__label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-ghost);
  display: block;
}
.cs-hmw__text {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 600;
  color: var(--pale);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* Media / video placeholder */
.cs-media {
  margin: 32px 0;
  border: 1px solid var(--ink-ghost);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.cs-media__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-ghost);
}
.cs-media__content {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-ghost);
  font-size: 12px;
}
.cs-media__content img,
.cs-media__content video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Reflections grid */
.cs-reflections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
}
.cs-reflection__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.cs-reflection__text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.65;
}

/* CTA at bottom */
.cs-footer-cta {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--ink-ghost);
  text-align: center;
}
.cs-footer-cta a {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 14px 32px;
  background: var(--pale);
  color: var(--void);
  text-decoration: none;
  border-radius: 4px;
  transition: opacity 0.2s;
}
.cs-footer-cta a:hover { opacity: 0.88; }

/* WordPress content styles within cs-content */
.cs-content h2 {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--pale);
  margin-top: 56px;
  margin-bottom: 16px;
  line-height: 1.2;
}
.cs-content h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--pale);
  margin-top: 40px;
  margin-bottom: 12px;
}
.cs-content p {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.75;
  margin-bottom: 20px;
}
.cs-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 24px 0;
  border: 1px solid var(--ink-ghost);
}
.cs-content ul,
.cs-content ol {
  padding-left: 20px;
  margin-bottom: 20px;
}
.cs-content li {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 6px;
}


/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--ink-ghost);
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer p {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}


/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cs-nav, nav { padding: 16px 24px; }
  .cs-main { padding: 80px 24px 80px; }
  .cs-meta-grid { grid-template-columns: 1fr; }
  .cs-meta-cell { border-right: none; }
  .cs-meta-cell:nth-last-child(-n+2) { border-bottom: 1px solid var(--ink-ghost); }
  .cs-meta-cell:last-child { border-bottom: none; }
  .cs-actors { grid-template-columns: 1fr; }
  .cs-two-col { grid-template-columns: 1fr; }
  .cs-principles { grid-template-columns: 1fr; }
  .cs-reflections { grid-template-columns: 1fr; }
  footer { padding: 20px 24px; }
}
