/* =========================================================================
   Andres Taquechel — portfolio
   "Calm futurism": dark-first, borderless surfaces, generous whitespace,
   large soft radii, a slowly drifting aurora field, and cursor-tracked glow.

   Shape rules that keep it from reading boxy:
     - No 1px card outlines. Surfaces are gradients + shadow + a hairline
       inset highlight along the top edge only.
     - Radii start at 20px and go up. Controls are fully pill-shaped.
     - Dividers are hairlines, never full boxes.
   ========================================================================= */

/* ------------------------------------------------------------- tokens --- */
:root {
  color-scheme: dark;

  --ink: #06070a;
  --ink-2: #090b10;
  --surface: rgba(255, 255, 255, 0.032);
  --surface-hi: rgba(255, 255, 255, 0.055);
  --edge: rgba(255, 255, 255, 0.07);
  --edge-soft: rgba(255, 255, 255, 0.035);
  --hairline: rgba(255, 255, 255, 0.06);

  --text: #f2f3f6;
  --text-dim: #a7aebc;
  --text-faint: #6f7788;

  --accent: #ff9e62;
  --accent-2: #ffd0a8;
  --accent-glow: rgba(255, 158, 98, 0.5);
  --accent-wash: rgba(255, 158, 98, 0.1);
  --mint: #62e6b4;
  --violet: #a98cff;
  --sky: #7fb2ff;

  --node-trigger: #62e6b4;
  --node-ai: #ff9e62;
  --node-system: #7fb2ff;
  --node-outcome: #a98cff;

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;

  --max: 1240px;
  --gutter: clamp(1.35rem, 5vw, 4.5rem);
  --r-lg: 30px;
  --r-md: 22px;
  --r-sm: 15px;

  --lift: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 22px 60px -28px rgba(0, 0, 0, 0.9);
  --lift-hi: 0 1px 0 rgba(255, 255, 255, 0.09) inset,
    0 34px 90px -30px rgba(0, 0, 0, 0.95);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --ink: #f4f2ee;
  --ink-2: #efece7;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-hi: rgba(255, 255, 255, 0.95);
  --edge: rgba(28, 26, 24, 0.09);
  --edge-soft: rgba(28, 26, 24, 0.05);
  --hairline: rgba(28, 26, 24, 0.09);

  --text: #17181c;
  --text-dim: #545b66;
  --text-faint: #857f78;

  --accent: #b8430c;
  --accent-2: #8a3208;
  --accent-glow: rgba(184, 67, 12, 0.28);
  --accent-wash: rgba(184, 67, 12, 0.07);
  --mint: #04785c;
  --violet: #5f42c9;
  --sky: #2657bd;

  --node-trigger: #04785c;
  --node-ai: #b8430c;
  --node-system: #2657bd;
  --node-outcome: #5f42c9;

  --lift: 0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 44px -24px rgba(40, 34, 28, 0.28);
  --lift-hi: 0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 30px 70px -26px rgba(40, 34, 28, 0.34);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --ink: #f4f2ee;
    --ink-2: #efece7;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-hi: rgba(255, 255, 255, 0.95);
    --edge: rgba(28, 26, 24, 0.09);
    --edge-soft: rgba(28, 26, 24, 0.05);
    --hairline: rgba(28, 26, 24, 0.09);

    --text: #17181c;
    --text-dim: #545b66;
    --text-faint: #857f78;

    --accent: #b8430c;
    --accent-2: #8a3208;
    --accent-glow: rgba(184, 67, 12, 0.28);
    --accent-wash: rgba(184, 67, 12, 0.07);
    --mint: #04785c;
    --violet: #5f42c9;
    --sky: #2657bd;

    --node-trigger: #04785c;
    --node-ai: #b8430c;
    --node-system: #2657bd;
    --node-outcome: #5f42c9;

    --lift: 0 1px 0 rgba(255, 255, 255, 0.7) inset,
      0 18px 44px -24px rgba(40, 34, 28, 0.28);
    --lift-hi: 0 1px 0 rgba(255, 255, 255, 0.9) inset,
      0 30px 70px -26px rgba(40, 34, 28, 0.34);
  }
}

