/* ============================================================
   Daniël de With — Portfolio
   ============================================================ */

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

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  html { scroll-behavior: auto; }
}

:root {
  /* Palette — warm midnight + champagne gold */
  --bg:        #0a0908;
  --bg-2:      #100e0c;
  --bg-3:      #16130f;
  --bg-4:      #1c1814;
  --text:      #f5f1ea;
  --text-dim:  #918a82;
  --text-low:  #56514d;
  --line:        rgba(245, 241, 234, 0.08);
  --line-strong: rgba(245, 241, 234, 0.18);
  --accent:        #c8a96a;
  --accent-bright: #ecc885;
  --accent-deep:   #8a7544;
  --accent-glow:   rgba(200, 169, 106, 0.18);
  --error: #e87171;
  --success: #6ad27e;

  /* Layout */
  --container: 1440px;
  --pad: clamp(1.25rem, 4vw, 4rem);

  /* Typography */
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Easing */
  --ease:     cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 300;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

body.is-loading {
  overflow: hidden;
  height: 100vh;
}

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

a { color: inherit; text-decoration: none; }
button { background: none; border: none; color: inherit; font-family: inherit; cursor: pointer; }
img, video { max-width: 100%; display: block; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }

/* --- LAYOUT --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
}

/* --- TYPE PRIMITIVES --- */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-block;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--text);
  text-wrap: balance;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.section-sub {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--text-dim);
  margin-top: 1.75rem;
  max-width: 56ch;
  line-height: 1.55;
}

.section-head {
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

/* --- GRAIN OVERLAY --- */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 200;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
  background-size: 240px 240px;
  animation: grainShift 8s steps(8) infinite;
}
@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-3%, -2%); }
  20% { transform: translate(2%, 3%); }
  30% { transform: translate(-2%, 4%); }
  40% { transform: translate(4%, -1%); }
  50% { transform: translate(-3%, 2%); }
  60% { transform: translate(2%, -3%); }
  70% { transform: translate(-4%, 1%); }
  80% { transform: translate(3%, 2%); }
  90% { transform: translate(-2%, -3%); }
}


/* --- SCROLL PROGRESS --- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* --- SECTION INDICATOR --- */
.section-indicator {
  position: fixed;
  bottom: 2rem;
  left: var(--pad);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0.45rem 0.85rem;
  box-shadow: 0 0 0 1px rgba(245, 241, 234, 0.05), 0 4px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(200, 169, 106, 0.08);
}
.section-indicator.is-visible { opacity: 1; }
.section-indicator-num {
  color: var(--accent);
  font-weight: 500;
}
.section-indicator-name {
  position: relative;
  padding-left: 0.75rem;
}
.section-indicator-name::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 1px;
  background: var(--text-dim);
}
@media (max-width: 768px) {
  .section-indicator { display: none; }
}

