@font-face {
  font-family: Bricolage;
  src: url('./assets/fonts/bricolage-grotesque-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: Bricolage;
  src: url('./assets/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('./assets/fonts/instrument-serif-italic-ext.woff2') format('woff2');
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('./assets/fonts/instrument-serif-italic.woff2') format('woff2');
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg: #10120e;
  --deep: #0a0c08;
  --surface: #191c16;
  --surface-2: #21251c;
  --line: #3b4032;
  --text: #f3eedf;
  --muted: #b9bcae;
  --soft: #d5eb8a;
  --accent: #d5eb8a;
  --mint: #b7e3a2;
  --font: Bricolage, 'Segoe UI', sans-serif;
  --display: Bricolage, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  accent-color: var(--soft);
  scrollbar-color: #677051 var(--deep);
}
body { caret-color: var(--soft) }
h1, h2, h3 { letter-spacing: -.035em; text-wrap: balance }
.wrap { width: min(100% - clamp(36px, 9vw, 144px), 1330px) }
.header, .header.scrolled { background: #10120e; border-color: #33372b; backdrop-filter: none }
.nav-wrap { min-height: 70px }
.brand { letter-spacing: -.025em }
.mark { color: #131809; background: var(--soft); border-radius: 50%; width: 31px; height: 31px }
.mark i { transform: rotate(0); border-radius: 1px; height: 9px }
.mark i:nth-child(2) { height: 15px }
.mark i:nth-child(3) { height: 7px }
.nav-desktop a { padding-block: 12px; font-weight: 550; border-bottom: 1px solid transparent }
.nav-desktop a[aria-current], .nav-desktop a:hover { border-color: var(--soft) }
.language { color: var(--text); font: 650 .85rem var(--font) }
.button { min-height: 46px; border-radius: 3px; gap: 9px; touch-action: manipulation }
.primary, .nav-download { background: var(--soft); border-color: var(--soft); color: #141909 }
.primary:hover, .nav-download:hover { background: #edf8c4; border-color: #edf8c4 }
.secondary { background: transparent; border-color: #687256; color: var(--text) }
.secondary:hover { background: var(--surface-2); border-color: var(--soft) }
.text-button { color: var(--soft); padding-inline: 0 }
.nav-mobile nav { background: var(--surface); border-color: var(--line) }
.footer { background: var(--deep) }
.footer .wrap { align-items: center }
.footer .wrap > div > span { color: var(--muted) }

.night-hero { position: relative; isolation: isolate; min-height: clamp(655px, 79svh, 950px); display: grid; align-items: center; overflow: clip; background: #0c0e09 }
.night-stage { position: absolute; z-index: -2; inset: 0; pointer-events: none }
.night-stage > img, .night-phone-overlay img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; max-width: none }
.night-phone-overlay { position: absolute; inset: 0 }
.night-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(90deg,#0b0d09e0 0%,#0b0d09a6 32%,#0b0d0900 60%),linear-gradient(0deg,#0b0d09aa 0%,transparent 25%) }
.night-hero-inner { padding-block: clamp(64px, 11vw, 170px) }
.night-hero-copy { max-width: 51%; }
.night-hero h1 { font-size: clamp(5.25rem, 8.7vw, 9rem); line-height: .91; letter-spacing: -.045em; font-weight: 660 }
.night-title-mask { display: block; padding-bottom: .105em; margin-bottom: -.105em; overflow: clip }
.night-title-line { display: block; width: fit-content }
.night-title-mask:nth-child(2) { font: italic 1.15em/.93 var(--serif); letter-spacing: -.026em; padding-bottom: .19em; margin-bottom: -.19em }
.night-intro { margin-top: clamp(24px, 4vw, 43px); max-width: 34ch; color: #e0dece; font-size: clamp(1.025rem, 1.55vw, 1.37rem); line-height: 1.5 }
.night-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 25px }
.night-actions .primary { padding-inline: 17px; min-height: 50px }
.night-watch { color: var(--text); background: #0a0c08b3; border-color: #969c85; min-height: 50px }
.night-watch:hover { border-color: var(--soft); color: var(--soft) }
.night-hero-meta { margin-top: 16px; color: #c9c9b7; font-size: .83rem }
.night-hero-meta .icon { margin-right: 4px }
.night-signal { position: absolute; left: 68%; top: 62%; width: clamp(58px, 10vw, 164px); height: 1px; background: var(--soft); opacity: 0; transform-origin: left }
.night-signal::after { content: ""; width: 6px; height: 6px; position: absolute; right: 0; top: -2px; border-radius: 50%; background: var(--soft); box-shadow: 0 0 14px var(--soft) }

.night-proof { background: #171b11; border-block: 1px solid var(--line) }
.night-proof .wrap { display: flex; min-height: 65px; gap: clamp(14px, 3vw, 48px); align-items: center; flex-wrap: wrap }
.night-proof span, .night-proof a { display: inline-flex; align-items: center; gap: 8px; font-size: .91rem }
.night-proof a { color: var(--soft); margin-left: auto; min-height: 44px }
.night-proof span .icon { color: var(--soft) }
.night-proof a:hover, .text-button:hover { text-decoration: underline; text-underline-offset: .25em }

.night-home .section { padding-block: clamp(72px, 8vw, 126px) }
.night-section-lead { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .7fr); align-items: end; gap: 25px; margin-bottom: clamp(28px, 5vw, 55px) }
.night-section-lead h2 { font-size: clamp(2.65rem, 5.35vw, 5.7rem); line-height: .98; text-wrap: balance }
.night-section-lead p { max-width: 43ch; font-size: clamp(1rem, 1.36vw, 1.2rem); line-height: 1.5; padding-bottom: .12em }
.night-demo { background: #171b13 }
.night-demo .demo-stage { grid-template-columns: minmax(0, 1fr) clamp(24px, 5vw, 80px) minmax(250px, 305px); gap: 0; padding: clamp(16px, 3.5vw, 52px); border: 1px solid #424a34; border-radius: 3px; background: #0f120d }
.night-demo .demo-screen { width: 100%; background: #0a0c08; border: 1px solid #424a34; border-radius: 3px; box-shadow: none }
.night-demo .demo-screen-top { min-height: 38px; font: 550 .82rem var(--font); color: #dadfce }
.night-demo .demo-screen-top span:first-child i { background: var(--soft); box-shadow: none }
.night-demo .demo-media { border-radius: 0 }
.night-demo .screen-play { border-radius: 50%; background: #10140bcb; color: var(--soft); border-color: #d5eb8a99 }
.night-demo .screen-play:hover { background: #272f1a; border-color: var(--soft) }
.night-demo .demo-credits { color: #b4bba7 }
.night-demo-connection { position: relative; height: 1px; background: #697956 }
.night-demo-connection i { position: absolute; inset: -1px 0; transform-origin: right; background: var(--soft); opacity: 0 }
.night-demo .phone-live { width: 100%; max-width: none; background: #1b1d23; border-color: #646873; border-radius: 23px; box-shadow: none }
.night-demo .phone-glass { background: #0d1015; padding: 11px; border-radius: 18px }
.night-demo .phone-head, .night-demo .phone-source { font-family: var(--font) }
.night-demo .phone-head > b { font-size: .82rem; letter-spacing: .085em }
.night-demo .phone-head span { color: #b4efca }
.night-demo .phone-source, .night-demo .phone-media, .night-demo .phone-volume { background: #181c24 }
.night-demo .phone-media > span:first-child { color: #cac3eb }
.night-demo .remote-key { scroll-margin-top: 265px; background: #242834; color: #f5f1fb; min-height: 47px }
.night-demo .remote-key:hover { background: #353c51 }
.night-demo .play-key { background: #5745b9 }
.night-demo .play-key:hover { background: #4e3ca7 }
.night-demo .transport, .night-demo .episodes { gap: 8px }
.night-demo input[type="range"] { accent-color: #b6a3ff }
.night-demo .demo-flash { border-color: #d5eb8a }

.night-story .scroll-story { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: start; gap: clamp(24px, 7vw, 106px) }
.night-story .chapter-display { top: clamp(90px, 12vh, 138px); min-height: 0; height: min(59vh, 590px); border: 1px solid #3c4433; border-radius: 2px; background: #171d13 }
.night-story .chapter { min-height: min(47vh, 390px); padding-block: 28px; align-content: center; gap: 14px }
.night-story .chapter h3 { font-size: clamp(2rem, 3.25vw, 3.85rem); font-weight: 650; line-height: 1 }
.night-story .chapter p { line-height: 1.58; max-width: 46ch }
.night-story .chapter.current { border-top-color: #85915c }
.night-story .chapter.current h3 { color: var(--text) }
.night-chapter-number { color: var(--soft); font: 550 .79rem var(--mono) }
.night-chapter-art { position: relative; min-width: 0; overflow: clip; background: #141a12; border: 0; border-radius: 0; padding: 0 }
.night-story .chapter-panel { position: absolute; inset: 0; width: 100%; height: 100%; animation: none }
.night-chapter-art > img { width: 100%; height: 100%; object-fit: cover }
.night-chapter-0 > img { object-position: 82% center }
.night-chapter-1 > img, .night-chapter-4 > img, .night-chapter-5 > img { object-fit: contain; padding: 18px; filter: drop-shadow(12px 19px 23px #080b06) }
.night-chapter-4 > img, .night-chapter-5 > img { width: 67%; justify-self: start; object-position: center }
.night-chapter-2 > img { object-fit: contain; padding: 23px; opacity: .62 }
.night-pair-mark, .night-panel-play, .night-timer, .night-source-list { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #151a12; color: var(--soft); border: 1px solid #718350 }
.night-pair-mark { right: 6%; bottom: 9%; font-size: 2.1rem }
.night-panel-play { inset: 50% auto auto 50%; translate: -50% -50%; border-radius: 50%; font-size: 1.55rem; padding: 15px }
.night-timer { right: 6%; bottom: 12%; font: 500 clamp(1rem, 2.6vw, 2.5rem) var(--mono); font-variant-numeric: tabular-nums }
.night-source-list { flex-direction: column; align-items: stretch; right: 6%; top: 50%; translate: 0 -50%; font-size: .91rem }
.night-source-list span + span { border-top: 1px solid #596448; padding-top: 5px }
.night-story-progress { position: absolute; z-index: 2; inset: auto 0 0; height: 3px; background: #515c42 }
.night-story-progress i { display: block; height: 100%; background: var(--soft); transform-origin: left center; transform: scaleX(0) }
.night-story .chapter-mobile { display: none }
.night-story .scroll-story + .button { margin-top: 15px }

.night-setup { background: #dedccb; color: #21291a }
.night-setup .night-section-lead p, .night-setup li p { color: #454d3b }
.night-setup ol { padding-left: 0; list-style: none; display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(16px,4vw,50px); counter-reset: setup; margin: 0 0 22px }
.night-setup li { border-top: 1px solid #849078; padding-top: 16px; counter-increment: setup }
.night-setup li::before { content: "0" counter(setup); display: block; font: 500 .85rem var(--mono); color: #49583c; margin-bottom: 16px }
.night-setup li h3 { font-size: clamp(1.4rem, 2.5vw, 2.4rem); margin-bottom: 9px }
.night-setup .text-button { color: #314422 }
.night-setup :focus-visible { outline-color: #314422 }

.night-compat .platforms { margin-bottom: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)) }
.night-compat .platforms a { position: relative; padding: 18px 36px 18px 13px; min-height: 95px; gap: 5px }
.night-compat .platforms a:hover { background: var(--surface-2) }
.night-compat .platforms a strong { font-size: clamp(1.2rem, 2.6vw, 2.35rem); letter-spacing: -.04em; overflow-wrap: anywhere }
.night-compat .platforms a .icon { position: absolute; top: 20px; right: 13px; color: var(--soft) }
.night-private { border-top: 1px solid var(--line); padding-block: clamp(45px,6vw,90px) }
.night-private .wrap { display: grid; grid-template-columns: 1.2fr .8fr; align-items: start; gap: 24px }
.night-private h2 { font-size: clamp(2.2rem, 4.35vw, 4.65rem) }
.night-private p { margin-bottom: 12px; max-width: 54ch }
.night-final { background: #d5eb8a; color: #1a2110; padding-block: clamp(62px, 10vw, 155px) }
.night-final h2 { font: italic clamp(3.4rem, 8.5vw, 9rem)/.98 var(--serif); text-wrap: balance }
.night-final p { color: #334322; margin: 17px 0 25px; font-size: clamp(1rem,1.65vw,1.3rem) }
.night-final .primary { background: #1a2110; border-color: #1a2110; color: #eef5da }
.night-final .primary:hover { background: #354124 }
.night-final :focus-visible { outline-color: #1a2110 }

@media (max-width: 899px) {
  .night-hero { min-height: 0; display: flex; flex-direction: column }
  .night-hero::after { display: none }
  .night-hero-inner { padding-block: clamp(34px, 6vw, 58px) 28px }
  .night-hero-copy { max-width: none }
  .night-hero h1 { font-size: clamp(3.5rem, 9.8vw, 6.2rem) }
  .night-intro { margin-top: 22px }
  .night-actions { margin-top: 18px }
  .night-stage { position: relative; z-index: 0; order: 2; height: clamp(260px, 55vw, 475px) }
  .night-stage > img, .night-phone-overlay img { object-position: 88% 63% }
  .night-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,#0c0e09 0%,#0c0e0900 15%) }
  .night-story .scroll-story { display: block }
  .night-story .chapter-display { display: none }
  .night-story .chapter { min-height: 0; gap: 10px; padding-block: 19px 29px }
  .night-story .chapter-mobile { display: grid; width: 100%; height: clamp(210px, 52vw, 420px); margin-top: 12px }
  .night-demo .demo-stage { grid-template-columns: minmax(0, 1fr) 24px minmax(220px, .63fr) }
}
@media (max-width: 590px) {
  .nav-wrap { min-height: 62px }
  .brand { gap: 6px }
  .mark { width: 26px; height: 26px }
  .nav-download { min-height: 44px; padding-inline: 8px }
  .nav-mobile summary { min-width: 44px; min-height: 44px }
  .night-stage > img, .night-phone-overlay img { object-position: 88% 64%; width: 127%; left: auto; right: 0 }
  .night-hero h1 { font-size: clamp(3.4rem, 10.3vw, 4.35rem) }
  .night-hero-meta { margin-top: 12px }
  .night-actions { column-gap: 8px }
  .night-actions .button { padding-inline: 9px; font-size: .79rem; min-height: 47px }
  .night-proof .wrap { min-height: 61px; gap: 9px 13px; padding-block: 10px }
  .night-proof span, .night-proof a { font-size: .77rem }
  .night-proof a { display: none }
  .night-section-lead, .night-private .wrap { grid-template-columns: 1fr; gap: 11px }
  .night-home .section { padding-block: 57px }
  .night-demo .demo-stage { grid-template-columns: 1fr; padding: 10px; gap: 0 }
  .night-demo .demo-screen { position: sticky; top: 70px; z-index: 3 }
  .night-demo .demo-screen-top { min-height: 29px; padding: 3px 3px 6px }
  .night-demo .demo-screen video { aspect-ratio: 2.1; max-height: 27vh }
  .night-demo .demo-credits { padding-block: 4px 0 }
  .night-demo-connection { height: 18px; width: 1px; justify-self: center }
  .night-demo .phone-live { width: min(100%, 340px); justify-self: center }
  .night-setup ol { grid-template-columns: 1fr }
  .night-setup li { position: relative; padding-inline-start: 37px }
  .night-setup li::before { position: absolute; left: 0; top: 18px }
  .night-compat .platforms { grid-template-columns: repeat(2, minmax(0,1fr)) }
  .night-compat .platforms a { min-height: 77px; padding: 13px 23px 13px 8px }
  .night-compat .platforms a .icon { right: 5px; top: 14px; width: 14px }
  .night-compat .platforms a span { font-size: .72rem }
}
@media (prefers-reduced-motion: reduce) {
  .night-story .scroll-story { display: block }
  .night-story .chapter-display { display: none }
  .night-story .chapter { min-height: 0; padding-block: 20px 32px }
  .night-story .chapter-mobile { display: grid; height: clamp(210px, 42vw, 425px); margin-top: 12px }
}
.night-chapter-art > img { position: absolute; inset: 0 }
.night-chapter-1 > img { width: 100%; padding-block: 13px; object-fit: contain }
.night-chapter-4 > img { position: absolute; inset: 12% 8% auto; width: 84%; height: 57%; object-fit: contain; padding: 0; filter: none }
.night-chapter-4 .night-timer { right: 8%; bottom: 11% }
.night-source-list span:first-child { color: #10120e; background: var(--soft); border-color: transparent; padding: 3px 7px }
.night-pair-layout { display: grid; grid-template-columns: minmax(0, 1fr) 52px auto; align-items: center; gap: clamp(6px, 2.5vw, 30px); width: min(100% - 28px, 530px) }
.night-pair-screen { display: grid; justify-items: center; gap: 12px; border: 1px solid #697755; background: #1b2116; padding: clamp(8px, 3.5vw, 32px); color: var(--text); }
.night-pair-screen > span { font-weight: 700 }
.night-pair-screen small { color: var(--muted); font-size: .72rem }
.night-pair-code { position: relative; width: min(100%, 164px); }
.night-pair-code img { width: 100%; height: auto }
.night-pair-code i { position: absolute; top: 8%; left: 8%; right: 8%; height: 2px; background: #526833; opacity: 0 }
.night-pair-signal { display: grid; place-items: center; position: relative; color: var(--soft) }
.night-pair-signal::before { content: ""; position: absolute; top: 50%; left: -12px; right: -12px; border-top: 1px dashed #697755; z-index: -1 }
.night-pair-device { display: grid; gap: 7px; justify-items: center; font-size: .8rem; color: var(--soft); max-width: 105px; text-align: center }
.night-pair-device .icon { width: 46px; height: 46px; stroke-width: 1.2 }
.night-chapter-2:not([hidden]) .night-pair-code i { animation: pairing-scan 1s ease-out .15s both }
@keyframes pairing-scan {
  15% { opacity: 1; transform: translateY(0) }
  85% { opacity: 1; transform: translateY(72px) }
  100% { opacity: 0; transform: translateY(72px) }
}
@media (max-width: 899px) {
  .night-stage { width: 100%; align-self: stretch }
}
@media (max-width: 590px) {
  .night-actions .button { padding-inline: 7px; font-size: .76rem }
  .night-demo.section { padding-block-start: 40px }
  .night-pair-layout { grid-template-columns: minmax(0, 1fr) 30px auto }
  .night-pair-code { width: 94px }
}
@media (prefers-reduced-motion: reduce) {
  .night-chapter-2:not([hidden]) .night-pair-code i { animation: none }
}