/* --------------------------------------------------------------- base --- */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17.5px;
  line-height: 1.72;
  letter-spacing: -0.004em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

img,
svg,
iframe {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.8rem 1.3rem;
  background: var(--accent);
  color: #16100b;
  border-radius: 0 0 12px 0;
  font-weight: 600;
}
.skip:focus {
  left: 0;
}

/* --------------------------------------------------- ambient backdrop --- */
/* Three slow-drifting radial fields + fine grain. Animates transform and
   opacity only, so it stays on the compositor. */
.field {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.field i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}

.field i:nth-child(1) {
  width: 62vw;
  height: 62vw;
  left: -18vw;
  top: -22vw;
  background: radial-gradient(circle, var(--accent-glow), transparent 68%);
  animation: drift-a 30s var(--ease-soft) infinite alternate;
}
.field i:nth-child(2) {
  width: 52vw;
  height: 52vw;
  right: -14vw;
  top: 22vh;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--violet) 42%, transparent),
    transparent 68%
  );
  opacity: 0.3;
  animation: drift-b 38s var(--ease-soft) infinite alternate;
}
.field i:nth-child(3) {
  width: 46vw;
  height: 46vw;
  left: 30vw;
  bottom: -20vw;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--mint) 34%, transparent),
    transparent 70%
  );
  opacity: 0.24;
  animation: drift-c 34s var(--ease-soft) infinite alternate;
}

:root[data-theme="light"] .field i {
  opacity: 0.3;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .field i {
    opacity: 0.3;
  }
}

@keyframes drift-a {
  to {
    transform: translate3d(14vw, 10vh, 0) scale(1.16);
  }
}
@keyframes drift-b {
  to {
    transform: translate3d(-13vw, -12vh, 0) scale(1.2);
  }
}
@keyframes drift-c {
  to {
    transform: translate3d(9vw, -14vh, 0) scale(0.86);
  }
}

/* Fine grain keeps the large gradients from banding. */
.grain {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .field i {
    animation: none;
  }
}

