:root {
  --bg: #0f0e0c;
  --paper: #f3eee3;
  --paper-2: rgba(243, 238, 227, 0.68);
  --paper-3: rgba(243, 238, 227, 0.44);
  --brass: rgb(214, 168, 96);
  --line: rgba(243, 238, 227, 0.12);
  --line-brass: rgba(214, 168, 96, 0.3);
  --header-h: 64px;
  --max: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.header.is-solid {
  background: rgba(15, 14, 12, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 26px; height: 26px; display: block; }
.brand__petals { fill: var(--paper); fill-opacity: 0.9; }
.brand__core { fill: var(--brass); }
.brand__name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper-2);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  text-align: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Soft vignette keeps the text legible over the network */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 52% 42% at center, rgba(15, 14, 12, 0.82) 0%, rgba(15, 14, 12, 0) 100%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 26%;
  background: linear-gradient(rgba(15, 14, 12, 0), var(--bg));
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; max-width: 100%; }

.hero__brand {
  font-size: clamp(22px, 5.2vw, 68px);
  font-weight: 500;
  letter-spacing: 0.32em;
  /* optical centring: offset the trailing letter-space */
  padding-left: 0.32em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__statement {
  max-width: 600px;
  margin: 30px auto 0;
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.6;
  color: var(--paper-2);
}

.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 1;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper-3);
  transition: color 0.2s ease;
}
.hero__cue:hover { color: var(--paper); }
.hero__cue::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--brass), rgba(214, 168, 96, 0));
  transform-origin: top;
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Stage: tagline + wheel ---------- */

.stage {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 24px 0;
}

.stage__sentinel { height: 1px; }

.tagline__title {
  position: sticky;
  top: var(--header-h);
  z-index: 4;
  margin: 0 -24px;
  padding: 18px 24px 30px;
  text-align: center;
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  background: linear-gradient(var(--bg) 58%, rgba(15, 14, 12, 0));
}
.tagline__title span {
  display: inline-block;
  transform-origin: 50% 0;
  transition: transform 0.4s var(--ease);
}

.tagline__body {
  max-width: 700px;
  margin: 4px auto 0;
  text-align: center;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--paper-2);
}

.pods-intro {
  max-width: 700px;
  margin: 72px auto 0;
  text-align: center;
  font-size: 15.5px;
  color: var(--paper-3);
}
.pods-intro__eyebrow {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
}

.stage__grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 80px;
  align-items: start;
  margin-top: 56px;
}

/* Scroll reveal (only when JS is available) */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Wheel ---------- */

.wheel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel__active {
  min-height: 20px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--brass);
}

.wheel__svg {
  width: min(100%, 400px);
  height: auto;
  aspect-ratio: 1;
  display: block;
  overflow: visible;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.wheel__svg.is-dragging { cursor: grabbing; }

.wheel__ring {
  fill: none;
  stroke: var(--line-brass);
  stroke-width: 1;
  stroke-dasharray: 2 7;
}
.wheel__marker { stroke: var(--brass); stroke-width: 2; stroke-linecap: round; }
.wheel__core-ring { fill: var(--bg); stroke: var(--brass); stroke-width: 1.4; pointer-events: none; }
.wheel__core { fill: var(--brass); pointer-events: none; }

.rotor {
  transform-origin: 0px 0px;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.8s var(--ease);
}
.rotor__ticks path { stroke: var(--brass); stroke-width: 1.4; stroke-linecap: round; opacity: 0.7; }
.rotor__stamens circle { fill: var(--paper); opacity: 0.5; pointer-events: none; }

.petal { cursor: pointer; }
.petal__shape {
  fill: rgba(243, 238, 227, 0.035);
  stroke: rgba(243, 238, 227, 0.26);
  stroke-width: 1.2;
  transition: fill 0.35s ease, stroke 0.35s ease;
}
.petal:hover .petal__shape {
  fill: rgba(214, 168, 96, 0.07);
  stroke: rgba(214, 168, 96, 0.7);
}
.petal.is-active .petal__shape {
  fill: rgba(214, 168, 96, 0.17);
  stroke: var(--brass);
  stroke-width: 1.6;
}
.petal__filament {
  stroke: rgba(243, 238, 227, 0.3);
  stroke-width: 1.2;
  stroke-linecap: round;
  pointer-events: none;
}
.petal__anther {
  fill: rgba(214, 168, 96, 0.55);
  pointer-events: none;
  transition: fill 0.35s ease;
}
.petal.is-active .petal__anther { fill: var(--brass); }
.petal.is-active .petal__filament { stroke: rgba(214, 168, 96, 0.7); }

.petal__num {
  font-family: var(--mono);
  font-size: 16px;
  fill: var(--paper-3);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  /* counter-rotate so the numbers stay upright */
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(calc(var(--rot, 0deg) * -1 - var(--a, 0deg)));
  transition: transform 0.8s var(--ease), fill 0.35s ease;
}
.petal.is-active .petal__num { fill: var(--paper); }

.wheel__svg.is-dragging .rotor,
.wheel__svg.is-dragging .petal__num { transition: none; }

.wheel__hint {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-3);
}

