/* ============================================================
   ZEROLAYER — Case Study pages (shared)
   Mirrors the main site tokens + chrome.
   ============================================================ */
:root {
  --bg:        #0A0A0A;
  --surface:   #111111;
  --surface-2: #161616;
  --hairline:  #1F1F1F;
  --hairline-2:#2A2A2A;
  --fg:        #EDE9E2;
  --fg-dim:    #8A8780;
  --fg-mute:   #5A5853;

  --accent:    #0057FF;
  --accent-soft: color-mix(in oklab, #0057FF 18%, transparent);
  --amber:     #FFB347;
  --booked:    oklch(0.78 0.16 152);
  --booked-soft: color-mix(in oklab, oklch(0.78 0.16 152) 12%, transparent);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;

  --maxw:   1180px;
  --gutter: clamp(20px, 4vw, 64px);
  --ease:   cubic-bezier(.2,.7,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; }
.mono { font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.dim { color: var(--fg-mute); }
em { font-style: normal; color: var(--accent); }

/* ---- NAV ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em;
}
.nav__logo { height: 22px; width: auto; display: block; filter: drop-shadow(0 0 20px rgba(0,87,255,0.25)); }
.nav__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-dim); text-decoration: none;
  transition: color .2s var(--ease);
}
.nav__back:hover { color: var(--fg); }
.nav__back svg { width: 14px; height: 14px; }

/* ---- WRAP ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- pills / badges ---- */
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--booked);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--booked) 14%, transparent);
  display: inline-block;
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--hairline-2);
  color: var(--fg-dim);
}
.badge--live { color: var(--booked); border-color: color-mix(in oklab, var(--booked) 30%, transparent); background: var(--booked-soft); }
.badge--custom { color: var(--amber); border-color: color-mix(in oklab, var(--amber) 30%, transparent); background: color-mix(in oklab, var(--amber) 8%, transparent); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: all .15s var(--ease); cursor: pointer; border: none;
}
.btn--lg { padding: 16px 26px; font-size: 15px; }
.btn--primary { background: var(--fg); color: var(--bg); }
.btn--primary:hover { background: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--fg); border: 1px solid var(--hairline-2); }
.btn--ghost:hover { border-color: var(--fg-dim); }
.btn svg { width: 15px; height: 15px; }

/* ============================================================
   HERO
   ============================================================ */
.cs-hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(0,87,255,0.05), transparent 60%),
    var(--bg);
}
.cs-hero__eyebrow {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  color: var(--fg-mute);
  margin-bottom: clamp(28px, 5vw, 48px);
}
.cs-hero__eyebrow .badge { text-transform: uppercase; }
.cs-hero h1 {
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 500;
  max-width: 16ch;
  margin-bottom: clamp(24px, 4vw, 36px);
  text-wrap: balance;
}
.cs-hero__sub {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--fg-dim);
  max-width: 62ch;
  line-height: 1.55;
  text-wrap: pretty;
}
.cs-hero__sub b { color: var(--fg); font-weight: 500; }

/* ============================================================
   KPI STRIP
   ============================================================ */
.kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--hairline);
  border: 1px solid var(--hairline);
  margin-top: clamp(40px, 6vw, 64px);
}
.kpi { background: var(--surface); padding: 28px 26px; display: grid; gap: 8px; align-content: start; }
.kpi__val { font-size: clamp(38px, 5vw, 56px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--fg); }
.kpi__val .u { font-size: 0.5em; color: var(--fg-dim); margin-left: 2px; }
.kpi__lbl { font-size: 14px; color: var(--fg); font-weight: 500; }
.kpi__sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--fg-mute); text-transform: uppercase; }
.kpi--accent .kpi__val { color: var(--accent); }
.kpi--booked .kpi__val { color: var(--booked); }