/* ------------------------------------------------------ scroll rail --- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 90;
  pointer-events: none;
}
.rail i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--mint));
}

/* --------------------------------------------------------------- nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 78px;
}

.nav__shell {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(18px) saturate(170%);
  background: color-mix(in srgb, var(--ink) 62%, transparent);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.nav__shell::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--hairline) 18%,
    var(--hairline) 82%,
    transparent
  );
}
.nav.is-stuck .nav__shell {
  opacity: 1;
}

.nav__mark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 620;
  letter-spacing: -0.024em;
  margin-right: auto;
  font-size: 1.02rem;
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--mint);
  opacity: 0;
  animation: ping 3.2s var(--ease) infinite;
}
@keyframes ping {
  0% {
    transform: scale(0.5);
    opacity: 0.7;
  }
  70%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.nav__links {
  position: relative;
  display: flex;
  gap: 0.35rem;
  font-size: 0.93rem;
}

.nav__links a {
  position: relative;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: var(--text-dim);
  transition: color 0.25s, background 0.25s;
}
.nav__links a:hover {
  color: var(--text);
  background: var(--surface);
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  transition: 0.28s var(--ease);
  flex: none;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface-hi);
  transform: translateY(-1px);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}
:root[data-theme="light"] .i-moon,
.i-sun {
  display: none;
}
:root[data-theme="light"] .i-sun {
  display: block;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .i-moon {
    display: none;
  }
  :root:not([data-theme="dark"]) .i-sun {
    display: block;
  }
}

@media (max-width: 760px) {
  .nav__links {
    display: none;
  }
  .nav__inner {
    height: 66px;
  }
}

/* -------------------------------------------------------------- hero --- */
.hero {
  position: relative;
  padding: clamp(4.5rem, 13vw, 10rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

@media (max-width: 940px) {
  .hero__grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.05rem 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  margin-bottom: 2rem;
}
.tag .mono {
  color: var(--text-dim);
  font-size: 0.66rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.15rem);
  max-width: 21ch;
  margin-bottom: 1.9rem;
}

/* Word-by-word entrance. The span wrapper is added by JS; without it the
   heading renders normally. */
.hero h1 .w {
  display: inline-block;
}
:root.js .hero h1 .w {
  opacity: 0;
  transform: translateY(0.5em) rotate(2deg);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
:root.js .hero h1.is-in .w {
  opacity: 1;
  transform: none;
}

/* The gradient has to be declared on the word spans too: `.w` is
   inline-block, and an inline-block child establishes its own painting
   context, which would otherwise clip the parent's gradient to nothing. */
.grad,
.grad .w {
  background-image: linear-gradient(
    104deg,
    var(--accent) 8%,
    var(--accent-2) 52%,
    var(--accent) 96%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 9s linear infinite;
}
@keyframes sheen {
  to {
    background-position: 220% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .grad {
    animation: none;
  }
}

.hero__pitch {
  font-size: clamp(1.08rem, 2.1vw, 1.32rem);
  color: var(--text-dim);
  max-width: 54ch;
  line-height: 1.62;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-top: 2rem;
  color: var(--text-faint);
  font-size: 0.92rem;
}
.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.hero__meta svg {
  width: 15px;
  height: 15px;
  opacity: 0.75;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2.5rem;
}

/* Pill controls with a soft glow on hover — no hard outlines anywhere. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 560;
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
  white-space: nowrap;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    120px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.14),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s;
}
.btn:hover {
  background: var(--surface-hi);
  transform: translateY(-2px);
  box-shadow: var(--lift);
}
.btn:hover::before {
  opacity: 1;
}
.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  position: relative;
}
.btn span {
  position: relative;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #17100a;
  font-weight: 640;
  box-shadow: 0 14px 40px -14px var(--accent-glow);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 55px -12px var(--accent-glow);
}
:root[data-theme="light"] .btn--primary {
  color: #fff;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .btn--primary {
    color: #fff;
  }
}

/* Portrait-slot / signature panel on the hero's right column. */
.sig {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border-radius: var(--r-lg);
  background: linear-gradient(
    155deg,
    var(--surface-hi),
    var(--surface) 60%,
    transparent
  );
  box-shadow: var(--lift);
  overflow: hidden;
}
.sig::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.1),
    transparent 42%
  );
  pointer-events: none;
}
.sig__q {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1.15rem;
  font-weight: 500;
}
.sig__who {
  font-size: 0.85rem;
  color: var(--text-faint);
}
.sig__rule {
  height: 1px;
  background: var(--hairline);
  margin: 1.3rem 0;
}
.sig__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--text-dim);
}
.sig__row b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 620;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.1rem;
}

/* ----------------------------------------------------------- marquee --- */
.band {
  position: relative;
  padding: clamp(2rem, 4vw, 3rem) 0;
  overflow: hidden;
}
.band__label {
  text-align: center;
  margin-bottom: 1.4rem;
}
.marquee {
  display: flex;
  gap: 0;
  width: max-content;
  animation: slide 46s linear infinite;
  /* Mask rather than paint gradients on top: an opaque fade in --ink would
     block the ambient glow behind and read as a flat dark rectangle. */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 9%,
    #000 91%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 9%,
    #000 91%,
    transparent
  );
}
.marquee:hover {
  animation-play-state: paused;
}
.marquee ul {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  margin: 0;
  padding: 0 1.3rem;
  list-style: none;
  flex: none;
}
.marquee li {
  font-size: 1.02rem;
  font-weight: 520;
  color: var(--text-faint);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee li:hover {
  color: var(--accent);
}
@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }
}
/* Edge fading is handled by the mask on .marquee above. */

/* ------------------------------------------------------------- stats --- */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.stat {
  position: relative;
  padding-top: 1.7rem;
}
/* Hairline above each figure instead of a surrounding box. */
.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--hairline);
}
.stat::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  height: 1px;
  width: 38px;
  background: var(--accent);
}

.stat__val {
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.7rem;
  color: var(--text);
}

