/* ---------- Fonts ---------- */
/* Your self-hosted "Editorial" serif. Drop the files in /public/fonts.
   Multiple formats are listed; the browser picks whichever exists, so you can
   provide just .woff2 (recommended) and ignore the rest. */
@font-face {
  font-family: "Editorial";
  src: url("/fonts/PPEditorialOld-Regular.otf") format("opentype"),
       url("/fonts/PPEditorialOld-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Editorial";
  src: url("/fonts/PPEditorialOld-Italic.otf") format("opentype"),
       url("/fonts/PPEditorialOld-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("/fonts/PPNeueMontreal-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("/fonts/PPNeueMontreal-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-serif: "Editorial", "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-neue: "Neue Montreal", "Inter", system-ui, -apple-system, sans-serif;

  --ink-dark: #0c1018; /* near-black used across text on light backgrounds */
  --cream: #f7f3f0; /* gradient's bottom stop; the work panel sits on this */

  /* Ink colours driven by scroll in main.js from the background luminance:
     --ink-rgb tracks the top of the viewport (fixed header),
     --ink-bottom-rgb tracks the bottom (sticky pills). */
  --ink-rgb: 255, 255, 255;
  /* constellations panel: copy + CTA fade dark → light while scrolling through */
  --con-ink-rgb: 12, 16, 24;
  /* hero headline: flips white → dark as the pinned gradient scrolls green → cream */
  --hero-ink-rgb: 255, 255, 255;

  font-family: var(--font-sans);
  line-height: 1.5;
  color: rgb(var(--ink-rgb));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #090808; /* = gradient top stop, avoids flash */
}

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

#app {
  display: flex;
  flex-direction: column;
}

/* ---------- Hero (tall, scroll-through gradient) ---------- */
.hero {
  position: relative;
  height: 200vh; /* scroll room: headline pins while the gradient scrolls behind
                    it (same mechanic as the constellations footer) */
  /* first viewport is all green (dark top → deep green); the light half of the
     gradient only comes into view as you scroll the pinned headline through it */
  background: linear-gradient(
    180deg,
    #090808 0%,
    #00462e 50%,
    /* transition zone, bridging through the green family to cream */
    #3f7c65 58%,
    #7ba694 65%,
    #b9cfc3 72%,
    rgb(254, 249, 225) 80%,
    rgb(247, 243, 240) 88%,
    rgb(247, 243, 240) 100%
  );
}

/* pinned first-viewport: the headline sticks in the centre of the screen while
   the tall gradient scrolls behind it, then releases so the work section can
   scroll up into view (mirrors .constellations__pin) */
.hero__inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* shared left/right gutter (~14.6% on the reference) */
.site-header,
.hero__headline {
  padding-left: max(1.25rem, 14.6vw);
  padding-right: max(1.25rem, 14.6vw);
}

/* ---------- Progressive scroll blur (frosted top) ---------- */
/* Fixed to the viewport top; each layer applies a doubling backdrop blur within
   a mask band that slides upward, so blur intensifies toward the very top.
   Sits below the header (z-index 10) so the logo stays crisp. */
.scroll-blur {
  position: fixed;
  inset: 0 0 auto 0;
  height: 200px;
  z-index: 15;
  pointer-events: none;
}

.scroll-blur > div {
  position: absolute;
  inset: 0;
}

/* Each layer's blur ramps up and its mask holds SOLID to the top (100%), so the
   frost peaks at the very top edge and never clears before content leaves. */
.scroll-blur > div:nth-child(1) {
  backdrop-filter: blur(0.4px);
  -webkit-backdrop-filter: blur(0.4px);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 16%, #000 100%);
  mask-image: linear-gradient(to top, transparent 0%, #000 16%, #000 100%);
}
.scroll-blur > div:nth-child(2) {
  backdrop-filter: blur(0.8px);
  -webkit-backdrop-filter: blur(0.8px);
  -webkit-mask-image: linear-gradient(to top, transparent 16%, #000 32%, #000 100%);
  mask-image: linear-gradient(to top, transparent 16%, #000 32%, #000 100%);
}
.scroll-blur > div:nth-child(3) {
  backdrop-filter: blur(1.6px);
  -webkit-backdrop-filter: blur(1.6px);
  -webkit-mask-image: linear-gradient(to top, transparent 32%, #000 48%, #000 100%);
  mask-image: linear-gradient(to top, transparent 32%, #000 48%, #000 100%);
}
.scroll-blur > div:nth-child(4) {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  -webkit-mask-image: linear-gradient(to top, transparent 48%, #000 64%, #000 100%);
  mask-image: linear-gradient(to top, transparent 48%, #000 64%, #000 100%);
}
.scroll-blur > div:nth-child(5) {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  -webkit-mask-image: linear-gradient(to top, transparent 64%, #000 80%, #000 100%);
  mask-image: linear-gradient(to top, transparent 64%, #000 80%, #000 100%);
}
.scroll-blur > div:nth-child(6) {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, transparent 80%, #000 96%, #000 100%);
  mask-image: linear-gradient(to top, transparent 80%, #000 96%, #000 100%);
}

/* ---------- Header (sticky, colour-adapting) ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: clamp(1.5rem, 2.6vw, 2.4rem);
  padding-bottom: clamp(1.5rem, 2.6vw, 2.4rem);
  color: rgb(var(--ink-rgb));
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* only one logo on screen at a time: header slides away when the footer logo shows */
.site-header.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.brand {
  /* "planning" logo (from Figma), recoloured via the scroll-driven ink so it is
     white over the dark top of the gradient and black over the cream bottom */
  display: block;
  height: 30px;
  aspect-ratio: 346 / 72;
  background-color: rgb(var(--ink-rgb));
  -webkit-mask: url("/logo-planning.svg") no-repeat center / contain;
  mask: url("/logo-planning.svg") no-repeat center / contain;
  transition: background-color 0.5s ease;
}

/* ---------- Headline ---------- */
.hero__headline {
  margin: 0;
  max-width: 30ch;
  /* headline runs wider than the gutter, closer to the right edge (as on the
     reference), so it breaks into 3 lines rather than 4 */
  padding-right: max(1.25rem, 4vw);
  font-family: var(--font-serif);
  font-weight: 400;
  font-optical-sizing: auto;
  font-size: clamp(2.5rem, 4.95vw, 4.5rem); /* measured 72px @ 1456px */
  line-height: 1.05;
  letter-spacing: -0.02em;
  /* flips white → dark (binary, eased over 0.5s) as the gradient behind the
     pinned headline scrolls from green to cream — same treatment as the logo */
  color: rgb(var(--hero-ink-rgb));
  transition: color 0.5s ease;
}

.hero__headline .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero__headline.is-in .word {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Work section (second/cream panel) ---------- */
.work {
  background: var(--cream); /* seamless with the gradient's bottom stop */
  color: var(--ink-dark);
  font-family: var(--font-neue);
  padding: clamp(3rem, 7vw, 6.5rem) max(1.25rem, 14.6vw) clamp(4rem, 10vw, 8rem);
}

.work__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.work__title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.2vw, 2rem); /* ~32px on the reference */
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.work__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project {
  padding-top: clamp(2rem, 3.5vw, 3rem);
  padding-bottom: clamp(2rem, 3.5vw, 3rem);
  border-top: 1px solid rgba(12, 16, 24, 0.12);
}

/* copy spans half the container, image spans the full width beneath it */
.project__info {
  max-width: 50%;
}

.project__name {
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.project__desc {
  margin: 0.75rem 0 0;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem); /* ~20px */
  line-height: 1.15;
  color: rgba(12, 16, 24, 0.4);
}

/* ---------- Feature panels (left = animatable, right = static mockup) ---------- */
.feature__panels {
  display: flex;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.feature__panel {
  background: #faf9f7;
  border-radius: 10px;
  overflow: hidden;
}

/* left panel: ~34% wide so the two boxes together keep the old 16:9 footprint */
.feature__panel--left {
  flex: 0 0 34%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* right panel is sized by its image's natural height (no cropping); the left
   panel stretches to match */
.feature__panel--right {
  flex: 1;
}

.feature__shot {
  display: block;
  width: 100%;
  height: auto;
}

/* "Suggested" + the suggestion pill (node 254:5355), stacked vertically (+20%) */
.suggest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
}

.suggest__label {
  font-family: var(--font-neue);
  font-size: 1.05rem; /* ~16.8px, +20% */
  color: #000;
  white-space: nowrap;
}

.suggest__pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 57.6px; /* +20% */
  padding: 9.6px 24px 9.6px 9.6px; /* +20% */
  background: transparent;
  border: 2px solid #e9e5e2; /* stroke stays 2px */
  border-radius: 100px;
}

/* rainbow stroke that rides on top of the border: laps the element twice, fades
   out to reveal the resting stroke, pauses ~3s, then repeats (used on the
   Feature 1 pill and the Feature 3 AI panel) */
@property --pill-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.suggest__pill::after,
.ai-panel::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  padding: 2px; /* ring thickness */
  background: conic-gradient(
    from var(--pill-angle),
    #7db6ff,
    #ff5f6d,
    #ff9d4d,
    #ffd54d,
    #5fce6b,
    #3ec9bd,
    #6ea8ff,
    #7db6ff
  );
  /* punch out the centre so only the 2px ring paints */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  animation: pill-rainbow 6.5s linear infinite;
}

.suggest__pill::after {
  inset: -2px; /* sit exactly over the 2px grey border */
}

.ai-panel::after {
  inset: 0; /* ring at the box edge */
}

@keyframes pill-rainbow {
  0% {
    --pill-angle: 0deg;
    opacity: 0;
  }
  3% {
    opacity: 1;
  } /* quick fade-in as it triggers */
  46% {
    --pill-angle: 720deg;
    opacity: 1;
  } /* two full laps (~3s), still visible */
  54% {
    --pill-angle: 720deg;
    opacity: 0;
  } /* fade out, grey stroke revealed */
  100% {
    --pill-angle: 720deg;
    opacity: 0;
  } /* ~3s pause before it loops */
}

@media (prefers-reduced-motion: reduce) {
  .suggest__pill::after,
  .ai-panel::after {
    animation: none;
    opacity: 0;
  }
}

.suggest__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38.4px; /* +20% */
  height: 38.4px;
  border-radius: 999px;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 2px 6px rgba(20, 16, 12, 0.12);
}

.suggest__plus svg {
  display: block;
  width: 19.2px; /* +20% */
  height: 19.2px;
}

.suggest__text {
  font-family: var(--font-neue);
  font-size: 1.05rem; /* ~16.8px, +20% */
  color: #000;
  white-space: nowrap;
}

/* ---------- Feature 2 left panel: "Active consents" list (node 255:8467) ---------- */
.actives {
  width: 100%;
  padding: clamp(1.25rem, 2.2vw, 2rem);
  font-family: var(--font-neue);
}

.actives__title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem; /* ~12px */
  font-weight: 500;
  color: #000;
}

.actives__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.actives__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0 14px;
  background: #fff;
  font-size: 0.75rem;
  color: #000;
}

.actives__row:first-child {
  border-radius: 7px 7px 0 0;
}

.actives__row:last-child {
  border-radius: 0 0 7px 7px;
}

.actives__who {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.actives__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.7rem;
  color: #1a1a1a;
}

.actives__name,
.actives__status {
  white-space: nowrap;
}

.actives__status--overdue {
  color: #f92f2b;
}

/* soft pastel avatar backgrounds (matching the Figma) */
.actives__avatar--je { background: #d6d4f0; }
.actives__avatar--fh { background: #f0ecc0; }
.actives__avatar--as { background: #cfe4f5; }
.actives__avatar--lb { background: #f5d9dc; }
.actives__avatar--cm { background: #e4d6f0; }

/* looping reveal: title + each row fade in 0.1s apart (top→bottom), hold ~7s,
   fade out in the same order, wait ~3s, repeat forever. The stagger comes from
   --i on each element; backwards fill keeps it hidden during its start delay. */
.actives__reveal {
  opacity: 0;
  animation: actives-cycle 11s ease-in-out calc(var(--i, 0) * 0.1s) infinite both;
}

@keyframes actives-cycle {
  0% {
    opacity: 0;
  }
  4.55% {
    opacity: 1;
  } /* fade in (~0.5s) */
  68.18% {
    opacity: 1;
  } /* hold (~7s) */
  72.73% {
    opacity: 0;
  } /* fade out (~0.5s) */
  100% {
    opacity: 0;
  } /* wait (~3s) then loop */
}

@media (prefers-reduced-motion: reduce) {
  .actives__reveal {
    animation: none;
    opacity: 1;
  }
}

/* ---------- Feature 3 left panel: effects checklist + AI panel (node 255:8512) ---------- */
.ai-effects {
  width: 100%;
  padding: clamp(1.25rem, 2.2vw, 2rem);
  font-family: var(--font-neue);
}

.ai-effects__list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-effects__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0 20px;
  background: #fff;
  border-radius: 7px;
}

.ai-effects__label {
  font-size: 0.875rem; /* 14px */
  color: #000;
  white-space: nowrap;
}

.ai-effects__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f92f2b;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
}

.ai-effects__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: #272727;
}

.ai-effects__caret svg {
  display: block;
}

/* the AI panel (gets the animated rainbow stroke) */
.ai-panel {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: #f2ede9;
  border-radius: 7px;
}

.ai-panel__spark {
  flex: none;
  color: #272727;
  line-height: 0;
  margin-top: 1px;
}

.ai-panel__spark svg {
  display: block;
}

.ai-panel__text {
  margin: 0;
  font-size: 0.875rem; /* 14px — matches the row labels in this section */
  line-height: 1.44;
  color: #272727;
}

/* ---------- Feature 4 left panel: status that resolves (nodes 255:8423 / 255:8459) ---------
   Looping (9.6s): the "Specialist assigned" panel fades in → its orange warning
   becomes a spinning rainbow stroke → the whole panel fades out → the "Response
   received" panel slides up 15px and fades into the same spot → holds 5s → repeat. */
.status {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(1.25rem, 2.2vw, 2rem);
  font-family: var(--font-neue);
}

/* both panels occupy the same cell so the "done" panel lands exactly where the
   "pending" panel was */
.status__stack {
  display: grid;
  place-items: center;
}

.status__row {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 15.6px; /* +20% */
  padding: 11px 17px; /* +20% */
  background: #fff;
  border-radius: 8px;
}

.status__row--pending {
  opacity: 1;
  animation: status-a 8s cubic-bezier(0.22, 1, 0.36, 1) infinite both;
}

.status__row--done {
  opacity: 0;
  transform: translateY(15px);
  animation: status-b 8s cubic-bezier(0.22, 1, 0.36, 1) infinite both;
}

/* icon slot: warning / spinner stacked in the same cell (+20%) */
.status__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 29px;
  height: 29px;
}

.status__icon-layer {
  grid-area: 1 / 1;
}

.status__icon-layer svg {
  display: block;
  width: 29px;
  height: 29px;
}

.status__warn {
  opacity: 1;
  animation: status-warn 8s ease infinite both;
}

/* spinning rainbow ring — 1px stroke inset inside the circle so it stays the
   same size as the icons */
.status__spinner {
  width: 24px;
  height: 24px;
  opacity: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #7db6ff,
    #ff5f6d,
    #ff9d4d,
    #ffd54d,
    #5fce6b,
    #3ec9bd,
    #6ea8ff,
    #7db6ff
  );
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 2px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, #0000 calc(100% - 2px), #000 calc(100% - 2px));
  animation: status-spin-rotate 1.1s linear infinite,
    status-spin-fade 8s ease infinite both;
}

.status__label {
  white-space: nowrap;
  font-size: 1.05rem; /* ~16.8px, +20% */
  color: #000;
}

/* Continuous replace loop (8s): each panel slides up 15px + fades into the same
   spot, holds, then slides up + fades out as the other slides in.
   0% = "Specialist assigned" showing (warning) · ~28% it exits while "Response
   received" slides in · holds ~5s · ~96% it exits while "Specialist assigned"
   slides back in, wrapping to 0%. */

/* pending panel: visible at 0%, exits ~28–32.5%, re-enters 95.625–100% */
@keyframes status-a {
  0% { opacity: 1; transform: translateY(0); }
  28.125% { opacity: 1; transform: translateY(0); }
  32.5% { opacity: 0; transform: translateY(-15px); }
  33% { opacity: 0; transform: translateY(15px); } /* reset below, hidden */
  95.625% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* orange warning: shows with the pending panel, hands off to the spinner */
@keyframes status-warn {
  0% { opacity: 1; }
  6.25% { opacity: 1; }
  11.25% { opacity: 0; }
  92% { opacity: 0; }
  95.625% { opacity: 1; } /* on again before the panel slides back in */
  100% { opacity: 1; }
}

/* rainbow spinner: takes over from the warning, spins, leaves with the panel */
@keyframes status-spin-fade {
  0% { opacity: 0; }
  6.25% { opacity: 0; }
  11.25% { opacity: 1; }
  28.125% { opacity: 1; }
  32.5% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes status-spin-rotate {
  to { transform: rotate(360deg); }
}

/* done panel: waits below, slides up + fades in ~28–32.5%, holds, exits 95.625–100% */
@keyframes status-b {
  0% { opacity: 0; transform: translateY(15px); }
  28.125% { opacity: 0; transform: translateY(15px); }
  32.5% { opacity: 1; transform: translateY(0); }
  95.625% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-15px); }
}

@media (prefers-reduced-motion: reduce) {
  .status__row--pending,
  .status__row--done,
  .status__warn,
  .status__spinner {
    animation: none;
  }
  .status__row--pending,
  .status__warn {
    opacity: 1;
  }
  .status__row--done {
    opacity: 0;
  }
  .status__spinner {
    opacity: 0;
  }
}

/* ---------- Constellations (orange gradient panel) ---------- */
.constellations {
  position: relative;
  height: 200vh; /* scroll room: content pins while the gradient scrolls behind */
  padding: 0 max(1.25rem, 14.6vw);
  /* exact newgenre gradient: light peach → orange → deep rust → near-black */
  background: linear-gradient(
    180deg,
    rgb(247, 243, 240) 0%,
    rgb(241, 189, 122) 17.4%,
    rgb(252, 190, 109) 33%,
    rgb(228, 108, 68) 51.5%,
    rgb(84, 37, 18) 78.3%,
    rgb(30, 19, 16) 100%
  );
}

/* pinned content: stays in view while the gradient scrolls underneath */
.constellations__pin {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: clamp(6rem, 11vw, 9rem); /* clears the fixed header */
  padding-bottom: calc(clamp(6rem, 11vw, 9rem) - 20px); /* 20px lower than the top gap */
}

/* auto-scrolling carousel of image boxes; boxes use --con-ink so they flip with
   the panel. The viewport fills the space between headline and CTA (80px gap
   above/below) and grows/shrinks with the viewport height (flex: 1); the track
   drifts left continuously for a seamless marquee. */
.thoughts__grid {
  margin-top: 80px;
  margin-bottom: 80px;
  /* full-bleed: negative margins cancel the section's side padding so the
     carousel spans the whole browser width (kept in sync at each breakpoint) */
  margin-left: calc(-1 * max(1.25rem, 14.6vw));
  margin-right: calc(-1 * max(1.25rem, 14.6vw));
  flex: 1;
  min-height: 0;
  /* flex container so the track stretches to full height (percentage heights
     don't resolve against a flex-sized parent) and overflow clips the marquee */
  display: flex;
  overflow: hidden;
  /* positioning context for the cursor-following pill */
  position: relative;
}

.thoughts__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex: none; /* keep intrinsic (max-content) width and full stretched height */
  /* one full set (half the duplicated track) drifts past over the duration */
  animation: thoughts-scroll 80s linear infinite;
}

.thoughts__item {
  flex: 0 0 auto;
  /* fixed width so ~3 show at once; margin (not gap) keeps every cell uniform so
     the -50% loop point is exactly seamless */
  width: clamp(200px, 23vw, 26rem);
  margin-right: clamp(0.5rem, 1vw, 0.85rem);
}

/* frosted "See work"-style pill that follows the cursor over the carousel — same
   blur treatment as the CTA. Position + label + text colour are set in main.js;
   .is-dark inverts the copy when the image behind it is too light to read on. */
.thoughts__pill {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-neue);
  font-size: 0.95rem;
  white-space: nowrap;
  color: #fff;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.25s ease;
}

.thoughts__pill.is-visible {
  opacity: 1;
}

.thoughts__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(var(--con-ink-rgb), 0.12); /* tint shows until the image loads */
}

@keyframes thoughts-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Short-viewport fallback: trim the 80px gaps (and top padding, while still
   clearing the fixed header) so the boxes stay visible instead of collapsing. */
@media (max-height: 820px) {
  .constellations__pin {
    padding-top: 7rem;
    padding-bottom: calc(7rem - 20px);
  }
  .thoughts__grid {
    margin-top: 48px;
    margin-bottom: 48px;
  }
}

@media (max-height: 660px) {
  .thoughts__grid {
    margin-top: 28px;
    margin-bottom: 28px;
  }
}

.constellations__headline {
  margin: 0;
  max-width: none;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 4.4vw, 4rem); /* ~64px on the reference */
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: rgb(var(--con-ink-rgb)); /* fades dark → light on scroll (main.js) */
  transition: color 0.5s ease;
}

.constellations__headline .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.constellations__headline.is-in .word {
  opacity: 1;
  transform: translateY(0);
}

/* pinned at the bottom of the content; colour adapts with the copy */
.constellations__cta {
  display: inline-flex;
  align-items: center;
  gap: 0;
  align-self: flex-start;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-neue);
  font-size: 0.95rem;
  color: rgb(var(--con-ink-rgb));
  background: rgba(var(--con-ink-rgb), 0.12);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color 0.5s ease, background-color 0.5s ease, gap 0.25s ease;
}

.constellations__cta:hover {
  background: rgba(var(--con-ink-rgb), 0.22);
  gap: 0.5rem;
}

.constellations__cta-arrow {
  display: inline-block;
  width: 0;
  overflow: hidden;
  font-size: 1.2em;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease, width 0.25s ease;
}

.constellations__cta:hover .constellations__cta-arrow {
  opacity: 1;
  transform: translateX(0);
  /* matches the glyph's own advance width so no extra gap sits before the
     button's right padding */
  width: 0.8em;
}

/* ---------- Contact / Work with us (dark panel) ---------- */
.contact {
  color: #f9fafb;
  font-family: var(--font-neue);
  padding: clamp(3rem, 7vw, 6rem) max(1.25rem, 14.6vw) clamp(4rem, 8vw, 7rem);
  /* stays the dark brown from the constellations bottom */
  background: rgb(30, 19, 16);
}

.contact__heading {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #f9fafb;
}

.contact__offices {
  display: flex;
  gap: clamp(2rem, 8vw, 7rem);
}

.office__city {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.office__time {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  color: rgba(249, 250, 251, 0.5);
}

.office__meta,
.office__address {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(249, 250, 251, 0.75);
}

.office__meta a {
  transition: opacity 0.2s ease;
}

.office__meta a:hover {
  opacity: 0.6;
}

.contact__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(1.5rem, 3.5vw, 2.75rem);
}

.contact__brand {
  display: block;
  height: 26px;
  aspect-ratio: 346 / 72;
  background-color: #f9fafb;
  -webkit-mask: url("/logo-planning.svg") no-repeat center / contain;
  mask: url("/logo-planning.svg") no-repeat center / contain;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .site-header,
  .hero__headline {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .work,
  .constellations {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .thoughts__grid {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    /* keep full-bleed, matched to the mobile side padding */
    margin-left: -1.25rem;
    margin-right: -1.25rem;
  }
  .contact {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .project__info {
    max-width: none;
  }
  /* stack the Feature 1 panels on narrow screens */
  .feature__panels {
    flex-direction: column;
  }
  .feature__panel--left {
    flex: none;
    aspect-ratio: 16 / 9;
  }
  /* On mobile the short 16:9 panel can't fit all five rows legibly, so show only
     the top three and enlarge everything for readability (no shrink-to-fit needed). */
  .feature__panel--left .actives__row:nth-child(n + 4) {
    display: none;
  }
  .feature__panel--left .actives__title {
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
  }
  .feature__panel--left .actives__list {
    gap: 4px;
  }
  .feature__panel--left .actives__row {
    min-height: 36px;
    padding: 0 16px;
    font-size: 0.85rem;
  }
  .feature__panel--left .actives__name,
  .feature__panel--left .actives__status {
    font-size: 0.85rem;
  }
  .feature__panel--left .actives__avatar {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
  /* Mobile: show only the Infringements row (hide Matters + Assessment) and
     enlarge the row and AI panel so they read clearly in the short 16:9 panel. */
  .feature__panel--left .ai-effects__row:nth-child(n + 2) {
    display: none;
  }
  .feature__panel--left .ai-effects__list {
    margin-bottom: 8px;
  }
  .feature__panel--left .ai-effects__row {
    min-height: 46px;
  }
  .feature__panel--left .ai-effects__label {
    font-size: 1rem;
  }
  .feature__panel--left .ai-effects__badge {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }
  .feature__panel--left .ai-panel {
    padding: 12px 14px;
    gap: 10px;
  }
  .feature__panel--left .ai-panel__text {
    font-size: 0.9rem;
    line-height: 1.35;
  }
  .contact__offices {
    flex-direction: column;
    gap: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__headline .word {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .thoughts__grid {
    opacity: 1;
  }
  .thoughts__track {
    animation: none;
  }
}
