/* =============================================================
   Shivani Sudhir — Portfolio
   Editorial · Light · Considered
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Paper — bright clean off-white (no brown) */
  --paper:        #FBFAF6;
  --paper-soft:   #F3F1EB;
  --paper-edge:   #E5E2D9;

  /* Ink — cool neutral (no warm brown) */
  --ink:          #1A1A1F;
  --ink-mid:      #4D4D55;
  --ink-mute:     #7A7A82;
  --ink-light:    #B8B8BE;

  /* Accent — vivid coral-orange (cheerful) */
  --accent:       #F25C3B;
  --accent-soft:  #FB8266;
  --accent-deep:  #D03E22;

  /* Brand colour per app */
  --c-utilify-a:    #FB923C;  --c-utilify-b:    #EF4444;
  --c-canwasa-a:    #EC4899;  --c-canwasa-b:    #06B6D4;
  --c-nightbloom-a: #6366F1;  --c-nightbloom-b: #4338CA;
  --c-palettely-a:  #F97316;  --c-palettely-b:  #8B5CF6;
  --c-paperlens-a:  #2563EB;  --c-paperlens-b:  #06B6D4;
  --c-astroorbit-a: #7C3AED;  --c-astroorbit-b: #6366F1;
  --c-mergerise-a:  #10B981;  --c-mergerise-b:  #14B8A6;
  --c-fuzzypop-a:   #F59E0B;  --c-fuzzypop-b:   #EC4899;
  --c-tzc-a:        #2563EB;  --c-tzc-b:        #6366F1;
  --c-qito-a:       #71717A;  --c-qito-b:       #A1A1AA;

  /* Type */
  --serif: 'Fraunces', 'New York', 'Times New Roman', serif;
  --sans:  'Inter Tight', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Geometry */
  --gutter: clamp(20px, 4vw, 56px);
  --rail:   clamp(24px, 6vw, 96px);
  --radius: 18px;

  /* Motion */
  --ease-smooth: cubic-bezier(.2, .7, 0, 1);
  --ease-soft:   cubic-bezier(.65, 0, .35, 1);
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: 'ss01', 'cv11', 'liga';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Soft cheerful glow */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255, 220, 175, 0.42), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(242, 92, 59, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--paper); }

/* (Native cursor — fast and snappy, no lag) */

/* ---------- Layout primitives ---------- */
.section-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5.2vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
  font-variation-settings: 'opsz' 144, 'SOFT' 40;
}
.section-title em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.section-title .dim { color: var(--ink-mute); }

.section-lede {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--ink-mid);
  max-width: 56ch;
  margin-top: 24px;
  font-style: italic;
}

.quiet-link {
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.quiet-link:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  background: linear-gradient(to bottom, rgba(251,250,246,0.78), rgba(251,250,246,0.0));
  transition: background .3s, padding .3s;
}
.site-header.is-scrolled {
  padding-top: 14px; padding-bottom: 14px;
  background: rgba(251, 250, 246, 0.92);
  border-bottom: 1px solid var(--paper-edge);
}

.mark { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); }
.mark-glyph {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.mark-word {
  font-size: 15px;
  letter-spacing: 0.02em;
  font-weight: 500;
  font-style: normal;
}
.mark-word em { font-style: italic; color: var(--ink-mid); }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 32px); }
.site-nav a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-mid);
  position: relative;
  padding: 6px 2px;
  transition: color .25s;
}
.site-nav a::after {
  content: '';
  position: absolute; left: 0; right: 100%; bottom: 2px;
  height: 1px; background: var(--ink);
  transition: right .35s var(--ease-smooth);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { right: 0; }

.nav-contact {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px !important;
  border: 1px solid var(--ink);
  border-radius: 100px;
  color: var(--ink) !important;
}
.nav-contact::after { display: none; }
.nav-contact:hover { background: var(--ink); color: var(--paper) !important; }
.nav-contact:hover .nav-dot { background: var(--paper); }
.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s var(--ease-soft) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242,92,59,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(242,92,59,0); }
}


/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: clamp(140px, 18vh, 200px) var(--rail) clamp(60px, 8vh, 100px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: clamp(20px, 4vh, 48px);
  z-index: 1;
}

/* Hero atmosphere: caustic light layer + constellation canvas */
.caustic {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.20;
  mix-blend-mode: multiply;
  display: block;
}
@media (prefers-reduced-motion: reduce) { .caustic { display: none; } }

.hero { isolation: isolate; }
.hero > :not(.caustic):not(.hero-grid) { position: relative; z-index: 1; }

