/*
 * THE VAL — Unified Design System
 * ═══════════════════════════════════════════════════
 *  Shared tokens, reset, layout, nav, footer, contacts,
 *  case-card grid, overlay/modal, and case-page chrome.
 *  Page-specific sections live in each HTML <style> block.
 * ═══════════════════════════════════════════════════
 */


/* ─── 1. TOKENS ──────────────────────────────────── */
:root {
  /* Brand */
  --y:        #F5C842;
  --y-bg:     #FDFBF0;
  --y-dark:   #3D2800;
  --accent:   #c8641e;
  --accent-bg: rgba(200,100,30,.10);

  /* Neutrals */
  --black:  #0D0D0C;
  --ink:    #0e0d0b;
  --ink2:   #3a3832;
  --g700:   #2D3748;
  --g500:   #6B7A8D;
  --muted:  #6b7a8d;
  --g200:   #DDE3EA;
  --border: #e6e3dd;
  --surf:   #f4f2ee;
  --g50:    #F7F9FB;
  --white:  #FFFFFF;
  --dark:   #131210;

  /* Borders */
  --bd:  rgba(100,120,150,.12);
  --bd2: rgba(100,120,150,.18);

  /* Brand color */
  --telegram: #2AABEE;

  /* Typography */
  --sans:    -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'DM Sans', sans-serif;
  --display: var(--sans);
  --font:    var(--sans);

  --text-xs:      11px;
  --text-sm:      12px;
  --text-base:    13px;
  --text-md:      14px;
  --text-lg:      15px;
  --text-xl:      17px;
  --text-2xl:     18px;
  --text-display: clamp(24px,2.4vw,34px);
  --text-section: clamp(26px,3.8vw,40px);
  --text-hero:    clamp(32px,5vw,56px);

  /* Spacing */
  --sp1:  4px;  --sp2:  8px;  --sp3:  12px; --sp4:  16px;
  --sp5:  20px; --sp6:  24px; --sp8:  32px; --sp10: 40px;
  --sp12: 48px; --sp16: 64px; --sp20: 80px;
  /* legacy aliases */
  --space-1:  4px;  --space-2:  8px;  --space-3:  12px; --space-4:  16px;
  --space-5:  20px; --space-6:  24px; --space-8:  32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-22: 88px;

  /* Radius */
  --r-sm:   8px;  --r-btn: 10px; --r-md:   14px;
  --r-card: 16px; --r-xl:  20px; --r-full: 9999px;

  /* Motion */
  --ease:           cubic-bezier(.4,0,.2,1);
  --ease-reveal:    cubic-bezier(.76,0,.24,1);
  --dur-fast:  .12s; --dur-base: .15s;
  --dur-slow:  .4s;  --dur-panel: .55s;
  /* legacy */
  --duration-fast: .12s; --duration-base: .15s;
  --duration-slow: .4s;  --duration-panel: .55s;

  /* Layout */
  --container:  1160px;
  --nav-h:      56px;
  --section-py: 88px;
}


/* ─── 2. RESET & BASE ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}

a  { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }


/* ─── 3. LAYOUT ─────────────────────────────────── */
.w {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp10);
  position: relative;
  z-index: 1;
}

section { padding: var(--section-py) 0; }


/* ─── 4. NAVIGATION ─────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(249,247,243,.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-base);
}
.nav.scrolled { box-shadow: 0 2px 16px rgba(14,13,11,.06); }

.nav-in {
  max-width: var(--container); width: 100%;
  margin: 0 auto; padding: 0 var(--sp10);
  display: flex; align-items: center; justify-content: space-between;
}

/* Logo */
.nav-logo {
  font-family: var(--display); font-size: 15px; font-weight: 700;
  color: var(--ink); letter-spacing: -.01em;
  display: flex; align-items: center; gap: var(--sp2);
}
.nav-logo-mark {
  width: 30px; height: 30px; background: var(--ink); color: var(--white);
  border-radius: var(--r-sm); display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700;
}
/* Legacy logo style (index.html uses text logo) */
.nav-logo-text { color: var(--y); }

.nav-links {
  display: flex; align-items: center; gap: var(--sp5);
}

