/* ========================================================================
   Designfy Studio — Editorial Monochrome
   ======================================================================== */

:root {
  --bg:            #000000;
  --bg-overlay:    #0A0A0A;
  --text-primary:  #F2EDE3;
  --text-muted:    #8A857C;
  --text-faint:    #4A4842;
  --accent-hot:    #FFFFFF;
  --divider:       #1F1D1A;
  --grain-opacity: 0.045;

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body:    'Inter Tight', 'Helvetica Neue', Arial, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: auto; } /* Lenis handles scroll */

body {
  overflow-x: hidden;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; font-family: var(--font-display); font-weight: 300; }

::selection { background: var(--text-primary); color: var(--bg); }

/* ========================================================================
   Loader
   ======================================================================== */
#loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease-out);
}
#loader.is-hidden { opacity: 0; pointer-events: none; }

.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 36px;
}
.loader-mark {
  width: 240px; height: 240px;
  filter: brightness(1.05);
}
.loader-progress {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  min-width: 280px;
}
.loader-bar {
  width: 280px; height: 1px;
  background: var(--text-faint);
  overflow: hidden;
}
#loader-bar-fill {
  height: 100%; width: 0%;
  background: var(--text-primary);
  transition: width 0.18s linear;
}
.loader-meta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  display: flex; gap: 6px; align-items: baseline;
}
.loader-percent-sym { color: var(--text-muted); }
.loader-label { margin-left: 18px; color: var(--text-faint); }

/* ========================================================================
   Site Header
   ======================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 76px;
  padding: 0 5vw;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow: visible;
}
.brand {
  display: flex; align-items: center; gap: 18px;
  color: var(--text-primary);
  transition: color 0.2s var(--ease-out);
}
.brand-mark {
  width: 180px; height: auto;
  filter: brightness(1.05);
  transition: transform 0.3s var(--ease-out);
}
.brand:hover .brand-mark { transform: scale(1.04); }
.brand:hover { color: var(--accent-hot); }

.site-nav {
  display: flex; gap: 56px; align-items: center;
}
.site-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--text-primary);
  position: relative;
  padding: 8px 0;
  transition: color 0.2s var(--ease-out);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent-hot);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.32s var(--ease-out);
}
.site-nav a:hover { color: var(--accent-hot); }
.site-nav a:hover::after { transform: scaleX(1); }

/* ========================================================================
   Hero (100vh standalone)
   ======================================================================== */
.hero-standalone {
  position: relative; z-index: 50;
  height: 100vh;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 0 5vw;
  overflow: hidden;
}
.hero-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  width: 100%;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--text-faint);
  margin-bottom: 36px;
  opacity: 0;
}
.hero-mark {
  width: 88px; height: 88px;
  margin-bottom: 36px;
  filter: brightness(1.05);
  opacity: 0;
}
.hero-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 9rem);
  line-height: 1;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  font-variation-settings: "opsz" 144;
  text-align: center;
}
.hero-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
}
.hero-word {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}
.hero-word + .hero-word { margin-left: 0.25em; }
.hero-heading em {
  font-style: italic;
  font-weight: 300;
  color: var(--text-primary);
}
.hero-tagline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 32px;
  opacity: 0;
}

.scroll-cue {
  position: absolute; bottom: 48px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  opacity: 0;
  z-index: 51;
}
.scroll-cue-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--text-faint);
}
.scroll-cue-track {
  position: relative;
  width: 1px; height: 56px;
  background: var(--text-faint);
  overflow: hidden;
}
.scroll-cue-dot {
  position: absolute; left: -2px; top: 0;
  width: 5px; height: 12px;
  background: var(--text-primary);
  border-radius: 999px;
  animation: cue-dot 1.8s ease-in-out infinite;
}
@keyframes cue-dot {
  0%   { transform: translateY(-12px); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(56px); opacity: 0; }
}

/* ========================================================================
   Canvas (fixed to right half of viewport, reveals via clip-path circle)
   ======================================================================== */
.canvas-wrap {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  left: 50%;
  z-index: 1;
  background: var(--bg);
  pointer-events: none;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path, opacity;
}
#canvas {
  width: 100%; height: 100%;
  display: block;
}

