/* ==========================================================================
   05-case-study.css  |  PAGE STYLES: diving-school.html, ecommerce-website-redesign.html, cat-cafe.html
   Shared by the three immersive case-study pages. Loads after 00-global.css.
   Each page picks a colour theme with <body class="theme-ocean|theme-commerce|theme-cafe">.
   Parallax layers are moved by assets/js/case-study.js (data-speed).
   ========================================================================== */
:root {
  --font-head: "Merriweather", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --page-bg: #101213; --surface: #16191c; --surface-border: rgba(255,255,255,.08);
  --chip-bg: rgba(255,255,255,.04); --chip-border: rgba(255,255,255,.10);
  --text: #ffffff; --text-soft: #c9ced6; --text-muted: #7f8792;
  --accent: #f45a0a; --accent-hover: #ff6d22; --accent-soft: rgba(244,90,10,.12);
  --sea: #35c9dc; --sea-soft: rgba(53,201,220,.12);
  --toggle-bg: rgba(255,255,255,.08); --toggle-border: rgba(255,255,255,.16);
  --glass-bg: linear-gradient(145deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.05) 100%);
  --glass-border: rgba(255,255,255,.22); --glass-highlight: rgba(255,255,255,.28); --glass-shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px; --gap: 20px; --page-pad: clamp(16px, 2.5vw, 48px); --content: 1120px;
  --deep-1: #03101a; --deep-2: #07324a; --deep-3: #0c6b86;
}
:root[data-theme="light"] {
  --page-bg: #f4f2ee; --surface: #ffffff; --surface-border: rgba(0,0,0,.08);
  --chip-bg: #f7f5f2; --chip-border: rgba(0,0,0,.08);
  --text: #161616; --text-soft: #4a4f57; --text-muted: #6b6b6b;
  --accent: #d94e05; --accent-hover: #bf4404; --accent-soft: rgba(217,78,5,.10);
  --sea: #0a7f92; --sea-soft: rgba(10,127,146,.10);
  --toggle-bg: #ffffff; --toggle-border: rgba(0,0,0,.12);
  --glass-bg: linear-gradient(145deg, rgba(255,255,255,.75) 0%, rgba(255,255,255,.35) 100%);
  --glass-border: rgba(0,0,0,.10); --glass-highlight: rgba(255,255,255,.9); --glass-shadow: 0 10px 30px rgba(0,0,0,.12);
}
* { box-sizing: border-box; }
html { background: var(--page-bg); scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--page-bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.65; transition: background-color 400ms ease, color 400ms ease; overflow-x: clip; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; margin: 0; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: calc(var(--content) + var(--page-pad) * 2); margin: 0 auto; padding: 0 var(--page-pad); }
.wrap.narrow { max-width: calc(820px + var(--page-pad) * 2); }
.page { width: 100%; max-width: calc(var(--content) + var(--page-pad) * 2); margin: 0 auto; padding: 0 var(--page-pad) 24px; }
.card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius); transition: background-color 400ms ease, border-color 250ms ease, transform 250ms ease; }
.pad { padding: 32px; }
.pad p { margin: 8px 0 0; color: var(--text-soft); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: min(100svh, 920px); margin-top: -1px; padding: 120px 0 152px; overflow: hidden; color: #fff; background: radial-gradient(120% 90% at 50% 0%, var(--deep-3) 0%, var(--deep-2) 45%, var(--deep-1) 100%); }
.hero-bg { position: absolute; inset: -12% 0; z-index: -4; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .55; mix-blend-mode: luminosity; }
.hero-tint { position: absolute; inset: 0; z-index: -3; background: linear-gradient(180deg, rgba(3,16,26,.55) 0%, rgba(7,50,74,.35) 45%, rgba(3,16,26,.85) 100%); }
.hero-fish { position: absolute; z-index: -1; right: 4%; top: 26%; width: clamp(160px, 22vw, 360px); height: auto; opacity: .9; animation: drift 14s ease-in-out infinite alternate; pointer-events: none; }
.hero-bub { position: absolute; z-index: -1; height: auto; pointer-events: none; opacity: .75; }
.hb1 { left: 3%; bottom: 8%; width: clamp(90px, 12vw, 200px); }
.hb2 { right: 14%; bottom: 14%; width: clamp(70px, 9vw, 150px); }
@keyframes drift { from { translate: -26px 0; } to { translate: 26px -12px; } }
.bubbles { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bubbles span { position: absolute; left: var(--x); bottom: -40px; width: var(--s); height: var(--s); border-radius: 50%; border: 1px solid rgba(255,255,255,.55); background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), rgba(255,255,255,.06) 60%); animation: rise-b var(--d) linear var(--dl) infinite; }
@keyframes rise-b { from { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } to { transform: translate(var(--dr), -105vh); opacity: 0; } }
.hero-inner { position: relative; }
.hero-kicker { display: inline-block; margin: 0 0 16px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { font-size: clamp(40px, 6.4vw, 92px); line-height: 1.04; letter-spacing: -.02em; max-width: 18ch; text-shadow: 0 4px 30px rgba(0,0,0,.4); }
.hero h1 span { display: block; color: var(--sea); }
.hero-lead { max-width: 640px; margin: 24px 0 0; font-size: clamp(17px, 1.4vw, 21px); color: rgba(255,255,255,.88); }
.metrics { display: flex; flex-wrap: wrap; gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; }
.metric { min-width: 170px; padding: 16px 24px; border-radius: 16px; border: 1px solid rgba(255,255,255,.22); background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); box-shadow: 0 10px 30px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.25); }
.metric b { display: block; font: 800 clamp(34px, 3.4vw, 48px)/1 var(--font-body); color: #fff; font-variant-numeric: tabular-nums; }
.metric span:not(.plus):not(.count):not(.pct) { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; color: rgba(255,255,255,.8); }
.plus, .pct { color: var(--sea); }
.scroll-cue { display: grid; place-items: center; width: 48px; height: 48px; margin-top: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); color: #fff; animation: bob 2.2s ease-in-out infinite; }
.scroll-cue svg { width: 22px; height: 22px; }
@keyframes bob { 50% { transform: translateY(8px); } }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(40px, 7vw, 90px); fill: var(--page-bg); transition: fill 400ms ease; }