/* The product wall — an organised 2 × 5 grid of the ten apps */
.hero-grid {
  position: absolute;
  right: var(--rail);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(10px, 1vw, 14px);
  width: clamp(76px, 7.5vw, 94px);
}
.hero-grid > button {
  aspect-ratio: 1;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 22%;
  overflow: hidden;
  box-shadow: 0 14px 26px -10px rgba(20, 14, 8, 0.28);
  transition: transform .4s var(--ease-smooth),
              box-shadow .4s var(--ease-smooth);
  display: block;
}
.hero-grid > button > img {
  width: 100%; height: 100%;
  display: block;
  border-radius: inherit;
}
.hero-grid > button:hover,
.hero-grid > button:focus-visible {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 24px 36px -10px rgba(20, 14, 8, 0.40);
}
@media (max-width: 880px) {
  /* Below tablet: switch to a horizontal 5×2 strip at the foot of the hero */
  .hero-grid {
    position: static;
    transform: none;
    width: 100%;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(10px, 2vw, 14px);
  }
}

.hero-meta {
  display: flex; align-items: center; gap: clamp(14px, 3vw, 40px);
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero-meta-top { justify-content: space-between; }
.kicker { display: inline-flex; align-items: center; gap: 8px; }
.dot-tiny { color: var(--ink-light); }

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(72px, 16.5vw, 260px);
  /* Line-height generous enough to contain Fraunces SOFT 100 ornamental
     ascenders (the dot of italic "i" sits well above cap-height) */
  line-height: 1.18;
  letter-spacing: -0.045em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  align-self: center;
  overflow: visible;
}
.hero-title .line {
  display: block;
  overflow: visible;
  /* Generous breathing room top AND bottom for italic Fraunces swashes
     and ornamental dot above italic "i" */
  padding-block: 0.18em 0.28em;
}
.hero-title .word, .hero-title .ltr { overflow: visible; }
.hero-title .line:last-child {
  padding-left: clamp(40px, 8vw, 120px);
}
.hero-title .word {
  display: inline-block;
  will-change: opacity, translate;
}
.hero-title .word.italic {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  color: var(--accent);
}
.js .hero-title .word {
  translate: 0 30%;
  opacity: 0;
  transition: translate .95s var(--ease-smooth),
              opacity .95s var(--ease-smooth);
}
.js .hero-title .line:last-child .word { transition-delay: .12s; }
.hero-title.is-revealed .word {
  translate: 0 0;
  opacity: 1;
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.35;
  color: var(--ink-mid);
  max-width: 24ch;
  margin: 0;
  font-weight: 300;
}
.hero-sub em {
  font-style: italic;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 80;
}

.hero-meta-bottom {
  border-top: 1px solid var(--paper-edge);
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 28px);
  align-items: start;
}
.meta-block { display: flex; flex-direction: column; gap: 4px; }
.meta-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
}
.meta-value {
  font-family: var(--serif);
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1.3;
  display: inline-flex; align-items: center; gap: 8px;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2EAA63;
  box-shadow: 0 0 0 0 #2EAA63;
  animation: pulseGreen 2s var(--ease-soft) infinite;
}
@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 170, 99, 0.55); }
  50%      { box-shadow: 0 0 0 7px rgba(46, 170, 99, 0); }
}

