:root {
  color-scheme: light dark;
  --canvas: #f1f2ed;
  --surface: #ffffff;
  --surface-2: #e7e9e3;
  --ink: #11151b;
  --muted: #606873;
  --faint: #626a74;
  --line: rgba(17, 21, 27, 0.16);
  --line-strong: rgba(17, 21, 27, 0.3);
  --accent: #c86f2f;
  --accent-ink: #fffaf3;
  --code: #111821;
  --code-ink: #e9edf3;
  --code-muted: #758397;
  --paper: var(--canvas);
  --paper-2: var(--surface);
  --paper-3: var(--surface-2);
  --ink-2: var(--ink);
  --ink-mute: var(--muted);
  --ink-dim: var(--faint);
  --sky: var(--accent);
  --sky-lift: var(--ink);
  --sun: var(--accent);
  --sun-lift: var(--accent);
  --glow: var(--accent);
  --rule: var(--line);
  --rule-2: var(--line-strong);
  --max: min(1280px, calc(100% - 56px));
  --narrow: min(920px, calc(100% - 56px));
  --radius: 16px;
  --radius-small: 10px;
  --shadow: 0 24px 70px rgba(29, 35, 43, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #090c11;
    --surface: #10151d;
    --surface-2: #171d27;
    --ink: #f3f0e8;
    --muted: #9aa5b2;
    --faint: #85909e;
    --line: rgba(243, 240, 232, 0.14);
    --line-strong: rgba(243, 240, 232, 0.28);
    --accent: #eda652;
    --accent-ink: #15100a;
    --code: #06090d;
    --code-ink: #edf1f7;
    --code-muted: #738096;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1rem/1.6 "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.marketing {
  overflow-x: clip;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

a:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 68%, transparent);
  outline-offset: 4px;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

code,
pre,
.code-title,
.section-label,
.frame-rate,
.preset-list dt,
.docs-rail {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Shared header */
.site-header,
body > header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: var(--max);
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-mark {
  position: relative;
  width: 20px;
  height: 20px;
  flex: none;
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.brand-mark::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: 5px;
  top: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 24px);
  white-space: nowrap;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 520;
  transition: color 180ms ease;
}

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

.nav-links .nav-cta {
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  color: var(--ink);
}

.nav-links .nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Marketing layout */
.hero {
  min-height: calc(100svh - 68px);
  display: grid;
  align-items: center;
  padding: clamp(34px, 5vw, 72px) 0;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.28fr);
  gap: clamp(36px, 5vw, 78px);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 25px;
  align-content: center;
}

.hero h1 {
  font-size: clamp(3rem, 4vw, 3.55rem);
}

.hero h1 span {
  display: block;
  white-space: nowrap;
}

.hero-copy > p {
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  line-height: 1.52;
}

.hero-actions,
.purchase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.1;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.film {
  min-width: 0;
  margin: 0;
}

.film-frame {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 200ms ease, transform 240ms ease;
}

