:root {
  color-scheme: dark;
  --page: #030407;
  --surface: #090c12;
  --surface-raised: #0e141d;
  --line: #252a35;
  --line-strong: #3a4657;
  --text: #f7f8fb;
  --muted: #adb3c0;
  --blue: #3685ff;
  --blue-bright: #78baff;
  --violet: #8e67df;
  --display: Bahnschrift, "Arial Narrow", Inter, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--page); }
body { margin: 0; background: var(--page); color: var(--text); font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: #245cb2; color: #fff; }
a, button, summary { text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }

.site-nav { background: rgba(3,4,7,.97); border-color: #1b2029 !important; box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.site-nav > div { max-width: 1480px; height: 76px; }
.site-nav > div > a:first-child img { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 4px; box-shadow: none !important; }
.site-nav > div > a:first-child span { font-family: var(--display); font-size: 20px; letter-spacing: .01em; }
.site-nav nav { gap: clamp(16px,2.5vw,34px); color: #d8dde6; }
.site-nav nav a { color: #d8dde6; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; transition: color 160ms ease; }
.site-nav nav a:hover { color: var(--blue-bright); }
.site-nav .surface-panel { padding: 8px 11px; }
.site-nav .btn-primary { padding: 9px 14px; border-radius: 3px; }
.icon-invert { filter: brightness(0) invert(1); }

.surface-panel { position: relative; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: none; backdrop-filter: none; opacity: 1; animation: none; transition: border-color 160ms ease, background-color 160ms ease; }
.surface-panel:hover { border-color: var(--line-strong); background: var(--surface-raised); box-shadow: none; transform: none; }
.btn-primary { position: relative; overflow: hidden; border: 1px solid #3478e6; border-radius: 3px; background: #276de0; color: #fff; box-shadow: none; transition: background-color 160ms ease, border-color 160ms ease; }
.btn-primary:hover { transform: none; border-color: #83c5ff; background: #3981ef; color: #fff; box-shadow: 0 7px 20px rgba(31,94,198,.2); }

#download { position: relative; isolation: isolate; overflow: hidden; padding: clamp(72px,9vw,126px) 24px clamp(64px,8vw,104px); background: #030407; }
#download::before { position: absolute; z-index: -1; inset: 0; content: ""; pointer-events: none; background: radial-gradient(ellipse at 77% 46%, rgba(24,75,160,.18), transparent 42%), linear-gradient(122deg, transparent 0 72%, rgba(35,115,255,.46) 72.1%, transparent 72.24%), linear-gradient(58deg, transparent 0 89%, rgba(52,133,255,.28) 89.1%, transparent 89.23%); }
#download .hero-copy { position: relative; z-index: 1; text-align: left; }
#download .hero-copy, #how-it-works, #features, #setup, #faq, #support, footer > div.max-w-6xl { width: 100%; max-width: 1440px; box-sizing: border-box; }
#download h1 { max-width: 17ch; margin: 0 0 24px; color: #f7f8fb; font: 800 clamp(2.9rem,6.2vw,5.5rem)/1.01 var(--display); letter-spacing: -.035em; text-transform: uppercase; text-wrap: balance; animation: none; }
#download h1::after { display: block; width: clamp(88px,12vw,154px); height: 3px; margin-top: 19px; content: ""; background: var(--blue); }
#download p { max-width: 64ch; margin-left: 0; margin-right: 0; color: #cbd1dc; line-height: 1.72; }
#download .hero-copy > div:last-child { color: #bac4d2; gap: 1.5rem; letter-spacing: .01em; }
#download .hero-copy > div:last-child svg { color: var(--blue-bright); }
#download .btn-primary, #download .surface-panel { min-height: 48px; padding: 12px 18px; border-radius: 3px; font-size: 13px; }
#download .surface-panel { background: transparent; color: var(--text); }
#download .surface-panel:hover { border-color: var(--blue-bright); background: var(--surface-raised); }

#screenshots, #how-it-works, #features, #setup, #faq, #support { scroll-margin-top: 84px; }
#how-it-works, #features, #setup, #faq, #support { position: relative; padding-top: clamp(58px,7vw,94px); padding-bottom: clamp(58px,7vw,94px); }
#screenshots { padding-top: 12px; }
#screenshots, #features, #faq { background: #070a10; }
#how-it-works, #setup { background: #030407; }
#how-it-works > div:first-child, #features > div:first-child, #setup > div:first-child, #faq > div:first-child { margin-bottom: 32px; }
h1, h2, h3 { color: var(--text); letter-spacing: -.025em; text-wrap: pretty; }
h2 { font-family: var(--display); font-weight: 750; animation: none; }
#how-it-works h2, #features h2, #setup h2, #faq h2 { font-size: clamp(1.9rem,3.7vw,3rem); line-height: 1.08; }
#how-it-works h3, #features h3, #setup h3 { font-size: 1.08rem; }
#how-it-works p, #features p, #setup p, #faq p, #support p { color: var(--muted); line-height: 1.72; }

.step-badge { border: 1px solid #3779dc; border-radius: 4px; background: #0c1728; color: #a8ceff; box-shadow: none; font-family: Inter, sans-serif; transition: background-color 160ms ease, border-color 160ms ease; }
.step-badge:hover { border-color: #78baff; background: #12233a; box-shadow: none; transform: none; }
.code-pill { border: 1px solid #303c4c; border-radius: 3px; background: #0d131c; color: #c7dcf5; }
details { border-radius: 0; transition: border-color 160ms ease, background-color 160ms ease; }
details[open] { border-color: var(--line-strong) !important; background: transparent; }
summary { outline: none; cursor: pointer; user-select: none; }
summary::-webkit-details-marker { display: none; }

#how-it-works .space-y-6 > .surface-panel, #setup .space-y-4 > .surface-panel, #faq .space-y-4 > details.surface-panel { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
#how-it-works .space-y-6 > .surface-panel { padding: 20px 0; }
#how-it-works .space-y-6 > .surface-panel:first-child { padding-top: 0; }
#setup .space-y-4 > .surface-panel, #faq .space-y-4 > details.surface-panel { padding: 20px 0; }
#how-it-works .space-y-6 > .surface-panel:hover, #setup .space-y-4 > .surface-panel:hover, #faq .space-y-4 > details.surface-panel:hover, #faq details[open] { border-color: var(--line-strong) !important; background: transparent; }
#setup .space-y-4 > .surface-panel.border { border-top: 1px solid var(--line-strong); }
.backend-list { display: grid; gap: 20px; }
.backend-list > div + div { padding-top: 20px; border-top: 1px solid var(--line); }
.backend-list dt { margin-bottom: 5px; color: var(--text); font-size: .95rem; font-weight: 650; }
.backend-list dd { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.65; }

.screenshot-section { position: relative; z-index: 10; width: min(100%, 1480px); margin-inline: auto; padding: 0 24px clamp(58px,7vw,94px); box-sizing: border-box; }
.screenshot-heading { margin-bottom: clamp(24px,3vw,36px); }
.screenshot-heading h2 { margin: 0; font-size: clamp(1.9rem,3.7vw,3rem); font-weight: 750; line-height: 1.08; }
.screenshot-heading p, .screenshot-item figcaption p { color: var(--muted); line-height: 1.6; }
.screenshot-heading p { margin: 8px 0 0; }
.screenshot-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(24px,3vw,38px) clamp(16px,2vw,24px); }
.screenshot-item { min-width: 0; margin: 0; }
.screenshot-wide { grid-column: span 2; }
.screenshot-trigger { display: grid; grid-template: minmax(0,1fr)/minmax(0,1fr); place-items: center; height: clamp(24rem,34vw,31rem); padding: clamp(12px,2vw,20px); box-sizing: border-box; border: 1px solid var(--line); border-radius: 4px; background: #080b12; cursor: zoom-in; transition: background-color 160ms ease,border-color 160ms ease; }
.screenshot-trigger:hover { border-color: #4e82cb; background: #0a0e16; }
.screenshot-trigger img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.screenshot-item figcaption { padding: 12px 2px 0; }
.screenshot-item figcaption h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.screenshot-item figcaption p { margin: 4px 0 0; font-size: .875rem; }

.screenshot-viewer { width: min(66rem,calc(100% - 2rem)); height: min(90dvh,54rem); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--page); color: var(--text); }
.screenshot-viewer::backdrop { background: rgba(1,3,7,.9); }
.screenshot-viewer-inner { display: grid; height: 100%; box-sizing: border-box; grid-template-rows: auto minmax(0,1fr) auto; padding: clamp(12px,2vw,20px); }
.viewer-header, .viewer-meta { display: flex; align-items: center; gap: 12px; }
.viewer-header { justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.viewer-meta h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.viewer-meta p { margin: 0; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.viewer-close, .viewer-control { display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 3px; background: #0b111a; color: var(--text); cursor: pointer; transition: background-color 160ms ease,border-color 160ms ease; }
.viewer-close:hover, .viewer-control:hover { border-color: #4e82cb; background: #0f1927; }
.viewer-stage { display: grid; grid-template: minmax(0,1fr)/44px minmax(0,1fr) 44px; place-items: center; gap: clamp(4px,1.5vw,16px); min-height: 0; padding-block: 12px; }
.viewer-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pan-y; }
.viewer-caption { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; text-align: center; }

#support > div { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line) !important; border-top: 2px solid var(--blue) !important; border-radius: 4px; background: #070b11; box-shadow: none; text-align: center; }
#support img { margin-inline: auto; }
#support h2 { font-family: var(--display); font-size: clamp(1.8rem,3.2vw,2.7rem); }
#support .btn-primary, #support .surface-panel { min-height: 48px; padding: 12px 18px; border-radius: 3px; }
footer { border-color: var(--line) !important; background: #030407 !important; }
footer a:hover { color: var(--blue-bright) !important; }

@media (max-width: 1024px) {
  .screenshot-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .screenshot-wide { grid-column: auto; }
}
@media (max-width: 768px) {
  html { scroll-padding-top: 104px; }
  .site-nav > div { height: auto; min-height: 68px; flex-wrap: wrap; gap: 10px 16px; padding-block: 10px; }
  .site-nav > div > a:first-child { flex: 1 0 auto; }
  .site-nav > div > nav { display: flex; order: 3; justify-content: flex-start; width: 100%; gap: 24px; overflow-x: auto; padding: 8px 0 4px; }
  .site-nav nav a { flex: 0 0 auto; font-size: 11px; }
  .site-nav > div > div { margin-left: auto; }
  #download { padding: 66px 20px 58px; }
  #download h1 { font-size: clamp(2.65rem,9.5vw,4.2rem); }
  #download .hero-copy > div:last-child { gap: 12px 20px; }
  #how-it-works, #features, #setup, #faq, #support { padding-top: 58px; padding-bottom: 58px; }
  .screenshot-section { padding: 0 20px 58px; }
}
@media (max-width: 600px) {
  #download, #how-it-works, #features, #setup, #faq, #support { padding-inline: 18px; }
  .screenshot-section { padding: 0 16px 58px; }
  .screenshot-grid { grid-template-columns: minmax(0,1fr); }
  .screenshot-trigger { height: clamp(24rem,120vw,32rem); }
  .screenshot-mini .screenshot-trigger { height: 16rem; }
  .screenshot-viewer { width: calc(100% - 1rem); height: min(92dvh,calc((100vw - 2.75rem)/var(--viewer-ratio,1) + 9.5rem)); }
  .viewer-stage { grid-template: minmax(0,1fr) auto/1fr 1fr; }
  .viewer-image { grid-area: 1 / 1 / 2 / 3; }
  .viewer-control { grid-row: 2; }
  [data-viewer-previous] { justify-self: end; }
  [data-viewer-next] { justify-self: start; }
  #support > div { padding: 24px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