@media (max-width: 760px) {
  .hero { padding: 110px 24px 48px; }
  .hero-meta-bottom { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; padding-top: 20px; }
  .hero-title .line:last-child { padding-left: 28px; }

  /* Tighten nav: keep mark + contact pill only */
  .site-header { padding-left: 20px; padding-right: 20px; gap: 12px; }
  .site-nav { gap: 0; }
  .site-nav > a:not(.nav-contact) { display: none; }
  .nav-contact { padding: 7px 12px !important; font-size: 12px; }
  .mark-word { display: none; }
  .mark-glyph { font-size: 24px; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
  padding: 26px 0;
  overflow: hidden;
  background: var(--paper-soft);
  position: relative; z-index: 1;
}
.marquee-track {
  display: inline-flex; align-items: center; gap: clamp(18px, 3vw, 40px);
  white-space: nowrap;
  animation: marquee 50s linear infinite;
  will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-track > span:not(.diamond) {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(28px, 4.2vw, 56px);
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 80;
}
.marquee-track .diamond {
  color: var(--accent);
  font-size: clamp(10px, 1vw, 14px);
  transform: translateY(-6px);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Manifesto ---------- */
.manifesto {
  padding: clamp(80px, 12vh, 140px) var(--rail) clamp(60px, 8vh, 100px);
  position: relative; z-index: 1;
}
.manifesto .section-title { max-width: 18ch; margin-bottom: 56px; }
.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1100px;
  margin-left: auto;
}
.manifesto-grid p {
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-mid);
  margin: 0;
}
.manifesto-grid p:first-child::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.2em;
  line-height: 0.9;
  float: left;
  margin: 0.05em 0.1em 0 -0.04em;
  color: var(--accent);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
@media (max-width: 760px) {
  .manifesto-grid { grid-template-columns: 1fr; }
  .manifesto .section-title { margin-bottom: 36px; }
}

/* ---------- Services / What I make ---------- */
.services {
  padding: clamp(70px, 10vh, 120px) var(--rail);
  position: relative; z-index: 1;
  border-top: 1px solid var(--paper-edge);
}
.services-head { max-width: 60ch; margin-bottom: clamp(40px, 5vh, 64px); }
.services-head .section-lede { margin-left: 0; }
.services-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0;
}
.service {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(22px, 3vw, 32px) 0;
  border-top: 1px solid var(--paper-edge);
  align-items: baseline;
}
.service:last-child { border-bottom: 1px solid var(--paper-edge); }
.service-no {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(14px, 1.1vw, 17px);
  letter-spacing: 0.02em;
  color: var(--accent);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.service-text {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: clamp(18px, 4vw, 64px);
  align-items: baseline;
}
.service h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0; color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.service p {
  font-family: var(--serif);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.55;
  color: var(--ink-mid);
  margin: 0; max-width: 50ch;
}
@media (max-width: 760px) {
  .service { grid-template-columns: auto 1fr; gap: 14px; }
  .service-text { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Selected Work — editorial index ---------- */
.work {
  padding: clamp(60px, 8vh, 100px) var(--rail) clamp(70px, 10vh, 120px);
  position: relative; z-index: 1;
}
.work-head { margin-bottom: clamp(34px, 5vh, 56px); }
.work-head .section-lede { margin-left: 0; }

.work-index {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--paper-edge);
}
.work-row {
  border-bottom: 1px solid var(--paper-edge);
  position: relative;
}
/* Brand-colour vertical bar draws in on hover */
.work-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--ca, var(--accent)), var(--cb, var(--accent)));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .6s var(--ease-smooth);
  pointer-events: none;
  z-index: 2;
}
.work-row:hover::before,
.work-row:focus-within::before { transform: scaleY(1); }
.work-link {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto auto;
  align-items: center;
  gap: clamp(14px, 2.4vw, 36px);
  padding: clamp(20px, 2.8vw, 34px) clamp(6px, 1.4vw, 18px);
  isolation: isolate;
}
/* brand wash on hover */
.work-link::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--ca, var(--accent)), transparent 62%);
  opacity: 0;
  transition: opacity .55s var(--ease-smooth);
}
.work-row:hover .work-link::before,
.work-link:focus-visible::before { opacity: 0.20; }
/* brand-gradient underline draws across on hover */
.work-link::after {
  content: '';
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--ca), var(--cb));
  transition: width .6s var(--ease-smooth);
}
.work-row:hover .work-link::after,
.work-link:focus-visible::after { width: 100%; }

.row-no {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.05em; color: var(--ink-light);
  font-variant-numeric: tabular-nums;
}
.row-icon-wrap {
  width: clamp(38px, 3.4vw, 50px); height: clamp(38px, 3.4vw, 50px);
  flex: none;
}
.row-icon {
  width: 100%; height: 100%;
  border-radius: 24%;
  opacity: 0.9;
  box-shadow: 0 8px 18px -8px rgba(20, 14, 8, 0.45);
  transition: transform .5s var(--ease-smooth), opacity .4s;
}
.work-row:hover .row-icon { transform: scale(1.12) rotate(-4deg); opacity: 1; }
.row-name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3.7vw, 56px);
  line-height: 1; letter-spacing: -0.025em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  transition: transform .5s var(--ease-smooth);
}
.work-row:hover .row-name { transform: translateX(clamp(6px, 1vw, 16px)); }
.row-cat {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-mute); text-align: right;
}
.row-year {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-light);
  font-variant-numeric: tabular-nums;
}
.row-go {
  font-family: var(--serif); font-size: 22px;
  color: var(--ink-mid);
  transition: transform .45s var(--ease-smooth), color .3s;
}
.work-row:hover .row-go { transform: translateX(8px); color: var(--accent); }