.film:hover .film-frame {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.film-frame video,
.film-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-film .film-frame {
  aspect-ratio: 16 / 11;
}

.film figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 2px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.film figcaption strong {
  color: var(--ink);
  font-weight: 620;
}

.film figcaption span {
  text-align: right;
}

.frame-rate {
  position: absolute;
  right: 13px;
  top: 13px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  background: rgba(7, 10, 14, 0.76);
  color: #f6f2e9;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.proof-strip {
  width: var(--max);
  margin: 0 auto;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.proof-strip dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin: 0;
}

.proof-strip dl > div {
  display: grid;
  gap: 3px;
}

.proof-strip dt {
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.proof-strip dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
}

.system-section,
.film-library,
.horizon-section,
.integration,
.preset-section,
.purchase,
.questions {
  padding: clamp(82px, 10vw, 150px) 0;
  border-bottom: 1px solid var(--line);
}

.section-grid,
.integration-grid,
.questions-grid {
  width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(52px, 8vw, 120px);
  align-items: start;
}

.section-intro {
  position: sticky;
  top: 110px;
}

.section-label {
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-intro h2,
.section-heading h2,
.horizon-copy h2,
.integration-copy h2,
.preset-copy h2,
.purchase h2,
.questions h2 {
  font-size: clamp(2.3rem, 4vw, 3.7rem);
}

.section-intro > p:last-child,
.section-heading p,
.horizon-copy p,
.integration-copy > p,
.preset-copy > p,
.questions-heading p {
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.capability-list {
  border-bottom: 1px solid var(--line);
}

.capability-list article {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  gap: 38px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.capability-list h3 {
  font-size: 1.06rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.capability-list p {
  color: var(--muted);
  line-height: 1.65;
}

.film-library {
  background: var(--surface);
}

.section-heading {
  width: var(--max);
  margin: 0 auto clamp(48px, 6vw, 82px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.66fr);
  gap: 50px;
  align-items: end;
}

.section-heading p {
  margin: 0;
}

.film-grid {
  width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px 24px;
  align-items: start;
}

.film-clouds {
  grid-column: 1 / 8;
  grid-row: 1 / 3;
  align-self: center;
}

.film-clouds .film-frame {
  aspect-ratio: 5 / 4;
}

.film-rays,
.film-atmosphere {
  grid-column: 8 / 13;
}

.film-rays .film-frame,
.film-atmosphere .film-frame {
  aspect-ratio: 16 / 9;
}

.horizon-grid,
.preset-grid,
.purchase-grid {
  width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(280px, 0.58fr);
  gap: clamp(50px, 7vw, 108px);
  align-items: center;
}

.horizon-frame {
  aspect-ratio: 16 / 9;
}

.horizon-copy {
  max-width: 28rem;
}

.text-link {
  display: inline-flex;
  margin-top: 26px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent);
  color: var(--ink);
  font-weight: 620;
}

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

.integration {
  background: var(--surface);
}

.integration-grid {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
}

.integration-copy > p + p {
  margin-top: 16px;
}

.integration-copy code,
.docs-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.85em;
}

.code-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: var(--code);
  box-shadow: var(--shadow);
}

.code-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--code-muted);
  font-size: 0.72rem;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: clamp(20px, 3vw, 34px);
  background: var(--code);
  color: var(--code-ink);
  font: 0.82rem/1.75 ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  tab-size: 2;
}

pre .k {
  color: #dc9bff;
}

pre .s {
  color: #f2ba72;
}

pre .c {
  color: var(--code-muted);
}

.preset-grid {
  grid-template-columns: minmax(300px, 0.62fr) minmax(0, 1.38fr);
}

.preset-list {
  margin: 36px 0 0;
  border-bottom: 1px solid var(--line);
}

.preset-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) 1.2fr;
  gap: 22px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.preset-list dt {
  color: var(--ink);
  font-size: 0.84rem;
}

.preset-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.preset-film .film-frame {
  aspect-ratio: 16 / 10;
}

.purchase {
  background: var(--surface-2);
}

.purchase-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: start;
}

.purchase-lead {
  display: grid;
  gap: 26px;
}

.purchase-lead .section-label {
  margin: 0;
}

.price {
  color: var(--ink);
  font-size: clamp(3.1rem, 6vw, 5.2rem);
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.055em;
}

.price span {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0;
}