.callout {
  margin-top: 1px;
  background: var(--surface);
  border: 1px solid var(--hairline); border-top: none;
  padding: 18px 26px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 14px; color: var(--fg-dim);
}
.callout strong { color: var(--accent); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.cs-section { padding: clamp(56px, 9vw, 104px) 0; border-top: 1px solid var(--hairline); }
.cs-section__head { margin-bottom: clamp(32px, 5vw, 56px); max-width: 64ch; }
.cs-section__head .mono { color: var(--fg-mute); display: block; margin-bottom: 16px; }
.cs-section__head h2 { font-size: clamp(28px, 4vw, 46px); letter-spacing: -0.03em; font-weight: 500; line-height: 1.05; margin-bottom: 16px; }
.cs-section__head p { color: var(--fg-dim); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.55; text-wrap: pretty; }

/* ============================================================
   MONTHLY BAR CHART
   ============================================================ */
.barchart {
  border: 1px solid var(--hairline);
  background: var(--surface);
  padding: clamp(24px, 4vw, 40px);
}
.barchart__legend { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 32px; }
.barchart__legend span { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-dim); }
.swatch { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.swatch--booked { background: var(--accent); }
.swatch--other { background: var(--hairline-2); }

.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(10px, 2vw, 24px); align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 0; justify-content: flex-end; }
.bar__col {
  width: 100%; max-width: 64px; margin: 0 auto;
  position: relative;
  background: var(--hairline-2);
  border-radius: 4px 4px 0 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  height: 0;
  transition: height 1.1s var(--ease);
}
.in .bar__col { height: var(--h); }
.bar__booked {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(0,87,255,0.35);
  height: 0;
  transition: height 1.1s var(--ease) .15s;
}
.in .bar__booked { height: var(--bh); }
.bar__total {
  position: absolute; top: -26px; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--fg);
}
.bar__rate {
  margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.02em;
}
.bar__month { margin-top: 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-mute); }

/* ============================================================
   ENQUIRY TYPES (horizontal bars)
   ============================================================ */
.enq { display: grid; gap: 14px; }
.enq__row { display: grid; grid-template-columns: 150px 1fr 72px; gap: 18px; align-items: center; }
.enq__name { font-size: 14px; color: var(--fg); }
.enq__track { position: relative; height: 34px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 6px; overflow: hidden; }
.enq__total { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--hairline-2); border-radius: 6px 0 0 6px; transition: width 1s var(--ease); }
.in .enq__total { width: var(--w); }
.enq__booked { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 6px 0 0 6px; box-shadow: 0 0 16px rgba(0,87,255,0.3); transition: width 1s var(--ease) .12s; }
.in .enq__booked { width: var(--wb); }
.enq__count { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); text-align: right; }
.enq__count b { color: var(--fg); }

/* ============================================================
   HOURS / AFTER-HOURS
   ============================================================ */
.hours {
  border: 1px solid var(--hairline);
  background: var(--surface);
  padding: clamp(24px, 4vw, 40px);
}
.hours__track {
  position: relative; height: 76px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  margin: 36px 0 14px;
}
.hours__open {
  position: absolute; top: 0; bottom: 0;
  /* 10:00 to 18:00 of 24h => 41.67% to 75% */
  left: 41.67%; width: 33.33%;
  background: var(--accent-soft);
  border-left: 1px dashed color-mix(in oklab, var(--accent) 50%, transparent);
  border-right: 1px dashed color-mix(in oklab, var(--accent) 50%, transparent);
  display: flex; align-items: center; justify-content: center;
}
.hours__open span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hours__ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--fg-mute); }
.hours__split { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); margin-top: 28px; }
.hours__cell { background: var(--surface); padding: 22px 24px; display: grid; gap: 6px; }
.hours__cell .v { font-size: 32px; font-weight: 500; letter-spacing: -0.02em; }
.hours__cell .v.after { color: var(--amber); }
.hours__cell .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-mute); }

/* ============================================================
   MONTHLY NARRATIVE TIMELINE
   ============================================================ */
