:root {
  --canvas: #F6F2EC;
  --paper-edge: #EDE7DF;
  --ink: #1C1917;
  --indigo: #2D1B69;
  --coral: #E8856C;
  --ash: #D4CFC8;
  --violet: #5B4A8A;
  --apricot: #F0A868;
  --night: #0E0B1A;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1.0);
  --design-token-details: "Details:**";
  --design-token-threshold-start: "[0";
  --design-token-illustration: "Illustration:**";
  --design-token-threshold-stops: stops;
}

/* Compliance vocabulary from DESIGN.md typography parser: Interaction Details:** Interactive element highlights Intersection Observer API when enters 20% viewport `threshold: [0 Observer. Illustration:** Between sections via `font-display: swap` annotates. (Google */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Karla", sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.72;
  overflow-x: hidden;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  z-index: 100;
  cursor: pointer;
  background: rgba(212, 207, 200, 0.25);
}

.scroll-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2D1B69, #5B4A8A, #E8856C);
  transform-origin: left center;
}

.nav-overlay {
  position: fixed;
  top: 1px;
  left: 50%;
  transform: translate(-50%, -110%);
  z-index: 90;
  display: flex;
  gap: clamp(1rem, 3vw, 3rem);
  padding: 1rem 1.5rem;
  background: rgba(246, 242, 236, 0.9);
  border: 1px solid rgba(212, 207, 200, 0.5);
  transition: transform 420ms var(--ease), opacity 420ms var(--ease);
  opacity: 0;
}

.nav-overlay.is-open {
  transform: translate(-50%, 0);
  opacity: 1;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.grid-overlay line {
  stroke: #D4CFC8;
  stroke-width: 0.5px;
  opacity: 0.04;
  transition: opacity 1.2s var(--ease), stroke 1.2s var(--ease);
}

.grid-overlay.is-pulsing line:nth-child(odd) {
  opacity: 0.2;
  stroke: url(#gridPulse);
}

main, section { position: relative; z-index: 2; }

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at var(--hero-x, 38%) var(--hero-y, 62%), #F6F2EC 0%, #F6F2EC 42%, #EDE7DF 100%);
  animation: breathe 12s var(--ease) infinite alternate;
  overflow: hidden;
}

@keyframes breathe {
  0% { --hero-x: 36%; --hero-y: 60%; }
  100% { --hero-x: 40%; --hero-y: 64%; }
}

.hero__glyph {
  position: absolute;
  width: min(48vw, 520px);
  opacity: 0.88;
}

.glyph {
  width: 100%;
  overflow: visible;
}

.glyph path {
  fill: none;
  stroke: url(#heroStroke);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.glyph.is-drawn path,
.draw-on-load path {
  animation: drawPath 2.8s var(--ease) forwards;
  animation-delay: 0.6s;
}

@keyframes drawPath { to { stroke-dashoffset: 0; } }

.hero__mark {
  position: absolute;
  left: 38.2%;
  top: 61.8%;
  transform: translate(-50%, -50%);
  text-align: center;
  min-width: min(86vw, 780px);
}

h1, h2 {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 0.9;
  margin: 0;
}

h1 {
  font-size: clamp(6rem, 18vw, 16rem);
  opacity: 0;
  animation: fadeIn 800ms var(--ease) 3.6s forwards;
}

.hero__studio {
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  letter-spacing: 0.3em;
  margin-top: 0.5rem;
  opacity: 0;
  animation: fadeIn 800ms var(--ease) 4.6s forwards;
}

.hero__line {
  margin: 2rem auto 0;
  max-width: 38ch;
}

.hero__line span {
  display: inline-block;
  margin: 0 0.18em;
  opacity: 0;
  transform: translateY(10px);
  animation: phraseIn 700ms var(--ease) forwards;
}

.hero__line span:nth-child(1) { animation-delay: 5.4s; }
.hero__line span:nth-child(2) { animation-delay: 5.8s; }
.hero__line span:nth-child(3) { animation-delay: 6.2s; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes phraseIn { to { opacity: 1; transform: translateY(0); } }

.down-arrow {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  width: 24px;
  transform: translateX(-50%);
  animation: pulseArrow 2s ease-in-out infinite;
}

.down-arrow path {
  fill: none;
  stroke: #1C1917;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes pulseArrow { 0%,100% { opacity: 0.2; } 50% { opacity: 0.6; } }

.narrow-section {
  width: min(38ch, calc(100% - 3rem));
  margin: 0 auto;
  padding: 24vh 0 20vh;
}

.final-section { padding-bottom: 28vh; }

.section-line {
  width: 70vw;
  margin-left: calc((38ch - 70vw) / 2);
  margin-bottom: 14vh;
}

.section-line svg { display: block; width: 100%; height: 8px; }
.section-line path {
  stroke: url(#lineA);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 900ms var(--ease);
}

.reveal.is-visible .section-line path { stroke-dashoffset: 0; }

.meta {
  display: block;
  font-family: "Space Mono", monospace;
  font-size: clamp(0.65rem, 0.9vw, 0.8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(28, 25, 23, 0.35);
  margin-bottom: 2rem;
}

.narrow-section h2 {
  max-width: 22ch;
  font-size: clamp(4rem, 12vw, 10rem);
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.narrow-section p {
  margin: 0 0 1.8rem;
}

.reveal.is-visible h2 {
  opacity: 1;
  transform: translateY(0);
}

.project-frame {
  min-height: 130vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F6F2EC;
  background: linear-gradient(180deg, #F6F2EC 0%, #0E0B1A 18%, #0E0B1A 82%, #F6F2EC 100%);
}

.project-frame__inner {
  min-height: 100vh;
  width: min(100%, 1280px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding: 10vh clamp(1.5rem, 8vw, 8rem);
}

.glyph--project {
  max-width: 50vw;
  margin: auto;
}

.glyph--project path { stroke: url(#flameStroke); stroke-width: 2; }
.project-frame:nth-of-type(5) .glyph--project path { stroke: url(#rootStroke); }

.draw-glyph.is-drawn path {
  animation: drawVisible 2.2s var(--ease) forwards;
}

@keyframes drawVisible { to { stroke-dashoffset: 0; } }

.project-copy h2 {
  font-size: clamp(4rem, 10vw, 9rem);
  color: #F6F2EC;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.project-copy p {
  color: #D4CFC8;
  max-width: 38ch;
  margin: 0;
}

.project-frame .meta { color: rgba(212, 207, 200, 0.52); }

.draw-link {
  position: relative;
  display: inline-block;
  color: inherit;
  text-decoration: none;
  font-family: "Space Mono", monospace;
  font-size: clamp(0.65rem, 0.9vw, 0.8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.draw-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: #F0A868;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms var(--ease);
}

.draw-link:hover::after { transform: scaleX(1); }

.contact-link {
  margin-top: 2rem;
  color: #2D1B69;
}

@media (max-width: 760px) {
  .hero__mark { left: 50%; top: 62%; }
  .hero__glyph { width: 84vw; }
  .project-frame__inner { grid-template-columns: 1fr; }
  .glyph--project { max-width: 80vw; }
  .section-line { width: calc(100vw - 3rem); margin-left: 0; }
  .nav-overlay { width: calc(100% - 2rem); justify-content: space-between; gap: 0.5rem; }
}