.license-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.license-list li {
  display: grid;
  grid-template-columns: minmax(145px, 0.72fr) 1.28fr;
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.license-list strong {
  font-weight: 620;
}

.license-list span {
  color: var(--muted);
}

.questions-grid {
  grid-template-columns: minmax(240px, 0.58fr) minmax(0, 1.42fr);
}

.questions-heading {
  position: sticky;
  top: 110px;
}

.questions-heading a {
  border-bottom: 1px solid var(--accent);
}

.faq {
  border-bottom: 1px solid var(--line);
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.faq summary {
  position: relative;
  padding-right: 40px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 620;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: -3px;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "−";
}

.faq p {
  max-width: 48rem;
  margin-top: 13px;
  padding-right: 40px;
  color: var(--muted);
}

footer {
  padding: 42px 0;
}

.foot {
  width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--faint);
  font-size: 0.84rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.foot a:hover {
  color: var(--ink);
}

/* Motion is added only when JavaScript can reveal the element. */
.js .marketing .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

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

.hero-copy > * {
  animation: hero-rise 620ms both cubic-bezier(0.2, 0.75, 0.25, 1);
}

.hero-copy > p {
  animation-delay: 70ms;
}

.hero-copy .hero-actions {
  animation-delay: 130ms;
}

.hero-film {
  animation: hero-film-in 760ms both cubic-bezier(0.2, 0.75, 0.25, 1);
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-film-in {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Documentation */
.docs-layout {
  width: var(--max);
  margin: 48px auto 80px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(42px, 6vw, 88px);
  align-items: start;
}

.docs-rail {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 0.82rem;
}

.docs-rail a {
  padding: 2px 0;
  color: var(--muted);
}

.docs-rail a:hover {
  color: var(--accent);
}

.rail-group {
  margin-top: 18px;
  color: var(--ink);
  font-weight: 700;
}

.rail-group:first-child {
  margin-top: 0;
}

.docs-body {
  max-width: 780px;
  min-width: 0;
}

.docs-body h1 {
  color: var(--ink);
}

.docs-body h2 {
  margin: 48px 0 15px;
  padding-top: 8px;
  font-size: 1.65rem;
  letter-spacing: -0.025em;
}

.docs-body h3 {
  margin: 28px 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.docs-body p,
.docs-body li {
  color: var(--ink);
}

.docs-body p {
  margin: 0 0 1rem;
}

.docs-body a {
  color: var(--accent);
}

.docs-body pre {
  margin: 16px 0;
  border-radius: var(--radius-small);
  border: 1px solid var(--line);
}

.docs-body table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.docs-body th,
.docs-body td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.docs-body th {
  color: var(--muted);
  font-weight: 620;
}

@media (max-width: 1040px) {
  .nav-links {
    gap: 15px;
  }

  .nav-links a[href="#whats-inside"],
  .nav-links a[href="#presets"] {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  }
}

@media (max-width: 820px) {
  :root {
    --max: min(100% - 36px, 720px);
    --narrow: min(100% - 36px, 720px);
  }

  .nav {
    height: 64px;
  }

  .nav-links a:not(.nav-cta):not([href="/demo/"]) {
    display: none;
  }

  .hero {
    min-height: calc(100svh - 64px);
    padding: 28px 0 24px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-copy {
    gap: 17px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 8vw, 3.4rem);
  }

  .hero-copy > p {
    font-size: 1rem;
  }

  .hero-film .film-frame {
    max-height: 42svh;
    aspect-ratio: 16 / 9;
  }

  .film figcaption {
    font-size: 0.77rem;
  }

  .proof-strip dl {
    grid-template-columns: 1fr 1fr;
    gap: 22px 26px;
  }

  .section-grid,
  .integration-grid,
  .questions-grid,
  .horizon-grid,
  .preset-grid,
  .purchase-grid {
    grid-template-columns: 1fr;
  }

  .section-intro,
  .questions-heading {
    position: static;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-heading p {
    max-width: 34rem;
  }

  .film-grid {
    grid-template-columns: 1fr 1fr;
  }

  .film-clouds {
    grid-column: 1 / 3;
    grid-row: auto;
  }

  .film-rays,
  .film-atmosphere {
    grid-column: auto;
  }

  .preset-film {
    grid-row: 1;
  }

  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .docs-rail {
    position: static;
  }

  .docs-body table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .nav-links a[href="/demo/"] {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.08rem, 9.3vw, 2.75rem);
  }

  .hero-actions,
  .purchase-actions {
    align-items: stretch;
  }

  .hero-actions .button,
  .purchase-actions .button {
    width: 100%;
  }

  .film figcaption {
    display: grid;
    gap: 2px;
  }

  .film figcaption span {
    text-align: left;
  }

  .proof-strip dl,
  .film-grid {
    grid-template-columns: 1fr;
  }

  .film-clouds,
  .film-rays,
  .film-atmosphere {
    grid-column: 1;
  }

  .film-clouds .film-frame,
  .film-rays .film-frame,
  .film-atmosphere .film-frame {
    aspect-ratio: 16 / 10;
  }

  .capability-list article,
  .preset-list > div,
  .license-list li {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .foot {
    display: grid;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .marketing .reveal {
    opacity: 1;
    transform: none;
  }
}
