@font-face {
  font-family: "Vania Display";
  src: local("Avenir Next");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: oklch(24% 0.035 10);
  --muted: oklch(43% 0.035 10);
  --paper: oklch(96% 0.014 35);
  --rose: oklch(67% 0.105 15);
  --rose-dark: oklch(41% 0.09 8);
  --line: oklch(24% 0.035 10 / 18%);
  --focus: oklch(53% 0.17 26);
  --page: min(92rem, calc(100vw - 3rem));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Vania Display", "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: inherit;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: var(--paper);
  background: var(--ink);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  width: var(--page);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}
.wordmark {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 760;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.wordmark span { color: inherit; }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }
.site-header nav a {
  font-size: 0.82rem;
  font-weight: 620;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35rem;
}

.hero {
  min-height: 100svh;
  padding: 0 0 2rem;
}
.hero-stage {
  position: relative;
  width: 100%;
  height: 100svh;
  max-height: none;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--rose);
  touch-action: pan-y;
}
.hero-videos, .vania-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-videos {
  z-index: 0;
  background: url("./public/vania-reactive/neutral.webp") center / cover no-repeat;
}
.hero-stage::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: rgb(255 255 255 / 1.5%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 54%, transparent 72%);
  mask-image: linear-gradient(to right, #000 0%, #000 54%, transparent 72%);
}
.vania-video {
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease);
  will-change: opacity;
}
.hero-stage[data-state="neutral"][data-idle-video="neutral"] [data-vania-video="neutral"],
.hero-stage[data-state="neutral"][data-idle-video="focus-typing"] [data-vania-video="focus-typing"],
.hero-stage[data-state="look-left"] [data-vania-video="look-left"],
.hero-stage[data-state="center-wave"] [data-vania-video="center-wave"],
.hero-stage[data-state="point-to-portfolio"] [data-vania-video="point-to-portfolio"] {
  opacity: 1;
  pointer-events: auto;
}

.hero-copy {
  position: absolute;
  z-index: 2;
  left: max(1.5rem, calc((100vw - var(--page)) / 2));
  top: 50%;
  width: min(38%, 30rem);
  transform: translateY(-48%);
}
.hero-kicker {
  margin: 0 0 clamp(0.7rem, 1.4vw, 1.2rem);
  color: #fff;
  font-size: clamp(0.62rem, 0.9vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(2.4rem, 6.6vw, 7rem);
  font-weight: 520;
  letter-spacing: -0.07em;
  line-height: 0.84;
}
.hero-intro {
  max-width: 33rem;
  margin: clamp(1rem, 2vw, 1.6rem) 0 0;
  font-size: clamp(0.82rem, 1.15vw, 1.08rem);
  line-height: 1.58;
}
.primary-link {
  display: inline-block;
  margin-top: clamp(1.1rem, 2vw, 1.8rem);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid currentColor;
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  font-weight: 720;
  text-decoration: none;
}
.interaction-hint {
  width: var(--page);
  margin: 0.9rem auto 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.work {
  width: var(--page);
  margin: 0 auto;
  padding: clamp(6rem, 12vw, 11rem) 0;
  overflow: clip;
}
.section-heading {
  display: grid;
  grid-template-columns: minmax(8rem, 0.55fr) 1.45fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: clamp(3rem, 6vw, 6rem);
}
.section-heading > p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.section-heading h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.3rem, 5.5vw, 5.6rem);
  font-weight: 520;
  letter-spacing: -0.06em;
  line-height: 0.95;
}
.kinetic-heading {
  overflow: visible;
}
.kinetic-word {
  display: inline-block;
  white-space: nowrap;
}
.kinetic-letter {
  display: inline-block;
  transform-origin: 50% 100%;
  backface-visibility: hidden;
}
.kinetic-heading.is-animating .kinetic-letter {
  will-change: transform, opacity;
}
.kinetic-heading.is-prepared .kinetic-letter {
  opacity: 0;
}
.kinetic-heading.is-complete .kinetic-letter {
  opacity: 1;
  transform: none;
}
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li {
  display: grid;
  grid-template-columns: minmax(3rem, 0.22fr) 0.78fr 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: baseline;
  padding: clamp(1.4rem, 2.6vw, 2.4rem) 0;
  border-top: 1px solid var(--line);
}
.work-list li:last-child { border-bottom: 1px solid var(--line); }
.work-list span { color: var(--muted); font-size: 0.72rem; }
.work-list h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2.5rem);
  font-weight: 590;
  letter-spacing: -0.04em;
}
.work-list p { max-width: 42ch; margin: 0; color: var(--muted); line-height: 1.55; }

.approach {
  --approach-inset: max(0px, calc((100vw - var(--page)) / 2));
  --approach-progress: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(3rem, 0.22fr) 1.78fr;
  gap: clamp(1rem, 3vw, 3rem);
  width: auto;
  margin: 0 var(--approach-inset) clamp(4rem, 8vw, 8rem);
  padding: clamp(3rem, 7vw, 7rem);
  color: var(--paper);
  background:
    radial-gradient(circle at 72% 35%, rgb(210 122 130 / 0.5), transparent 38%),
    linear-gradient(135deg, #050303, #7d2f2f);
  will-change: margin-inline;
}
.approach-shader {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.approach.is-webgl-fallback .approach-shader { display: none; }
.approach > :not(.approach-shader) { position: relative; z-index: 1; }
.approach-index { margin: 0.55rem 0 0; opacity: 0.6; font-size: 0.72rem; }
.approach h2 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 520;
  letter-spacing: -0.065em;
  line-height: 0.92;
}
.approach div > p { max-width: 55ch; margin: 2rem 0 0; color: oklch(88% 0.012 35); line-height: 1.7; }
.approach a { display: inline-block; margin-top: 2rem; text-underline-offset: 0.35rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: var(--page);
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}
footer p { margin: 0; }

@media (max-width: 720px) {
  :root { --page: calc(100vw - 1.5rem); }
  .site-header { padding-top: 0.9rem; }
  .hero { min-height: auto; padding-top: 0; }
  .hero-stage { height: auto; aspect-ratio: 16 / 9; }
  .hero-copy { left: 0.75rem; width: 44%; }
  .hero-kicker { margin-bottom: 0.35rem; font-size: 0.42rem; }
  .hero h1 { font-size: clamp(1.35rem, 7vw, 1.8rem); }
  .hero-intro { display: none; }
  .primary-link { margin-top: 0.55rem; font-size: 0.6rem; }
  .interaction-hint { font-size: 0.66rem; line-height: 1.4; }
  .section-heading { grid-template-columns: 1fr; gap: 1.25rem; }
  .work-list li { grid-template-columns: 2.5rem 1fr; }
  .work-list p { grid-column: 2; }
  .approach { grid-template-columns: 1fr; padding: 2rem 1.25rem; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .approach { will-change: auto; }
}
