/* ============================================================
   rast — web design & development studio
   Dark premium aesthetic · inspired in spirit by fiddle.digital
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:        #0A0A0C;
  --bg-2:      #0E0E11;
  --surface:   #131318;
  --surface-2: #17171D;

  --ink:       #F4F0E9;   /* primary text */
  --ink-dim:   #A7A2AE;   /* secondary text */
  --ink-faint: #6E6A77;   /* tertiary / meta */

  /* RGB channels of the core colours, so any rgba(...) stays locked to the
     palette and can't drift out of sync with the hex tokens above. */
  --bg-rgb:     10, 10, 12;
  --ink-rgb:    244, 240, 233;
  --accent-rgb: 255, 74, 46;

  --line:   rgba(var(--ink-rgb), 0.10);
  --line-2: rgba(var(--ink-rgb), 0.18);

  --accent:      #FF4A2E;
  --accent-soft: #FF6A4D;
  --accent-deep: #C9341C;

  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, monospace;

  --container: 1320px;
  --gutter: clamp(20px, 5vw, 80px);

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

  --radius: 18px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
em { font-style: normal; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: #fff; }


/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow .idx { color: var(--accent); }
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.accent { color: var(--accent); }

.section-head { margin-bottom: clamp(48px, 6vw, 90px); max-width: 880px; }
.section-head--row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; max-width: none; flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-top: 20px;
  max-width: 16ch;
}
.section-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-dim);
  max-width: 26ch;
  line-height: 1.5;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 2000;
  background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 8px;
  font-size: 14px; transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Grain ---------- */
/* Static, non-blended overlay: a fixed layer the compositor can cache.
   mix-blend-mode here forced a full-viewport recomposite on every scroll
   frame (a major source of scroll judder), so it's intentionally dropped. */
.grain {
  position: fixed; inset: 0; z-index: 900; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Follower dot (native cursor stays; this trails it and blends with the bg) ---------- */
.cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 1500;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  background: var(--accent); border-radius: 50%;
  pointer-events: none; will-change: transform;
  mix-blend-mode: difference;                 /* interacts with whatever is behind it */
  transition: width .3s var(--ease), height .3s var(--ease), opacity .3s;
}
.cursor-dot.is-active { width: 34px; height: 34px; margin: -17px 0 0 -17px; }   /* grows over interactive elements */
@media (hover: none), (pointer: coarse) { .cursor-dot { display: none; } }

/* ---------- Scroll progress ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1100; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 0%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 2000; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
}
.loader__inner { display: inline-flex; align-items: flex-start; gap: 6px; }
.loader__mark { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 9vw, 96px); letter-spacing: -0.03em; line-height: 1; }
/* the counting number rides at the top-right of "rast" — exactly where the brand dot sits */
.loader__count { font-family: var(--font-mono); font-size: clamp(15px, 2.4vw, 22px); color: var(--accent); margin-top: 0.15em; }
.loader__bar { width: min(280px, 60vw); height: 2px; background: var(--line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0%; background: var(--accent); }
.loader.is-done { opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2vw, 26px) var(--gutter);
  transition: transform .5s var(--ease), background .4s var(--ease), padding .4s var(--ease);
}
/* Solid translucent bar instead of backdrop-filter blur — blur repaints the
   header strip every scroll frame, which hurts low-end framerates. */
.header--scrolled {
  background: rgba(var(--bg-rgb), 0.9);
  border-bottom: 1px solid var(--line);
  padding-block: 14px;
}
.header--hidden { transform: translateY(-110%); }

.brand { display: inline-flex; align-items: flex-start; gap: 5px; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.brand__word { line-height: 1; }
.brand__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 1px; flex: none; }

.nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav > a { font-size: 15px; color: var(--ink-dim); position: relative; transition: color .3s; }
.nav > a:hover { color: var(--ink); }
.nav > a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav > a:not(.nav__cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  border: 1px solid var(--line-2); border-radius: 100px; padding: 10px 20px; color: var(--ink) !important;
  transition: background .3s, border-color .3s, color .3s;
}
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: var(--bg) !important; }