.nav-link {
  font-size: var(--text-md); font-weight: 400; color: #6B6B68;
  letter-spacing: -.01em; padding: 5px var(--sp3);
  border-radius: var(--r-sm); line-height: 1.4;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-link:hover  { background: var(--surf); color: var(--ink); }
.nav-link:active { background: var(--border); color: var(--ink); }

.nav-cta {
  display: inline-flex; align-items: center; gap: var(--sp1);
  padding: 6px 14px; background: var(--ink); color: var(--white);
  font-size: var(--text-base); font-weight: 500;
  border-radius: var(--r-btn); letter-spacing: -.01em;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  margin-left: var(--sp1);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.nav-cta:hover  { background: #2C2C2A; border-color: rgba(255,255,255,.18); }
.nav-cta:active { background: #111110; transform: scale(.98); }
.nav-cta svg    { flex-shrink: 0; }

/* Hamburger */
.hbg {
  display: none; flex-direction: column; gap: var(--sp1);
  padding: var(--sp1); cursor: pointer;
}
.hbg span {
  display: block; width: 20px; height: 1.5px;
  background: var(--black); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s;
}
.hbg.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hbg.open span:nth-child(2) { opacity: 0; }
.hbg.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }


/* ─── 5. CONTACTS BLOCK ─────────────────────────── */
.contacts {
  background: var(--dark);
  padding: var(--sp20) 0;
  overflow-x: hidden;
}
.contacts-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--sp10);
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: start;
}
.contacts-left .c-label {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: var(--sp4);
}
.contacts-left .c-title {
  font-family: var(--display); font-size: clamp(28px,4vw,48px); font-weight: 800;
  letter-spacing: -.03em; color: #fff; line-height: 1.1; margin-bottom: var(--sp2); white-space: nowrap;
}
.contacts-left .c-sub {
  font-size: var(--text-md); color: rgba(255,255,255,.4); line-height: 1.6;
  max-width: 400px; margin-bottom: var(--sp8);
}
.contacts-left .c-btn {
  display: inline-flex; align-items: center; gap: var(--sp2);
  height: 44px; padding: 0 22px;
  background: var(--y); color: var(--y-dark);
  font-weight: 700; font-size: var(--text-base);
  border-radius: var(--r-btn); letter-spacing: -.01em;
  transition: filter .15s;
}
.contacts-left .c-btn:hover { filter: brightness(1.08); }

.contacts-right { display: flex; flex-direction: column; gap: var(--sp3); padding-top: 0; }
.c-link {
  display: flex; align-items: center; gap: var(--sp3);
  padding: var(--sp4) var(--sp5); border-radius: var(--r-md);
  background: rgb(31 30 28 / 95%); border: 1px solid rgba(255,255,255,.08);
  transition: background .15s, border-color .15s;
}
.c-link:hover { background: rgb(31 30 28 / 100%); border-color: rgba(255,255,255,.15); }
.c-link-ico img { filter: brightness(0) invert(1); }
.c-link-ico {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.1); display: flex;
  align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.c-link-name { font-size: var(--text-base); font-weight: 500; color: rgba(255,255,255,.85); }
.c-link-val  { font-size: var(--text-sm); color: rgba(255,255,255,.35); margin-left: auto; }


/* ─── 6. FOOTER ─────────────────────────────────── */
.footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 24px 0;
}
.footer-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--sp10);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp4);
}
.foot-logo {
  font-family: var(--display); font-size: 14px; font-weight: 700;
  color: rgba(255,255,255,.5);
}
.foot-nav { display: flex; gap: var(--sp6); }
.foot-nav a { font-size: var(--text-sm); color: rgba(255,255,255,.3); }
.foot-nav a:hover { color: rgba(255,255,255,.7); }
.foot-copy { font-size: var(--text-sm); color: rgba(255,255,255,.2); }


/* ─── 7. CASE CARDS GRID (index.html) ───────────── */
.cases { background: var(--surf); }
.cases .w { text-align: left; }

.cases-sec-head { margin-bottom: var(--sp8); }
.cases-sec-head h2 {
  font-family: var(--display); font-size: var(--text-section);
  font-weight: 800; letter-spacing: -.03em; color: var(--ink);
  margin-bottom: var(--sp2);
}
.cases-sec-head p { font-size: var(--text-md); color: var(--muted); }

/* Filter bar */
.fbar {
  display: flex; gap: var(--sp2); flex-wrap: wrap;
  margin-bottom: var(--sp6);
}
.ftag {
  height: 28px; padding: 0 12px; border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 500; color: var(--muted);
  background: var(--white); border: 1px solid var(--border);
  transition: all var(--dur-fast);
}
.ftag.on, .ftag:hover {
  background: var(--ink); color: var(--white); border-color: var(--ink);
}

/* Grid */
.cgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.cgrid .cc:first-child { grid-column: span 2; }

/* Card */
.cc {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-card); overflow: hidden;
  cursor: pointer; position: relative;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  user-select: none;
}
.cc.h { display: none; }
.cc:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(14,13,11,.1);
  border-color: rgba(14,13,11,.15);
}
.cc:hover .cc-hint { opacity: 1; }