/* ---------- Craft — the system (cool-dark interlude, never brown) ---------- */
.craft {
  position: relative; z-index: 1;
  background: #161620;
  color: #FBFAF6;
  padding: clamp(90px, 13vh, 160px) var(--rail);
}
.craft .section-no   { color: rgba(251, 250, 246, 0.5); }
.craft .section-title { color: #FBFAF6; }
.craft .section-title em { color: #FB8266; }
.craft .section-lede { color: rgba(251, 250, 246, 0.62); margin-left: 0; }
.craft-head { margin-bottom: clamp(48px, 7vh, 90px); }

.craft-block { margin-bottom: clamp(48px, 7vh, 90px); }
.craft-block:last-child { margin-bottom: 0; }
.craft-block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(251, 250, 246, 0.14);
}
.craft-label {
  font-family: var(--mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--paper);
}
.craft-note {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(14px, 1.2vw, 17px);
  color: rgba(251, 250, 246, 0.55);
  margin: 0; max-width: 46ch;
}

/* Colour palettes — token cards, not just gradients */
.spectrum {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 1.4vw, 22px);
}
.band {
  display: flex; flex-direction: column;
  gap: 14px;
  border: 1px solid rgba(251, 250, 246, 0.07);
  background: rgba(255, 255, 255, 0.018);
  border-radius: 14px;
  padding: clamp(20px, 1.8vw, 28px) clamp(18px, 1.6vw, 24px);
  cursor: pointer;
  text-align: left;
  transition: transform .35s var(--ease-smooth),
              border-color .35s, background .35s;
  position: relative;
  overflow: hidden;
}
.band::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(160deg, var(--ca), transparent 65%);
  opacity: 0;
  transition: opacity .4s var(--ease-smooth);
  pointer-events: none;
}
.band:hover, .band:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(251, 250, 246, 0.18);
  background: rgba(255, 255, 255, 0.04);
}
.band:hover::before, .band:focus-visible::before { opacity: 0.10; }
.band > * { position: relative; z-index: 1; }

/* Wordmark — the app name in its brand colour */
.band-spec {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(20px, 1.7vw, 28px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ca);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.band-cat {
  display: block;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(251, 250, 246, 0.5);
}

/* Five tonal chips — a token system, not a gradient */
.band-chips {
  display: flex; gap: 4px;
  height: clamp(44px, 4vw, 56px);
  align-items: stretch;
  margin-top: 4px;
}
.band-chips i {
  flex: 1; border-radius: 4px; display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.band-chips i:nth-child(1) { background: color-mix(in oklab, var(--ca), white 70%); }
.band-chips i:nth-child(2) { background: color-mix(in oklab, var(--ca), white 35%); }
.band-chips i:nth-child(3) { background: var(--ca); }
.band-chips i:nth-child(4) { background: var(--cb); }
.band-chips i:nth-child(5) { background: color-mix(in oklab, var(--cb), black 55%); }

/* Source tokens */
.band-tokens {
  display: flex; flex-direction: column; gap: 3px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(251, 250, 246, 0.6);
}
.band-tokens span { white-space: nowrap; }
.band:hover .band-tokens, .band:focus-visible .band-tokens {
  color: rgba(251, 250, 246, 0.85);
}

/* Icon marks */
.marks {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: clamp(8px, 1.4vw, 18px);
}
.craft-mark {
  border: none; background: none; padding: 0; margin: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.craft-mark img {
  width: 100%; aspect-ratio: 1; border-radius: 24%;
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.6);
  transition: transform .45s var(--ease-smooth);
}
.craft-mark:hover img, .craft-mark:focus-visible img { transform: translateY(-8px) scale(1.05); }
.craft-mark-name {
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(251, 250, 246, 0.55);
  white-space: nowrap;
  transition: color .35s;
}
.craft-mark:hover .craft-mark-name, .craft-mark:focus-visible .craft-mark-name {
  color: rgba(251, 250, 246, 1);
}

@media (max-width: 860px) {
  .work-link { grid-template-columns: auto auto 1fr auto auto; }
  .row-cat { display: none; }
  .spectrum { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .work-link { grid-template-columns: auto auto 1fr auto; gap: 12px; }
  .row-year { display: none; }
  .marks { grid-template-columns: repeat(5, 1fr); gap: 18px 12px; }
  .spectrum { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .band { padding: 18px 16px; }
}

/* ---------- Approach ---------- */
.approach {
  padding: clamp(80px, 12vh, 140px) var(--rail);
  border-top: 1px solid var(--paper-edge);
  position: relative; z-index: 1;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
}
.approach-head { max-width: 24ch; margin-bottom: clamp(40px, 6vh, 64px); }

.principles {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 48px) clamp(40px, 6vw, 96px);
}
.principle {
  position: relative;
  padding: 28px 0;
  border-top: 1px solid var(--paper-edge);
}
.principle-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}
.principle h3 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.principle h3 em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  color: var(--accent);
}
.principle p {
  font-family: var(--serif);
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--ink-mid);
  max-width: 38ch;
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Ledger ---------- */
.ledger {
  padding: clamp(50px, 8vh, 100px) var(--rail);
  background: var(--paper-soft);
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
  position: relative; z-index: 1;
}
.ledger-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2vw, 32px);
  align-items: end;
}
.ledger-cell {
  border-left: 1px solid var(--paper-edge);
  padding-left: clamp(16px, 1.6vw, 24px);
}
.ledger-cell:first-child { border-left: 0; padding-left: 0; }
.ledger-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(60px, 10vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 80, 'wght' 400;
  margin-bottom: 12px;
}
.ledger-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  line-height: 1.4;
}
@media (max-width: 760px) {
  .ledger-row { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .ledger-cell:nth-child(3) { border-left: 0; padding-left: 0; }
}

/* ---------- About ---------- */
.about {
  padding: clamp(80px, 12vh, 140px) var(--rail);
  position: relative; z-index: 1;
}
.about-head { margin-bottom: clamp(40px, 6vh, 64px); }
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about-bio p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--ink-mid);
  margin: 0 0 24px;
}
.about-bio p strong {
  color: var(--ink);
  font-weight: 500;
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.about-side {
  border-top: 1px solid var(--paper-edge);
  padding-top: 24px;
}
.side-block {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--paper-edge);
}
.side-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding-top: 4px;
}
.side-value {
  font-family: var(--serif);
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--ink);
  line-height: 1.45;
}
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
  .side-block { grid-template-columns: 110px 1fr; gap: 16px; }
}

