:root {
  --bg: #090c12;
  --bg-elevated: #0e131d;
  --bg-surface: #131a27;
  --bg-card: rgba(19, 26, 39, 0.78);
  --text: #f3f6fb;
  --text-muted: #9aa7bd;
  --text-subtle: #66758f;
  --cobalt: #4f8cff;
  --cobalt-soft: #8cb6ff;
  --amber: #f0b354;
  --amber-soft: #f7cf8b;
  --emerald: #34d399;
  --border: rgba(140, 182, 255, 0.16);
  --border-strong: rgba(140, 182, 255, 0.34);
  --grid-line: rgba(140, 182, 255, 0.075);
  --max-w: 1140px;
  --radius: 10px;
  --radius-sm: 6px;
  --tnum: "tnum" 1, "lnum" 1;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 22px;
  position: relative;
  z-index: 2;
}

/* ================= STICKY HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 12, 18, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1rem;
  white-space: nowrap;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.25), rgba(240, 179, 84, 0.18));
  border: 1px solid var(--border-strong);
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--cobalt-soft);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active-chapter {
  color: var(--text);
}

.nav-links a.active-chapter {
  position: relative;
}

.nav-links a.active-chapter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--cobalt);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: border-color 0.2s ease;
}

.lang-toggle:hover {
  border-color: var(--border-strong);
}

.lang-active {
  color: var(--cobalt-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.btn-accent {
  background: var(--cobalt);
  color: #06090f;
}

.btn-accent:hover {
  background: var(--cobalt-soft);
}

.btn-amber {
  background: var(--amber);
  color: #110d04;
}

.btn-amber:hover {
  background: var(--amber-soft);
}

.btn-ghost-light {
  border: 1px solid var(--border-strong);
  background: rgba(19, 26, 39, 0.65);
  color: var(--text);
}

.btn-ghost-light:hover {
  border-color: var(--cobalt-soft);
  background: rgba(79, 140, 255, 0.12);
}

.reading-progress {
  height: 2px;
  background: rgba(140, 182, 255, 0.1);
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cobalt), var(--amber));
  transition: width 0.1s linear;
}

/* ================= HERO POSTER ================= */
.hero-poster {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.hero-poster-frame {
  position: relative;
  min-height: calc(100vh - 66px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 0 32px;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 38%, rgba(79, 140, 255, 0.24) 0%, rgba(79, 140, 255, 0.08) 38%, transparent 72%),
    radial-gradient(circle at 18% 82%, rgba(240, 179, 84, 0.12) 0%, transparent 48%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid-overlay,
.section-grid-overlay {
  position: absolute;
  inset: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(6, 1fr);
  border-top: 1px solid var(--grid-line);
  border-left: 1px solid var(--grid-line);
  pointer-events: none;
  z-index: 1;
}

.section-grid-overlay {
  opacity: 0.6;
}

.grid-cell {
  border-right: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
  position: relative;
}

.desktop-cell {
  display: none;
}

.cell-accent {
  background: rgba(79, 140, 255, 0.08);
}

.cell-accent-outline {
  box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.22);
}

.cell-outline-box {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(240, 179, 84, 0.22);
}

.cell-meta-top {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.hero-poster-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  flex: 1;
}

.hero-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  margin: auto 0;
}

.hero-motto {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(240, 179, 84, 0.32);
  background: rgba(240, 179, 84, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber-soft);
  margin-bottom: 18px;
}

.poster-headline {
  margin: 0 0 18px;
  font-size: clamp(2.45rem, 6vw, 4.3rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.poster-headline .line-white {
  display: block;
  color: var(--text);
}

.poster-headline .line-accent {
  display: block;
  color: var(--cobalt);
}

.poster-headline .line-amber {
  display: block;
  color: var(--amber);
}

.poster-subcopy {
  margin: 0 0 24px;
  max-width: 560px;
  font-size: 1rem;
  color: var(--text-muted);
  border-left: 2px solid var(--cobalt);
  padding-left: 16px;
}

.poster-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-portrait-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-portrait-cutout {
  width: min(360px, 82vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55));
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, rgba(0, 0, 0, 0.22) 96%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, rgba(0, 0, 0, 0.22) 96%, transparent 100%);
}

.hero-poster-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.poster-name {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.poster-role {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--amber-soft);
  margin: 4px 0 12px;
}

.poster-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.poster-pillars span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(79, 140, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cobalt-soft);
}

.poster-monogram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--cobalt-soft);
}

.monogram-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

