/* ══════════════════════════════════════════════════════════════════
   ZIRYVO
   ══════════════════════════════════════════════════════════════════ */

:root {
  --bg:      #ffffff;
  --ink:     #0a0a0a;
  --ink-2:   #55585d;
  --ink-3:   #8e9197;
  --line:    #e5e5e7;

  --gutter:  clamp(1.5rem, 5.2vw, 5rem);
  --shell:   1320px;
  --bar-h:   clamp(56px, 8vh, 68px);

  --ease:    cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.45, .05, .55, .95);

  --sans: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI',
          Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 4px;
  border-radius: 1px;
}

.shell {
  width: 100%;
  max-width: calc(var(--shell) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: fixed;
  top: 0; left: 50%;
  z-index: 200;
  transform: translate(-50%, -120%);
  padding: .85rem 1.4rem;
  background: var(--ink);
  color: var(--bg);
  font-size: .8125rem;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .3s var(--ease);
}
.skip:focus-visible { transform: translate(-50%, 0); }


/* ── type ──────────────────────────────────────────────────────── */

.hero__title {
  font-size: clamp(4.25rem, 19vw, 16rem);
  font-weight: 600;
  line-height: .82;
  letter-spacing: -.055em;
  text-indent: -.02em;          /* optical: pull the Z off the left edge */
}

.display {
  font-size: clamp(1.9rem, 5.1vw, 4.35rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.034em;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.0625rem, 1.35vw, 1.3125rem);
  line-height: 1.58;
  color: var(--ink-2);
  letter-spacing: -.008em;
}

.micro {
  font-size: .6875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}


/* ── text CTA links ────────────────────────────────────────────── */

.link {
  position: relative;
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  line-height: 1;
  padding: .35em 0;
  white-space: nowrap;
}
/* the mark stays small and typographic; the tap area does not */
.link::before {
  content: '';
  position: absolute;
  inset: -14px -13px;
}
.link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .5s var(--ease);
}
.link:hover::after,
.link:focus-visible::after { transform: scaleX(1); transform-origin: left center; }
.link:active { opacity: .55; }

.link--lg {
  font-size: clamp(.8125rem, 1.05vw, .9375rem);
  letter-spacing: .2em;
  padding: .5em 0;
}


/* ── sticky brand / CTA bar ────────────────────────────────────── */

.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--bar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-inline: var(--gutter);
  /* opaque: a frosted bar smears the copy passing beneath it, and on a
     white page that reads as a smudge rather than as glass */
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transform: translateY(-101%);
  opacity: 0;
  visibility: hidden;
  transition: transform .62s var(--ease), opacity .34s linear, visibility 0s .62s;
}
.bar[data-hidden='false'] {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform .62s var(--ease), opacity .34s linear, visibility 0s 0s;
}

.bar__cta--left  { justify-self: start; }
.bar__cta--right { justify-self: end; }

.bar__mark { justify-self: center; display: block; }


/* ── the living mark ───────────────────────────────────────────── */

.mark {
  display: block;
  height: clamp(19px, 2.4vh, 24px);
  width: auto;
  color: var(--ink);
  overflow: visible;
}
.mark__bar {
  fill: currentColor;
  animation-name: drift;
  animation-timing-function: var(--ease-io);
  animation-iteration-count: infinite;
  animation-duration: var(--dur);
  animation-delay: var(--delay);
  will-change: transform;
}
/* four bars, four rhythms — nothing lands on the same beat */
.mark__bar:nth-child(1) { --dur: 7.3s;  --delay: -0.4s; animation-name: drift-a; }
.mark__bar:nth-child(2) { --dur: 9.1s;  --delay: -3.6s; animation-name: drift-b; }
.mark__bar:nth-child(3) { --dur: 8.2s;  --delay: -1.9s; animation-name: drift-c; }
.mark__bar:nth-child(4) { --dur: 10.4s; --delay: -5.2s; animation-name: drift-d; }