/* ---------- Contact ---------- */
.contact {
  padding: clamp(100px, 16vh, 200px) var(--rail);
  text-align: center;
  position: relative; z-index: 1;
  border-top: 1px solid var(--paper-edge);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(242, 92, 59, 0.10), transparent 60%),
    var(--paper);
}
.contact .section-no { margin-bottom: 28px; display: inline-block; }
.contact-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--ink-mid);
  max-width: 36ch;
  margin: 0 auto 28px;
  line-height: 1.4;
}
.contact-mail {
  display: inline-flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  font-family: var(--serif);
  font-size: clamp(24px, 6.5vw, 84px);
  font-style: italic;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 80, 'wght' 400;
  line-height: 1.05;
  margin-bottom: 32px;
  position: relative;
  transition: color .35s;
  word-break: break-word;
}
.contact-mail::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -8px;
  height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease-smooth);
}
.contact-mail:hover { color: var(--accent); }
.contact-mail:hover::after { transform: scaleX(1); background: var(--accent); }
.contact-arrow {
  font-size: 0.4em;
  transition: transform .35s var(--ease-smooth);
}
.contact-mail:hover .contact-arrow { transform: translate(6px, -6px); }

.contact-meta {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- Footer ---------- */
.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 32px var(--rail);
  border-top: 1px solid var(--paper-edge);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  position: relative; z-index: 1;
}
.foot-mark {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink);
}
.foot-mark em { font-style: italic; color: var(--ink-mid); }
.foot-sub { display: block; margin-top: 4px; }
.foot-left { display: flex; flex-direction: column; gap: 2px; }
.foot-center { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.foot-right { display: flex; gap: 20px; justify-content: flex-end; }
.foot-right a { transition: color .25s; }
.foot-right a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .foot-left, .foot-right, .foot-center { justify-content: center; align-items: center; text-align: center; }
  .foot-right { flex-wrap: wrap; }
}

/* ---------- Reveal animations ---------- */
[data-reveal] { opacity: 1; transform: none; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease-smooth), transform .9s var(--ease-smooth);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .hero-title .ltr { translate: 0 !important; transition: none !important; }
  .intro { display: none !important; }
  .marquee-track, .pulse-dot, .nav-dot { animation: none !important; }
}

/* =============================================================
   ELEVATION LAYER
   Load choreography · interactive hero · case studies · craft
   ============================================================= */

/* ---------- Intro curtain ---------- */
html:not(.js) .intro { display: none; }
.intro {
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  animation: introLift .82s var(--ease-smooth) 1.0s forwards;
}
.intro.is-gone { display: none; }
.intro-inner {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  animation: introInnerLift .82s var(--ease-smooth) 1.0s forwards;
}
.intro-cap {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-mute);
  opacity: 0; animation: introFade .6s var(--ease-smooth) .12s forwards;
}
.intro-mark {
  font-family: var(--serif); font-size: clamp(28px, 4.6vw, 50px);
  letter-spacing: -0.02em; color: var(--ink); line-height: 1;
  opacity: 0; animation: introFade .7s var(--ease-smooth) .26s forwards;
}
.intro-mark em { font-style: italic; color: var(--accent); }
.intro-rule {
  display: block; height: 1px; width: 0;
  background: var(--ink); opacity: 0.5;
  animation: introRule .7s var(--ease-smooth) .46s forwards;
}
@keyframes introFade { to { opacity: 1; } }
@keyframes introRule { to { width: clamp(170px, 22vw, 300px); opacity: 0.5; } }
@keyframes introInnerLift { to { transform: translateY(-40px); opacity: 0; } }
@keyframes introLift { to { transform: translateY(-101%); } }