/* Mobile toggle */
.nav__toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav__toggle span { position: absolute; left: 11px; width: 22px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
.nav__toggle span:nth-child(1) { top: 18px; }
.nav__toggle span:nth-child(2) { top: 25px; }
.nav__toggle.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 999; background: var(--bg-2);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter);
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease);
  pointer-events: none;
}
.menu.is-open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.menu__nav { display: flex; flex-direction: column; gap: 6px; }
.menu__nav a {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 13vw, 84px);
  line-height: 1.05; letter-spacing: -0.03em; display: flex; align-items: baseline; gap: 16px;
  transition: color .3s, padding-left .4s var(--ease);
}
.menu__nav a:hover { color: var(--accent); padding-left: 14px; }
.menu__idx { font-family: var(--font-mono); font-size: 14px; color: var(--ink-faint); }
.menu__foot { margin-top: 48px; display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); border-top: 1px solid var(--line); padding-top: 24px; flex-wrap: wrap; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--gutter) clamp(40px, 6vh, 70px);
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .9; }
.hero__glow {
  position: absolute; z-index: 0; top: 40%; left: 60%; width: 60vw; height: 60vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(var(--accent-rgb),0.22), transparent 62%);
  filter: blur(40px); pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; width: 100%; max-width: var(--container); margin-inline: auto; }
.hero__eyebrow { margin-bottom: clamp(20px, 3vh, 34px); }

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 12.5vw, 200px);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
/* Clip-reveal mask: extra top/bottom room so Latvian diacritics (macrons on
   ā ē ī ū) and descenders aren't sliced; negative margins keep the tight leading. */
.hero__title .line {
  display: block; overflow: hidden;
  padding-top: 0.16em; margin-top: -0.16em;
  padding-bottom: 0.12em; margin-bottom: -0.08em;
}
.hero__title .line > span { display: block; backface-visibility: hidden; }
.hero__title i.accent { font-style: normal; }

.hero__sub {
  margin-top: clamp(24px, 3.4vh, 40px);
  max-width: 52ch; font-size: clamp(16px, 1.4vw, 20px);
  color: var(--ink-dim); line-height: 1.6;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: clamp(28px, 4vh, 44px); }

.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(40px, 6vh, 70px); z-index: 2;
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim);
}
.hero__scroll-line { width: 60px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); animation: scrollLine 2s var(--ease-in-out) infinite; }
@keyframes scrollLine { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (max-width: 760px) { .hero__scroll { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 100px; font-size: 15px; font-weight: 500;
  border: 1px solid transparent; overflow: hidden; transition: color .35s var(--ease);
}
.btn--lg { padding: 19px 34px; font-size: 16px; }
.btn__arrow { transition: transform .4s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(5px); }

/* SOLID — cream wipes in from the left, text flips to accent, button lifts with a glow */
.btn--solid { background: var(--accent); color: var(--bg); transition: color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease); }
.btn--solid::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); z-index: 0; }
.btn--solid:hover { color: var(--accent); transform: translateY(-3px); box-shadow: 0 16px 34px -12px rgba(var(--accent-rgb), .55); }
.btn--solid:hover::before { transform: scaleX(1); }
.btn--solid > * { position: relative; z-index: 1; }

/* GHOST — border fills bottom-up with cream, text flips to dark (distinct axis + colour from solid) */
.btn--ghost { border-color: var(--line-2); color: var(--ink); transition: color .35s var(--ease), border-color .35s var(--ease); }
.btn--ghost::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); transition: transform .45s var(--ease); z-index: 0; }
.btn--ghost:hover { color: var(--bg); border-color: var(--ink); }
.btn--ghost:hover::before { transform: translateY(0); }
.btn--ghost > * { position: relative; z-index: 1; }

/* ============================================================
   STUDIO
   ============================================================ */
.studio { padding: clamp(90px, 13vw, 200px) 0; }
.studio__statement {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 4.6vw, 64px); line-height: 1.12; letter-spacing: -0.02em;
  max-width: 20ch;
}
.studio__statement em { color: var(--accent); font-style: italic; }
.studio__cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 70px); margin-top: clamp(48px, 6vw, 90px); max-width: 820px; margin-left: auto; }
.studio__cols p { color: var(--ink-dim); font-size: clamp(15px, 1.3vw, 18px); }
@media (max-width: 700px) { .studio__cols { grid-template-columns: 1fr; } }

/* Split-text word styling */
[data-split] .word { display: inline-block; }
[data-split] .word .w { display: inline-block; }

/* ============================================================
   SERVICES — plain formatted text, no interactions
   ============================================================ */
.svc { padding: clamp(70px, 9vw, 140px) 0; }
.svc__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(30px, 4vw, 52px) clamp(40px, 6vw, 96px); max-width: 1040px; }
.svc__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 1.9vw, 26px); letter-spacing: -0.01em; line-height: 1.2; }
.svc__desc { color: var(--ink-dim); font-size: clamp(15px, 1.05vw, 17px); line-height: 1.6; margin-top: 8px; max-width: 52ch; }
@media (max-width: 640px) { .svc__list { grid-template-columns: 1fr; } }

/* ============================================================
   WORK
   ============================================================ */
.work { padding: clamp(70px, 9vw, 140px) 0; }
.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2.4vw, 36px); }
.work__card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; }