@keyframes drift-a {                       /* drifts left */
  0%, 100% { transform: translateX(0); }
  34%      { transform: translateX(-1.7px); }
  62%      { transform: translateX(-2.4px); }
}
@keyframes drift-b {                       /* drifts right */
  0%, 100% { transform: translateX(0); }
  40%      { transform: translateX(2.9px); }
  71%      { transform: translateX(1.4px); }
}
@keyframes drift-c {                       /* drifts left */
  0%, 100% { transform: translateX(0); }
  29%      { transform: translateX(-1.1px); }
  58%      { transform: translateX(-2.7px); }
}
@keyframes drift-d {                       /* drifts right */
  0%, 100% { transform: translateX(0); }
  46%      { transform: translateX(2.1px); }
  77%      { transform: translateX(.9px); }
}


/* ── language selector ─────────────────────────────────────────── */

.lang {
  position: fixed;
  z-index: 110;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .1rem;
  padding: .3rem .55rem;
  border-radius: 2px;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
}
@supports (backdrop-filter: blur(1px)) {
  .lang { backdrop-filter: blur(12px) saturate(1.4); }
}
.lang__btn {
  position: relative;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1;
  color: var(--ink-3);
  padding: .62rem .5rem;
  transition: color .3s var(--ease);
}
.lang__btn::before { content: ''; position: absolute; inset: -8px -4px; }
.lang__btn:hover { color: var(--ink); }
.lang__btn[aria-current='true'] { color: var(--ink); }
.lang__sep { color: var(--line); font-size: .6875rem; user-select: none; }


/* ══ narrative wrapper: hero + problem share the cable canvas ════ */

.narrative { position: relative; }

.cables {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  color: var(--ink);
  pointer-events: none;
  overflow: visible;
}
/* weighted to match the hairline wires in the hero artwork they continue */
#cable-a { opacity: .62; }
#cable-b { opacity: .42; }

.cable__end {
  fill: var(--ink);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.cables[data-arrived='true'] .cable__end { opacity: 1; }


/* ══ 01 · hero ══════════════════════════════════════════════════ */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: calc(var(--bar-h) + 1.25rem) 0;
  text-align: center;
}

.hero__title { margin-bottom: clamp(1.5rem, 3.2vh, 2.6rem); }

.hero__tagline {
  font-size: clamp(.95rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -.012em;
  color: var(--ink-2);
  max-width: 30ch;
  margin-inline: auto;
  text-wrap: balance;
}

.hero__ctas {
  margin-top: clamp(2rem, 4.4vh, 3.25rem);
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 4.5vw, 3.5rem);
}

.hero__figure {
  position: relative;
  margin-top: clamp(2rem, 4.5vh, 3.75rem);
  display: flex;
  justify-content: center;
}

/* Width-driven, so the artwork can run past the fold on tall screens
   without ever overflowing a narrow one. The stage shrink-wraps the
   image, letting the cable ports pin to fractions of the artwork
   itself rather than of the page. */
.hero__stage { position: relative; width: min(90vw, 820px); }