.timeline { display: grid; gap: 0; border-left: 1px solid var(--hairline-2); margin-left: 8px; }
.tl {
  position: relative;
  padding: clamp(28px, 4vw, 44px) 0 clamp(28px, 4vw, 44px) clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--hairline);
}
.timeline .tl:last-child { border-bottom: none; }
.tl::before {
  content: ""; position: absolute; left: -5px; top: clamp(34px, 4.5vw, 50px);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg), 0 0 14px rgba(0,87,255,0.5);
}
.tl--last::before { background: var(--booked); box-shadow: 0 0 0 4px var(--bg), 0 0 14px color-mix(in oklab, var(--booked) 60%, transparent); }
.tl__top { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.tl__num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-mute); }
.tl__date { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.tl__title { font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.02em; font-weight: 500; line-height: 1.1; margin-bottom: 12px; max-width: 22ch; }
.tl__body { color: var(--fg-dim); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.6; max-width: 56ch; margin-bottom: 22px; text-wrap: pretty; }
.tl__stats { display: flex; gap: 0; border: 1px solid var(--hairline); width: fit-content; flex-wrap: wrap; }
.tl__stat { padding: 14px 22px; border-right: 1px solid var(--hairline); display: grid; gap: 3px; }
.tl__stat:last-child { border-right: none; }
.tl__stat .v { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.tl__stat .v.book { color: var(--accent); }
.tl__stat .l { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-mute); }

/* ============================================================
   CLOSING CTA
   ============================================================ */
.cs-close {
  padding: clamp(72px, 11vw, 140px) 0;
  border-top: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 60% 60% at 50% 100%, rgba(0,87,255,0.06), transparent 60%),
    var(--bg);
  text-align: center;
}
.cs-close h2 { font-size: clamp(30px, 5vw, 60px); letter-spacing: -0.035em; font-weight: 500; line-height: 1.04; max-width: 20ch; margin: 0 auto 40px; text-wrap: balance; }
.cs-close__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- footer ---- */
.cs-foot {
  border-top: 1px solid var(--hairline);
  padding: 28px var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-mute);
}
.cs-foot a { color: var(--fg-dim); text-decoration: none; }
.cs-foot a:hover { color: var(--fg); }

/* ============================================================
   CASE STUDIES INDEX
   ============================================================ */
.idx-hero { padding: clamp(64px, 10vw, 130px) 0 clamp(32px, 5vw, 56px); }
.idx-hero .mono { color: var(--fg-mute); display: block; margin-bottom: 20px; }
.idx-hero h1 { font-size: clamp(44px, 8vw, 104px); letter-spacing: -0.045em; font-weight: 500; line-height: 0.95; margin-bottom: 28px; max-width: 14ch; }
.idx-hero p { color: var(--fg-dim); font-size: clamp(16px, 1.6vw, 20px); max-width: 56ch; line-height: 1.55; text-wrap: pretty; }

.cases { padding-bottom: clamp(64px, 9vw, 120px); display: grid; gap: 28px; }
.case-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  border: 1px solid var(--hairline);
  background: var(--surface);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.case-card:hover { border-color: var(--hairline-2); transform: translateY(-2px); }
.case-card__body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 20px; }
.case-card__eyebrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.case-card h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.03em; font-weight: 500; line-height: 1.06; text-wrap: balance; }
.case-card__desc { color: var(--fg-dim); font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.case-card__cta { margin-top: auto; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.case-card__cta svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.case-card:hover .case-card__cta svg { transform: translateX(4px); }

.case-card__stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--hairline); border-left: 1px solid var(--hairline);
}
.case-card__stat { background: var(--surface); padding: clamp(22px, 3vw, 36px) clamp(20px, 2.5vw, 32px); display: grid; gap: 6px; align-content: center; }
.case-card__stat .v { font-size: clamp(32px, 4vw, 48px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.case-card__stat .v.accent { color: var(--accent); }
.case-card__stat .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-mute); }

.cases__note { color: var(--fg-mute); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; padding: 24px 0 0; border-top: 1px dashed var(--hairline-2); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .case-card { grid-template-columns: 1fr; }
  .case-card__stats { border-left: none; border-top: 1px solid var(--hairline); }
  .enq__row { grid-template-columns: 110px 1fr 60px; gap: 12px; }
  .enq__name { font-size: 13px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .bars { gap: 6px; height: 240px; }
  .hours__split { grid-template-columns: 1fr; }
  .enq__row { grid-template-columns: 92px 1fr 52px; gap: 10px; }
  .tl__stats { width: 100%; }
  .nav__brand .nav__wordmark { display: none; }
}