.stat__label {
  font-size: 0.93rem;
  font-weight: 520;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.stat__note {
  font-size: 0.8rem;
  color: var(--text-faint);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .stats__grid {
    grid-template-columns: 1fr;
  }
  .stat__note {
    display: none;
  }
}

/* ----------------------------------------------------------- section --- */
.section {
  position: relative;
  padding: clamp(4rem, 10vw, 8.5rem) 0;
}

.section__head {
  max-width: 60ch;
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
}

.section__head .mono {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.3rem;
}
.section__head .mono::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.section__head h2 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  margin-bottom: 1.1rem;
}

.section__head p {
  color: var(--text-dim);
  font-size: 1.04rem;
}

/* ------------------------------------------------------------ filter --- */
.work-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.view-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--edge);
}

.view-toggle__button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  color: var(--text-faint);
  font-size: 0.86rem;
  font-weight: 580;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.view-toggle__button span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.72;
}

.view-toggle__button[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface-hi);
  box-shadow: var(--lift);
}

.view-note {
  color: var(--text-faint);
  font-size: 0.86rem;
  text-align: right;
}

@media (max-width: 680px) {
  .work-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .view-note {
    text-align: left;
  }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 520;
  backdrop-filter: blur(8px);
  transition: 0.3s var(--ease);
}
.chip:hover {
  color: var(--text);
  background: var(--surface-hi);
  transform: translateY(-1px);
}
.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #17100a;
  font-weight: 620;
  box-shadow: 0 10px 26px -12px var(--accent-glow);
}
:root[data-theme="light"] .chip[aria-pressed="true"] {
  color: #fff;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .chip[aria-pressed="true"] {
    color: #fff;
  }
}

.filter-count {
  color: var(--text-faint);
  font-size: 0.87rem;
  margin-bottom: 2rem;
  font-variant-numeric: tabular-nums;
}

[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------- cards --- */
.grid {
  width: 100%;
}

.grid--cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: clamp(0.9rem, 2vw, 1.4rem);
  /* Featured cards span two tracks, so without dense packing a wide card
     leaves an unfillable hole beside it. Dense lets single-width cards
     backfill those gaps. */
  grid-auto-flow: dense;
}

.grid--index {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.project-row {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) minmax(120px, 0.28fr) 1.6rem;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  width: 100%;
  padding: clamp(1.15rem, 2.2vw, 1.65rem);
  border-radius: var(--r-sm);
  background: linear-gradient(110deg, var(--surface-hi), var(--surface));
  text-align: left;
  overflow: hidden;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.project-row::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge), transparent);
}

.project-row:hover,
.project-row:focus-visible {
  transform: translateX(5px);
  background: linear-gradient(110deg, var(--surface-hi), var(--accent-wash));
  box-shadow: var(--lift);
}

.project-row__num,
.project-row__meta {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.project-row__main {
  display: grid;
  gap: 0.24rem;
}

.project-row__meta {
  color: var(--text-faint);
}

.project-row__main strong {
  color: var(--text);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  letter-spacing: -0.025em;
}

.project-row__summary {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.45;
}

.project-row__proof {
  display: grid;
  gap: 0.14rem;
}

.project-row__proof b {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.project-row__proof span {
  color: var(--text-faint);
  font-size: 0.72rem;
}

.project-row__open svg {
  width: 1rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}

.project-row:hover .project-row__open svg {
  transform: translateX(4px);
}

@media (max-width: 720px) {
  .project-row {
    grid-template-columns: 1.6rem minmax(0, 1fr) 1.2rem;
  }
  .project-row__proof {
    grid-column: 2;
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
  }
  .project-row__open {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.6rem, 2.6vw, 2.1rem);
  border-radius: var(--r-md);
  background: linear-gradient(158deg, var(--surface-hi), var(--surface) 70%);
  text-align: left;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  overflow: hidden;
  isolation: isolate;
}

/* Cursor-tracked glow. --mx/--my are written by JS on pointermove. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    var(--accent-wash),
    transparent 68%
  );
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

/* Hairline top edge that brightens on hover — replaces a full border. */
.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--edge) 22%,
    var(--edge) 78%,
    transparent
  );
  transition: background 0.45s var(--ease);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--lift-hi);
}
.card:hover::before,
.card:focus-visible::before {
  opacity: 1;
}
.card:hover::after {
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent) 30%,
    var(--accent-2) 70%,
    transparent
  );
}

