:root {
  --bg-page: #f2f5f7;
  --bg-surface: #e6edf1;
  --bg-deep: #0b212e;
  --bg-deep-surface: #122d3d;
  --text-primary: #0b212e;
  --text-muted: #425a67;
  --text-on-deep: #f2f5f7;
  --text-on-deep-muted: #b6c8d3;
  --accent: #c8431b;
  --accent-hover: #a83513;
  --error-color: #f38a6b;
  --border-subtle: rgba(11, 33, 46, 0.14);
  --border-deep: rgba(242, 245, 247, 0.18);

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-heading: 1.75rem;
  --text-body: 1rem;
  --text-sm: 0.875rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --max-width: 1280px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-page);
  color: var(--text-primary);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-page);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
input,
select {
  font-family: inherit;
  font-size: inherit;
}

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

section[id] {
  scroll-margin-top: 4.5rem;
}

.container {
  width: min(100% - 3rem, var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.site-header.is-scrolled {
  background-color: rgba(242, 245, 247, 0.94);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  gap: 2rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  padding-block: 0.25rem;
  transition: color 180ms var(--ease-out);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link-action {
  font-weight: 600;
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  margin-inline: auto;
  background-color: var(--text-primary);
  transition: transform 200ms var(--ease-out);
}

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  padding-top: clamp(6.5rem, 12vh, 9.5rem);
  padding-bottom: clamp(4rem, 10vh, 7rem);
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(242, 245, 247, 0.42) 0%,
    rgba(242, 245, 247, 0.16) 46%,
    rgba(242, 245, 247, 0) 74%
  );
}

.hero-content {
  width: min(100% - 3rem, var(--max-width));
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.3rem, 7.2vw, 6.4rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  max-width: 15ch;
}

.hero-summary {
  margin: 1.5rem 0 2rem;
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--text-primary);
  max-width: 46ch;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.75rem;
  border: 0;
  background-color: var(--accent);
  color: #ffffff;
  font-size: var(--text-body);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.section-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.section-copy {
  margin: 1rem 0 0;
  font-size: var(--text-body);
  max-width: 58ch;
}

.stage-section {
  background-color: var(--bg-deep);
  color: var(--text-on-deep);
  padding-block: clamp(4.5rem, 8vw, 7rem);
}

.stage-section .section-copy {
  color: var(--text-on-deep-muted);
}

.stage-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-deep);
}

.stage-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--border-deep);
  background-color: var(--bg-deep-surface);
}

.segmented-item {
  border: 0;
  background: transparent;
  color: var(--text-on-deep-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  min-height: 44px;
  padding: 0 1rem;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

.segmented-item + .segmented-item {
  border-left: 1px solid var(--border-deep);
}

.segmented-item[aria-selected="true"] {
  background-color: var(--text-on-deep);
  color: var(--bg-deep);
  font-weight: 600;
}

.unit-switch {
  display: inline-flex;
  border: 1px solid var(--border-deep);
}

.unit-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.unit-option + .unit-option {
  border-left: 1px solid var(--border-deep);
}

.unit-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.unit-option span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.875rem;
  font-size: var(--text-sm);
  color: var(--text-on-deep-muted);
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

.unit-option input:checked + span {
  background-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.unit-option input:focus-visible + span {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
}

.stage-grid {
  display: grid;
  grid-template-columns: minmax(260px, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
  padding-top: 3rem;
}

.dial-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.dial-svg {
  width: min(100%, 340px);
  height: auto;
}

.dial-hand {
  transition: transform 220ms var(--ease-out);
}

.dial-caption {
  display: flex;
  justify-content: space-between;
  width: min(100%, 340px);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-deep);
  font-size: var(--text-sm);
}

.dial-station {
  font-weight: 600;
  color: var(--text-on-deep);
}

.dial-phase {
  color: var(--text-on-deep-muted);
}

.telemetry-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.curve-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.slider-label {
  font-size: var(--text-sm);
  color: var(--text-on-deep-muted);
}

.time-readout {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 600;
  color: var(--text-on-deep);
}

.curve-svg {
  width: 100%;
  height: auto;
}

.time-slider {
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.readout-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2rem;
  margin: 0.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-deep);
}

.readout-item {
  margin: 0;
}

.readout-item dt {
  font-size: var(--text-sm);
  color: var(--text-on-deep-muted);
}

.readout-item dd {
  margin: 0.25rem 0 0;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--text-on-deep);
}

.editorial-section {
  background-color: var(--bg-page);
  padding-block: clamp(4.5rem, 8vw, 7.5rem);
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.editorial-figure {
  margin: 0;
}

.editorial-figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.editorial-body .section-copy {
  color: var(--text-muted);
}

.feature-list {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
}

.feature-list li {
  padding-block: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.feature-list h3 {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--text-primary);
}

.feature-list p {
  margin: 0.4rem 0 0;
  font-size: var(--text-body);
  color: var(--text-muted);
  max-width: 52ch;
}

.craft-section {
  background-color: var(--bg-surface);
  padding-block: clamp(4.5rem, 8vw, 7.5rem);
}

.craft-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.craft-body .section-copy {
  color: var(--text-muted);
}

.craft-figure {
  margin: 0;
}

.craft-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.spec-list {
  margin: 2.25rem 0 0;
  padding: 0;
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1.5fr);
  gap: 1rem;
  padding-block: 0.9rem;
  border-top: 1px solid var(--border-subtle);
}

.spec-row dt {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.spec-row dd {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--text-primary);
}

.reserve-section {
  background-color: var(--bg-deep);
  color: var(--text-on-deep);
  padding-block: clamp(4.5rem, 8vw, 7rem);
}

.reserve-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.reserve-intro .section-copy {
  color: var(--text-on-deep-muted);
}

.reserve-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.form-field label,
.form-field legend {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-on-deep-muted);
  padding: 0;
}

