:root {
  color-scheme: dark;
  --ink: #f7f4ec;
  --muted: rgba(247, 244, 236, 0.72);
  --line: rgba(247, 244, 236, 0.2);
  --dark: #091111;
  --night: #13201f;
  --leaf: #38b26d;
  --gold: #e6b845;
  --sky: #93b8d8;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--dark);
  color: var(--ink);
}

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

.site-nav {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: linear-gradient(180deg, rgba(5, 12, 12, 0.78), rgba(5, 12, 12, 0));
}

.brand,
.nav-links,
.nav-cta,
.hero-actions,
.slider-buttons {
  display: flex;
  align-items: center;
}

.brand {
  justify-self: start;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.nav-links {
  gap: clamp(16px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a,
.secondary-action {
  transition:
    color 180ms ease,
    opacity 180ms ease;
}

.nav-links a:hover,
.secondary-action:hover {
  color: var(--ink);
}

.nav-cta {
  justify-self: end;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(260px, 1fr) auto;
  gap: clamp(24px, 4vw, 44px);
  min-height: 92svh;
  overflow: hidden;
  padding: clamp(108px, 14vh, 150px) clamp(18px, 5vw, 72px) clamp(28px, 5vh, 52px);
}

.hero-media,
.hero-media::before,
.hero-media::after {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 8%, rgba(147, 184, 216, 0.26), transparent 30%),
    linear-gradient(160deg, #071010 0%, #172322 52%, #0d1414 100%);
}

.hero-media::before {
  z-index: 2;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 10, 10, 0.86) 0%, rgba(5, 10, 10, 0.54) 34%, rgba(5, 10, 10, 0.08) 72%),
    linear-gradient(180deg, rgba(5, 10, 10, 0.2) 0%, rgba(5, 10, 10, 0.04) 48%, rgba(5, 10, 10, 0.74) 100%);
}

.hero-media::after {
  z-index: 4;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  opacity: 0.28;
  transform: translateX(calc(var(--progress) - 50%));
  transition: transform 620ms ease;
}

.stage-strip {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  min-height: 44vh;
  object-fit: cover;
  object-position: center bottom;
  filter: saturate(1.02) contrast(1.02);
}

.stage-focus {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: calc(var(--stage) * 20%);
  width: 20%;
  height: min(62vh, 55vw);
  border-inline: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 42px rgba(0, 0, 0, 0.26);
  transition: left 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.stage-marker {
  position: absolute;
  z-index: 5;
  bottom: 0;
  left: calc((var(--stage) * 20%) + 10%);
  width: 2px;
  height: min(62vh, 55vw);
  background: var(--grade-color);
  box-shadow: 0 0 22px var(--grade-color);
  transform: translateX(-1px);
  transition:
    left 620ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 240ms ease,
    box-shadow 240ms ease;
}

.hero-content {
  align-self: end;
  max-width: min(720px, 95vw);
  padding-bottom: clamp(6px, 3vh, 34px);
}

.eyebrow,
.readout-label,
.signal-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(4rem, 13vw, 10.2rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.lede {
  max-width: 640px;
  margin-bottom: 28px;
  color: rgba(247, 244, 236, 0.82);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  line-height: 1.45;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  font-weight: 850;
}

.primary-action {
  padding: 0 22px;
  background: var(--ink);
  color: #0d1716;
}

.secondary-action {
  padding: 0 16px;
  color: rgba(247, 244, 236, 0.78);
}

.grade-panel {
  display: grid;
  grid-template-columns: minmax(132px, 172px) minmax(220px, 1fr) minmax(210px, 0.75fr) auto;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  width: 100%;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(7, 15, 15, 0.78);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.grade-readout {
  min-width: 0;
}

.grade-value {
  display: block;
  margin-top: 3px;
  color: var(--grade-color);
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
  transition: color 240ms ease;
}

.stage-title {
  display: block;
  margin-top: 8px;
  font-size: 0.96rem;
  font-weight: 850;
}

.slider-block {
  min-width: 0;
}

.rail-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 10px;
  color: rgba(247, 244, 236, 0.7);
  font-size: 0.78rem;
  font-weight: 900;
}

.rail-labels span:nth-child(2),
.rail-labels span:nth-child(3),
.rail-labels span:nth-child(4) {
  text-align: center;
}

.rail-labels span:last-child {
  text-align: right;
}

.grade-slider {
  width: 100%;
  height: 30px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.grade-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0 var(--progress), transparent var(--progress)),
    linear-gradient(90deg, #dc4a3d 0%, #df8840 26%, #d5c85b 50%, #63b675 75%, #28c088 100%);
}

.grade-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0 var(--progress), transparent var(--progress)),
    linear-gradient(90deg, #dc4a3d 0%, #df8840 26%, #d5c85b 50%, #63b675 75%, #28c088 100%);
}

.grade-slider::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -10px;
  appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--grade-color);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(0, 0, 0, 0.28);
  transition: background-color 240ms ease;
}