/* ========================================================================
   Dark overlay (for stats section)
   ======================================================================== */
#dark-overlay {
  position: fixed; inset: 0; z-index: 5;
  background: var(--bg-overlay);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* ========================================================================
   Scroll container & sections
   ======================================================================== */
#scroll-container {
  position: relative;
  width: 100%;
  height: 1400vh;
  z-index: 10;
}
.scroll-section {
  position: absolute; left: 0; right: 0;
  /* Top set by JS to the midpoint of [enter, leave] */
  transform: translateY(-50%);
  display: flex; align-items: center;
  pointer-events: none;
  will-change: opacity, transform;
}
.scroll-section.is-active { pointer-events: auto; }

/* Persistent sections (contact CTA) stay at viewport center via fixed positioning,
   so they remain visible all the way through scroll progress = 1. */
.scroll-section[data-persist="true"] {
  position: fixed;
  top: 50%;
  left: 0; right: 0;
  z-index: 14;
}

.section-inner {
  position: relative;
  width: 100%;
  max-width: 42vw;
}
/* Canvas now lives in right 50vw; all section text lives in left 50vw.
   .align-left / .align-right alternate text-align for editorial rhythm,
   but both stay inside the left half. */
.align-left {
  padding-left: 6vw;
  padding-right: 52vw;
}
.align-right {
  padding-left: 6vw;
  padding-right: 52vw;
  text-align: right;
}
.align-right .section-inner { margin-left: auto; }
.align-right .section-body { margin-left: auto; }

.section-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-faint);
  margin-bottom: 28px;
}
.section-heading {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.018em;
  color: var(--text-primary);
  margin-bottom: 32px;
  font-variation-settings: "opsz" 144;
}
.section-heading em {
  font-style: italic;
  font-weight: 300;
  color: var(--text-primary);
}
.section-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 38ch;
  margin-bottom: 28px;
}
.section-list {
  list-style: none;
  border-top: 1px solid var(--divider);
  margin-top: 12px;
}
.section-list li {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-primary);
  padding: 16px 0;
  border-bottom: 1px solid var(--divider);
}

/* ========================================================================
   Process list
   ======================================================================== */
.process-list { list-style: none; }
.process-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--divider);
  align-items: start;
}
.process-row:first-child { border-top: 1px solid var(--divider); }
.process-num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--text-faint);
  font-variation-settings: "opsz" 144;
}
.process-body { display: flex; flex-direction: column; gap: 8px; }
.process-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-primary);
}
.process-desc {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ========================================================================
   Work list
   ======================================================================== */
.work-list { list-style: none; }
.work-row {
  border-bottom: 1px solid var(--divider);
}
.work-row:first-child { border-top: 1px solid var(--divider); }
.work-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  position: relative;
  overflow: hidden;
  transition: padding 0.28s var(--ease-out);
}
.work-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--text-primary);
  position: relative;
  transition: transform 0.28s var(--ease-out), color 0.28s var(--ease-out);
  font-variation-settings: "opsz" 144;
}
.work-name::before {
  content: "→";
  display: inline-block;
  margin-right: 0.3em;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out);
  color: var(--accent-hot);
}
.work-meta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-faint);
  transition: transform 0.28s var(--ease-out), color 0.28s var(--ease-out);
}
.work-link:hover .work-name {
  color: var(--accent-hot);
  transform: translateX(28px);
}
.work-link:hover .work-name::before {
  opacity: 1;
  transform: translateX(0);
}
.work-link:hover .work-meta {
  color: var(--text-primary);
  transform: translateX(-12px);
}

/* ========================================================================
   Stats section
   ======================================================================== */
.section-stats {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  z-index: 12;
}
.stats-inner {
  max-width: none;
  width: 100%;
  padding: 0 6vw;
  text-align: center;
}
.section-stats .section-label {
  margin-bottom: 24px;
}
.stats-heading {
  margin-bottom: 64px;
  max-width: 24ch;
  margin-left: auto;
  margin-right: auto;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5vw;
  max-width: 1200px;
  margin: 0 auto;
}
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  position: relative;
}
.stat::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 24px; height: 1px;
  background: var(--text-faint);
}
.stat-number {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4.5rem, 8vw, 8.4rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 144;
}
.stat-suffix {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: -8px;
}
.stat-suffix:empty { display: none; }
.stat-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ========================================================================
   Contact CTA
   ======================================================================== */