/* ---------- Scroll progress ---------- */
html:not(.js) .scroll-progress { display: none; }
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transform: scaleX(0); transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- Live clock ---------- */
[data-clock] { font-variant-numeric: tabular-nums; }

/* ---------- Nav scroll-spy ---------- */
.site-nav a.is-current { color: var(--ink); }
.site-nav a.is-current::after { right: 0; }
.nav-contact.is-current { background: var(--ink); color: var(--paper) !important; }
.nav-contact.is-current .nav-dot { background: var(--paper); }

/* ---------- Focus craft ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.case-link:focus-visible { outline-offset: 5px; }
.cs-panel :focus-visible { outline-offset: 2px; }

/* ---------- Ledger count craft ---------- */
.ledger-no { font-variant-numeric: tabular-nums; }

/* ---------- Scroll-driven work-row entrance ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .js .work-row {
      animation: rowRise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    @keyframes rowRise {
      from { opacity: 0; transform: translateY(36px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}

/* ---------- Case study overlay ---------- */
.case-study {
  position: fixed; inset: 0; z-index: 900;
  visibility: hidden;
  pointer-events: none;
}
.case-study.is-open { visibility: visible; pointer-events: auto; }

.cs-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 14, 8, 0.46);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .55s var(--ease-smooth);
  cursor: pointer;
}
.case-study.is-open .cs-backdrop { opacity: 1; }

.cs-panel {
  position: absolute;
  left: 50%; bottom: 0;
  width: min(980px, 100%);
  height: min(93vh, 1160px);
  transform: translate(-50%, 100%);
  background: var(--paper);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -50px 130px -30px rgba(20, 14, 8, 0.55);
  transition: transform .64s var(--ease-smooth);
  overflow: hidden;
  display: flex; flex-direction: column;
  will-change: transform;
}
.case-study.is-open .cs-panel { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .cs-panel, .cs-backdrop { transition: none; }
}

.cs-close {
  position: absolute; top: 16px; right: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(251, 250, 246, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--paper-edge);
  border-radius: 100px;
  padding: 9px 15px 9px 12px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-mid);
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease-smooth);
}
.cs-close:hover {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
  transform: scale(1.04);
}
.cs-close-x { width: 11px; height: 11px; position: relative; flex: none; }
.cs-close-x::before, .cs-close-x::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 1.5px; background: currentColor;
}
.cs-close-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.cs-close-x::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.cs-scroll {
  overflow-y: auto; overflow-x: hidden;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-edge) transparent;
}
.cs-scroll::-webkit-scrollbar { width: 8px; }
.cs-scroll::-webkit-scrollbar-thumb { background: var(--paper-edge); border-radius: 8px; }

/* Case study content */
.cs-content { display: block; }

/* Head — leads the study, icon inline */
.cs-head {
  display: flex; flex-direction: column;
  padding: clamp(42px, 6vw, 78px) clamp(28px, 5vw, 72px) clamp(8px, 2vw, 16px);
}
.cs-head .cs-icon {
  width: clamp(54px, 6vw, 74px); height: clamp(54px, 6vw, 74px);
  border-radius: 22%;
  box-shadow: 0 16px 34px rgba(20, 14, 8, 0.26);
  margin-bottom: clamp(20px, 3vw, 30px);
}
.cs-head-meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.cs-head-meta .cs-no { color: var(--ink-light); }
.cs-head-meta .cs-no::after { content: ''; display: inline-block; width: 18px; height: 1px; background: var(--ink-light); margin-left: 14px; vertical-align: middle; }
.cs-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 6.5vw, 88px);
  line-height: 0.98; letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-variation-settings: 'opsz' 144, 'SOFT' 40;
}
.cs-tag {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(18px, 1.9vw, 26px);
  color: var(--accent);
  margin: 0;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

/* Case study hero — the shipped screen on a brand-tinted panel */
.cs-hero {
  position: relative;
  margin: clamp(20px, 3vw, 36px) clamp(28px, 5vw, 72px) clamp(12px, 2vw, 20px);
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-radius: 18px;
}
.cs-hero .cs-shot {
  width: auto; height: auto;
  max-width: 40%; max-height: 88%;
  filter: drop-shadow(0 38px 60px rgba(20, 14, 8, 0.48));
}

/* ---------- Web project — browser-framed site shot ---------- */
.cs-hero--web {
  aspect-ratio: auto;
  padding: clamp(24px, 4vw, 52px);
}
.cs-browser {
  margin: 0;
  width: 100%;
  max-width: 760px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 40px 70px -24px rgba(20, 14, 8, 0.55), 0 4px 12px rgba(20, 14, 8, 0.2);
}
.cs-browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  background: #e7e0d6;
  border-bottom: 1px solid rgba(20, 14, 8, 0.08);
}
.cs-browser-bar i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #c6bfb2;
}
.cs-browser-addr {
  margin-left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #8a8378;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-browser-shot {
  display: block;
  width: 100%;
  height: auto;
}
.cs-browser-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vw, 34px);
  width: 100%;
}
.cs-webshot {
  margin: 0;
  width: 100%;
  max-width: 760px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 50px -22px rgba(20, 14, 8, 0.5);
}
.cs-webshot img {
  display: block;
  width: 100%;
  height: auto;
}
/* Section shots — staggered two-up, not a plain stack */
.cs-webgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.5vw, 30px);
  width: 100%;
  max-width: 880px;
  align-items: start;
}
.cs-webgrid .cs-webshot { max-width: none; }
.cs-webgrid .cs-webshot:nth-child(2) { margin-top: clamp(28px, 5vw, 64px); }
@media (max-width: 620px) {
  .cs-webgrid { grid-template-columns: 1fr; }
  .cs-webgrid .cs-webshot:nth-child(2) { margin-top: 0; }
}

