/* =====================================================================
   RevAlpha — Case study pages + success stories grid
   Builds on css/style.css tokens. Loaded only by case study pages and success-stories.html.
   ===================================================================== */

/* ---------- Hero ---------- */
.cs-hero { position: relative; overflow: hidden; background: var(--ivory); padding-top: calc(var(--header-h) + clamp(40px, 6vw, 84px)); padding-bottom: clamp(56px, 7vw, 96px); }
.cs-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(36px, 5vw, 84px); align-items: center; }
.cs-hero h1 { font-size: clamp(34px, 4.2vw, 62px); max-width: 17ch; }
.cs-hero h1 .italic-accent { white-space: nowrap; }
.cs-hero .lead { margin-top: 22px; max-width: 54ch; }
.cs-hero__place { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 15px; font-weight: 600; color: var(--navy); }
.cs-hero__place svg { color: var(--gold); flex: none; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cs-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--slate); }
.cs-chip b { color: var(--navy); font-weight: 700; }
.cs-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.cs-hero__media { position: relative; }
.cs-hero__frame { position: relative; border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 4 / 4.4; box-shadow: var(--shadow-navy); background: var(--navy-deep); }
.cs-hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.cs-hero__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 22, 43, 0) 45%, rgba(7, 22, 43, 0.55) 100%); }
.cs-hero__tag { position: absolute; top: 20px; left: 20px; z-index: 2; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft-white); background: rgba(7, 22, 43, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(247, 248, 250, 0.18); }
.cs-badge { position: absolute; left: clamp(-36px, -2.4vw, -18px); bottom: clamp(26px, 4vw, 48px); z-index: 3; min-width: 210px; padding: 22px 26px 20px; border-radius: var(--radius-m); background: var(--panel-gradient); color: var(--soft-white); box-shadow: var(--shadow-navy); border: 1px solid rgba(217, 184, 92, 0.3); }
.cs-badge__v { font-family: var(--font-serif); font-size: clamp(40px, 4vw, 58px); line-height: 1; letter-spacing: -0.02em; background: var(--gold-gradient); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cs-badge__k { margin-top: 8px; font-size: 13.5px; font-weight: 600; color: rgba(247, 248, 250, 0.82); max-width: 22ch; }

/* ---------- Results band ---------- */
.cs-results-wrap { background: var(--paper); padding-block: clamp(48px, 6vw, 84px); }
.cs-results { position: relative; overflow: hidden; border-radius: var(--radius-l); background: var(--panel-gradient); color: var(--soft-white); padding: clamp(32px, 4.4vw, 64px); box-shadow: var(--shadow-navy); }
.cs-results::before { content: ""; position: absolute; right: -120px; top: -160px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(closest-side, rgba(217, 184, 92, 0.22), transparent); pointer-events: none; }
.cs-results > * { position: relative; }
.cs-results .eyebrow { color: var(--gold-bright); }
.cs-results__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px; margin-bottom: clamp(28px, 3.4vw, 46px); }
.cs-results__head h2 { color: var(--soft-white); font-size: clamp(28px, 3vw, 44px); max-width: 20ch; }
.cs-results__head h2 .italic-accent { color: var(--gold-bright); }
.cs-results__period { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: rgba(247, 248, 250, 0.6); max-width: 36ch; }
.cs-stats { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(247, 248, 250, 0.14); }
.cs-stat { padding: clamp(24px, 2.6vw, 34px) clamp(18px, 2.4vw, 34px) 6px 0; }
.cs-stat + .cs-stat { padding-left: clamp(18px, 2.4vw, 34px); border-left: 1px solid rgba(247, 248, 250, 0.14); }
.cs-stat__v { font-family: var(--font-serif); font-size: clamp(46px, 5.4vw, 84px); line-height: 0.95; letter-spacing: -0.03em; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.cs-stat__k { margin-top: 14px; font-size: 16px; font-weight: 700; color: var(--soft-white); }
.cs-stat__p { margin-top: 6px; font-size: 13.5px; color: rgba(247, 248, 250, 0.62); max-width: 30ch; }
.cs-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: clamp(28px, 3vw, 40px); }
.cs-hl { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius-s); background: rgba(247, 248, 250, 0.06); border: 1px solid rgba(247, 248, 250, 0.12); }
.cs-hl__ico { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(217, 184, 92, 0.16); color: var(--gold-bright); }
.cs-hl b { display: block; color: var(--soft-white); font-size: 15px; margin-bottom: 3px; }
.cs-hl span { font-size: 14px; color: rgba(247, 248, 250, 0.7); line-height: 1.55; }

