/* ==========================================================================
   Sections, in DOM order: hero, ticker, manifesto, process, projects,
   contact, footer. Each one uses a different layout family.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero: full-bleed dot board behind an asymmetric split.
   The CSS hole pattern sits under the canvas on the same grid (hero.js keeps
   --board-cell in sync with the board), so the swap to WebGL is seamless and
   the pattern is the fallback. Like the board, it thins out behind the text.
   -------------------------------------------------------------------------- */

.hero {
  --board-cell: 16px;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: calc(var(--nav-top) + var(--nav-h) + 32px);
  padding-bottom: 48px;
  overflow: clip;
  background-color: var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: var(--z-board);
  pointer-events: none;
  background-image: radial-gradient(
    circle at center,
    var(--hole) 0 calc(var(--board-cell) * 0.11),
    transparent calc(var(--board-cell) * 0.11 + 0.55px)
  );
  background-size: var(--board-cell) var(--board-cell);
  background-position: 0 0;
  -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0.3) 0 42%, #000 50%);
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0.3) 0 42%, #000 50%);
}

@media (min-width: 1024px) {
  .hero::before {
    -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0.3) 0 62%, #000 72%);
    mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0.3) 0 62%, #000 72%);
  }
}

.hero__board {
  position: absolute;
  inset: 0;
  z-index: var(--z-board);
  width: 100%;
  height: 100%;
}

.hero.is-board-fallback .hero__board {
  display: none;
}

.hero__grid {
  position: relative;
  z-index: var(--z-content);
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  row-gap: 24px;
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 780;
  font-stretch: 112%;
  letter-spacing: var(--tracking-display);
  line-height: 0.94;
}

.hero__title-art {
  display: block;
}

/* Word masks for the load animation. Padding widens the clip box so accents
   and descenders are never cut; the negative margin keeps layout intact. */
.word {
  display: inline-block;
  overflow: clip;
  vertical-align: top;
  padding: 0.08em 0.03em 0.12em;
  margin: -0.08em -0.03em -0.12em;
}

.word__inner {
  display: inline-block;
  transition: transform 800ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}

/* The slab: a square, stamped accent block behind the emphasized word. */
.slab {
  display: inline-block;
  vertical-align: top;
  padding: 0.035em 0.07em 0.06em;
  margin: -0.035em 0.02em -0.06em -0.02em;
  border-radius: var(--radius-slab);
  background: var(--accent);
  color: var(--on-accent);
  transition: clip-path 600ms var(--ease-in-out) var(--slab-delay, 420ms);
}

.hero__copy {
  display: grid;
  gap: 28px;
  justify-items: start;
}