/* ---------- Mockup gallery — horizontal device shelf ---------- */
.cs-gallery {
  aspect-ratio: auto;
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: clamp(24px, 3.4vw, 40px) clamp(20px, 3vw, 40px);
}
.cs-gallery::-webkit-scrollbar { display: none; }
.cs-gallery-track {
  display: flex;
  gap: clamp(14px, 2vw, 22px);
  width: max-content;
  margin: 0 auto;
}
.cs-phone {
  flex: 0 0 auto;
  margin: 0;
  width: clamp(146px, 18vw, 208px);
  background: #0a0a0f;
  border-radius: clamp(20px, 2.4vw, 30px);
  padding: clamp(5px, 0.7vw, 8px);
  box-shadow: 0 30px 50px -16px rgba(20, 14, 8, 0.5);
}
.cs-phone img {
  width: 100%;
  aspect-ratio: 1320 / 2868;
  object-fit: cover;
  display: block;
  border-radius: clamp(15px, 1.9vw, 23px);
}

/* ---------- "What it makes" — output cards ---------- */
.cs-outputs { display: flex; flex-wrap: wrap; gap: clamp(12px, 1.6vw, 18px); }
.cs-output { flex: 1 1 0; min-width: 150px; max-width: 230px; margin: 0; }
.cs-output img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  box-shadow: 0 16px 30px -12px rgba(20, 14, 8, 0.32);
}

.cs-body {
  padding: clamp(28px, 4vw, 52px) clamp(28px, 5vw, 72px) 0;
  max-width: 760px;
}
.cs-block {
  padding: clamp(24px, 3vw, 36px) 0;
  border-top: 1px solid var(--paper-edge);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: clamp(16px, 3vw, 40px);
}
.cs-block:first-child { border-top: none; padding-top: clamp(8px, 2vw, 20px); }
.cs-block-label {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-light);
  padding-top: 6px;
}
.cs-prose {
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.6; color: var(--ink-mid);
  margin: 0;
}
.cs-prose strong { color: var(--ink); font-weight: 500; }
.cs-outcome {
  font-style: italic; color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 80;
}
.cs-decisions {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(20px, 2.6vw, 30px);
}
.cs-decisions li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
}
.cs-decisions li::before {
  content: counter(cs-dec, decimal-leading-zero);
  counter-increment: cs-dec;
  font-family: var(--mono); font-size: 11px;
  color: var(--accent);
  padding-top: 7px;
}
.cs-decisions { counter-reset: cs-dec; }
.cs-decisions h4 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.25; letter-spacing: -0.01em;
  margin: 0 0 6px; color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
}
.cs-decisions p {
  font-family: var(--serif);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.55; color: var(--ink-mid);
  margin: 0;
}

/* ---------- Design process ---------- */
.cs-process {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(18px, 2.4vw, 26px);
  counter-reset: cs-step;
}
.cs-process li { display: grid; grid-template-columns: auto 1fr; gap: 16px; }
.cs-process li::before {
  content: counter(cs-step, decimal-leading-zero);
  counter-increment: cs-step;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-light); padding-top: 7px;
}
.cs-process h4 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.25; letter-spacing: -0.01em;
  margin: 0 0 4px; color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
}
.cs-process p {
  font-family: var(--serif);
  font-size: clamp(15px, 1.1vw, 16px);
  line-height: 1.55; color: var(--ink-mid); margin: 0;
}