/* ---------- Facts ---------- */
.facts { padding: 8px 0 0; }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; }
.fact:last-child { grid-column: 1 / -1; }
.fact { padding: 16px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--surface-border); }
.fact dt { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sea); }
.fact dd { margin: 8px 0 0; font-weight: 700; line-height: 1.4; }

/* ---------- Sections ---------- */
.ds-sec { padding: clamp(56px, 8vw, 110px) 0 0; }
.eyebrow { display: flex; align-items: center; gap: 16px; margin: 0 0 16px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.eyebrow span { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--sea-soft); color: var(--sea); letter-spacing: .04em; }
.ds-h2 { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.15; letter-spacing: -.015em; max-width: 22ch; margin-bottom: 32px; }
.h3 { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.3; margin-top: 16px; }
.h3.big { margin-top: 0; font-size: clamp(24px, 2.2vw, 32px); }
.h4 { font-size: 17px; line-height: 1.3; }
.lead { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.6; color: var(--text); margin: 0 0 16px; }
.two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.two p:not(.lead) { color: var(--text-soft); margin: 0; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.card.pad:hover { border-color: color-mix(in srgb, var(--sea) 50%, transparent); transform: translateY(-4px); }
.ic { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; color: var(--sea); background: var(--sea-soft); }
.ic svg { width: 26px; height: 26px; }
.ic.sm { width: 42px; height: 42px; border-radius: 12px; }
.ic.sm svg { width: 22px; height: 22px; }
.ticks { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 32px; color: var(--text-soft); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%; background: var(--sea-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2335c9dc' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/11px no-repeat; }
.ticks.num { counter-reset: n; }
.ticks.num li::before { counter-increment: n; content: counter(n); top: .15em; width: 22px; height: 22px; display: grid; place-items: center; background-image: none; color: var(--sea); font-size: 12px; font-weight: 800; }
.ticks.num li { padding-left: 32px; }

/* ---------- Parallax image bands ---------- */
.band { position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(340px, 62vh, 600px); margin-top: clamp(56px, 8vw, 110px); overflow: hidden; color: #fff; background: linear-gradient(160deg, var(--deep-3), var(--deep-2) 50%, var(--deep-1)); }
.band-img { position: absolute; inset: -20% 0; z-index: -2; will-change: transform; }
.band-img img { width: 100%; height: 100%; object-fit: cover; }
.band-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3,16,26,.82) 0%, rgba(3,16,26,.45) 55%, rgba(3,16,26,.15) 100%); }
.band-quote { margin: 0; max-width: 20ch; font: 700 clamp(28px, 4.2vw, 60px)/1.12 var(--font-head); letter-spacing: -.015em; text-shadow: 0 4px 30px rgba(0,0,0,.45); }
.band-sub { margin: 16px 0 0; font-size: clamp(16px, 1.4vw, 20px); color: rgba(255,255,255,.85); }
.band + .ds-sec { padding-top: clamp(56px, 8vw, 110px); }

/* ---------- Research ---------- */
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-bottom: clamp(28px, 4vw, 48px); }
.method { display: flex; gap: 16px; align-items: flex-start; padding: 16px 24px; border-radius: 14px; border: 1px solid var(--surface-border); background: var(--surface); }
.method p { margin: 4px 0 0; font-size: 15px; color: var(--text-soft); }
.bigstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.bigstat { padding: clamp(22px, 3vw, 36px) 8px; border-top: 3px solid var(--sea); }
.bigstat b { display: block; font: 800 clamp(52px, 6.4vw, 96px)/1 var(--font-body); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bigstat > span:last-child { display: block; margin-top: 16px; max-width: 28ch; color: var(--text-soft); }

/* ---------- Process steps ---------- */
.steps { position: relative; margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.steps::before { content: ""; position: absolute; left: 21px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--sea), color-mix(in srgb, var(--sea) 15%, transparent)); }
.step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.step-n { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--page-bg); border: 2px solid var(--sea); color: var(--sea); font-weight: 800; }
.step-card { display: flex; gap: 16px; align-items: flex-start; }
.step-card p { margin: 4px 0 0; color: var(--text-soft); }