.hero__sub {
  max-width: 34ch;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

[data-hero-fade] {
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
  transition-delay: var(--fade-delay, 640ms);
}

@media (prefers-reduced-motion: no-preference) {
  html.js:not(.is-hero-ready) .hero__title .word__inner {
    transform: translateY(110%);
  }

  html.js:not(.is-hero-ready) .hero__title .slab {
    clip-path: inset(0 100% 0 0);
  }

  html.js:not(.is-hero-ready) .hero [data-hero-fade] {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Stage: the square where the board draws the current project glyph. */
.hero__stage-wrap {
  width: min(100%, 420px);
  margin-top: 16px;
}

.stage {
  width: 100%;
}

.stage__square {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.stage__fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  container-type: inline-size;
  color: var(--accent);
}

.hero.is-board-fallback .stage__fallback,
html:not(.js) .stage__fallback {
  display: grid;
}

.stage__fallback i {
  font-size: 78cqi;
  line-height: 1;
}

.stage__fallback-text {
  font-size: 44cqi;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stage__caption {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

html:not(.js) .stage__caption {
  display: none;
}

.stage__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 28px;
}

/* Name + status travel together; when space runs out the link drops to the
   next line as a whole. */
.stage__name {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.stage__name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 600;
  font-stretch: 106%;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.stage__status {
  flex: none;
}

.stage__row .link {
  flex: none;
}

.stage__name-text,
.stage__status {
  transition:
    opacity 180ms ease,
    transform 220ms var(--ease-out);
}

.stage__caption.is-swapping .stage__name-text,
.stage__caption.is-swapping .stage__status {
  opacity: 0;
  transform: translateY(6px);
}

@media (prefers-reduced-motion: reduce) {
  .stage__caption.is-swapping .stage__name-text,
  .stage__caption.is-swapping .stage__status {
    transform: none;
  }
}

/* Stepper: one dot per featured project; the current one carries the
   autoplay progress ring. */
@property --stage-progress {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

.stepper {
  display: flex;
  align-items: center;
  margin-right: -6px;
}

.stepper__dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

.stepper__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hole);
  transition:
    background-color var(--dur-ui) ease,
    transform var(--dur-ui) var(--ease-out);
}

.stepper__dot:active::before {
  transform: scale(0.8);
}

.stepper__dot[aria-current="true"]::before {
  background: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .stepper__dot:not([aria-current="true"]):hover::before {
    background: var(--ink-2);
  }
}

.stepper__ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  opacity: 0;
  background: conic-gradient(var(--accent) calc(var(--stage-progress) * 1turn), color-mix(in oklab, var(--accent) 22%, transparent) 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
}

html:not(.has-registered-props) .stepper__ring {
  background: var(--accent);
}

.stepper__dot[aria-current="true"] .stepper__ring {
  opacity: 1;
}

.stepper.is-autoplay .stepper__dot[aria-current="true"] .stepper__ring {
  animation: stage-progress var(--stage-interval, 4500ms) linear both;
}

.stepper.is-autoplay.is-paused .stepper__ring {
  animation-play-state: paused;
}

@keyframes stage-progress {
  from {
    --stage-progress: 0;
  }
  to {
    --stage-progress: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stepper__ring {
    display: none;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding-top: calc(var(--nav-top) + var(--nav-h) + 28px);
    padding-bottom: clamp(32px, 6vh, 64px);
  }

  .hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    align-content: stretch;
    column-gap: 24px;
    row-gap: clamp(28px, 4.5vh, 56px);
  }

  .hero__title {
    grid-column: 1 / -1;
    font-stretch: var(--stretch-display);
  }

  .hero__copy {
    grid-column: 1 / span 6;
    align-self: start;
    gap: 32px;
  }

  .hero__stage-wrap {
    --caption-h: 86px;
    grid-column: 7 / -1;
    width: auto;
    min-height: 340px;
    margin-top: 0;
    container-type: size;
  }

  .stage {
    width: min(100cqw, 100cqh - var(--caption-h));
    margin-left: auto;
  }
}

/* --------------------------------------------------------------------------
   Ticker band: the only marquee on the page.
   -------------------------------------------------------------------------- */

.ticker {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 64px;
  border-block: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}

.ticker__label {
  position: relative;
  z-index: 2;
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  padding-inline: var(--gutter) 20px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.ticker__viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

.ticker__track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
}

.ticker.is-running .ticker__track {
  animation: ticker-scroll var(--ticker-duration, 30s) linear infinite;
}

@media (hover: hover) and (pointer: fine) {
  .ticker.is-running:hover .ticker__track {
    animation-play-state: paused;
  }
}

/* Keyboard focus parks the band at its start so focused links are visible. */
.ticker.is-running:focus-within .ticker__track {
  animation: none;
}

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

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding-inline: 18px;
  border-radius: var(--radius-pill);
  font-size: 20px;
  font-weight: 700;
  font-stretch: 115%;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  transition: color var(--dur-ui) ease;
}

.ticker__item:focus-visible {
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .ticker__item:hover {
    color: var(--accent-ink);
  }
}

.ticker__sep {
  flex: none;
  width: 6px;
  height: 6px;
  margin-inline: 14px;
  border-radius: 50%;
  background: var(--hole);
}

/* Reduced motion: a still, horizontally scrollable band. */
.ticker.is-static .ticker__viewport {
  overflow-x: auto;
  -webkit-mask-image: none;
  mask-image: none;
}

.ticker.is-static .ticker__viewport.is-overflowing {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
}

.ticker.is-static .ticker__track {
  padding-inline: 8px;
}

.ticker__label .eyebrow {
  white-space: nowrap;
}

@media (max-width: 559.98px) {
  .ticker__label {
    gap: 10px;
    padding-right: 14px;
  }

  .ticker__item {
    font-size: 18px;
    padding-inline: 14px;
  }
}

/* --------------------------------------------------------------------------
   Manifesto (#about): one statement lit word by word as it scrolls, then
   four principles on hairlines.
   -------------------------------------------------------------------------- */

.manifesto {
  max-width: 22em;
  font-size: var(--fs-manifesto);
  font-weight: 600;
  font-stretch: 106%;
  letter-spacing: -0.028em;
  line-height: 1.12;
  text-wrap: pretty;
}

.manifesto em {
  color: var(--accent-ink);
}

.mw {
  display: inline-block;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .manifesto.is-split .mw {
      view-timeline: --mw block;
      animation: mw-light linear both;
      animation-timeline: --mw;
      animation-range: entry 60% cover 45%;
    }

    .manifesto.is-split .mw em {
      animation: mw-accent linear both;
      animation-timeline: --mw;
      animation-range: entry 60% cover 45%;
    }
  }
}

@keyframes mw-light {
  from {
    opacity: 0.16;
  }
  to {
    opacity: 1;
  }
}

@keyframes mw-accent {
  from {
    color: var(--ink);
  }
  to {
    color: var(--accent-ink);
  }
}

.principles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px 32px;
  margin-top: clamp(72px, 10vw, 144px);
}

.principle {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.principle::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.principle__icon {
  display: block;
  font-size: 28px;
  color: var(--accent-ink);
}

.principle__title {
  margin-top: 20px;
  font-size: 20px;
  font-weight: 650;
  font-stretch: 106%;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.principle__body {
  margin-top: 8px;
  max-width: 30ch;
  color: var(--ink-2);
}

@media (min-width: 700px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .principles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Process (#process): sticky dot display + scrolling steps on desktop,
   a plain vertical list below 1024px.
   -------------------------------------------------------------------------- */

.process .section-title {
  max-width: 12em;
}

.process__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: clamp(48px, 7vw, 96px);
}

.process__aside {
  display: none;
}

.process__steps {
  position: relative;
}

.process__list {
  display: grid;
  gap: 56px;
}

.process__rail {
  display: none;
}

.process-step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.process-step__icon {
  display: block;
  font-size: 36px;
  color: var(--accent);
}

.process-step__title {
  position: relative;
  font-size: var(--fs-manifesto);
  font-weight: 720;
  font-stretch: 110%;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.process-step__body {
  max-width: 40ch;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-2);
}

.process-display {
  position: sticky;
  top: 112px;
  width: min(100%, calc(100vh - 160px));
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--bg-raised);
  isolation: isolate;
}

.process-display__board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.process-display__stage {
  position: absolute;
  inset: 10%;
  pointer-events: none;
}

.process-display__fallback {
  position: absolute;
  inset: 10%;
  display: none;
  place-items: center;
  container-type: inline-size;
  color: var(--accent);
}

.process-display__fallback i {
  font-size: 78cqi;
  line-height: 1;
}

.process-display.is-board-fallback,
html:not(.js) .process-display {
  background-image: radial-gradient(circle at center, var(--hole) 0 1.54px, transparent 2.1px);
  background-size: 14px 14px;
}

.process-display.is-board-fallback .process-display__board,
html:not(.js) .process-display__board {
  display: none;
}

.process-display.is-board-fallback .process-display__fallback,
html:not(.js) .process-display__fallback {
  display: grid;
}

.process-display__caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-lg);
  font-stretch: var(--stretch-mono);
  color: var(--ink-2);
}

.process-display__pegs {
  display: flex;
  gap: 5px;
}

.process-display__pegs span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hole);
  transition: background-color 300ms ease;
}