/* ================= SECTIONS COMMON ================= */
.section {
  position: relative;
  padding: 76px 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.section-elevated {
  background: var(--bg-elevated);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

.chapter-header {
  max-width: 720px;
  margin-bottom: 32px;
}

.chapter-kicker {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.6vw, 2.55rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.section-intro {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
}

/* ================= SUBTABS & CARDS ================= */
.vd-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.vd-subtab {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.vd-subtab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.vd-subtab.active {
  background: rgba(79, 140, 255, 0.16);
  border-color: var(--cobalt);
  color: var(--text);
}

.vd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.vd-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.vd-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--cobalt);
  border-radius: var(--radius);
  padding: 20px;
}

.vd-card-amber {
  border-top-color: var(--amber);
}

.vd-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-soft);
  margin-bottom: 8px;
}

.vd-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 800;
}

.vd-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.skill-list {
  margin: 10px 0 0;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.skill-list li + li {
  margin-top: 5px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(79, 140, 255, 0.08);
  color: var(--cobalt-soft);
}

.chip-amber {
  border-color: rgba(240, 179, 84, 0.32);
  background: rgba(240, 179, 84, 0.1);
  color: var(--amber-soft);
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  padding: 4px;
  background: #ffffff;
  border: 1px solid rgba(140, 182, 255, 0.28);
  flex-shrink: 0;
}

.logo-badge-sm {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  padding: 3px;
}

.logo-badge-lg {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  padding: 5px;
}

.logo-dark-bg {
  background: rgba(79, 140, 255, 0.14);
}

.tool-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
  background: #ffffff;
  padding: 1.5px;
  flex-shrink: 0;
}

.tool-icon-dark {
  background: rgba(79, 140, 255, 0.2);
}

.card-logo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.card-logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.brand-tab-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.case-head-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ================= CASE STUDY WORKBENCH ================= */
.brand-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.brand-tab {
  text-align: left;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: all 0.2s ease;
}

.brand-tab:hover {
  border-color: var(--border-strong);
}

.brand-tab.active {
  border-color: var(--cobalt);
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.16), rgba(19, 26, 39, 0.95));
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.3);
}

.brand-tab-niche {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 3px;
}

.brand-tab-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.brand-tab-stat {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cobalt-soft);
  margin-top: 2px;
}

.case-stage {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 26px;
}

.case-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.case-company {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-soft);
  margin-bottom: 6px;
}

.case-title {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.case-role {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.case-period {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--cobalt-soft);
  white-space: nowrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.kpi-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.kpi-val {
  display: block;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt-soft);
  margin-bottom: 4px;
}

.kpi-note {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.case-body-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.case-panel {
  background: rgba(9, 12, 18, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.case-panel h4 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}

.case-panel p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.58;
}

.channel-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.ch-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ch-track {
  height: 7px;
  background: rgba(140, 182, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.ch-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cobalt), var(--amber));
  border-radius: 999px;
}

/* ================= TIMELINE SPINE ================= */
.b1-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.v-spine {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v-node {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}

.v-node.active {
  border-color: var(--cobalt);
}

.v-node-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 130px 1fr 24px;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  text-align: left;
}

.v-year {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.v-heading {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
}

.v-toggle {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cobalt-soft);
  text-align: right;
}

.v-node-body {
  padding: 0 20px 18px;
  border-top: 1px solid var(--border);
}

.v-node-body p {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ================= IMPACT METRICS ================= */
.impact-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.impact-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--amber);
  border-radius: var(--radius);
  padding: 20px;
}

.impact-num {
  display: block;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  margin-bottom: 8px;
}

.impact-stat h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
}

.impact-stat p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================= EPILOG & FOOTER ================= */
.epilog-box {
  background: linear-gradient(135deg, rgba(19, 26, 39, 0.92), rgba(14, 19, 29, 0.96));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 36px 28px;
}

.epilog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.footer-col {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(9, 12, 18, 0.55);
}

.footer-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.footer-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.footer-val:hover {
  color: var(--cobalt-soft);
}

.site-footer {
  padding: 28px 0 36px;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ================= RESPONSIVE ================= */
@media (min-width: 820px) {
  .nav-links {
    display: flex;
  }

  .hero-grid-overlay,
  .section-grid-overlay {
    grid-template-columns: repeat(6, 1fr);
  }

  .desktop-cell {
    display: block;
  }

  .hero-top-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .case-body-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .b1-split {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 36px;
  }

  .epilog-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .footer-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .v-node-trigger {
    grid-template-columns: 1fr 24px;
  }
  .v-year {
    grid-column: 1 / -1;
  }
}