/* ---------- Decisions ---------- */
.decision p { max-width: 46ch; }

/* ---------- Gallery ---------- */
.gallery { padding-top: 32px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 14vw, 200px); gap: var(--gap); }
.shot { margin: 0; position: relative; }
.shot.tall { grid-column: span 4; grid-row: span 4; }
.shot.sq { grid-column: span 4; grid-row: span 2; }
.shot.wide { grid-column: span 8; grid-row: span 2; }
.shot-in { height: 100%; will-change: transform; }
.shot-btn { display: block; width: 100%; height: 100%; padding: 0; border: 1px solid var(--surface-border); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: linear-gradient(160deg, var(--deep-3), var(--deep-2) 55%, var(--deep-1)); }
.shot-btn img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 700ms cubic-bezier(.22,1,.36,1); }
.shot-btn:hover img { transform: scale(1.05); }
.sysrow { margin-top: clamp(28px, 4vw, 48px); }

/* ---------- Results ---------- */
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.result { padding: 32px; background: linear-gradient(160deg, color-mix(in srgb, var(--sea) 12%, var(--surface)), var(--surface)); }
.rnum { display: block; font: 800 clamp(56px, 6vw, 92px)/1 var(--font-body); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.result .h4 { margin-top: 16px; font-size: 20px; }
.result p { margin: 4px 0 0; }
.bar { display: block; height: 8px; margin-top: 24px; border-radius: 99px; background: var(--chip-bg); border: 1px solid var(--chip-border); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--sea), var(--accent)); transition: width 1400ms cubic-bezier(.22,1,.36,1) 200ms; }
.is-in .bar i, .no-js .bar i { width: var(--w); }