.process-display__pegs span.is-on {
  background: var(--accent);
}

@media (min-width: 1024px) {
  .process__layout {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
  }

  .process__aside {
    display: block;
    grid-column: 1 / span 5;
  }

  .process__steps {
    grid-column: 6 / -1;
    margin-left: clamp(24px, 3vw, 56px);
    padding-left: 56px;
  }

  .process__list {
    gap: 0;
  }

  .process__rail {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 1px;
    background: var(--line);
  }

  .process__rail-fill {
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform-origin: top;
    transform: scaleY(var(--rail, 0.25));
    transition: transform 500ms var(--ease-in-out);
  }

  .process-step {
    min-height: 62vh;
    transition: opacity 300ms var(--ease-out);
  }

  html.js .process-step:not(.is-active) {
    opacity: 0.28;
  }

  .process-step__icon {
    display: none;
  }

  .process-step__title::before {
    content: "";
    position: absolute;
    top: 0.51em;
    left: -56px;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4px;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    transition:
      background-color 300ms ease,
      border-color 300ms ease;
  }

  .process-step.is-reached .process-step__title::before {
    border-color: var(--accent);
    background: var(--accent);
  }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .process__rail-fill,
  .process-step {
    transition-duration: 1ms;
  }
}

/* --------------------------------------------------------------------------
   Projects (#projects): a typographic index, not a card grid.
   -------------------------------------------------------------------------- */