.card--featured {
  grid-column: span 2;
}
@media (max-width: 800px) {
  .card--featured {
    grid-column: span 1;
  }
}

.card__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 620;
}

.badge--year {
  background: var(--surface);
  color: var(--text-faint);
}

.card h3 {
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.card__sub {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 540;
  margin-top: -0.5rem;
}

.card__blurb {
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.62;
}

.card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
  padding-top: 1.1rem;
  margin-top: auto;
  position: relative;
}
.card__metrics::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--hairline);
}

.card__metric b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 620;
  color: var(--text);
  letter-spacing: -0.03em;
}
.card__metric span {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.card__open {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 560;
  color: var(--accent);
}
.card__open svg {
  width: 14px;
  height: 14px;
  transition: transform 0.4s var(--ease);
}
.card:hover .card__open svg {
  transform: translateX(5px);
}

/* --------------------------------------------------------- pipeline --- */
.pipe {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  padding: 1.4rem 0.2rem 1.7rem;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.pipe__node {
  flex: 1 0 158px;
  min-width: 158px;
  padding: 1rem 1.1rem;
  border-radius: var(--r-sm);
  background: linear-gradient(155deg, var(--surface-hi), var(--surface));
  scroll-snap-align: start;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease),
    box-shadow 0.6s var(--ease);
}

/* Hidden-until-scrolled only while JS is driving the animation. If scripting
   or IntersectionObserver fails, content stays visible rather than blank. */
:root.js .pipe__node {
  opacity: 0;
  transform: translateY(14px) scale(0.97);
}

.pipe.is-live .pipe__node {
  opacity: 1;
  transform: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--kc) 26%, transparent) inset,
    0 14px 34px -22px rgba(0, 0, 0, 0.8);
}

.pipe__node b {
  display: block;
  font-size: 0.88rem;
  font-weight: 620;
  line-height: 1.3;
  margin-bottom: 0.3rem;
  letter-spacing: -0.015em;
}

.pipe__node span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.45;
}

.pipe__kind {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
  color: var(--kc);
}
.pipe__kind i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kc);
  box-shadow: 0 0 10px var(--kc);
  flex: none;
}

.pipe__node[data-kind="trigger"] {
  --kc: var(--node-trigger);
}
.pipe__node[data-kind="ai"] {
  --kc: var(--node-ai);
}
.pipe__node[data-kind="system"] {
  --kc: var(--node-system);
}
.pipe__node[data-kind="outcome"] {
  --kc: var(--node-outcome);
}

.pipe__link {
  flex: 0 0 30px;
  align-self: center;
  height: 1px;
  background: var(--hairline);
  position: relative;
}

.pipe__link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
:root.js .pipe__link::after {
  transform: scaleX(0);
}
.pipe.is-live .pipe__link::after {
  transform: scaleX(1);
}

.pipe__link::before {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: opacity 0.4s 0.4s;
}
:root.js .pipe__link::before {
  opacity: 0;
}
.pipe.is-live .pipe__link::before {
  opacity: 1;
}

/* Reduced-motion handling for these lives with the .reveal rules at the
   end of the file, where the :root.js specificity matches. */