/* --- PRELOADER --- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--pad) 3.5rem;
  transition: transform 1.1s var(--ease-out);
}
.preloader.is-done {
  transform: translateY(-101%);
}
.preloader-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}
.preloader-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}
.preloader-counter { color: var(--text); font-weight: 500; }
.preloader-counter .muted { color: var(--text-low); margin-left: 0.2em; }
.preloader-bar {
  height: 1px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.preloader-bar-fill {
  position: absolute;
  inset: 0 100% 0 0;
  background: var(--text);
  transition: right 0.18s var(--ease-out);
}

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  padding: 1.6rem var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  transition: padding 0.4s var(--ease-out), background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  background: rgba(10, 9, 8, 0.75);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.brand-mark {
  width: 32px; height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  position: relative;
  transition: border-color 0.4s ease, color 0.4s ease;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}
.nav-brand:hover .brand-mark { border-color: var(--accent); color: var(--accent); }
.nav-brand:hover .brand-mark::after { opacity: 0.5; transform: scale(1); }
.brand-handle { color: var(--text-dim); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.25rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-links a {
  position: relative;
  color: var(--text-dim);
  transition: color 0.3s ease;
  padding: 0.25rem 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(106, 210, 126, 0.5);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(106, 210, 126, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(106, 210, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(106, 210, 126, 0); }
}

@media (max-width: 900px) {
  .nav { grid-template-columns: auto 1fr; }
  .nav-links { display: none; }
  .nav-status { font-size: 0.66rem; }
}
@media (max-width: 540px) {
  .brand-handle { display: none; }
  .nav-status .status-text { display: none; }
}

/* --- BUTTONS --- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform 0.45s var(--ease-out), background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.45s var(--ease-out);
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  will-change: transform;
  text-decoration: none;
}
.btn span { text-decoration: none; }
.btn svg {
  width: 16px; height: 16px;
  transition: transform 0.45s var(--ease-out);
}
.btn:hover svg { transform: translateX(4px); }

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, var(--text) 100%);
  color: var(--bg);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 100%);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease-out);
  z-index: -1;
}
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover {
  color: var(--bg);
  box-shadow: 0 6px 36px rgba(200, 169, 106, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-ghost {
  border: 1px solid rgba(245, 241, 234, 0.28);
  color: var(--text);
  background: rgba(245, 241, 234, 0.04);
  box-shadow: inset 0 1px 0 rgba(245, 241, 234, 0.08), 0 2px 12px rgba(0, 0, 0, 0.2);
}
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(245, 241, 234, 0.08);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease-out);
  z-index: -1;
}
.btn-ghost:hover {
  border-color: rgba(245, 241, 234, 0.55);
  background: rgba(245, 241, 234, 0.06);
  box-shadow: inset 0 1px 0 rgba(245, 241, 234, 0.14), 0 4px 24px rgba(0, 0, 0, 0.25);
}
.btn-ghost:hover::before { transform: translateY(0); }

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: clamp(8rem, 18vh, 12rem) var(--pad) clamp(3rem, 6vh, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  overflow: hidden;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 1s var(--ease-out) 1.4s forwards;
}
.line-mark {
  width: 36px;
  height: 1px;
  background: var(--text-dim);
  flex-shrink: 0;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 13.5vw, 13rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-top: clamp(2rem, 6vh, 5rem);
  text-wrap: balance;
  will-change: transform, opacity;
  color: #ffffff;
}
.hero-title .line {
  display: block;
  overflow: hidden;
  padding: 0.06em 0;
}
/* Once the last line finishes sliding in, open overflow so the em shadow isn't clipped */
.hero-title .line:last-child {
  animation: lineOverflowOpen 0.001s linear 2.45s forwards;
}
@keyframes lineOverflowOpen {
  to { overflow: visible; }
}
.hero-title .line-inner {
  display: block;
  transform: translateY(110%);
  animation: lineUp 1.15s var(--ease-out) forwards;
  will-change: transform;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.hero-title .line:nth-child(1) .line-inner { animation-delay: 0.85s; }
.hero-title .line:nth-child(2) .line-inner { animation-delay: 1s;    }
.hero-title .line:nth-child(3) .line-inner { animation-delay: 1.15s; }
.hero-title em {
  font-style: italic;
  color: var(--accent-bright);
  font-weight: 400;
  animation: emGlowIn 0.8s var(--ease-out) 2.45s both;
}
@keyframes emGlowIn {
  from { text-shadow: none; }
  to   { text-shadow: 0 0 60px rgba(200, 169, 106, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4); }
}
@keyframes lineUp { to { transform: translateY(0); } }

.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-top: clamp(3rem, 7vh, 6rem);
  opacity: 0;
  animation: fadeUp 1.1s var(--ease-out) 1.8s forwards;
}
@media (max-width: 800px) {
  .hero-foot { grid-template-columns: 1fr; gap: 2.5rem; }
}
.hero-desc {
  max-width: 40ch;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.6;
}
.hero-desc::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 1rem;
}
.hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  right: var(--pad);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 2.2s forwards;
}
.hero-scroll-line {
  display: inline-block;
  width: 64px;
  height: 1px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: translateX(-101%);
  animation: scrollLine 2.6s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: translateX(-101%); }
  55%  { transform: translateX(101%); }
  100% { transform: translateX(101%); }
}