.work__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; transition: transform .9s var(--ease); }
.work__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(var(--bg-rgb),.55), transparent 55%); }
.work__card:hover .work__media { transform: scale(1.04); }

/* Real project thumbnail (live-site screenshot) + "view" caption */
.work__media--shot { background-color: var(--surface); background-size: cover; background-position: top center; }
.work__view {
  position: absolute; bottom: 16px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
  opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.work__card:hover .work__view { opacity: 1; transform: translateY(0); }
.work__view i { color: var(--accent); transition: transform .4s var(--ease); }
.work__card:hover .work__view i { transform: translateX(4px); }

.work__meta { padding: 22px 4px 4px; display: flex; flex-direction: column; gap: 4px; }
.work__idx { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.work__name { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.02em; line-height: 1.05; }
.work__cat { font-size: 14px; color: var(--ink-dim); }

.work__card--cta { background: var(--surface); display: grid; place-items: center; text-align: center; min-height: 280px; transition: background .4s; border: 1px solid var(--line); }
.work__card--cta:hover { background: var(--surface-2); }
.work__cta-inner { padding: 40px; }
.work__card--cta .work__name { margin: 12px 0; font-size: clamp(28px, 3.4vw, 48px); }
.work__card--cta .work__cat { color: var(--accent); }

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

/* ============================================================
   PARALLAX BAND (background + scroll effect)
   ============================================================ */
.band {
  position: relative; min-height: 94vh; min-height: 94svh;
  display: grid; place-items: center; overflow: hidden; isolation: isolate;
  margin-block: clamp(40px, 7vw, 100px);
}
.band__bg {
  position: absolute; inset: -38% 0; z-index: -2; will-change: transform;
  background:
    radial-gradient(58% 70% at 24% 28%, rgba(var(--accent-rgb),0.55), transparent 60%),
    radial-gradient(52% 60% at 82% 72%, rgba(201,52,28,0.42), transparent 62%),
    radial-gradient(42% 50% at 62% 18%, rgba(255,106,77,0.30), transparent 60%),
    linear-gradient(160deg, #1A1311, #0A0A0C 72%);
  /* Drop a real photo here to use an image instead:  background-image: url('assets/band.jpg'); background-size: cover; background-position: center; */
}
.band__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb),0.55), rgba(var(--bg-rgb),0.30) 50%, rgba(var(--bg-rgb),0.55)),
    radial-gradient(circle at 50% 50%, rgba(var(--bg-rgb),0.10), rgba(var(--bg-rgb),0.62));
}
.band__word {
  position: absolute; inset: 0; z-index: -1; will-change: transform;
  display: grid; place-items: center; white-space: nowrap; user-select: none;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(110px, 33vw, 540px); line-height: 0.8; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(var(--ink-rgb),0.16);
}
.band__content { position: relative; z-index: 1; text-align: center; padding-block: clamp(80px, 12vw, 170px); }
.band__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 5.4vw, 84px); line-height: 1.08; letter-spacing: -0.025em;
  max-width: 18ch; margin: 22px auto 0;
}
.band__title em { color: var(--accent); font-style: italic; }
.band .eyebrow { justify-content: center; }

/* ============================================================
   PROCESS
   ============================================================ */
.process { padding: clamp(70px, 9vw, 140px) 0; }
.process__container { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 6vw, 100px); align-items: start; }
.process__head { position: sticky; top: 120px; }
.process__lead { color: var(--ink-dim); margin-top: 20px; max-width: 34ch; }

/* Scroll-filling timeline spine down the steps */
.process__steps { position: relative; padding-left: clamp(22px, 3vw, 44px); }
.process__line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.process__line i {
  position: absolute; left: -0.5px; top: 0; width: 2px; height: 100%;
  background: var(--accent); transform: scaleY(0); transform-origin: top;
  box-shadow: 0 0 14px var(--accent);
}
.process__list { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 40px); padding: clamp(26px, 3vw, 42px) 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num { font-family: var(--font-mono); font-size: 14px; color: var(--accent); }
.step__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 2.6vw, 38px); letter-spacing: -0.02em; margin-bottom: 10px; }
.step__desc { color: var(--ink-dim); max-width: 50ch; }
@media (max-width: 860px) {
  .process__container { grid-template-columns: 1fr; }
  .process__head { position: static; }
}

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto { padding: clamp(90px, 13vw, 200px) 0; text-align: center; }
.manifesto__quote {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 5vw, 76px); line-height: 1.1; letter-spacing: -0.025em;
  max-width: 18ch; margin-inline: auto;
}
.manifesto__quote em { color: var(--accent); font-style: italic; }
.manifesto__cite { display: block; margin-top: 40px; font-family: var(--font-mono); font-size: 14px; color: var(--ink-dim); font-style: normal; }

