:root {
  --navy: #1F3864;
  --navy-deep: #15284A;
  --amber: #E9A23B;
  --amber-strong: #C9831B;
  --amber-soft: #FDF3E3;

  --bg: #FFFFFF;
  --bg-alt: #F5F7FB;
  --surface: #FFFFFF;
  --text: #1A2233;
  --text-muted: #5A6478;
  --border: #E2E7F0;
  --heading: #1F3864;
  --header-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 1px 2px rgba(20, 35, 70, 0.06), 0 4px 16px rgba(20, 35, 70, 0.06);

  --radius: 14px;
  --maxw: 1140px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1626;
    --bg-alt: #121C30;
    --surface: #17233B;
    --text: #E4E9F2;
    --text-muted: #A0AABD;
    --border: #26344F;
    --heading: #F1F4FA;
    --amber-soft: #2E2516;
    --header-bg: rgba(14, 22, 38, 0.86);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  }
}
:root[data-theme="dark"] {
  --bg: #0E1626;
  --bg-alt: #121C30;
  --surface: #17233B;
  --text: #E4E9F2;
  --text-muted: #A0AABD;
  --border: #26344F;
  --heading: #F1F4FA;
  --amber-soft: #2E2516;
  --header-bg: rgba(14, 22, 38, 0.86);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { color: var(--heading); line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--heading); text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--navy); color: var(--amber);
  display: grid; place-items: center; font-size: 15px;
}
.back { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--text-muted); }
.back:hover { color: var(--heading); }

/* ---------- Intro ---------- */
.intro {
  background: linear-gradient(135deg, #1F3864 0%, #16294B 60%, #0F1E39 100%);
  color: #fff; padding: 64px 0 56px;
}
.case-num { font-size: 13px; font-weight: 800; color: var(--amber); letter-spacing: .1em; margin-bottom: 10px; }
.intro h1 { color: #fff; font-size: clamp(30px, 5vw, 46px); font-weight: 800; margin-bottom: 10px; }
.intro .sub { color: #C9D5EC; font-size: 18px; margin-bottom: 20px; }
.industry-tag {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  background: var(--amber); color: #1A1406; font-size: 13px; font-weight: 600;
}

main section { padding: 48px 0; }

/* ---------- Problem / Approach / Outcome ---------- */
.pao { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pao-col { background: var(--surface); border-radius: var(--radius); padding: 22px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.pao-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--heading); margin-bottom: 10px;
}
.pao-label i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.problem .pao-label i { background: #FDE8E8; color: #B42318; }
.approach .pao-label i { background: #E6EEFB; color: var(--navy); }
.outcome .pao-label i { background: #E3F6EA; color: #1C7C45; }
.pao-col p { font-size: 15px; color: var(--text-muted); }
.pao-col strong { color: var(--text); font-weight: 600; }

.frameworks { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.frameworks-label { font-size: 13px; font-weight: 700; color: var(--heading); margin-right: 4px; }
.tag { padding: 4px 11px; border-radius: 6px; font-size: 13px; font-weight: 600; background: var(--amber-soft); color: var(--amber-strong); }
:root[data-theme="dark"] .tag { color: var(--amber); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag { color: var(--amber); } }

/* ---------- Document ---------- */
.doc-section { background: var(--bg-alt); }
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.doc-head h2 { font-size: 24px; font-weight: 800; }
.doc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 2px solid transparent;
}
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-ghost { border-color: var(--border); color: var(--heading); background: var(--surface); }
.btn-ghost:hover { border-color: var(--amber); }
.pdf-frame {
  width: 100%; height: 80vh; min-height: 520px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow);
}
.pdf-fallback { padding: 32px; text-align: center; color: var(--text-muted); }

.site-footer { padding: 28px 0; border-top: 1px solid var(--border); }
.site-footer p { color: var(--text-muted); font-size: 14px; }

@media (max-width: 860px) {
  .pao { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .intro { padding: 44px 0 40px; }
  .pdf-frame { height: 70vh; min-height: 420px; }
  .doc-actions .btn { flex: 1 1 auto; justify-content: center; }
}