.cta-button {
  display: inline-flex; align-items: center; gap: 18px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-primary);
  padding: 18px 2px 14px;
  border-bottom: 1px solid var(--text-faint);
  margin-top: 16px;
  margin-bottom: 28px;
  transition: border-color 0.22s var(--ease-out), color 0.22s var(--ease-out);
}
.cta-arrow {
  display: inline-block;
  transition: transform 0.22s var(--ease-out);
  font-family: var(--font-body);
}
.cta-button:hover {
  color: var(--accent-hot);
  border-bottom-color: var(--accent-hot);
}
.cta-button:hover .cta-arrow {
  transform: translateX(6px);
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--bg);
  background: var(--text-primary);
  padding: 17px 34px;
  margin-top: 44px;
  border-radius: 2px;
  opacity: 0;
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.hero-cta:hover { background: rgba(242, 237, 227, 0.86); transform: translateY(-2px); }
.hero-cta-arrow { display: inline-block; transition: transform 0.25s var(--ease-out); }
.hero-cta:hover .hero-cta-arrow { transform: translateX(5px); }
.contact-email {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 96px;
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease-out);
}
.contact-email:hover { color: var(--accent-hot); }
.contact-footer {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-faint);
}

/* ========================================================================
   Site Footer (anchored to bottom of #scroll-container, fades in at ~95%)
   ======================================================================== */
.site-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 18;
  padding: 56px 5vw 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.78) 60%, rgba(0,0,0,0) 100%);
  border-top: 1px solid var(--divider);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}
.site-footer.is-visible {
  pointer-events: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 4vw;
  align-items: start;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 22px;
}
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-brand { flex-direction: row; align-items: center; gap: 18px; }
.footer-mark { width: 48px; height: 48px; filter: brightness(1.05); }
.footer-brand-text { display: flex; flex-direction: column; gap: 6px; }
.footer-word {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.0rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-primary);
}
.footer-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.footer-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.footer-email {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.15rem, 1.5vw, 1.5rem);
  color: var(--text-primary);
  letter-spacing: 0.005em;
  transition: color 0.22s var(--ease-out);
  width: max-content;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 4px;
}
.footer-email:hover { color: var(--accent-hot); border-bottom-color: var(--accent-hot); }
.footer-social {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-social a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 10px;
  transition: color 0.22s var(--ease-out), gap 0.22s var(--ease-out);
  width: max-content;
}
.footer-social a:hover { color: var(--accent-hot); gap: 16px; }

.social-icon {
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.22s var(--ease-out);
}
.footer-social a:hover .social-icon { opacity: 1; }
.footer-meta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-faint);
}

/* ========================================================================
   Grain overlay (top of everything, never interactive)
   ======================================================================== */
#grain-overlay {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* ========================================================================
   Section reset for entrance animations (JS handles play/reverse)
   ======================================================================== */
.scroll-section .section-label,
.scroll-section .section-heading,
.scroll-section .section-body,
.scroll-section .section-list,
.scroll-section .process-list,
.scroll-section .work-list,
.scroll-section .case-studies-block,
.scroll-section .case-studies-nav,
.scroll-section .testimonials-block,
.scroll-section .testimonial-next,
.scroll-section .stats-grid,
.scroll-section .cta-button,
.scroll-section .contact-email,
.scroll-section .contact-footer,
.scroll-section .stat {
  opacity: 0;
}

/* ========================================================================
   Full-width sections (case studies, testimonials)
   ======================================================================== */
.scroll-section.section-wide {
  padding: 0 6vw;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  z-index: 12;
}
.section-wide .section-inner {
  max-width: 1180px;
  width: 100%;
}

.scroll-section.case-studies-section,
.scroll-section.testimonials-section {
  justify-content: flex-start;
  padding-left: 5vw;
  padding-right: 52vw;
}
.case-studies-section .section-inner,
.testimonials-section .section-inner {
  max-width: 100%;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  padding: 36px 40px;
  border-radius: 6px;
  border: 1px solid var(--divider);
}

/* ========================================================================
   Case Studies carousel
   ======================================================================== */