/* ---------- Colour palette ---------- */
.cs-palette {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: clamp(12px, 1.6vw, 18px);
}
.cs-swatch { display: flex; flex-direction: column; gap: 8px; width: 92px; }
.cs-chip {
  display: block; width: 100%; aspect-ratio: 1;
  border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.cs-swatch-name { font-family: var(--sans); font-size: 12px; line-height: 1.2; color: var(--ink); }
.cs-swatch-hex {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mute);
}

/* ---------- Typography ---------- */
.cs-type {
  display: grid; grid-template-columns: auto 1fr;
  gap: clamp(20px, 3vw, 36px); align-items: center;
}
.cs-type-specimen {
  font-family: -apple-system, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  font-weight: 600; font-size: clamp(64px, 9vw, 104px);
  line-height: 0.85; letter-spacing: -0.04em; color: var(--ink);
}
.cs-type-detail { display: grid; gap: 4px; }
.cs-type-line { font-family: var(--sans); font-size: clamp(14px, 1.1vw, 15px); color: var(--ink-mid); margin: 0; }
.cs-type-line strong { color: var(--ink); font-weight: 600; }
.cs-type-note { margin-top: 12px !important; }

.cs-foot {
  padding: clamp(28px, 4vw, 48px) clamp(28px, 5vw, 72px) clamp(40px, 6vw, 72px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.cs-visit {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 15px 24px; border-radius: 100px;
  transition: background .3s, transform .3s var(--ease-smooth), gap .3s var(--ease-smooth);
}
.cs-visit span { transition: transform .3s var(--ease-smooth); }
.cs-visit:hover { background: var(--accent); gap: 14px; }
.cs-visit:hover span { transform: translate(3px, -3px); }
.cs-foot-meta {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute);
}

/* Case study content entrance stagger */
.cs-head, .cs-hero, .cs-body .cs-block, .cs-foot {
  opacity: 1; transform: none;
}
.js .cs-head, .js .cs-hero, .js .cs-body .cs-block, .js .cs-foot {
  opacity: 0; transform: translateY(22px);
}
.js .case-study.is-open .cs-head,
.js .case-study.is-open .cs-hero,
.js .case-study.is-open .cs-body .cs-block,
.js .case-study.is-open .cs-foot {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease-smooth), transform .6s var(--ease-smooth);
}
.js .case-study.is-open .cs-head            { transition-delay: .14s; }
.js .case-study.is-open .cs-hero            { transition-delay: .20s; }
.js .case-study.is-open .cs-body .cs-block:nth-child(1) { transition-delay: .26s; }
.js .case-study.is-open .cs-body .cs-block:nth-child(2) { transition-delay: .32s; }
.js .case-study.is-open .cs-body .cs-block:nth-child(3) { transition-delay: .38s; }
.js .case-study.is-open .cs-body .cs-block:nth-child(4) { transition-delay: .44s; }
.js .case-study.is-open .cs-body .cs-block:nth-child(5) { transition-delay: .50s; }
.js .case-study.is-open .cs-body .cs-block:nth-child(6) { transition-delay: .56s; }
.js .case-study.is-open .cs-body .cs-block:nth-child(7) { transition-delay: .62s; }
.js .case-study.is-open .cs-body .cs-block:nth-child(8) { transition-delay: .68s; }
.js .case-study.is-open .cs-foot            { transition-delay: .74s; }
@media (prefers-reduced-motion: reduce) {
  .js .cs-head, .js .cs-hero, .js .cs-body .cs-block, .js .cs-foot {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* Lock scroll behind overlay */
html.cs-open, html.cs-open body { overflow: hidden; }

@media (max-width: 720px) {
  .cs-panel { height: 94vh; border-radius: 20px 20px 0 0; }
  .cs-block { grid-template-columns: 1fr; gap: 8px; }
  .cs-block-label { padding-top: 0; }
  .cs-hero { margin: 16px 18px; aspect-ratio: 4 / 3; }
  .cs-hero .cs-shot { max-width: 52%; }
  .cs-gallery { aspect-ratio: auto; margin: 16px 0 16px 18px; padding: 20px; }
  .cs-phone { width: 150px; }
  .cs-foot { flex-direction: column; align-items: flex-start; }
  .cs-type { grid-template-columns: 1fr; gap: 14px; }
  .cs-swatch { width: 78px; }
}

/* ---------- Print niceties ---------- */
@media print {
  .site-header, .marquee,
  .intro, .scroll-progress, .case-study { display: none !important; }
  body { color: #000; background: #fff; }
}