.hero__head {
  width: 100%;
  height: auto;
  display: block;
  /* the artwork is cropped flat through the neck — dissolve that edge so
     it never reads as a placed rectangle */
  -webkit-mask-image: linear-gradient(to bottom, #000 76%, rgba(0,0,0,.42) 92%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 76%, rgba(0,0,0,.42) 92%, transparent 100%);
}

.hero__port {
  position: absolute;
  left: var(--x);
  top: var(--y, 100%);
  width: 0;
  height: 0;
}


/* ══ 02 · the problem ═══════════════════════════════════════════ */

.problem {
  position: relative;
  z-index: 1;
  padding-block: clamp(9rem, 26vh, 20rem) clamp(7rem, 18vh, 13rem);
}

.problem__title {
  font-size: clamp(1.9rem, 5.1vw, 4.35rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.034em;
  max-width: 17ch;
  text-wrap: balance;
}

.problem__body {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  margin-left: auto;
  max-width: 44ch;
  width: min(100%, 44ch);
  font-size: clamp(1.0625rem, 1.35vw, 1.3125rem);
  line-height: 1.58;
  letter-spacing: -.008em;
  color: var(--ink-2);
}


/* ══ 03 · process ═══════════════════════════════════════════════ */

.process { padding-block: clamp(6rem, 14vh, 11rem) clamp(8rem, 20vh, 15rem); }

.process__inner {
  --rail: clamp(2.75rem, 8vw, 8.5rem);
  position: relative;
  padding-left: var(--rail);
}

.process__rail {
  position: absolute;
  left: 0;
  top: .45em;
  bottom: 1.5rem;
  width: 1px;
  background: var(--line);
}
.process__rail i {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  background: var(--ink);
  transform: scaleY(var(--p, 0));
  transform-origin: top center;
  will-change: transform;
}
.process__rail b {                          /* the signal travelling the line */
  position: absolute;
  left: 50%;
  top: calc(var(--p, 0) * 100%);
  width: 5px; height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--ink);
  opacity: calc(var(--pulse, 0));
  will-change: top;
}

.steps { display: grid; gap: clamp(4.5rem, 13vh, 10rem); }

.step { position: relative; max-width: 46ch; }

.step__node {
  position: absolute;
  left: calc(var(--rail) * -1);
  top: .5em;
  width: 9px; height: 9px;
  margin-left: -4px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--bg);
  transition: background-color .5s var(--ease), transform .5s var(--ease);
}
.step.is-active .step__node { background: var(--ink); transform: scale(1.15); }

.step__meta {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: clamp(1.1rem, 2.4vw, 1.75rem);
}
.step__index {
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.step__rule { flex: 0 0 clamp(1.5rem, 4vw, 3rem); height: 1px; background: var(--line); }
.step__label {
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.step__title {
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -.026em;
}

.step__body {
  margin-top: clamp(.9rem, 1.8vw, 1.35rem);
  font-size: clamp(1rem, 1.2vw, 1.1875rem);
  line-height: 1.62;
  letter-spacing: -.006em;
  color: var(--ink-2);
}


/* ══ 04 · about ═════════════════════════════════════════════════ */

.about { padding-block: clamp(6rem, 15vh, 12rem) clamp(7rem, 18vh, 13rem); }

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(2.5rem, 6vw, 6.5rem);
  align-items: center;
}

.about__title {
  font-size: clamp(1.75rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.032em;
  max-width: 20ch;
  text-wrap: balance;
}

.about__prose {
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  display: grid;
  gap: clamp(1.1rem, 2.2vw, 1.6rem);
  max-width: 52ch;
}
.about__prose p {
  font-size: clamp(1rem, 1.15vw, 1.125rem);
  line-height: 1.66;
  letter-spacing: -.006em;
  color: var(--ink-2);
}

.about__closing {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -.018em;
  color: var(--ink);
  max-width: 34ch;
}

.about__figure {
  position: relative;
  width: min(100%, 545px);
  margin-inline: auto;
}

/* faint lattice behind the portrait — the same language as the hero cranium */
.about__lattice {
  position: absolute;
  inset: 6% -6% 16% 4%;
  background-image: radial-gradient(currentColor .9px, transparent .9px);
  background-size: 13px 13px;
  color: var(--ink);
  opacity: .17;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 58% 42%, #000 0%, rgba(0,0,0,.55) 52%, transparent 78%);
          mask-image: radial-gradient(ellipse 62% 58% at 58% 42%, #000 0%, rgba(0,0,0,.55) 52%, transparent 78%);
}

.about__portrait {
  position: relative;
  width: 100%;
  height: auto;
  /* the site is monochrome — a full-colour photograph reads as a stock
     headshot dropped in. Stripped to greyscale it sits in the same
     register as the hero artwork and the type. */
  filter: grayscale(1) contrast(1.07) brightness(1.03);
  /* the cutout is cropped at the chest — dissolve it into the page */
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, rgba(0,0,0,.55) 82%, transparent 99%);
          mask-image: linear-gradient(to bottom, #000 58%, rgba(0,0,0,.55) 82%, transparent 99%);
}

.about__caption {
  position: relative;
  margin-top: clamp(-1.5rem, -2vw, -.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .9rem;
}
.about__name {
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ink);
}
.about__role {
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}


/* ══ 05 · footer ════════════════════════════════════════════════ */

/* the fixed language control lives bottom-right — keep the base row clear of it */
.footer { position: relative; padding-bottom: clamp(5.5rem, 11vh, 7rem); }

.footer__field {
  position: relative;
  width: 100%;
  height: clamp(340px, 58svh, 620px);
  overflow: hidden;
}
.footer__field canvas { width: 100%; height: 100%; }

.footer__cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-block: clamp(3rem, 8vh, 6rem) clamp(5rem, 13vh, 9rem);
}

.footer__title {
  font-size: clamp(1.8rem, 4.6vw, 4rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.034em;
  max-width: 15ch;
  text-wrap: balance;
}

.footer__links {
  display: flex;
  gap: clamp(2.25rem, 3.5vw, 3rem);   /* clears the expanded tap areas */
  padding-bottom: .35rem;
}

.footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
}
.footer__mark { display: block; }
.footer__mark .mark { height: 17px; }
.footer__legal {
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--ink-3);
  text-align: right;
}


/* ══ scroll reveals ═════════════════════════════════════════════ */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .95s var(--ease), transform 1.05s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}