.case-studies-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--divider);
}
.case-studies-intro { display: flex; flex-direction: column; gap: 0; }
.case-studies-intro .section-label { margin-bottom: 18px; }
.case-studies-heading { margin-bottom: 18px; max-width: 18ch; }
.case-studies-blurb { max-width: 52ch; margin-bottom: 0; }

.case-studies-nav {
  display: flex; gap: 12px;
  align-self: end;
}
.case-arrow {
  width: 48px; height: 48px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.22s var(--ease-out),
              color 0.22s var(--ease-out),
              background 0.22s var(--ease-out),
              transform 0.22s var(--ease-out);
}
.case-arrow:hover:not(:disabled) {
  border-color: var(--text-primary);
  color: var(--accent-hot);
  background: rgba(255, 255, 255, 0.06);
}
.case-arrow:active:not(:disabled) { transform: scale(0.96); }
.case-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.case-studies-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 6px 18px;
  margin: 0 -6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.case-studies-track::-webkit-scrollbar { display: none; }

.case-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  position: relative;
}
.case-card-link {
  display: block;
  position: relative;
  height: 460px;
  border-radius: 18px;
  overflow: hidden;
  background: #0d0c0a;
  border: 1px solid var(--divider);
  isolation: isolate;
  transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.case-card-link:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 237, 227, 0.18);
}
.case-card-media {
  position: absolute; inset: 0;
  overflow: hidden;
}
.case-card-image {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.6) contrast(1.05) brightness(0.85);
  transition: transform 0.6s var(--ease-out), filter 0.6s var(--ease-out);
}
.case-card-link:hover .case-card-image {
  transform: scale(1.06);
  filter: grayscale(0.35) contrast(1.08) brightness(0.95);
}
.case-card-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px 22px 22px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.7) 40%,
    rgba(0, 0, 0, 0.12) 75%,
    rgba(0, 0, 0, 0) 100%
  );
  color: var(--text-primary);
}
.case-card-meta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.case-card-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--text-primary);
  font-variation-settings: "opsz" 144;
  margin-bottom: 10px;
}
.case-card-desc {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(242, 237, 227, 0.78);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-card-cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-primary);
}
.case-card-arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease-out);
}
.case-card-link:hover .case-card-arrow { transform: translateX(6px); }

.case-dots {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 24px;
}
.case-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(242, 237, 227, 0.18);
  padding: 0;
  border: 0;
  transition: background 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}
.case-dot:hover { background: rgba(242, 237, 227, 0.4); }
.case-dot.is-active {
  background: var(--text-primary);
  transform: scale(1.2);
}

/* ========================================================================
   Testimonials shuffle deck
   ======================================================================== */
.testimonials-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
  align-items: center;
}
.testimonials-intro { display: flex; flex-direction: column; gap: 0; }
.testimonials-intro .section-label { margin-bottom: 18px; }
.testimonials-intro .section-heading { max-width: 14ch; margin-bottom: 22px; }
.testimonials-intro .section-body { margin-bottom: 26px; }

.testimonial-next {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-primary);
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--text-faint);
  width: max-content;
  transition: color 0.22s var(--ease-out),
              border-color 0.22s var(--ease-out);
}
.testimonial-next-arrow {
  display: inline-block;
  transition: transform 0.22s var(--ease-out);
}
.testimonial-next:hover {
  color: var(--accent-hot);
  border-bottom-color: var(--accent-hot);
}
.testimonial-next:hover .testimonial-next-arrow { transform: translateX(6px); }