.form-field input[type="email"],
.form-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid var(--border-deep);
  background-color: var(--bg-deep-surface);
  color: var(--text-on-deep);
  font-size: var(--text-body);
  transition: border-color 180ms var(--ease-out);
}

.form-field input[type="email"]::placeholder {
  color: rgba(182, 200, 211, 0.56);
}

.form-field input[type="email"]:focus,
.form-field select:focus {
  border-color: var(--accent);
}

.form-field input[aria-invalid="true"] {
  border-color: var(--error-color);
}

.field-error {
  margin: 0;
  min-height: 1.25rem;
  font-size: var(--text-sm);
  color: var(--error-color);
}

.finish-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border-deep);
  background-color: var(--bg-deep-surface);
}

.finish-option {
  position: relative;
  display: flex;
  cursor: pointer;
}

.finish-option + .finish-option {
  border-left: 1px solid var(--border-deep);
}

.finish-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.finish-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  font-size: var(--text-sm);
  color: var(--text-on-deep-muted);
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

.finish-option input:checked + span {
  background-color: var(--text-on-deep);
  color: var(--bg-deep);
  font-weight: 600;
}

.finish-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.form-status {
  min-height: 1.5rem;
  font-size: var(--text-body);
  color: var(--text-on-deep);
}

.form-status-saved {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-deep);
}

.status-reset {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text-on-deep-muted);
  font-size: var(--text-sm);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.status-reset:hover {
  color: var(--text-on-deep);
}

.site-footer {
  background-color: var(--bg-deep);
  color: var(--text-on-deep-muted);
  border-top: 1px solid var(--border-deep);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem;
  font-size: var(--text-sm);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-on-deep);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a:hover {
  color: var(--text-on-deep);
}

@media (max-width: 900px) {
  .stage-grid,
  .editorial-grid,
  .craft-grid,
  .reserve-grid {
    grid-template-columns: 1fr;
  }

  .craft-figure {
    order: -1;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 2rem, var(--max-width));
  }

  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: var(--bg-page);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem 1.25rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
  }

  .primary-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link {
    width: 100%;
    padding: 0.75rem 0;
    font-size: var(--text-body);
  }

  .hero {
    padding-top: 5.5rem;
    min-height: 94dvh;
  }

  .hero-media img {
    object-position: 69% 74%;
  }

  .hero-content {
    width: min(100% - 2rem, var(--max-width));
  }

  .hero-title {
    font-size: clamp(2.65rem, 11vw, 3.6rem);
  }

  .stage-controls {
    width: 100%;
  }

  .segmented {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .segmented-item {
    padding: 0 0.5rem;
    text-align: center;
  }

  .readout-list,
  .spec-row,
  .finish-options {
    grid-template-columns: 1fr;
  }

  .finish-option + .finish-option {
    border-left: 0;
    border-top: 1px solid var(--border-deep);
  }
}

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

  .site-header,
  .nav-link,
  .nav-toggle-bar,
  .btn-primary,
  .segmented-item,
  .unit-option span,
  .dial-hand,
  .primary-nav,
  .finish-option span {
    transition: none;
  }
}