/* Card cover */
.cc-img {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cc:first-child .cc-img { }

.cc-img-placeholder {
  position: absolute; inset: 0;
  background: #1a1816;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);
  background-size: 24px 24px;
}
.cc-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,rgba(14,13,11,.6) 0%,rgba(14,13,11,.2) 100%);
}
.cc-img-tags {
  position: absolute; top: 14px; left: 14px;
  display: flex; gap: 5px; z-index: 2;
}
.ct {
  height: 20px; padding: 0 8px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px); border-radius: 4px;
  font-size: 10px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: rgba(255,255,255,.9);
  display: inline-flex; align-items: center;
}
.ct.y { background: var(--accent); border-color: transparent; }

.cc-hint {
  position: absolute; bottom: 14px; right: 14px; z-index: 2;
  height: 28px; padding: 0 10px;
  background: rgba(255,255,255,1); border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 5px;
  opacity: 0; transition: opacity .2s;
}
.cc-hint::after { content: '→'; }

/* Card patterns */
.pat-grid  { background-color:#131210; background-image:radial-gradient(rgba(255,255,255,.08) 1px,transparent 1px); background-size:16px 16px; }
.pat-dots  { background-color:#131210; background-image:radial-gradient(rgba(255,255,255,.08) 1px,transparent 1px); background-size:16px 16px; padding: 0 20px; }
.pat-diag  { background-color:#131210; background-image:radial-gradient(rgba(255,255,255,.08) 1px,transparent 1px); background-size:16px 16px; padding: 0 20px; }
.pat-lines { background-color:#131210; background-image:radial-gradient(rgba(255,255,255,.08) 1px,transparent 1px); background-size:16px 16px; }
.pat-cross { background-color:#131210; background-image:radial-gradient(rgba(255,255,255,.08) 1px,transparent 1px); background-size:16px 16px; }

/* Card body */
.cc-body { padding: 18px 20px 20px; }
.cc-nm {
  font-family: var(--display); font-size: 16px; font-weight: 700;
  letter-spacing: -.015em; color: var(--ink); line-height: 1.25;
  margin-bottom: 6px;
}
.cc:first-child .cc-nm { font-size: 20px; }
.cc-num { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.cc-name-row { display: flex; align-items: baseline; gap: var(--sp3); margin-bottom: 6px; }
.cc-m { font-size: 11px; font-weight: 600; color: var(--accent); }
.cc-d { font-size: 12px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.cc-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-role {
  font-size: 11px; font-weight: 500; color: var(--ink2);
  background: var(--surf); border: 1px solid var(--border);
  height: 22px; padding: 0 8px; border-radius: 4px;
  display: inline-flex; align-items: center;
}


/* ─── 8. OVERLAY + MODAL ─────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(14,13,11,.55); backdrop-filter: blur(6px);
  z-index: 900; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.overlay.visible { opacity: 1; pointer-events: all; }

.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-46%) scale(.97);
  z-index: 1000;
  width: min(900px,calc(100vw - 48px));
  max-height: min(88vh,700px);
  background: var(--white); border-radius: var(--r-xl);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(14,13,11,.08),
    0 32px 80px rgba(14,13,11,.22),
    0 8px 24px rgba(14,13,11,.12);
  opacity: 0; pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
  will-change: transform, opacity;
}
.modal.open {
  opacity: 1; pointer-events: all;
  transform: translate(-50%,-50%) scale(1);
}
.modal-inner {
  display: grid; grid-template-columns: 340px 1fr;
  flex: 1; overflow: hidden; min-height: 0;
}

/* Modal visual (left) */
.modal-visual {
  position: relative;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-cover {
  flex: 1; min-height: 0; display: flex;
  align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.modal-cover-inner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.modal-device {
  width: 220px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-md);
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-device-bar {
  height: 28px; background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; padding: 0 10px; gap: 4px;
}
.mdot { width: 6px; height: 6px; border-radius: 50%; }
.md1 { background: rgba(255,95,87,.6); }
.md2 { background: rgba(255,189,46,.6); }
.md3 { background: rgba(40,202,65,.6); }
.modal-device-screen {
  height: 240px; display: flex; align-items: center;
  justify-content: center; position: relative;
  background: repeating-linear-gradient(0deg,rgba(255,255,255,.025) 0,rgba(255,255,255,.025) 1px,transparent 1px,transparent 20px);
}
.modal-screen-ph {
  font-size: 10px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: rgba(255,255,255,.15);
  text-align: center; padding: 0 16px; line-height: 1.6;
}
.modal-vis-stats {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.07);
  display: grid; grid-template-columns: repeat(3,1fr);
  background: var(--dark);
}
.mvs { text-align: center; padding: 6px 0; border-right: 1px solid rgba(255,255,255,.07); }
.mvs:last-child { border-right: none; }
.mvs-n { font-family: var(--display); font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1; margin-bottom: 3px; }
.mvs-n.placeholder { font-size: 16px; color: rgba(255,255,255,.3); }
.mvs-l { font-size: 10px; color: rgba(255,255,255,.3); letter-spacing: .02em; }
.kbd-hint {
  font-size: 11px; color: rgba(255,255,255,.3);
  display: flex; gap: 6px; align-items: center; justify-content: center; white-space: nowrap;
  padding: 0 20px; background: transparent;
  position: absolute; bottom: 16px; left: 0; right: 0;
}
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  height: 18px; padding: 0 5px; border-radius: 3px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  font-family: var(--sans); font-size: 10px; color: rgba(255,255,255,.5); font-weight: 500;
}

/* Modal content (right) */
.modal-content {
  display: flex; flex-direction: column;
  overflow-y: auto; min-height: 0;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.modal-header {
  padding: 24px 28px 0; position: sticky; top: 0;
  background: var(--white); z-index: 5;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.modal-header.scrolled {
  border-color: var(--border);
  box-shadow: 0 4px 16px rgba(14,13,11,.06);
}
.modal-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.mtag {
  height: 22px; padding: 0 9px;
  background: var(--surf); border: 1px solid var(--border);
  border-radius: 5px; font-size: 10px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center;
}
.mtag.hi { background: var(--dark); color: rgba(255,255,255,.85); border-color: transparent; }
.mtag.ac { background: var(--accent-bg); color: var(--accent); border-color: rgba(200,100,30,.2); }
.modal-title {
  font-family: var(--display); font-size: 24px; font-weight: 800;
  letter-spacing: -.025em; color: var(--ink); line-height: 1.15; margin-bottom: 16px;
}
.modal-meta-inline { display: flex; gap: 16px; flex-wrap: wrap; }
.mmi { font-size: 12px; color: var(--muted); display: flex; gap: 5px; align-items: center; }
.mmi strong { color: var(--ink2); font-weight: 500; }
.mmi::before { content: '·'; color: var(--border); }
.mmi:first-child::before { display: none; }

.modal-body { padding: 0 28px 28px; flex: 1; }
.m-tldr {
  background: rgba(14,13,11,.04); border-left: 2px solid var(--ink);
  border-radius: 0 8px 8px 0; padding: 12px 14px;
  margin: 20px 0; display: flex; gap: 10px;
}
.m-tldr-lbl { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); flex-shrink: 0; margin-top: 2px; }
.m-tldr-text { font-size: 13px; color: var(--ink2); line-height: 1.55; }
.m-sec-lbl { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: block; margin-top: 22px; }
.m-role-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.m-chip { height: 26px; padding: 0 10px; border-radius: 5px; font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; }
.m-chip-dark { background: var(--ink); color: #fff; }
.m-chip-out { background: var(--surf); border: 1px solid var(--border); color: var(--ink2); }
.m-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.m-list li { font-size: 12px; color: var(--ink2); line-height: 1.5; display: flex; gap: 8px; align-items: flex-start; }
.m-list li::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); flex-shrink: 0; margin-top: 6px; }
.m-process { display: flex; gap: 0; position: relative; margin: 6px 0; }
.m-process::before { content: ''; position: absolute; top: 15px; left: 15px; right: 15px; height: 1px; background: var(--border); }
.m-step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 1; padding: 0 6px; }
.m-step-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--surf); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.m-step.done .m-step-dot { background: var(--dark); border-color: var(--dark); color: #fff; }
.m-step.active .m-step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.m-step-label { font-size: 10px; color: var(--muted); line-height: 1.3; font-weight: 500; }
.m-decisions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.m-dec { background: var(--surf); border-radius: 8px; padding: 12px; border: 1px solid var(--border); }
.m-dec-tag { height: 18px; padding: 0 7px; border-radius: 3px; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; display: inline-flex; align-items: center; margin-bottom: 6px; }
.t-ux  { background: #e8f5e9; color: #1a7f3a; }
.t-arc { background: #e3ecff; color: #2255cc; }
.t-biz { background: #fff3e0; color: #bf6c1a; }
.t-sys { background: #f3e5f5; color: #7b1fa2; }
.m-dec-title { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.3; margin-bottom: 4px; }
.m-dec-text { font-size: 11px; color: var(--muted); line-height: 1.45; }

/* Modal footer */
.modal-footer {
  padding: 16px 28px; background: var(--surf);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
}
.modal-close-btn {
  height: 32px; padding: 0 12px; border-radius: 8px;
  background: rgba(14,13,11,.08); border: none;
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; color: var(--muted); font-family: var(--sans); font-size: 13px; font-weight: 500;
  transition: background .15s, color .15s;
}
.modal-close-btn:hover { background: var(--ink); color: #fff; }
.btn-open-case {
  height: 40px; padding: 0 20px; background: var(--ink); color: #fff;
  border: none; border-radius: 8px; font-family: var(--sans);
  font-size: 13px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: background .15s; text-decoration: none;
}
.btn-open-case:hover { background: var(--accent); }
.btn-figma {
  height: 40px; padding: 0 16px; background: transparent; color: var(--ink2);
  border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: border-color .15s, background .15s; text-decoration: none;
}
.btn-figma:hover { border-color: var(--ink); background: var(--white); }
.modal-footer-nav { display: flex; align-items: center; gap: 4px; }
.modal-nav-btn {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--muted); transition: all .15s;
}
.modal-nav-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.modal-nav-btn:disabled { opacity: .35; pointer-events: none; }
.modal-case-counter { font-size: 11px; color: var(--muted); padding: 0 6px; font-weight: 500; }
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 20;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(14,13,11,.08); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--ink); color: #fff; }


/* ─── 9. CASE PAGE CHROME ───────────────────────── */

/* Reading progress bar */
#rp { position: fixed; top: 0; left: 0; width: 0; height: 2px; background: var(--accent); z-index: 300; transition: width .1s linear; }

/* Page layout with side nav */
.page-wrap {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--sp10);
  display: grid; grid-template-columns: 180px 1fr; grid-template-rows: auto 1fr;
  gap: 0 60px; align-items: start;
}

/* Side nav */
.side-col { grid-column: 1; grid-row: 1 / -1; position: sticky; top: var(--nav-h); align-self: start; padding-top: 96px; }
.side-nav { padding-top: 0; }
.main-content { grid-column: 2; grid-row: 1 / -1; }
.side-nav-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.side-nav-item a {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--muted); text-decoration: none;
  padding: 6px 0; transition: color .2s; white-space: nowrap; font-weight: 400;
}
.side-nav-item a::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--border); flex-shrink: 0; transition: background .2s, transform .2s;
}
.side-nav-item a.active { color: var(--ink); font-weight: 500; }
.side-nav-item a.active::before { background: var(--accent); transform: scale(1.5); }
.side-nav-item a:hover { color: var(--ink); }
.side-nav-sep { height: 1px; background: var(--border); margin: 10px 0; }
.side-time { grid-column: 1; grid-row: 1; font-size: 11px; color: var(--muted); margin-top: 72px; display: flex; align-items: center; gap: 6px; }
.side-time::before { content: '⏱'; font-size: 11px; }

.main-content { min-width: 0; }

/* Sections */
.sec { padding: 72px 0; border-bottom: 1px solid var(--border); }
.sec:last-child { border-bottom: none; }
.sec-label { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: block; }
.sec-title { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); line-height: 1.2; margin-bottom: 8px; }
.sec-sub { font-size: 14px; color: var(--muted); line-height: 1.55; max-width: 100%; }
.sec-head { margin-bottom: 36px; }

/* Hero dark (case pages) */
.case-hero { background: var(--dark); overflow: hidden; padding-top: 52px; }
.case-hero-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--sp10);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.case-hero-left {
  padding: 56px 0 0;
  display: flex; flex-direction: column; align-items: center;
  max-width: 800px; margin: 0 auto; width: 100%;
}
.case-hero-right {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48px 0 0 56px;
}
.hero-breadcrumb { font-size: 12px; color: rgba(255,255,255,.35); margin-bottom: 24px; display: flex; align-items: center; gap: 6px; }
.hero-breadcrumb a { color: rgba(255,255,255,.35); }
.hero-breadcrumb a:hover { color: rgba(255,255,255,.7); }
.hero-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 32px; }
.htag { height: 22px; padding: 0 10px; border: 1px solid #fff; border-radius: 4px; font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: #111; background: #fff; display: inline-flex; align-items: center; }
.htag.hi { border-color: #fff; color: #111; background: #fff; }
.hero-h1 { font-family: var(--display); font-size: clamp(26px,3.5vw,42px); font-weight: 800; letter-spacing: -.025em; color: #fff; line-height: 1.1; margin-bottom: 16px; }
.hero-h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: 14px; color: rgba(255,255,255,.5); line-height: 1.6; max-width: 440px; margin-bottom: 36px; }
.hero-meta-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 40px; }
.hm { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 12px 14px; }
.hm-label { font-size: 9px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 4px; }
.hm-val { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.85); }
.hero-tldr-text { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; text-align: center; }

/* Device frame */
.hero-device-frame { width: 100%; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 16px 16px 0 0; overflow: hidden; min-height: 380px; display: flex; flex-direction: column; }
.device-bar { height: 32px; background: rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; padding: 0 14px; gap: 6px; flex-shrink: 0; }
.ddot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.15); }
.device-url { margin: 0 auto; background: rgba(255,255,255,.07); border-radius: 4px; height: 18px; width: 200px; }
.device-screen { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 300px; background: repeating-linear-gradient(45deg,rgba(255,255,255,.015),rgba(255,255,255,.015) 1px,transparent 1px,transparent 8px); }
.device-ph { text-align: center; color: rgba(255,255,255,.2); font-size: 11px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; }