.testimonials-block {
  display: flex; align-items: center; justify-content: center;
  min-height: 340px;
  width: 100%;
}
.testimonials-deck {
  position: relative;
  width: 300px;
  height: 340px;
  margin: 0;
}
.testimonial-card {
  position: absolute;
  top: 0; left: 0;
  width: 300px;
  height: 340px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 24px;
  border-radius: 22px;
  border: 1px solid rgba(242, 237, 227, 0.12);
  background: rgba(20, 18, 15, 0.55);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.4s var(--ease-out),
              opacity 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out);
  will-change: transform;
}
.testimonial-card.is-front {
  z-index: 3;
  transform: rotate(-6deg) translate3d(0, 0, 0);
  cursor: grab;
}
.testimonial-card.is-front:active { cursor: grabbing; }
.testimonial-card.is-middle {
  z-index: 2;
  transform: rotate(0deg) translate3d(24px, 8px, 0);
}
.testimonial-card.is-back {
  z-index: 1;
  transform: rotate(6deg) translate3d(48px, 14px, 0);
}
.testimonial-card.is-hidden {
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transform: rotate(8deg) translate3d(64px, 18px, 0);
}
.testimonial-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(242, 237, 227, 0.18);
  background: #14120f;
  pointer-events: none;
}
.testimonial-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-primary);
  text-align: center;
  font-variation-settings: "opsz" 144;
  pointer-events: none;
}
.testimonial-author {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  text-align: center;
  pointer-events: none;
}

/* ========================================================================
   Mobile (<768px)
   ======================================================================== */
@media (max-width: 768px) {
  body { font-size: 16px; }

  #scroll-container { height: 1100vh; }

  .site-header {
    height: 96px;
    padding: 0 5vw;
  }
  .brand-mark { width: 80px; height: 80px; }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 0.72rem; letter-spacing: 0.18em; }

  .loader-mark { width: 150px; height: 150px; }
  .loader-bar, .loader-progress { width: 220px; min-width: 220px; }

  /* Canvas back to full viewport on mobile */
  .canvas-wrap { left: 0; }

  .hero-mark { width: 64px; height: 64px; margin-bottom: 28px; }
  .hero-eyebrow { font-size: 0.68rem; letter-spacing: 0.24em; margin-bottom: 24px; }
  .hero-heading { font-size: clamp(2.6rem, 13vw, 5rem); }
  .hero-tagline { font-size: 0.78rem; max-width: 28ch; margin-top: 24px; padding: 0 12px; }

  /* Side-aligned text becomes centered with a backdrop overlay (full-width on mobile) */
  .align-left, .align-right {
    padding: 0 6vw;
    text-align: left;
  }
  .section-inner {
    max-width: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 28px 22px;
    border-radius: 0;
  }
  .align-right .section-inner { margin-left: 0; }
  .align-right .section-body { margin-left: 0; }

  /* Footer stacks vertically */
  .site-footer { padding: 36px 6vw 24px; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 24px;
    margin-bottom: 16px;
  }
  .footer-brand { flex-direction: row; gap: 14px; }
  .footer-mark { width: 40px; height: 40px; }
  .footer-email { font-size: 1.1rem; }
  .footer-social a { font-size: 0.8rem; letter-spacing: 0.2em; }

  .section-heading { font-size: clamp(2.4rem, 9vw, 4rem); }
  .section-body { font-size: 1rem; }
  .section-list li { font-size: 0.72rem; letter-spacing: 0.18em; }

  .process-row { grid-template-columns: 56px 1fr; gap: 16px; padding: 16px 0; }
  .process-num { font-size: 1.8rem; }
  .process-name { font-size: 0.78rem; letter-spacing: 0.22em; }
  .process-desc { font-size: 1.05rem; }

  .work-name { font-size: clamp(1.4rem, 6vw, 2.2rem); }
  .work-meta { font-size: 0.66rem; letter-spacing: 0.22em; }
  .work-link { padding: 16px 0; gap: 12px; }
  .work-link:hover .work-name { transform: none; }
  .work-link:hover .work-name::before { opacity: 0; }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .stats-heading { margin-bottom: 36px; font-size: clamp(2rem, 8vw, 3.4rem); }
  .stat-number { font-size: clamp(3.6rem, 16vw, 6rem); }
  .stat-suffix { font-size: 1rem; }
  .stat::before { display: none; }

  .cta-button { font-size: 0.82rem; letter-spacing: 0.22em; }
  .contact-email { font-size: 0.9rem; margin-bottom: 48px; }

  /* Section-wide layouts stack on mobile */
  .scroll-section.section-wide { padding: 0 6vw; }
  .section-wide .section-inner {
    max-width: 100%;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px 18px;
  }

  .case-studies-header {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 20px;
  }
  .case-studies-nav { justify-self: end; }
  .case-arrow { width: 40px; height: 40px; }
  .case-studies-heading { font-size: clamp(2rem, 8vw, 3rem); }
  .case-card { flex: 0 0 78vw; }
  .case-card-link { height: 420px; }
  .case-card-title { font-size: 1.5rem; }
  .case-card-desc { font-size: 0.92rem; }

  .testimonials-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .testimonials-inner { grid-template-columns: 1fr; gap: 28px; }
  .testimonials-block { min-height: 380px; justify-content: flex-start; }
  .testimonials-deck { width: 300px; height: 340px; margin-left: 0; }
  .testimonial-card { width: 300px; height: 340px; padding: 28px 22px; gap: 16px; }
  .testimonial-card.is-middle { transform: rotate(0deg) translate3d(22%, 6px, 0); }
  .testimonial-card.is-back { transform: rotate(6deg) translate3d(44%, 12px, 0); }
  .testimonial-avatar { width: 88px; height: 88px; }
  .testimonial-quote { font-size: 0.96rem; }
  .testimonial-author { font-size: 0.64rem; letter-spacing: 0.22em; }
}