/* ══ momentum scrolling shell ═══════════════════════════════════ */

html.smooth #scroll-content {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  will-change: transform;
}


/* ══════════════════════════════════════════════════════════════════
   responsive — tablet
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(3rem, 7vh, 5rem);
    align-items: start;
  }
  .about__copy { order: 1; }
  .about__title { max-width: 24ch; }
  .about__prose { max-width: 58ch; }
  .about__figure {
    order: 2;
    width: min(100%, 480px);
    margin-inline: auto;
  }
  .about__lattice { inset: 4% -4% 14% 2%; }

  .problem__body { margin-left: auto; }
}


/* ══════════════════════════════════════════════════════════════════
   responsive — mobile (designed, not shrunk)
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {

  .hero { padding-block: calc(var(--bar-h) + 1.5rem) 0; }
  .hero__title { letter-spacing: -.045em; }
  .hero__tagline { max-width: 22ch; font-size: 1rem; }
  .hero__ctas { gap: 2.75rem; margin-top: 2.25rem; }
  .hero__figure { margin-top: 2.25rem; }
  .hero__stage { width: min(96vw, 460px); }

  .problem { padding-block: 8rem 6rem; }
  .problem__title { max-width: 14ch; }
  .problem__body { margin-top: 2.25rem; margin-left: 0; width: 100%; max-width: none; }

  .process__inner { --rail: 2.25rem; }
  .steps { gap: 4rem; }
  .step { max-width: none; }
  .step__meta { gap: .7rem; margin-bottom: 1rem; }

  .footer__field { height: clamp(280px, 42svh, 380px); }
  .footer__cta {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 2.5rem;
    padding-block: 2.5rem 4rem;
  }
  .footer__title { max-width: 13ch; }
  .footer__links { padding-bottom: 0; gap: 2.5rem; }
  .footer__base {
    flex-direction: column;
    align-items: flex-start;
    gap: .9rem;
  }
  .footer__legal { text-align: left; }

  /* keep the language control clear of the thumb zone and the CTAs */
  .lang { right: .5rem; bottom: max(.5rem, env(safe-area-inset-bottom)); }

  .about__closing { max-width: none; }
}

@media (max-width: 400px) {
  .bar { --bar-h: 54px; }
  .link { font-size: .6875rem; letter-spacing: .14em; }
  .mark { height: 17px; }
}


/* ══════════════════════════════════════════════════════════════════
   motion off — everything must still read
   ══════════════════════════════════════════════════════════════════ */

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

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal { opacity: 1; transform: none; }
  .mark__bar { animation: none !important; transform: none !important; }
  .cable__end { opacity: 1; }
  .bar { transition: none; }
}


/* ══ print ══════════════════════════════════════════════════════ */

@media print {
  .bar, .lang, .footer__field, .cables, .skip { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