/* ---------- At a glance strip ---------- */
.cs-glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(22px, 2.6vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; box-shadow: var(--shadow-card); }
.cs-glance > div { padding: 20px 24px; }
.cs-glance > div + div { border-left: 1px solid var(--line); }
.cs-glance dt { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.cs-glance dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--navy); line-height: 1.45; }

/* ---------- Story layout ---------- */
.cs-story { background: var(--paper); padding-block: clamp(20px, 3vw, 40px) clamp(56px, 7vw, 96px); }
.cs-story__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(36px, 5vw, 80px); align-items: start; }
.cs-block + .cs-block { margin-top: clamp(48px, 5.4vw, 72px); }
.cs-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cs-kicker__n { font-family: var(--font-mono); font-size: 12px; color: var(--gold); letter-spacing: 0.1em; }
.cs-kicker__line { height: 1px; flex: 1; max-width: 64px; background: var(--gold-line); }
.cs-kicker__t { font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--slate); }
.cs-block h2 { font-size: clamp(28px, 3vw, 42px); max-width: 22ch; margin-bottom: 18px; }
.cs-block > p { color: var(--slate); font-size: 17px; line-height: 1.75; }
.cs-block > p + p { margin-top: 14px; }

.cs-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 26px; }
.cs-goal { position: relative; padding: 22px 22px 20px; border-radius: var(--radius-s); background: var(--ivory); border: 1px solid var(--line); }
.cs-goal__n { font-family: var(--font-serif); font-size: 30px; line-height: 1; color: var(--gold); }
.cs-goal p { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--navy); line-height: 1.5; }

.cs-cs { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; margin-top: 26px; }
.cs-panel { border-radius: var(--radius-m); padding: clamp(24px, 2.6vw, 34px); }
.cs-panel h3 { font-size: clamp(21px, 1.8vw, 26px); margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.cs-panel--challenge { background: var(--ivory); border: 1px solid var(--line); }
.cs-panel--strategy { background: #fff; border: 1px solid var(--gold-line); box-shadow: var(--shadow-soft); }
.cs-panel__ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.cs-panel--challenge .cs-panel__ico { background: rgba(207, 95, 69, 0.12); color: var(--coral); }
.cs-panel--strategy .cs-panel__ico { background: var(--gold-soft); color: var(--gold); }
.cs-list li { position: relative; padding-left: 22px; color: var(--slate); font-size: 15.5px; line-height: 1.6; }
.cs-list li + li { margin-top: 12px; }
.cs-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--coral); }
.cs-steps { counter-reset: step; }
.cs-steps li { position: relative; padding-left: 50px; counter-increment: step; }
.cs-steps li + li { margin-top: 18px; }
.cs-steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 1px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--navy); background: var(--champagne); }
.cs-steps li:not(:last-child)::after { content: ""; position: absolute; left: 16.5px; top: 40px; bottom: -14px; width: 1px; background: var(--gold-line); }
.cs-steps b { display: block; color: var(--navy); font-size: 16px; margin-bottom: 2px; }
.cs-steps span { color: var(--slate); font-size: 15px; line-height: 1.6; }

.cs-conclusion { position: relative; padding: clamp(28px, 3.4vw, 44px) clamp(26px, 3.4vw, 48px); border-radius: var(--radius-m); background: var(--sand); overflow: hidden; }
.cs-conclusion::before { content: "\201C"; position: absolute; right: 24px; top: -28px; font-family: var(--font-serif); font-size: 200px; line-height: 1; color: var(--gold); opacity: 0.18; }
.cs-conclusion p { position: relative; font-family: var(--font-serif); font-size: clamp(20px, 1.8vw, 26px); line-height: 1.45; color: var(--navy); max-width: 46ch; font-weight: 300; }