/* ---------------------------------------------------------- detail --- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  pointer-events: none;
}

.sheet[hidden] {
  display: none;
}

.sheet__scrim {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.sheet__panel {
  position: relative;
  width: min(920px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(
    170deg,
    color-mix(in srgb, var(--ink-2) 96%, var(--accent) 4%),
    var(--ink-2) 55%
  );
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  transform: translateY(30px) scale(0.985);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
  pointer-events: auto;
  box-shadow: var(--lift-hi);
}

.sheet.is-open {
  pointer-events: auto;
}
.sheet.is-open .sheet__scrim {
  opacity: 1;
}
.sheet.is-open .sheet__panel {
  transform: none;
  opacity: 1;
}

@media (min-width: 800px) {
  .sheet {
    place-items: center;
  }
  .sheet__panel {
    border-radius: var(--r-lg);
  }
}

.sheet__close {
  position: sticky;
  top: 1.1rem;
  float: right;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 1.1rem 1.1rem 0 0;
  border-radius: 999px;
  background: var(--surface-hi);
  backdrop-filter: blur(12px);
  color: var(--text-dim);
  transition: 0.3s var(--ease);
}
.sheet__close:hover {
  color: var(--text);
  transform: rotate(90deg);
}
.sheet__close svg {
  width: 16px;
  height: 16px;
}

.sheet__body {
  padding: clamp(1.7rem, 4vw, 3.2rem);
}

.sheet__body > .card__top {
  margin-bottom: 1.1rem;
}

.sheet__body h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.sheet__lede {
  color: var(--accent);
  font-size: 1.06rem;
  font-weight: 540;
  margin-bottom: 1.7rem;
}

.sheet h4 {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 620;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 2.6rem 0 1.05rem;
}
.sheet h4::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.sheet p,
.sheet li {
  color: var(--text-dim);
  font-size: 0.99rem;
}

.sheet ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.95rem;
}

.sheet li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.75rem;
  line-height: 1.68;
}

.sheet li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 0.6em;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

.sheet ul.outcomes li::before {
  background: var(--mint);
  opacity: 1;
  box-shadow: 0 0 10px color-mix(in srgb, var(--mint) 60%, transparent);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: 0.6rem;
}

.metric-row div {
  position: relative;
  padding-top: 1.1rem;
}
.metric-row div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--hairline);
}
.metric-row b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 620;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.metric-row span {
  font-size: 0.79rem;
  color: var(--text-faint);
  line-height: 1.45;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-pill {
  padding: 0.36rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* -------------------------------------------------------- approach --- */
.approach {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem) clamp(1.8rem, 4vw, 3rem);
}

.approach__item {
  position: relative;
  padding-top: 1.35rem;
}
.approach__item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--hairline);
}
.approach__item::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.6s var(--ease);
}
.approach__item:hover::after {
  width: 100%;
}

.approach__step {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 620;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.65rem;
}

.approach__item h3 {
  font-size: 1.08rem;
  margin-bottom: 0.38rem;
  letter-spacing: -0.02em;
}

.approach__item p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------ chat --- */
.chat {
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--surface-hi), var(--surface) 70%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 880px;
  box-shadow: var(--lift);
  position: relative;
}
.chat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--edge) 20%,
    var(--edge) 80%,
    transparent
  );
  pointer-events: none;
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.15rem 1.5rem;
  position: relative;
}
.chat__head::after {
  content: "";
  position: absolute;
  inset: auto 1.5rem 0 1.5rem;
  height: 1px;
  background: var(--hairline);
}

.chat__head b {
  font-size: 0.94rem;
  font-weight: 580;
}

.chat__head span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.chat__log {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 200px;
  max-height: 440px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.msg {
  display: flex;
  gap: 0.85rem;
  font-size: 0.96rem;
  line-height: 1.68;
  animation: rise 0.45s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.msg__who {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--surface-hi);
  color: var(--text-faint);
}

.msg--bot .msg__who {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #17100a;
}

.msg__text {
  color: var(--text-dim);
  padding-top: 0.22rem;
}
.msg--user .msg__text {
  color: var(--text);
}
.msg__text p + p {
  margin-top: 0.8rem;
}
.msg__text strong {
  color: var(--text);
  font-weight: 620;
}

.dots {
  display: inline-flex;
  gap: 5px;
  padding-top: 0.55rem;
}
.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.3s ease-in-out infinite;
}
.dots i:nth-child(2) {
  animation-delay: 0.16s;
}
.dots i:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes blink {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.chat__seeds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.5rem 1.15rem;
}

.seed {
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.84rem;
  transition: 0.3s var(--ease);
}
.seed:hover {
  color: var(--accent);
  background: var(--accent-wash);
  transform: translateY(-1px);
}

.chat__form {
  display: flex;
  gap: 0.7rem;
  padding: 1.15rem 1.5rem;
  position: relative;
}
.chat__form::before {
  content: "";
  position: absolute;
  inset: 0 1.5rem auto 1.5rem;
  height: 1px;
  background: var(--hairline);
}