/* === CASE HERO === */
.case-hero .hero-h1 {
  font-size: var(--text-display);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #fff;
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--sp4);
  white-space: normal;
}
.case-hero .hero-tags { justify-content: center; }
.case-hero .hero-tldr { max-width: 800px; margin-bottom: 0; }

.case-hero-preview {
  width: 100%;
  overflow: hidden;
  margin: 56px 0 56px;
}
@keyframes preview-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.case-hero-preview::-webkit-scrollbar { display: none; }
.case-hero-preview__track {
  display: flex;
  flex-direction: row;
  gap: 40px;
  width: max-content;
  padding: 0 40px;
  will-change: transform;
  backface-visibility: hidden;
}
.case-hero-preview__track img {
  height: 480px;
  width: auto;
  display: block;
  border-radius: 16px;
  flex-shrink: 0;
}
.case-hero-preview__placeholder {
  width: 230px;
  height: 500px;
  flex-shrink: 0;
  border-radius: 16px;
  background-color: var(--color-surface, #1e1e1e);
}

/* Stats bar */
.stats-bar { background: rgba(255,255,255,.04); border-top: 1px solid rgba(255,255,255,.08); }
.stats-bar-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp10); display: grid; grid-template-columns: repeat(4,1fr); }
.stat-cell { padding: 20px 0 20px 28px; border-right: 1px solid rgba(255,255,255,.06); }
.stat-cell:first-child { padding-left: 0; }
.stat-cell:last-child { border-right: none; }
.stat-n { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -.04em; color: #fff; line-height: 1; margin-bottom: 4px; }
.stat-l { font-size: 11px; color: rgba(255,255,255,.35); }

/* Context cards */
.ctx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ctx-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; }
.ctx-card.dark { background: var(--dark); border-color: transparent; }
.ctx-card-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: block; }
.ctx-card.dark .ctx-card-label { color: rgba(255,255,255,.35); }
.ctx-card-title { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; line-height: 1.3; }
.ctx-card.dark .ctx-card-title { color: #fff; }
.ctx-card p { font-size: 13px; color: var(--ink2); line-height: 1.6; }
.ctx-card.dark p { color: rgba(255,255,255,.5); margin-bottom: 10px; }
.ctx-card { display: flex; flex-direction: column; }
.ctx-card.dark .metrics-cloud { margin-top: auto; }
.constraints { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.cst { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink2); line-height: 1.45; }
.cst-badge { flex-shrink: 0; height: 18px; padding: 0 7px; border-radius: 3px; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; display: flex; align-items: center; margin-top: 1px; }
.b-tech { background: #e3ecff; color: #2255cc; }
.b-biz  { background: #ffe3e3; color: #cc2222; }
.b-ux   { background: #e3f5e3; color: #22882a; }
.metrics-cloud { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.mc { height: 26px; padding: 0 11px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 5px; font-size: 12px; font-weight: 500; color: rgba(255,255,255,.75); display: inline-flex; align-items: center; }

/* Role layout */
.role-layout { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.role-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; }
.role-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; }
.chip-dark { background: var(--ink); color: #fff; }
.chip-light { background: var(--surf); color: var(--ink2); border: 1px solid var(--border); }
.role-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.role-list li { display: flex; gap: 10px; font-size: 13px; color: var(--ink2); line-height: 1.5; }
.role-list li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); flex-shrink: 0; margin-top: 7px; }
.team-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; }
.team-lbl { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.tm { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tm:last-child { border-bottom: none; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.av.me { background: var(--ink); color: #fff; }
.tm-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.tm-role { font-size: 11px; color: var(--muted); margin-left: auto; }

/* Research flow */
.research-flow { display: flex; gap: 0; justify-content: space-between; position: relative; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: #999692 #e6e3dd; }
.research-flow::-webkit-scrollbar { height: 6px; background: #e6e3dd; }
.research-flow::-webkit-scrollbar-thumb { background: #999692; border-radius: 3px; }
.research-flow::-webkit-scrollbar-button { width: 0; height: 0; display: none; }
.research-flow::before { display: none; }
.rf-item { flex: 1; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 12px; overflow: visible; }
.rf-item:first-child { padding-left: 0; }
.rf-item:last-child { padding-right: 0; }
.rf-item:not(:last-child)::after { content: ''; position: absolute; top: 24px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 1px; background: var(--border); z-index: 0; }
.rf-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 14px; flex-shrink: 0; position: relative; z-index: 1; transition: border-color .2s; }
.rf-item:hover .rf-icon { border-color: var(--accent); }
.rf-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.rf-text { font-size: 12px; color: var(--muted); line-height: 1.45; }
.rf-result { margin-top: 10px; padding: 6px 10px; background: var(--surf); border-radius: 5px; font-size: 11px; color: var(--ink2); font-style: italic; line-height: 1.4; }
.insight-strip { margin-top: 28px; background: var(--ink); border-radius: 10px; padding: 20px 24px; display: flex; gap: 16px; align-items: flex-start; }
.is-label { flex-shrink: 0; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-top: 3px; }
.is-text { font-size: 14px; font-weight: 500; color: rgba(255,255,255,.85); line-height: 1.5; }

/* HMW */
.hmw { background: var(--ink); border-radius: 14px; padding: 36px; margin-bottom: 28px; }
.hmw-lbl { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; display: block; }
.hmw-q { font-family: var(--display); font-size: clamp(20px,2.8vw,32px); font-weight: 700; color: #fff; line-height: 1.25; letter-spacing: -.02em; max-width: 100%; }
.hmw-q em { font-style: normal; color: rgba(255,255,255,.4); }
.problem-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.pc { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.pc-lv { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pc-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; line-height: 1.3; letter-spacing: -.01em; }
.pc-text { font-size: 12px; color: var(--ink2); line-height: 1.55; }

/* Process stages */
.process-stages { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; position: relative; }
.process-stages::after { content: ''; position: absolute; top: 38px; left: 10%; right: 10%; height: 1px; background: var(--border); }
.ps { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 20px; position: relative; z-index: 1; }
.ps-num { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; flex-shrink: 0; }
.ps-num.done { background: var(--border); color: var(--muted); }
.ps-stage-label { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ps-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 14px; line-height: 1.3; letter-spacing: -.01em; }
.ps-tags { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.ps-tag { height: 20px; padding: 0 8px; border-radius: 3px; background: var(--surf); border: 1px solid var(--border); font-size: 10px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; }
.ps-items { width: 100%; }
.ps-item { text-align: left; display: flex; gap: 8px; font-size: 12px; color: var(--ink2); padding: 5px 0; border-bottom: 1px solid var(--border); line-height: 1.4; }
.ps-item:last-child { border-bottom: none; }
.ps-item::before { content: '·'; color: var(--muted); flex-shrink: 0; }

/* Screen slots */
.screens-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; margin-bottom: 16px; }
.screens-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.screen-slot { background: var(--white); border: 1.5px dashed var(--border); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.screen-slot.dark { background: #1a1916; border-color: #2a2926; }
.screen-top { background: var(--surf); border-bottom: 1px solid var(--border); padding: 8px 12px; display: flex; align-items: center; gap: 6px; }
.screen-slot.dark .screen-top { background: #111; border-color: #222; }
.screen-dots { display: flex; gap: 4px; }
.sdot { width: 8px; height: 8px; border-radius: 50%; }
.sd1 { background: #FF5F57; } .sd2 { background: #FFBD2E; } .sd3 { background: #28CA41; }
.screen-label-bar { margin-left: auto; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.screen-slot.dark .screen-label-bar { color: rgba(255,255,255,.3); }
.screen-body { flex: 1; min-height: 200px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; padding: 20px; background: repeating-linear-gradient(0deg,transparent,transparent 19px,var(--border) 19px,var(--border) 20px); }
.screen-slot.dark .screen-body { background: repeating-linear-gradient(0deg,transparent,transparent 19px,rgba(255,255,255,.04) 19px,rgba(255,255,255,.04) 20px); }
.screen-body-tall { min-height: 280px; }
.screen-ph { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--border); text-align: center; }
.screen-slot.dark .screen-ph { color: rgba(255,255,255,.12); }
.screen-caption { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); line-height: 1.4; background: var(--white); }
.screen-slot.dark .screen-caption { background: #1a1916; border-color: #2a2926; color: rgba(255,255,255,.35); }
.mobile-slots { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.mobile-slot { background: var(--white); border: 1.5px dashed var(--border); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.mobile-notch { height: 26px; background: var(--ink); border-radius: 18px 18px 0 0; display: flex; justify-content: center; align-items: center; }
.mobile-notch-bar { width: 50px; height: 5px; background: rgba(255,255,255,.2); border-radius: 3px; }
.mobile-screen { flex: 1; min-height: 220px; display: flex; align-items: center; justify-content: center; padding: 12px; background: repeating-linear-gradient(0deg,transparent,transparent 14px,var(--border) 14px,var(--border) 15px); }
.mobile-caption { padding: 8px 12px; border-top: 1px solid var(--border); font-size: 10px; color: var(--muted); text-align: center; background: var(--surf); }

/* Results */
.results-nums { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 14px; }
.rn { background: var(--ink); border-radius: var(--r-md); padding: 28px; display: flex; flex-direction: column; }
.rn-num { font-family: var(--display); font-size: 56px; font-weight: 800; letter-spacing: -.05em; color: #fff; line-height: 1; margin-bottom: 6px; }
.rn-num small { font-size: 24px; font-weight: 700; }
.rn-label { font-size: 12px; color: rgba(255,255,255,.9); line-height: 1.4; }
.rn-ctx { margin-top: auto; padding-top: 14px; margin-top: 14px; border-top: 1px solid rgba(255,255,255,.3); font-size: 11px; color: rgba(255,255,255,.9); }
.results-impact { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.ri-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 24px; }
.ri-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 14px; letter-spacing: -.01em; }
.ri-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.ri-list li { display: flex; gap: 10px; font-size: 13px; color: var(--ink2); line-height: 1.5; align-items: flex-start; }
.ri-list li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; font-size: 13px; }
.ri-qual { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.rq { background: var(--white); border-radius: 8px; border: 1px solid var(--border); padding: 12px; }
.rq-l { font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.rq-v { font-size: 13px; color: var(--ink); line-height: 1.4; }

/* Reflection */
.refl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.refl-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 24px; }
.refl-icon { font-size: 22px; margin-bottom: 14px; display: block; }
.refl-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 8px; letter-spacing: -.01em; }
.refl-text { font-size: 13px; color: var(--ink2); line-height: 1.6; }

/* CTA / next case */
.case-cta { background: var(--surf); border-top: 1px solid var(--border); padding: 0; }
.cta-wrap { max-width: var(--container); margin: 0 auto; padding: var(--sp20) var(--sp10); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.next-card { background: var(--ink); border-radius: var(--r-card); padding: 32px; text-decoration: none; display: flex; flex-direction: column; gap: 10px; transition: transform .2s; }
.next-card:hover { transform: translateY(-2px); }
.nc-lbl { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.35); }
.nc-tags { display: flex; gap: 6px; }
.nc-tag { height: 20px; padding: 0 8px; border: 1px solid #fff; border-radius: 3px; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: transparent; display: inline-flex; align-items: center; }
.nc-title { font-family: var(--display); font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.02em; line-height: 1.2; }
.nc-arr { font-size: 22px; color: #f5c842; margin-top: auto; }
.contact-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.cc-title { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.cc-text { font-size: 13px; color: var(--muted); line-height: 1.55; }
.cc-links { display: flex; flex-direction: column; gap: 8px; }
.cc-link { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: background .15s; }
.cc-link:hover { background: var(--surf); }
.cc-ico { width: 32px; height: 32px; border-radius: 7px; background: var(--surf); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.cc-name { font-weight: 500; }
.cc-val { font-size: 11px; color: var(--muted); margin-left: auto; }

/* Scroll reveal */
.rv { transition: opacity var(--dur-slow) var(--ease-reveal), transform var(--dur-slow) var(--ease-reveal); }
.rv.pre { opacity: 0; transform: translateY(18px); }
.rv.in  { opacity: 1; transform: translateY(0); }


/* ─── 10. RESPONSIVE ─────────────────────────────── */
@media (max-width: 1024px) {
  .cgrid { grid-template-columns: repeat(2,1fr); }
  .cgrid .cc:first-child { grid-column: span 2; }
  .page-wrap { grid-template-columns: 1fr; }
  .side-nav { display: none; }
  .side-time { display: none; }
  .case-hero-right { display: none; }
  .stats-bar-inner { grid-template-columns: repeat(2,1fr); }
  .stat-cell:nth-child(1), .stat-cell:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,.06); }
  .contacts-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --section-py: 56px; }
  .w { padding: 0 20px; }
  .nav-in { padding: 0 20px; }
  .cgrid { grid-template-columns: 1fr; }
  .cgrid .cc:first-child { grid-column: span 1; }
  .modal-inner { grid-template-columns: 1fr; }
  .modal-visual { display: none; }
  .ctx-grid, .role-layout, .problem-cols, .results-nums, .results-impact, .refl-grid, .cta-wrap { grid-template-columns: 1fr; }
  .process-stages { display: flex; overflow-x: auto; gap: 0; scrollbar-width: thin; scrollbar-color: #999692 #e6e3dd; }
  .process-stages .ps { flex: 0 0 260px; }
  .screens-grid, .screens-row { grid-template-columns: 1fr; }
  .mobile-slots { grid-template-columns: repeat(2,1fr); }
  .case-hero-inner { padding: 0; }
  .case-hero-left { padding: 40px 16px; }
  .page-wrap { padding: 0 16px; }
  .cta-wrap { padding-left: 16px; padding-right: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .rf-item { flex: 0 0 210px; }
}

/* Широкие модалки для горизонтальных картинок */
.modal:has(.pat-dots),
.modal:has(.pat-diag) {
  width: min(1060px, calc(100vw - 48px));
}
.modal-inner:has(.pat-dots),
.modal-inner:has(.pat-diag) {
  grid-template-columns: 616px 1fr;
}