.hero-corner {
  position: absolute;
  bottom: 3rem;
  left: var(--pad);
  display: grid;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-low);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 2.2s forwards;
}
.hero-corner div { display: flex; gap: 0.85rem; }
.corner-key { color: var(--accent); }
@media (max-width: 700px) {
  .hero-corner { display: none; }
  .hero-scroll { left: var(--pad); right: auto; }
}

/* --- HERO CANVAS --- */
.hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-eyebrow,
.hero-title,
.hero-foot {
  position: relative;
  z-index: 1;
}

/* --- MANIFESTO --- */
.manifesto {
  padding: clamp(7rem, 18vw, 18rem) 0;
  position: relative;
}
.manifesto-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.7rem, 4.4vw, 3.8rem);
  line-height: 1.18;
  letter-spacing: -0.022em;
  max-width: 22ch;
  text-wrap: balance;
  margin-top: 1rem;
}
.manifesto-text .word {
  display: inline-block;
  color: var(--text);
  opacity: 0.16;
  transition: opacity 0.5s var(--ease-soft);
  will-change: opacity;
}
.manifesto-text .word.is-lit { opacity: 1; }
.manifesto-text .word.is-accent { color: var(--accent); font-style: italic; }

/* --- SERVICES --- */
.services {
  padding: clamp(5rem, 10vw, 10rem) 0;
  border-top: 1px solid var(--line);
}
.services-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.services-grid > .service-card:last-child:not(.service-card--featured) {
  grid-column: 2 / -1;
}
.service-card {
  background: var(--bg);
  padding: clamp(1.8rem, 3vw, 2.8rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  position: relative;
  transition: background 0.5s ease;
  min-height: 320px;
  overflow: hidden;
}
.service-card:hover { background: var(--bg-2); }
.service-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}
.service-card:hover::after { transform: scaleX(1); }
.service-card--featured {
  grid-column: 1;
  grid-row: 1 / span 3;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  padding: clamp(2.2rem, 3.4vw, 3.2rem);
}
.service-card--featured:hover {
  background: linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%);
}
.service-card--featured::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 240px; height: 240px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}
.card-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
}
.service-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
.service-card--featured h3 {
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
}
.service-card p {
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 0.96rem;
  max-width: 38ch;
}
.card-list {
  list-style: none;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
}
.card-list li {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.5;
}
.card-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.card-foot {
  position: absolute;
  bottom: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-low);
}

@media (max-width: 1000px) {
  .services-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .service-card--featured { grid-column: 1 / -1; grid-row: auto; min-height: 360px; }
  .services-grid > .service-card:last-child:not(.service-card--featured) { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .card-foot { position: static; margin-top: 1.5rem; }
}

/* --- TICKER --- */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.6rem 0;
  background: var(--bg);
}
.ticker-track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  animation: tickerMove 40s linear infinite;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  color: var(--text);
  align-items: center;
}
.ticker-track .dot {
  font-style: normal;
  color: var(--accent);
  font-size: 0.6em;
  transform: translateY(-0.1em);
}
@keyframes tickerMove { to { transform: translateX(-50%); } }

/* --- APPROACH --- */
.approach {
  padding: clamp(5rem, 10vw, 10rem) 0;
  border-top: 1px solid var(--line);
}
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 7rem);
}
@media (max-width: 900px) {
  .approach-grid { grid-template-columns: 1fr; }
}
.approach-text {
  display: grid;
  gap: 1.5rem;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.65;
  color: var(--text);
  max-width: 50ch;
}
.approach-text p:nth-child(2),
.approach-text p:nth-child(3) { color: var(--text-dim); }

.principles {
  list-style: none;
  display: grid;
  border-top: 1px solid var(--line);
}
.principles li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: padding-left 0.5s var(--ease-out);
}
.principles li:hover { padding-left: 0.75rem; }
.principle-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  padding-top: 0.4rem;
}
.principles h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.principles p {
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.55;
}

/* --- PROCESS --- */
.process {
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: clamp(3rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.process-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 2.5rem;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-left: 1px solid var(--line);
}

.process-step {
  padding: 0 2rem 0 1.75rem;
  border-right: 1px solid var(--line);
}

.process-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 500;
  display: block;
  margin-bottom: 1.25rem;
}

.process-step h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.process-step p {
  font-size: 0.93rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 26ch;
}