/* ---------- Sidebar ---------- */
.cs-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; }
.cs-card { border-radius: var(--radius-m); padding: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.cs-card h3 { font-family: var(--font-sans); font-size: 11.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.cs-svc li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; font-weight: 600; color: var(--navy); line-height: 1.45; }
.cs-svc li + li { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.cs-svc svg { flex: none; margin-top: 2px; color: var(--mint); }
.cs-card--navy { background: var(--panel-gradient); border-color: transparent; color: var(--soft-white); box-shadow: var(--shadow-navy); }
.cs-card--navy h3 { color: var(--gold-bright); }
.cs-card--navy p { font-family: var(--font-serif); font-size: 22px; line-height: 1.25; color: var(--soft-white); margin-bottom: 20px; }
.cs-card--navy .btn { width: 100%; }
.cs-card--navy .cs-call { display: block; margin-top: 14px; text-align: center; font-size: 14px; color: rgba(247, 248, 250, 0.75); }
.cs-card--navy .cs-call:hover { color: var(--gold-bright); }

.cs-note { margin-top: 34px; font-size: 13.5px; color: var(--slate-2); max-width: 72ch; }

/* ---------- More case studies / success stories grid ---------- */
.cs-more { background: var(--ivory); border-top: 1px solid var(--line); }
.cs-more__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 34px; }
.cs-more__head h2 { font-size: clamp(28px, 3vw, 44px); }
.cs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 26px); }
.cs-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-tile { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-m); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-card); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.cs-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.cs-tile__img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-deep); }
.cs-tile__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.cs-tile:hover .cs-tile__img img { transform: scale(1.05); }
.cs-tile__stat { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: baseline; gap: 10px; padding: 10px 16px; border-radius: 14px; background: rgba(7, 22, 43, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--soft-white); }
.cs-tile__stat b { font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1; color: var(--gold-bright); }
.cs-tile__stat span { font-size: 12.5px; font-weight: 600; max-width: 18ch; line-height: 1.3; }
.cs-tile__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.cs-tile__loc { font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.cs-tile h3 { font-size: clamp(21px, 1.7vw, 25px); margin-top: 8px; }
.cs-tile p { margin-top: 10px; font-size: 15px; color: var(--slate); line-height: 1.6; }
.cs-tile .link-arrow { margin-top: auto; padding-top: 18px; }

/* Featured (first) story on the listing page */
.cs-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border-radius: var(--radius-l); overflow: hidden; background: var(--panel-gradient); color: var(--soft-white); box-shadow: var(--shadow-navy); margin-bottom: clamp(22px, 2.4vw, 30px); transition: transform 0.5s var(--ease); }
.cs-feature:hover { transform: translateY(-4px); }
.cs-feature__img { position: relative; min-height: 380px; overflow: hidden; }
.cs-feature__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.cs-feature:hover .cs-feature__img img { transform: scale(1.04); }
.cs-feature__body { padding: clamp(28px, 3.6vw, 52px); display: flex; flex-direction: column; justify-content: center; }
.cs-feature__body .cs-tile__loc { color: var(--gold-bright); }
.cs-feature__body h3 { color: var(--soft-white); font-size: clamp(28px, 2.8vw, 40px); margin-top: 10px; }
.cs-feature__body p { color: rgba(247, 248, 250, 0.75); margin-top: 14px; }
.cs-feature__nums { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 14px clamp(18px, 3vw, 40px); margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(247, 248, 250, 0.14); }
.cs-feature__nums b { display: block; font-family: var(--font-serif); font-weight: 400; font-size: clamp(32px, 3vw, 44px); line-height: 1; color: var(--gold-bright); }
.cs-feature__nums span { display: block; margin-top: 6px; font-size: 13px; color: rgba(247, 248, 250, 0.7); }
.cs-feature .link-arrow { margin-top: 26px; color: var(--gold-bright); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cs-story__grid { grid-template-columns: 1fr; }
  .cs-aside { position: static; grid-template-columns: 1fr 1fr; }
  .cs-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-glance > div:nth-child(3) { border-left: 0; }
  .cs-glance > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 1024px) {
  .cs-hero__grid { grid-template-columns: 1fr; }
  .cs-hero__media { max-width: 620px; }
  .cs-hero__frame { aspect-ratio: 16 / 11; }
  .cs-badge { left: 16px; bottom: 16px; min-width: 0; padding: 16px 20px; }
  .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-feature { grid-template-columns: 1fr; }
  .cs-feature__img { min-height: 280px; }
}
@media (max-width: 760px) {
  .cs-stats { grid-template-columns: 1fr; }
  .cs-stat, .cs-stat + .cs-stat { padding: 22px 0 18px; border-left: 0; }
  .cs-stat + .cs-stat { border-top: 1px solid rgba(247, 248, 250, 0.14); }
  .cs-cs { grid-template-columns: 1fr; }
  .cs-aside { grid-template-columns: 1fr; }
  .cs-grid, .cs-grid--2 { grid-template-columns: 1fr; }
  .cs-hero h1 .italic-accent { white-space: normal; }
}
@media (max-width: 520px) {
  .cs-glance { grid-template-columns: 1fr; }
  .cs-glance > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .cs-badge__v { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-tile, .cs-feature, .cs-tile__img img, .cs-feature__img img { transition: none; }
}