.projects__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 20px;
}

.projects__count {
  margin-top: 0.7em;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-lg);
  font-stretch: var(--stretch-mono);
  color: var(--ink-2);
  white-space: nowrap;
}

.projects__filters {
  margin-top: clamp(32px, 4vw, 48px);
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  padding-block: 4px;
}

.index {
  margin-top: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}

.index__item {
  border-top: 1px solid var(--line);
}

.index__heading {
  font-size: inherit;
  font-weight: inherit;
}

.index__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name plus"
    "meta meta";
  align-items: center;
  gap: 14px 20px;
  width: 100%;
  padding: 26px 0;
  text-align: left;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
}

.index__row:focus-visible {
  outline-offset: -2px;
}

.index__name {
  position: relative;
  grid-area: name;
  justify-self: start;
  max-width: 100%;
  font-size: var(--fs-project);
  font-weight: 760;
  font-stretch: 115%;
  letter-spacing: -0.04em;
  line-height: 1;
  overflow-wrap: anywhere;
}

/* Slab clone: same text on an accent block, revealed with clip-path. */
.index__slab {
  position: absolute;
  inset: -0.03em -0.08em -0.06em;
  padding: 0.03em 0.08em 0.06em;
  border-radius: var(--radius-slab);
  background: var(--accent);
  color: var(--on-accent);
  pointer-events: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 200ms var(--ease-out);
}

.index__row:focus-visible .index__slab {
  clip-path: inset(0);
  transition-duration: 320ms;
}

@media (hover: hover) and (pointer: fine) {
  .index__row:hover .index__slab {
    clip-path: inset(0);
    transition-duration: 320ms;
  }
}

.index__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-stretch: var(--stretch-mono);
  color: var(--ink-2);
}

.index__tags,
.index__year {
  white-space: nowrap;
}

.index__plus {
  grid-area: plus;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 18px;
  color: var(--ink);
  transition:
    transform 320ms var(--ease-in-out),
    background-color var(--dur-ui) ease,
    border-color var(--dur-ui) ease;
}

.index__row[aria-expanded="true"] .index__plus {
  transform: rotate(45deg);
  border-color: var(--ink);
}

.index__row:active .index__plus {
  scale: 0.94;
}

@media (hover: hover) and (pointer: fine) {
  .index__row:hover .index__plus {
    border-color: var(--ink);
  }
}

.index__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows 320ms var(--ease-in-out),
    visibility 0s linear 320ms;
}

.index__item.is-open .index__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition:
    grid-template-rows 320ms var(--ease-in-out),
    visibility 0s;
}

.index__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.index__panel-body {
  display: grid;
  gap: 20px;
  justify-items: start;
  max-width: 62ch;
  padding-bottom: 36px;
}

.index__desc {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink);
}

.index__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

@media (prefers-reduced-motion: reduce) {
  .index__panel,
  .index__item.is-open .index__panel {
    transition-duration: 1ms;
  }
}

@media (min-width: 1024px) {
  .index__row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "name meta plus";
    column-gap: 40px;
    padding: 30px 0;
  }

  .index__meta {
    display: grid;
    grid-template-columns: 11.5rem 13rem 3rem;
    column-gap: 24px;
  }

  .index__tags {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .index__year {
    text-align: right;
  }

  .index__panel-body {
    padding-left: 2px;
  }
}

.empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: clamp(24px, 3vw, 40px);
  padding: 56px 24px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-panel);
  text-align: center;
  color: var(--ink-2);
}