.process-result {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  letter-spacing: -0.015em;
  color: var(--text-dim);
}

.process-result em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

@media (max-width: 900px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 0;
    border-left: none;
  }
  .process-step {
    padding: 0 1.5rem 2rem 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .process-step:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 1.5rem; }
  .process-step:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 540px) {
  .process-steps { grid-template-columns: 1fr; border-left: none; }
  .process-step { padding: 0 0 1.75rem; border-right: none; border-bottom: 1px solid var(--line); }
  .process-step:last-child { border-bottom: none; padding-bottom: 0; }
}

/* --- WORK --- */
.work {
  padding: clamp(5rem, 10vw, 10rem) 0;
  border-top: 1px solid var(--line);
}
.project + .project {
  margin-top: clamp(5rem, 10vw, 9rem);
}
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.project-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.6rem;
}
.project-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  letter-spacing: -0.025em;
  line-height: 1;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  align-self: end;
  padding-bottom: 0.3rem;
}

.project-media {
  display: grid;
  gap: 1rem;
}
.project-media--triple,
.project-media--mixed {
  grid-auto-rows: auto;
  grid-auto-flow: dense;
  align-items: start;
}
/* Buitenkans: feature full-bleed, then two-up at equal aspect */
.project-media--triple { grid-template-columns: 1fr 1fr; }
.project-media--triple .media:nth-child(1) { grid-column: 1 / -1; grid-row: 1; }
.project-media--triple .media:nth-child(2) { grid-column: 1; grid-row: 2; }
.project-media--triple .media:nth-child(3) { grid-column: 2; grid-row: 2; }
/* KIG: feature full-bleed, then image + video side-by-side.
   Columns are sized to each asset's aspect ratio (image 1236/1065 ≈ 1.16, video 640/306 ≈ 2.09)
   so both tiles render at their TRUE aspect AND end up the same height. */
.project-media--mixed { grid-template-columns: 1.16fr 2.09fr; }
.project-media--mixed .media--feature { grid-column: 1 / -1; grid-row: 1; }
.project-media--mixed .media--image   { grid-column: 1; grid-row: 2; }
.project-media--mixed .media:not(.media--feature):not(.media--image) {
  grid-column: 2;
  grid-row: 2;
}
@media (max-width: 800px) {
  .project-media--triple .media,
  .project-media--mixed .media { grid-column: 1 / -1 !important; }
}

.media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-2);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.5s ease, transform 0.6s var(--ease-out);
  isolation: isolate;
}
.media--feature {
  aspect-ratio: 4 / 5.2;
}
.project-media--triple .media { aspect-ratio: 4 / 5; }
.media:has(.media-asset) { aspect-ratio: var(--asset-ar, 4 / 5); }
.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 30% 20%, rgba(200, 169, 106, 0.06), transparent 70%),
    repeating-linear-gradient(135deg, transparent 0, transparent 3px, rgba(245, 241, 234, 0.014) 3px, rgba(245, 241, 234, 0.014) 6px);
  transition: opacity 0.5s ease;
  z-index: 0;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.25));
  z-index: 1;
  pointer-events: none;
}
.media:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}
.media-label {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--text);
  text-transform: uppercase;
  z-index: 3;
}
.media-meta {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
  z-index: 3;
}
.media-play {
  position: absolute;
  bottom: 1.1rem;
  right: 1.1rem;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  transform: scale(0.85) translateY(8px);
  opacity: 0.8;
  transition: transform 0.5s var(--ease-out), opacity 0.4s ease, background 0.4s ease;
  z-index: 3;
}
.media:hover .media-play {
  transform: scale(1) translateY(0);
  opacity: 1;
  background: var(--accent);
}
.media-play svg { width: 18px; height: 18px; transform: translateX(1px); }
.media-asset {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
  image-rendering: high-quality;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: filter 0.5s ease;
}
.media:has(.media-asset)::before { opacity: 0; }
.media:has(.media-asset)::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.18) 100%);
}
.media:hover .media-asset {
  filter: brightness(1.05);
}