/* ============================================================
   STATS
   ============================================================ */
.stats { padding: clamp(50px, 7vw, 90px) 0; border-block: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 4vw, 60px); }
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat__num { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 4.4vw, 64px); letter-spacing: -0.03em; line-height: 1; }
.stat__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-dim); }
@media (max-width: 760px) { .stats__grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   IMPACT  (pinned — letters appear on scroll, "rast" morphs fonts)
   ============================================================ */
.impact {
  position: relative; min-height: 100svh; min-height: 100dvh;
  display: grid; place-items: center; overflow: hidden;
  padding: clamp(60px, 10vh, 120px) var(--gutter);
}
.impact__inner { width: 100%; max-width: var(--container); margin-inline: auto; }
.impact__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(38px, 8.4vw, 132px); line-height: 1.28; letter-spacing: -0.035em;
  max-width: 15ch;
}
.impact .ch { display: inline-block; will-change: transform, opacity; }
.impact__rast {
  display: inline-block; color: var(--accent);
  /* Lock the box height so the live font-morph (taller/shorter fonts) can't
     change the line-box and re-center the whole title. Glyphs overflow freely
     into the generous line spacing above; the row never jumps. */
  height: 1em; line-height: 1; overflow: visible; vertical-align: baseline;
}
.impact__q { color: var(--accent); }

/* ============================================================
   CTA
   ============================================================ */
.cta { padding: clamp(90px, 14vw, 220px) 0; text-align: center; }
.cta .eyebrow { margin-bottom: 30px; }
.cta__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(46px, 11vw, 168px); line-height: 0.92; letter-spacing: -0.035em; }
.cta__title .line {
  display: block; overflow: hidden;
  padding-top: 0.16em; margin-top: -0.16em;
  padding-bottom: 0.12em; margin-bottom: -0.09em;
}
.cta__title .line > span { display: block; backface-visibility: hidden; }
.cta__actions { display: flex; flex-direction: column; align-items: center; gap: 28px; margin-top: clamp(40px, 6vw, 70px); }
.cta__email { font-family: var(--font-mono); font-size: clamp(14px, 1.6vw, 18px); color: var(--ink-dim); border-bottom: 1px solid var(--line-2); padding-bottom: 4px; transition: color .3s, border-color .3s; }
.cta__email:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding-top: clamp(50px, 7vw, 90px); border-top: 1px solid var(--line); overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: clamp(28px, 4vw, 60px); padding-bottom: clamp(50px, 7vw, 90px); }
.footer__tag { font-family: var(--font-display); font-size: clamp(20px, 2vw, 28px); line-height: 1.25; letter-spacing: -0.01em; max-width: 22ch; }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__heading { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.footer__col a { color: var(--ink-dim); font-size: 15px; width: fit-content; transition: color .3s; }
.footer__col a:hover { color: var(--accent); }
.footer__muted { color: var(--ink-faint); font-size: 14px; }

.footer__wordmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(90px, 26vw, 420px); line-height: 0.8; letter-spacing: -0.04em;
  text-align: center; color: var(--ink);
  display: flex; align-items: flex-start; justify-content: center;
  margin-bottom: -0.08em; user-select: none;
}
.footer__wordmark i { display: block; align-self: flex-start; width: 0.17em; height: 0.17em; border-radius: 50%; background: var(--accent); margin-top: 0.16em; animation: dotFly 7s ease-in-out infinite; will-change: transform; }
/* the footer dot gently drifts/orbits around its spot */
@keyframes dotFly {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(0.11em, -0.07em); }
  50%      { transform: translate(0.17em, 0.05em); }
  75%      { transform: translate(0.05em, 0.13em); }
}

.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 0; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); flex-wrap: wrap; }
.footer__totop { transition: color .3s; }
.footer__totop:hover { color: var(--accent); }

@media (max-width: 860px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__col--brand { grid-column: 1 / -1; } }

/* ============================================================
   REVEAL STATES (only when JS present; cleared if anim disabled)
   ============================================================ */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js .hero__title .line > span { transform: translateY(110%); }
/* NB: .cta__title lines are NOT pre-hidden here — they reveal via JS with
   immediateRender:false, so if that ScrollTrigger never fires the headline
   still stays visible (never a blank CTA). */

/* Fallback: JS loaded but GSAP unavailable → force everything visible */
.no-anim [data-reveal] { opacity: 1 !important; transform: none !important; }
.no-anim .hero__title .line > span,
.no-anim .cta__title .line > span { transform: none !important; }

/* ---------- Responsive nav ---------- */
@media (max-width: 880px) {
  .nav { display: none; }
  .nav__toggle { display: block; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero__title .line > span, .js .cta__title .line > span { transform: none; }
  .hero__canvas { display: none; }
}