.wheel__tabs {
  display: grid;
  width: min(100%, 360px);
  margin-top: 24px;
}
.wheel__tab {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 7px 14px;
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  color: var(--paper-3);
  font: inherit;
  font-size: 14.5px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.wheel__tab:hover { color: var(--paper-2); }
.wheel__tab-num { font-family: var(--mono); font-size: 12px; }
.wheel__tab[aria-selected="true"] { color: var(--paper); border-left-color: var(--brass); }
.wheel__tab[aria-selected="true"] .wheel__tab-num { color: var(--brass); }

/* ---------- Pillar panels ---------- */

/* Bottom space lives inside the grid row so the sticky wheel keeps its place */
.pillars { padding-bottom: 128px; }

.pillar {
  scroll-margin-top: 190px;
  animation: panel-in 0.55s var(--ease) both;
}
.pillar[hidden] { display: none; }
/* stacked spacing only matters when JS is off and all panels show */
html:not(.js) .pillar + .pillar { margin-top: 88px; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.pillar__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.pillar__headline {
  margin: 16px 0 34px;
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.2;
}

.label {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-3);
}

.pillar__build {
  margin-bottom: 40px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--paper-2);
}

.caps { margin: 0; padding: 0; list-style: none; }
.caps li {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.caps li:last-child { border-bottom: 1px solid var(--line); }
.caps h5 { font-size: 15.5px; font-weight: 500; line-height: 1.4; color: var(--paper); }
.caps p { font-size: 15px; line-height: 1.65; color: var(--paper-2); }

/* ---------- Footer ---------- */

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 24px 44px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-3);
}

/* ---------- Desktop: lock the heading and the wheel ---------- */

@media (min-width: 960px) {
  .tagline__title.is-stuck span { transform: scale(0.62); }
}

@media (min-width: 960px) and (min-height: 840px) {
  .wheel {
    position: sticky;
    top: calc(var(--header-h) + 76px);
  }
  .wheel__svg { width: min(100%, 400px, 42vh); }
}

/* ---------- Tablet and mobile ---------- */

@media (max-width: 1100px) {
  .stage__grid { gap: 56px; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
  .caps li { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 959px) {
  .tagline__title { position: static; background: none; padding-bottom: 14px; }
  .stage { padding: 72px 24px 0; }
  .pillars { padding-bottom: 96px; }
  .pods-intro { margin-top: 48px; }
  .stage__grid { grid-template-columns: 1fr; gap: 48px; margin-top: 44px; }
  .wheel__svg { width: min(100%, 340px); }
  .pillar { scroll-margin-top: calc(var(--header-h) + 16px); }
}

@media (max-width: 520px) {
  .header { padding: 0 18px; }
  .hero__brand { letter-spacing: 0.22em; padding-left: 0.22em; }
  .pillar__build { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