.chat__form input {
  flex: 1;
  min-width: 0;
  padding: 0.82rem 1.2rem;
  border-radius: 999px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: background 0.3s;
}
.chat__form input::placeholder {
  color: var(--text-faint);
}
.chat__form input:focus {
  outline: none;
  background: var(--surface-hi);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.chat__send {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #17100a;
  transition: 0.3s var(--ease);
  flex: none;
  box-shadow: 0 10px 26px -12px var(--accent-glow);
}
:root[data-theme="light"] .chat__send,
:root[data-theme="light"] .msg--bot .msg__who {
  color: #fff;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .chat__send,
  :root:not([data-theme="dark"]) .msg--bot .msg__who {
    color: #fff;
  }
}
.chat__send:hover {
  transform: translateY(-2px) scale(1.04);
}
.chat__send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.chat__send svg {
  width: 17px;
  height: 17px;
}

.chat__note {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 1.1rem;
  max-width: 60ch;
}

/* --------------------------------------------------------- booking --- */
.book {
  position: relative;
}

.book__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

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

.book__frame {
  position: relative;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--surface-hi), var(--surface) 70%);
  box-shadow: var(--lift);
  overflow: hidden;
  min-height: 620px;
}

/* Google's booking iframe paints no background of its own, so whatever sits
   behind it decides legibility. On the dark card its dark-theme text was
   barely readable; a light surface makes it crisp and reads as a deliberate
   white panel against the page. Scoped to `.is-embed` (set by JS only when
   the iframe is actually inserted) so the dark fallback card is unaffected. */
.book__frame.is-embed {
  background: #ffffff;
}

.book__frame iframe {
  display: block;
  width: 100%;
  height: 660px;
  border: 0;
}

.book__fallback {
  display: grid;
  gap: 1.15rem;
  place-content: center;
  justify-items: start;
  padding: clamp(2rem, 5vw, 3.4rem);
  min-height: 620px;
}
.book__fallback h3 {
  font-size: 1.5rem;
}
.book__fallback p {
  color: var(--text-dim);
  font-size: 0.97rem;
  max-width: 42ch;
}
.book__fallback .mono {
  color: var(--text-faint);
}

.book__list {
  display: grid;
  gap: 1px;
  margin-top: 2rem;
}
.book__list div {
  position: relative;
  padding: 1.15rem 0;
}
.book__list div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--hairline);
}
.book__list b {
  display: block;
  font-size: 0.95rem;
  font-weight: 560;
  margin-bottom: 0.2rem;
}
.book__list span {
  font-size: 0.87rem;
  color: var(--text-faint);
}

/* --------------------------------------------------------- contact --- */
.contact__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

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

.contact h2 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 1.2rem;
}

.contact p {
  color: var(--text-dim);
  max-width: 46ch;
}

.contact__links {
  display: grid;
}

.contact__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.35rem 0.4rem;
  transition: padding-left 0.4s var(--ease);
}
.contact__link::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--hairline);
}
.contact__link:last-child::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--hairline);
}
.contact__link:hover {
  padding-left: 1.1rem;
}
.contact__link > svg:first-child {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex: none;
}
.contact__link b {
  display: block;
  font-size: 0.98rem;
  font-weight: 560;
}
.contact__link span span {
  font-size: 0.84rem;
  color: var(--text-faint);
}
.contact__link .arw {
  margin-left: auto;
  width: 15px;
  height: 15px;
  color: var(--text-faint);
  transition: transform 0.4s var(--ease), color 0.3s;
}
.contact__link:hover .arw {
  transform: translateX(5px);
  color: var(--accent);
}

/* ---------------------------------------------------------- footer --- */
.footer {
  position: relative;
  padding: 2.4rem 0 3rem;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0 var(--gutter) auto var(--gutter);
  height: 1px;
  background: var(--hairline);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  color: var(--text-faint);
}

/* --------------------------------------------------------- reveal --- */
.reveal {
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

/* Same guard as the pipeline: the hidden state exists only while JS can
   remove it. No JS, no IntersectionObserver, or a script error → visible. */
:root.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}

:root.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  :root.js .reveal,
  :root.js .pipe__node,
  :root.js .pipe__link::after,
  :root.js .pipe__link::before,
  :root.js .hero h1 .w {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