@media (max-width: 900px) and (min-width: 769px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 64px 5vw; }
}

@media (max-height: 700px) {
  .hero-mark { width: 64px; height: 64px; margin-bottom: 24px; }
  .hero-eyebrow { margin-bottom: 24px; }
  .scroll-cue { bottom: 24px; }
  .scroll-cue-track { height: 40px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================
   About Founder section
   ======================================================================== */
.founder-section {
  display: flex; align-items: center;
  padding-left: 6vw;
  padding-right: 52vw;
}
.founder-inner {
  display: flex; gap: 4vw; align-items: flex-start;
  width: 100%;
}
.founder-image-block {
  flex: 0 0 auto;
  width: min(240px, 22vw);
  display: flex; flex-direction: column; gap: 8px;
}
.fp-main {
  overflow: hidden;
  transform-origin: center bottom;
}
.founder-photo {
  width: 100%; aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(0.3);
  display: block;
}
.fp-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fp-thumb {
  overflow: hidden;
  transform-origin: center top;
}
.fp-thumb img {
  width: 100%; aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: grayscale(0.35);
  display: block;
}
.founder-text-block { flex: 1; }
.founder-bio { max-width: 38ch; font-size: 1.05rem; line-height: 1.75; color: var(--text-muted); margin-top: 1.2rem; }

/* Contact section — slightly enlarged */
#contact .section-heading {
  font-size: clamp(3.4rem, 7vw, 6.2rem);
}
#contact .section-inner {
  max-width: 44vw;
}

@media (max-width: 768px) {
  .founder-section { padding-left: 6vw; padding-right: 6vw; }
  .founder-inner { flex-direction: column; gap: 2rem; }
  .founder-image-block { flex: none; width: 100%; max-width: 300px; }
  .fp-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* ========================================================================
   FAQ section
   ======================================================================== */
.faq-section .section-inner { max-width: 780px; }
.faq-list { display: flex; flex-direction: column; margin-top: 3rem; }
.faq-item { border-top: 1px solid var(--divider); }
.faq-item:last-child { border-bottom: 1px solid var(--divider); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1.4rem 0;
  font-family: var(--font-body); font-size: 0.98rem; font-weight: 500;
  color: var(--text-primary); cursor: pointer; text-align: left;
  background: none; border: 0;
}
.faq-question:hover { color: var(--accent-hot); }
.faq-icon {
  font-size: 1.3rem; color: var(--text-muted);
  transition: transform 0.35s var(--ease-out); flex-shrink: 0; line-height: 1;
}
.faq-item.is-open .faq-icon { transform: rotate(45deg); color: var(--text-primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.45s var(--ease-out); }
.faq-item.is-open .faq-answer { max-height: 220px; }
.faq-answer p { padding-bottom: 1.4rem; color: var(--text-muted); font-size: 0.93rem; line-height: 1.75; }

/* ========================================================================
   Contact details (email + phone beneath CTA)
   ======================================================================== */
.contact-details {
  display: flex; flex-direction: column; gap: 0.35rem; margin-top: 2rem;
}
.contact-detail-link {
  color: var(--text-muted); font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: color 0.2s var(--ease-out);
}
.contact-detail-link:hover { color: var(--text-primary); }