/* --- QUALITY --- */
.quality {
  padding: clamp(5rem, 10vw, 10rem) 0;
  border-top: 1px solid var(--line);
}
.quality-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 8rem);
  align-items: center;
}
.quality-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 1.5rem 0 1.5rem;
}
.quality-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.quality-desc {
  color: var(--text-dim);
  font-size: clamp(0.96rem, 1.2vw, 1.08rem);
  line-height: 1.65;
  max-width: 44ch;
}
.quality-source {
  display: block;
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-low);
}
.quality-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.5rem) 1.25rem;
  transition: background 0.4s ease;
}
.score-item:hover { background: var(--bg-2); }

.score-gauge {
  position: relative;
  width: 96px;
  height: 96px;
}
.score-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.gauge-bg {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 5;
}
.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 314.159;
  stroke-dashoffset: 314.159;
  transition: stroke-dashoffset 1.4s var(--ease-out);
  filter: drop-shadow(0 0 5px rgba(200, 169, 106, 0.45));
}
.score-item:nth-child(2) .gauge-fill { transition-delay: 0.12s; }
.score-item:nth-child(3) .gauge-fill { transition-delay: 0.24s; }
.score-item:nth-child(4) .gauge-fill { transition-delay: 0.36s; }
.score-item.is-visible .gauge-fill {
  stroke-dashoffset: var(--gauge-offset);
}
.gauge-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.75rem;
  letter-spacing: -0.04em;
  color: var(--text);
}
.gauge-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}
@media (max-width: 960px) {
  .quality-inner { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .quality-scores { grid-template-columns: 1fr 1fr; }
}

/* --- INFRASTRUCTURE --- */
.infrastructure {
  padding: clamp(5rem, 10vw, 10rem) 0;
  border-top: 1px solid var(--line);
}
.infra-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 8rem);
  align-items: center;
}
.infra-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 1.5rem 0 1.5rem;
}
.infra-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.infra-desc {
  color: var(--text-dim);
  font-size: clamp(0.96rem, 1.2vw, 1.08rem);
  line-height: 1.65;
  max-width: 44ch;
}
.infra-desc + .infra-desc {
  margin-top: 1rem;
}
.infra-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--line);
}
.infra-stat {
  background: var(--bg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: background 0.4s ease;
}
.infra-stat:hover { background: var(--bg-2); }
.infra-stat-value {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.infra-stat-unit {
  font-size: 0.7em;
  color: var(--accent);
}
.infra-stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Globe */
.infra-globe-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.globe-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.gnode {
  animation: gnodePulse 3s ease-in-out infinite;
}
@keyframes gnodePulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}
.globe-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-2);
}
.globe-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(200,169,106,0.6);
  flex-shrink: 0;
}
.globe-badge-sep { color: var(--text-low); }

@media (max-width: 960px) {
  .infra-inner { grid-template-columns: 1fr; }
  .infra-globe-wrap { order: -1; }
  .globe-svg { max-width: 260px; }
}

/* --- LANGUAGES --- */
.languages {
  padding: clamp(5rem, 9vw, 8rem) 0;
  border-top: 1px solid var(--line);
}
.lang-inner {
  max-width: 880px;
}
.lang-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  margin: 1.25rem 0 1.5rem;
}
.lang-title em {
  font-style: italic;
  color: var(--accent-bright);
  font-weight: 400;
}
.lang-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 0 2.5rem;
}
.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.lang-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,0.015);
  transition: border-color 0.4s var(--ease-out), background 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.lang-card:hover {
  border-color: rgba(200,169,106,0.35);
  background: rgba(200,169,106,0.03);
  transform: translateY(-2px);
}
.lang-flag {
  width: 48px;
  height: 32px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 4px 14px rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.lang-flag svg { display: block; width: 100%; height: 100%; }
.lang-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.lang-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
}
.lang-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.lang-level {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent-bright);
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(200,169,106,0.25);
  border-radius: 3px;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .lang-grid { grid-template-columns: 1fr; }
}