/* ---------- Conclusion / CTA ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; padding: 0; list-style: none; }
.tags li { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--chip-border); background: var(--chip-bg); font-size: 14px; font-weight: 700; }
.cta { padding: clamp(28px, 4vw, 52px); text-align: center; background: linear-gradient(160deg, color-mix(in srgb, var(--sea) 14%, var(--surface)), var(--surface) 70%); }
.cta p { max-width: 560px; margin: 16px auto 0; color: var(--text-soft); }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 12px; border: 1px solid transparent; font: 700 16px/1 var(--font-body); text-decoration: none; transition: background-color 250ms ease, border-color 250ms ease, transform 250ms ease, color 250ms ease; }
.btn svg { width: 18px; height: 18px; transition: transform 250ms ease; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost { background: var(--chip-bg); border-color: var(--chip-border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Depth gauge ---------- */
.depth { position: fixed; z-index: 30; right: clamp(10px, 1.4vw, 28px); top: 50%; transform: translateY(-50%); display: none; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-bg); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); box-shadow: var(--glass-shadow); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); opacity: 0; transition: opacity 300ms ease; pointer-events: none; }
.depth.is-on { opacity: 1; }
.depth-track { position: relative; width: 4px; height: min(34vh, 260px); border-radius: 4px; background: linear-gradient(var(--sea), var(--deep-2)); }
.depth-mark { position: absolute; left: 50%; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.depth-val { min-width: 44px; text-align: center; color: var(--text); font-variant-numeric: tabular-nums; }
@media (min-width: 1280px) { .depth { display: flex; } }

/* ---------- Lightbox ---------- */
.lightbox { width: min(94vw, 1200px); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(3,16,26,.88); backdrop-filter: blur(6px); }
.lightbox img { display: block; max-width: 100%; max-height: 88vh; margin: 0 auto; border-radius: var(--radius); }
.lb-close { position: absolute; top: -14px; right: -6px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.lb-close svg { width: 20px; height: 20px; }

/* ---------- Footer + back to top (same as other pages) ---------- */
.page-footer { padding: 32px 16px 0; color: var(--text-muted); font-size: 14px; text-align: center; }
.back-to-top { position: fixed; right: clamp(16px, 2vw, 40px); bottom: clamp(16px, 2vw, 40px); z-index: 20; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text); cursor: pointer; backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight); opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity 300ms ease, transform 300ms ease, visibility 300ms, color 400ms ease, border-color 400ms ease; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top svg { width: 22px; height: 22px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal-on-scroll { opacity: 0; transform: translateY(28px); }
.js .reveal-on-scroll.is-in { opacity: 1; transform: none; transition: opacity 700ms ease, transform 700ms cubic-bezier(.22,1,.36,1); }
.js .reveal-on-scroll.card.pad.is-in:hover { transform: translateY(-4px); }

/* ---------- Responsive ---------- */
@media (max-width: 1023.98px) {
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two, .trio, .results, .bigstats, .methods { grid-template-columns: minmax(0, 1fr); }
  .quad, .duo { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 30vw, 260px); }
  .shot.tall { grid-column: span 1; grid-row: span 2; }
  .shot.sq { grid-column: span 1; grid-row: span 1; }
  .shot.wide { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 575.98px) {
  .hero { padding: 96px 0 120px; }
  .metric { flex: 1 1 calc(50% - 14px); min-width: 0; padding: 16px 16px; }
  .facts-grid { grid-template-columns: minmax(0, 1fr); }
  .pad { padding: 24px; }
  .gallery { grid-template-columns: minmax(0, 1fr); grid-auto-rows: clamp(200px, 60vw, 320px); }
  .shot.tall, .shot.sq, .shot.wide { grid-column: span 1; grid-row: span 1; }
  .shot.tall { grid-row: span 2; }
  .band-shade { background: linear-gradient(180deg, rgba(3,16,26,.55), rgba(3,16,26,.8)); }
}
@media (min-width: 1920px) { :root { --content: 1280px; } }
@media (min-width: 2560px) {
  :root { --content: 1700px; }
  body { font-size: 20px; }
  .hero-lead, .lead { font-size: 28px; } .metric span:not(.plus):not(.count):not(.pct), .eyebrow, .fact dt { font-size: 17px; }
  .back-to-top { width: 68px; height: 68px; } .back-to-top svg { width: 28px; height: 28px; }
  .page-footer { font-size: 18px; }
}
@media (min-width: 3840px) { :root { --content: 2200px; } body { font-size: 26px; } .page-footer { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bubbles, .hero-fish, .scroll-cue { animation: none; }
  .bubbles span { animation: none; opacity: .35; bottom: 20%; }
  .js .reveal-on-scroll { opacity: 1; transform: none; }
  .bar i { transition: none; width: var(--w); }
  .card, .btn, .btn svg, .shot-btn img, .back-to-top { transition: none; }
  .card.pad:hover, .btn:hover { transform: none; }
  .band-img, .shot-in, .hero-bg { transform: none !important; }
}


/* ==========================================================================
   Theme variants (hero, bands and accents)
   ========================================================================== */
.theme-commerce { --sea: #8ea2ff; --sea-soft: rgba(142,162,255,.14); --deep-1: #0b0d18; --deep-2: #1b2145; --deep-3: #3b3f9e; }
:root[data-theme="light"] .theme-commerce { --sea: #3f55d1; --sea-soft: rgba(63,85,209,.10); }
.theme-cafe { --sea: #ffb347; --sea-soft: rgba(255,179,71,.14); --deep-1: #1a0f08; --deep-2: #4a2a14; --deep-3: #a05a1f; }
:root[data-theme="light"] .theme-cafe { --sea: #b4630a; --sea-soft: rgba(180,99,10,.10); }
.ticks li::before { background-image: none; }
.ticks li::after { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; background: var(--sea); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/11px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/11px no-repeat; }
.ticks.num li::after { display: none; }
/* e-commerce: floating UI squares */
.theme-commerce .hero-bg img { opacity: .5; mix-blend-mode: luminosity; }
/* cat cafe: soft warm glows, like steam and lamp light */
.theme-cafe .hero-bg img { opacity: .5; mix-blend-mode: normal; }
.hero-fg { position: absolute; z-index: -1; right: 4%; bottom: 14%; width: clamp(220px, 30vw, 520px); height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.45)); pointer-events: none; }
@media (max-width: 767.98px) { .hero-fg { opacity: .35; right: -8%; } }
/* photo-style foreground (a mockup with its own dark backdrop): fade the edges so it blends into the hero */
.hero-fg[src$=".jpg"] { border-radius: 24px; -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%); filter: none; }

/* ==========================================================================
   Extra components used by the e-commerce and cat cafe pages
   ========================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.chips li { padding: 4px 16px; border-radius: 999px; border: 1px solid var(--chip-border); background: var(--chip-bg); color: var(--text-soft); font-size: 13px; font-weight: 700; }
.h3.t0 { margin-top: 0; }
.target { margin: 16px 0 0 !important; padding-top: 16px; border-top: 1px dashed var(--chip-border); font-size: 14px; font-weight: 700; color: var(--sea) !important; }
.impact { margin-top: var(--gap); }
.note { max-width: 62ch; margin: 32px 0 0; padding-left: 16px; border-left: 3px solid var(--sea); color: var(--text-soft); font-size: 17px; }
.quote .lead { margin-bottom: 8px; }
.quote .hmw { color: var(--text-soft); margin: 0; }
.quote .hmw b { color: var(--sea); }
.quote { margin-bottom: var(--gap); border-left: 4px solid var(--sea); }
.subhead { margin: clamp(32px, 4vw, 52px) 0 18px; font-size: clamp(20px, 2vw, 28px); }
.mini { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 14px; color: var(--text-soft); }
.mini li::before { content: "\2022"; margin-right: 8px; color: var(--sea); }
.methods:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.rgrid.sm { margin-top: var(--gap); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.rstats { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.rstats li { display: flex; align-items: baseline; gap: 16px; }
.rstats b { flex: none; min-width: 3.2ch; font: 800 clamp(26px, 2.4vw, 34px)/1 var(--font-body); color: var(--sea); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.rstats span { color: var(--text-soft); font-size: 15px; line-height: 1.35; }
.rstats.one { margin: 0; }
.rstats.one b { color: var(--text); font-size: clamp(32px, 3vw, 44px); }
.rstats.one li { flex-direction: column; gap: 8px; }
.rgrid.sm .card.pad { padding: 24px; }
.step-card .chips { margin-top: 16px; }

/* tall full-page screenshots: pan down on hover */
.shot figcaption { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 4px 16px; border-radius: 999px; background: rgba(3,10,18,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.shot.scrolly .shot-btn img { object-position: center top; transition: object-position 7s linear, transform 700ms cubic-bezier(.22,1,.36,1); }
.shot.scrolly .shot-btn:hover img, .shot.scrolly .shot-btn:focus-visible img { object-position: center bottom; transform: none; }
.hint { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--text-muted); }
.theme-commerce .gallery { grid-auto-rows: clamp(150px, 17vw, 260px); }

@media (max-width: 1023.98px) {
  .rgrid { grid-template-columns: minmax(0, 1fr); }
  .methods:has(> :nth-child(4)) { grid-template-columns: minmax(0, 1fr); }
  .theme-commerce .shot.tall { grid-column: span 1; grid-row: span 2; }
}
@media (max-width: 575.98px) {
  .theme-commerce .shot.tall { grid-row: span 2; }
}
@media (prefers-reduced-motion: reduce) { .shot.scrolly .shot-btn img { transition: none; } }

.hint { margin-top: 48px; }
.bigstats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rgrid.sm { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.theme-commerce .hero-tint { background: linear-gradient(180deg, rgba(8,10,22,.78) 0%, rgba(14,18,44,.62) 45%, rgba(8,10,22,.92) 100%); }
.theme-cafe .hero-tint { background: linear-gradient(180deg, rgba(20,10,4,.7) 0%, rgba(40,22,10,.5) 45%, rgba(20,10,4,.9) 100%); }
@media (max-width: 1199.98px) { .rgrid.sm { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bigstats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .rgrid.sm, .bigstats.four { grid-template-columns: minmax(0, 1fr); } }
.bigstats.four .bigstat b { font-size: clamp(44px, 4.6vw, 72px); }

/* ==========================================================================
   Cat cafe: paw prints (hero loop + a trail that is stamped down as you scroll)
   ========================================================================== */
.paw, .paw-trail .p { --paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cellipse cx='32' cy='42' rx='15' ry='12'/%3E%3Cellipse cx='11' cy='28' rx='6' ry='8.5' transform='rotate(-20 11 28)'/%3E%3Cellipse cx='24' cy='15' rx='6' ry='9'/%3E%3Cellipse cx='40' cy='15' rx='6' ry='9'/%3E%3Cellipse cx='53' cy='28' rx='6' ry='8.5' transform='rotate(20 53 28)'/%3E%3C/svg%3E"); background: var(--sea); -webkit-mask: var(--paw) center/contain no-repeat; mask: var(--paw) center/contain no-repeat; }
.paws { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.paws .paw { position: absolute; left: var(--x); top: var(--y); width: clamp(34px, 3.6vw, 56px); aspect-ratio: 1; margin: -20px 0 0 -20px; rotate: var(--r); opacity: 0; animation: paw-step 10s ease-in-out infinite; animation-delay: calc(var(--i) * .7s); }
@keyframes paw-step { 0% { opacity: 0; scale: .55; } 6% { opacity: .5; scale: 1.08; } 10% { scale: 1; } 62% { opacity: .5; } 80%, 100% { opacity: 0; } }

.has-trail { position: relative; }
.paw-trail { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.paw-trail .p { position: absolute; width: clamp(26px, 2.6vw, 42px); aspect-ratio: 1; opacity: 0; scale: .5; }
.paw-trail .p.is-down { opacity: .34; scale: 1; transition: opacity 500ms ease, scale 450ms cubic-bezier(.3,1.6,.5,1); }
.has-trail .facts, .has-trail .ds-sec { position: relative; z-index: 1; }
@media (max-width: 767.98px) { .paw-trail .p { width: 24px; } .paw-trail .p.is-down { opacity: .26; } }
@media (prefers-reduced-motion: reduce) { .paws .paw { animation: none; opacity: .3; } .paw-trail .p, .paw-trail .p.is-down { opacity: .22; scale: 1; transition: none; } }

/* ==========================================================================
   E-commerce: floating wireframe product cards in the hero + cart gauge
   ========================================================================== */
.shop { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.wf { position: absolute; left: var(--x); top: var(--y); width: var(--w); padding: 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,.28); background: linear-gradient(150deg, rgba(255,255,255,.16), rgba(255,255,255,.04)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 18px 40px rgba(0,0,0,.35); rotate: var(--r); opacity: .75; animation: wf-float 9s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.4s); display: grid; gap: 8px; }
.wf i { display: block; border-radius: 6px; background: rgba(255,255,255,.2); }
.wf-img { aspect-ratio: 4 / 3; border-radius: 9px !important; background: linear-gradient(135deg, rgba(142,162,255,.45), rgba(142,162,255,.1)) !important; }
.wf-l { height: 8px; width: 88%; }
.wf-l.s { width: 55%; }
.wf-row { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; }
.wf-price { height: 12px; width: 38%; background: rgba(255,255,255,.38) !important; }
.wf-btn { height: 18px; width: 40%; border-radius: 99px !important; background: var(--accent) !important; opacity: .9; }
@keyframes wf-float { from { translate: 0 -10px; } to { translate: 0 12px; } }
@media (max-width: 767.98px) { .wf { opacity: .35; } .wf:nth-child(n+4) { display: none; } }
@media (prefers-reduced-motion: reduce) { .wf { animation: none; } }
.depth-ic { width: 20px; height: 20px; color: var(--accent); }

/* Wide conclusion / CTA: same width as the other sections (replaces .wrap.narrow at the bottom of case studies) */
.wrap.concl-wide .lead { max-width: 64ch; }
.wrap.concl-wide .faqs { max-width: none; }
/* Skills / methods / industry chip rows (shared by every case study) */
.facts-tags { padding: clamp(18px, 2.4vw, 28px) 0 0; }
.facts-tags .wrap { display: grid; gap: 16px; }
.ft-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ft-label { flex: 0 0 136px; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); }
.ft-row .chips { margin: 0; flex: 1 1 320px; min-width: 0; }
@media (max-width: 639.98px) { .ft-label { flex-basis: 100%; } }