.grade-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--grade-color);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(0, 0, 0, 0.28);
  transition: background-color 240ms ease;
}

.stage-copy {
  margin: 0;
  color: rgba(247, 244, 236, 0.76);
  font-size: 0.98rem;
  line-height: 1.45;
}

.slider-buttons {
  gap: 8px;
  justify-content: end;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.icon-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.icon-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.signal-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.signal {
  min-height: 120px;
  padding: clamp(20px, 4vw, 42px) clamp(18px, 5vw, 72px);
  background: #f6f1e8;
  color: #14201d;
}

.signal-value {
  display: block;
  margin-bottom: 8px;
  color: #102322;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 900;
}

.signal-label {
  color: rgba(20, 32, 29, 0.62);
}

.start-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(42px, 8vw, 96px) clamp(18px, 5vw, 72px);
  background: #e9eef2;
  color: #0f1717;
}

.start-band h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.primary-action.dark {
  flex: 0 0 auto;
  background: #112321;
  color: #fff;
}

@media (max-width: 1080px) {
  .grade-panel {
    grid-template-columns: minmax(120px, 160px) minmax(220px, 1fr) auto;
  }

  .stage-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-nav {
    grid-template-columns: 1fr auto;
    gap: 12px;
    min-height: 66px;
    padding-inline: 16px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    min-height: 38px;
    padding-inline: 14px;
    font-size: 0.82rem;
  }

  .hero {
    align-content: end;
    grid-template-rows: auto auto;
    gap: 16px;
    min-height: 92svh;
    padding: 86px 16px 18px;
  }

  .hero-media::before {
    background:
      linear-gradient(180deg, rgba(5, 10, 10, 0.82) 0%, rgba(5, 10, 10, 0.3) 42%, rgba(5, 10, 10, 0.78) 100%),
      linear-gradient(90deg, rgba(5, 10, 10, 0.5), rgba(5, 10, 10, 0.06));
  }

  .stage-strip {
    right: auto;
    left: 0;
    width: auto;
    max-width: none;
    height: 100%;
    min-height: 0;
    transform: translateX(calc(var(--stage) * -20%));
    transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .stage-focus,
  .stage-marker {
    display: none;
  }

  .hero-content {
    align-self: end;
    padding-bottom: 0;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 0.7rem;
  }

  h1 {
    margin-bottom: 10px;
    font-size: clamp(2.35rem, 10vw, 3rem);
  }

  .lede {
    max-width: 31rem;
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.36;
  }

  .primary-action,
  .secondary-action {
    min-height: 44px;
  }

  .grade-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .grade-readout {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: end;
  }

  .readout-label {
    grid-column: 1 / -1;
  }

  .grade-value {
    font-size: 3.5rem;
  }

  .stage-title {
    margin-bottom: 7px;
    font-size: 0.9rem;
  }

  .stage-copy {
    font-size: 0.94rem;
    line-height: 1.38;
  }

  .slider-buttons {
    justify-content: start;
  }

  .signal-band {
    grid-template-columns: 1fr;
  }

  .signal {
    min-height: 96px;
  }

  .start-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .secondary-action {
    justify-content: flex-start;
    min-height: 28px;
    padding-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