/* --- CONTACT --- */
.contact {
  padding: clamp(5rem, 10vw, 10rem) 0;
  border-top: 1px solid var(--line);
}
.contact-form {
  max-width: 920px;
  position: relative;
}
.form-grid { display: grid; gap: 2rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .field-row { grid-template-columns: 1fr; }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
}
.field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.field .req { color: var(--accent); }
.field .opt {
  color: var(--text-low);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.95rem 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.4s ease, padding-left 0.4s var(--ease-out);
  border-radius: 0;
}
.field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  padding-left: 0.5rem;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-low); }

.select-wrap {
  position: relative;
}

/* --- CUSTOM SELECT --- */
.cs-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.4s ease, padding-left 0.4s var(--ease-out);
}
.cs-trigger:focus { outline: none; }
.cs-trigger:focus-visible,
.select-wrap.cs-open .cs-trigger { border-color: var(--accent); padding-left: 0.5rem; }

.cs-value {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 300;
  color: var(--text-low);
  transition: color 0.3s ease;
}
.cs-value.is-filled { color: var(--text); }

.cs-caret {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform 0.4s var(--ease-out), color 0.3s ease;
}
.select-wrap.cs-open .cs-caret { transform: rotate(180deg); color: var(--accent); }

.cs-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  z-index: 100;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 241, 234, 0.04);
}
.select-wrap.cs-open .cs-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cs-option {
  padding: 0.85rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 300;
  color: var(--text-dim);
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease, padding-left 0.25s var(--ease-out);
  border-bottom: 1px solid var(--line);
}
.cs-option:last-child { border-bottom: none; }
.cs-option:hover,
.cs-option.is-highlighted {
  background: var(--bg-3);
  color: var(--text);
  padding-left: 1.4rem;
}
.cs-option.is-selected { color: var(--accent); }
.cs-option.is-selected::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.field-error {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--error);
  opacity: 0;
  max-height: 0;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  overflow: hidden;
}
.field.has-error .field-error {
  opacity: 1;
  max-height: 2em;
  margin-top: 0.25rem;
}
.field.has-error input,
.field.has-error textarea,
.field.has-error select,
.field.has-error .cs-trigger {
  border-color: var(--error);
  animation: shake 0.45s var(--ease) both;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.field--other {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.55s var(--ease-out), opacity 0.4s ease;
  pointer-events: none;
}
.field--other.is-open {
  max-height: 220px;
  opacity: 1;
  pointer-events: auto;
}

.form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.form-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.btn-submit {
  position: relative;
  min-width: 200px;
  justify-content: center;
}
.btn-submit.is-loading .btn-label,
.btn-submit.is-loading svg { opacity: 0; }
.btn-submit .btn-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
}
.btn-submit.is-loading .btn-loader { opacity: 1; }
.btn-submit .btn-loader::after {
  content: "";
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-success {
  padding: 4rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.form-success-mark {
  width: 64px; height: 64px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 0.5rem;
  animation: markPop 0.7s var(--ease-out) both;
}
.form-success-mark svg { width: 28px; height: 28px; }
@keyframes markPop {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.form-success h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}
.form-success p { color: var(--text-dim); }

/* --- FOOTER --- */
.footer {
  padding: clamp(4rem, 8vw, 8rem) 0 2.5rem;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.footer-statement {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 6.5vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.footer-statement em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.footer-statement span { display: block; }

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 1rem 1.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.footer-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease-out);
  z-index: -1;
}
.footer-cta:hover { color: var(--bg); border-color: var(--text); }
.footer-cta:hover::before { transform: translateY(0); }
.footer-cta svg { width: 16px; height: 16px; transition: transform 0.4s var(--ease-out); }
.footer-cta:hover svg { transform: translateX(4px); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-up {
  color: var(--text-dim);
  transition: color 0.3s ease;
}
.footer-up:hover { color: var(--text); }

/* --- REVEAL UTILITIES --- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s;     }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s;  }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s;  }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s;  }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s;  }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s;  }

/* While preloader is up, hide hero animations from racing */
body.is-loading .hero-title .line-inner { animation-play-state: paused; }
body.is-loading .hero-title .line:last-child { animation-play-state: paused; }
body.is-loading .hero-title em { animation-play-state: paused; }
body.is-loading .hero-eyebrow,
body.is-loading .hero-foot,
body.is-loading .hero-scroll,
body.is-loading .hero-corner { animation-play-state: paused; }