.empty i {
  font-size: 32px;
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   Contact (#contact): centered over the dot field, with an accent spotlight
   that follows the pointer. A feathered plate of the page background sits
   behind the content (above the dot layers, below the text) so neither the
   holes nor the spotlight ever light up behind a word.
   -------------------------------------------------------------------------- */

.contact {
  isolation: isolate;
  overflow: clip;
  border-top: 1px solid var(--line);
}

.contact__dots,
.contact__spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-size: var(--dot-grid) var(--dot-grid);
  background-position: center top;
}

.contact__dots {
  z-index: -2;
  background-image: radial-gradient(circle at center, var(--hole) 0 var(--dot-size), transparent calc(var(--dot-size) + 0.6px));
}

.contact__spot {
  --mx: 50%;
  --my: 72%;
  z-index: -1;
  background-image: radial-gradient(circle at center, var(--accent) 0 2.6px, transparent 3.2px);
  -webkit-mask-image: radial-gradient(circle 220px at var(--mx) var(--my), #000, transparent);
  mask-image: radial-gradient(circle 220px at var(--mx) var(--my), #000, transparent);
}

.contact__inner {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 24px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
}

/* The plate: the page background, feathered over 56px on every side (two
   crossed linear masks give soft, rounded corners). */
.contact__inner::before {
  --feather: 56px;
  content: "";
  position: absolute;
  inset: calc(-1 * var(--feather));
  z-index: -1;
  background: var(--bg);
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent);
  mask-composite: intersect;
}

.contact__title {
  max-width: 13em;
  font-size: var(--fs-section);
  font-weight: 760;
  font-stretch: var(--stretch-title);
  letter-spacing: var(--tracking-title);
  line-height: 0.98;
  text-wrap: balance;
}

.contact__body {
  max-width: 44ch;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* The address is the primary action (copy); the mailto is a quiet text
   link below it. */
.contact__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.contact__email {
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 17.5px;
  font-weight: 500;
  font-stretch: var(--stretch-mono);
  letter-spacing: 0;
  translate: 0 0;
  transition:
    transform var(--dur-press) var(--ease-out),
    background-color var(--dur-ui) ease,
    translate 300ms var(--ease-out);
}

.contact__email .copy-icon {
  font-size: 20px;
}

.contact__email .copy-label > span {
  text-align: center;
}

/* --------------------------------------------------------------------------
   Footer: giant dotted wordmark, then links and preferences.
   -------------------------------------------------------------------------- */

.footer {
  position: relative;
  padding-top: clamp(64px, 9vw, 120px);
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
}

.footer__mark {
  position: relative;
  container-type: inline-size;
  user-select: none;
  -webkit-user-select: none;
}

.wordmark {
  display: block;
  padding-block: 0.03em;
  font-size: calc(100cqi / 7.2);
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  line-height: 0.8;
  white-space: nowrap;
  color: transparent;
  background-image: radial-gradient(circle at center, var(--ink) 0.016em, transparent 0.0205em);
  background-size: 0.052em 0.052em;
  background-position: 0 0;
  -webkit-background-clip: text;
  background-clip: text;
}

.wordmark--lit {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, var(--accent) 0.019em, transparent 0.0235em);
  -webkit-mask-image: radial-gradient(circle 190px at var(--mx, -400px) var(--my, -400px), #000 25%, transparent 100%);
  mask-image: radial-gradient(circle 190px at var(--mx, -400px) var(--my, -400px), #000 25%, transparent 100%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.footer__mark.is-lit .wordmark--lit {
  opacity: 1;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 32px;
  margin-top: clamp(40px, 6vw, 72px);
}

.footer__tagline {
  max-width: 26ch;
  margin-top: 16px;
  color: var(--ink-2);
}

.footer__email {
  margin-top: 16px;
}

.footer__list {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.footer__list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-weight: 500;
  font-stretch: var(--stretch-ui);
  transition: color var(--dur-ui) ease;
}

.footer__list i {
  font-size: 18px;
  color: var(--ink-2);
}

@media (hover: hover) and (pointer: fine) {
  .footer__list a:hover {
    color: var(--accent-ink);
  }
}

.footer__prefs {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.footer__pref {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}

@media (min-width: 700px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: section-level movement off (wipes, presses, nudges).
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .index__slab,
  .index__plus {
    transition: none;
  }

  .index__row:active .index__plus,
  .stepper__dot:active::before {
    scale: none;
    transform: none;
  }

  .contact__email {
    translate: none !important;
  }
}
