@layer base, layout, product, pages, motion, responsive;

@layer base {
  :root {
    color-scheme: dark;
    --bg: #0b0b11;
    --deep: #08080e;
    --surface: #14141e;
    --surface-2: #1c1b2a;
    --line: #2a2938;
    --text: #f5f3fb;
    --muted: #b0aec1;
    --soft: #c8b8ff;
    --accent: #a78aff;
    --mint: #8ee6c0;
    --ease: cubic-bezier(.22,.8,.22,1);
    --font: "Geist", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    --display: "Geist", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  }
  *, *::before, *::after { box-sizing: border-box }
  html { scroll-padding-top: 88px }
  body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased }
  h1, h2, h3, p, figure { margin: 0 }
  h1, h2, h3 { font-family: var(--display); line-height: 1.02; letter-spacing: -.055em }
  h2 { font-size: clamp(2.5rem, 6vw, 5.5rem); font-weight: 650 }
  p { color: var(--muted) }
  a { color: inherit; text-decoration: none }
  button, input, select { font: inherit; color: inherit }
  button, summary, select { cursor: pointer }
  img, video { display: block; max-width: 100% }
  [hidden] { display: none !important }
  :focus-visible { outline: 2px solid var(--soft); outline-offset: 4px }
  ::selection { background: var(--soft); color: var(--deep) }
  .icon { display: inline-block; width: 1.2em; height: 1.2em; flex: 0 0 auto; vertical-align: -.2em }
}
@layer layout {
  .wrap { width: min(100% - 112px, 1340px); margin-inline: auto }
  .section { padding-block: clamp(76px, 10vw, 156px) }
  .skip { position: fixed; z-index: 10; left: 16px; top: 16px; padding: 12px 20px; background: var(--text); color: var(--bg); transform: translateY(-200%) }
  .skip:focus { transform: none }
  .header { position: sticky; z-index: 5; top: 0; background: #0b0b11f5; border-bottom: 1px solid #ffffff10; transition: background .24s }
  .header.scrolled { background: #0b0b11ea; backdrop-filter: blur(12px) }
  .nav-wrap { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px }
  .brand { display: inline-flex; align-items: center; justify-self: start; gap: 10px; font-weight: 750; font-size: 1.22rem; letter-spacing: -.055em; white-space: nowrap }
  .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--soft); display: inline-flex; gap: 2px; align-items: center; justify-content: center; color: #171123 }
  .mark i { width: 3px; height: 8px; border-radius: 6px; background: currentColor; transform: rotate(29deg) }
  .mark i:nth-child(2) { height: 15px }
  .mark i:nth-child(3) { height: 11px }
  .nav-desktop, .nav-actions { display: flex; align-items: center; gap: clamp(13px, 2.2vw, 36px) }
  .nav-actions { justify-self: end; gap: 15px }
  .nav-desktop a, .footer nav a { color: var(--muted); font-size: .875rem; white-space: nowrap }
  .nav-desktop a:hover, .nav-desktop a[aria-current], .footer a:hover { color: var(--text) }
  .language { display: grid; place-items: center; min-width: 38px; min-height: 44px; font: 600 .78rem var(--mono); color: var(--muted) }
  .language:hover { color: var(--text) }
  .nav-mobile { display: none }
  .button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 0 17px; min-height: 48px; border-radius: 8px; font-size: .88rem; line-height: 1.2; font-weight: 700; border: 1px solid transparent; transition: background .2s, border .2s, transform .2s var(--ease), color .2s; white-space: nowrap }
  .button:active { transform: translateY(1px) }
  .primary { background: var(--soft); color: #161021 }
  .primary:hover { background: #e0d5ff; transform: translateY(-2px) }
  .secondary { background: #181722; border-color: var(--line); color: var(--text) }
  .secondary:hover { border-color: #746792; background: #232035 }
  .nav-download { min-height: 42px; background: #f1edf9; color: #15101d; padding-inline: 13px }
  .nav-download:hover { background: var(--soft) }
  .text-button { padding-inline: 0; color: var(--soft) }
  .text-button .icon { order: 2; transition: transform .22s var(--ease) }
  .text-button:hover .icon { transform: translateX(4px) }
  .eyebrow { color: var(--soft); font: 650 .75rem/1.4 var(--mono); letter-spacing: .11em; text-transform: uppercase }
  .section-head { display: grid; gap: 18px; margin-bottom: 40px }
  .lede { max-width: 60ch; font-size: clamp(1rem, 1.6vw, 1.18rem) }
  .footer { padding: 42px 0; border-top: 1px solid var(--line); background: var(--deep) }
  .footer .wrap { display: flex; justify-content: space-between; align-items: start; gap: 28px }
  .footer .wrap > div { display: grid; gap: 11px }
  .footer .wrap > div > span { font: .72rem var(--mono); color: var(--muted) }
  .footer nav { display: flex; flex-wrap: wrap; gap: 15px 23px }
}
@layer product {
  .demo-screen-top i { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px #a88bff8c }
  .phone { padding: 5px; border: 1px solid #a498b8; border-radius: 29px; background: linear-gradient(142deg, #797285, #171722 28%, #191822 68%, #746779); box-shadow: 11px 23px 43px #000b, inset 0 0 0 1px #ffffff48; min-width: 0 }
  .phone-glass { background: #111116; border-radius: 24px; padding: 13px 11px 12px; overflow: hidden }
  .island { width: 27%; min-height: 8px; border-radius: 8px; background: #050509; margin: -4px auto 10px }
  .phone-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px; font: 600 .63rem var(--mono); color: #eeeef5; margin-bottom: 10px; letter-spacing: .03em }
  .phone-head span { color: var(--mint); letter-spacing: 0; font-size: .58rem; display: inline-flex; align-items: center; gap: 4px }
  .phone-head i { width: 5px; height: 5px; background: currentColor; border-radius: 50% }
  .phone-source { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 6px; font-size: .65rem; color: var(--muted); border-radius: 6px; background: #21212a; margin-bottom: 8px }
  .phone-source strong { color: #f1eefc; text-align: right }
  .phone-media { padding: 8px 7px 5px; border-radius: 7px; background: #1c1c24; margin-bottom: 7px; color: #eae9f1 }
  .phone-media > span:first-child { display: block; color: #b5a4e4; font: .59rem var(--mono); text-transform: uppercase }
  .phone-media > strong { display: block; overflow-wrap: anywhere; margin-block: 1px 5px; font-size: .8rem }
  .phone-time { display: flex; justify-content: space-between; font: .58rem/1.1 var(--mono); color: #bbb9cc }
  .fake-range { display: block; height: 3px; border-radius: 4px; background: #373544; margin: 9px 0 5px }
  .fake-range i { display: block; width: 32%; height: 100%; background: #a890ff; border-radius: inherit }
  .transport, .episodes { display: grid; grid-template-columns: 1fr 1.28fr 1fr; gap: 4px; margin-bottom: 5px }
  .episodes { grid-template-columns: 1fr 1fr }
  .remote-key { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; border: 0; border-radius: 6px; background: #292933; min-height: 34px; padding: 2px; color: #f5f1fb; font-size: .91rem; line-height: 1.05; gap: 3px; text-align: center }
  .remote-key small, .episodes .remote-key { font-size: .59rem; font-weight: 650 }
  .remote-key .icon { width: 18px; height: 18px }
  .play-key { background: #7064d8 }
  .intro-key { flex-direction: row; margin-bottom: 5px; min-height: 26px; background: #ffb655; color: #22180a; font-size: .62rem; font-weight: 750; gap: 4px }
  .intro-key .icon { width: 12px; height: 12px }
  .episodes .remote-key { min-height: 26px; flex-direction: row }
  .episodes .remote-key .icon { width: 12px; height: 12px }
  .phone-volume, .phone-timer { display: flex; align-items: center; gap: 5px; padding: 6px; margin-top: 5px; border-radius: 6px; color: #c6bfd4; background: #22212b; font-size: .65rem }
  .phone-volume .fake-range { flex: 1; margin: 0 }
  .phone-timer b { color: var(--soft); margin-left: auto; white-space: nowrap }
  .demo { padding-block-start: clamp(54px, 6vw, 88px); background: #11111a; border-block: 1px solid var(--line) }
  .demo-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(238px, 24%); align-items: center; gap: clamp(20px, 4vw, 66px); padding: clamp(18px, 4vw, 58px); background: radial-gradient(ellipse at 73% 42%, #26203c, #15151f 67%); border: 1px solid #343042; border-radius: 18px }
  .demo-screen { min-width: 0; background: #09090f; border: 1px solid #4a435b; border-radius: 12px; padding: 8px; box-shadow: 0 22px 45px #0007 }
  .demo-screen-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 7px 10px; font: .74rem var(--mono); color: #c7c0d8 }
  .demo-screen-top span:first-child { display: flex; align-items: center; gap: 7px }
  .demo-media { position: relative; overflow: hidden; border-radius: 6px; background: #1c233f }
  .demo-media video { width: 100%; aspect-ratio: 16/9; object-fit: cover }
  .demo-credits, [data-error] { padding: 8px 6px 1px; font-size: .73rem }
  [data-error] { color: #ffc5bf }
  .screen-play { position: absolute; z-index: 1; inset: 50% auto auto 50%; translate: -50% -50%; width: 58px; height: 58px; border: 1px solid #ffffff61; border-radius: 50%; background: #151126d9; display: grid; place-items: center }
  .screen-play:hover { background: #41345c }
  .screen-play .icon { width: 25px; height: 25px }
  .demo-flash { position: absolute; inset: 0; pointer-events: none; border: 2px solid var(--soft); opacity: 0 }
  .phone-live { width: 100%; justify-self: center; max-width: 304px }
  .phone-live .phone-glass { padding: 14px }
  .phone-live .phone-head { font-size: .77rem }
  .phone-live .phone-head span { font-size: .65rem }
  .phone-live .phone-source { padding: 8px; font-size: .73rem }
  .phone-live .phone-media { padding: 9px }
  .phone-live .phone-media > strong { font-size: .99rem }
  .phone-live .phone-time { font-size: .69rem }
  .phone-live .remote-key { min-height: 48px; transition: background .18s, transform .18s }
  .phone-live .remote-key:hover { background: #49445d }
  .phone-live .play-key:hover { background: #8f80f4 }
  .phone-live .remote-key:active { transform: scale(.96) }
  .phone-live .remote-key small, .phone-live .episodes .remote-key { font-size: .73rem }
  .phone-live .episodes .remote-key { min-height: 44px }
  input[type="range"] { display: block; min-width: 0; width: 100%; accent-color: #ac96ff; margin: 0; height: 34px }
  .scroll-story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 7vw, 100px) }
  .chapter-display { position: sticky; top: 110px; height: min(540px, 75svh); min-height: 350px; display: grid; place-items: center; overflow: hidden; border-radius: 16px; border: 1px solid #393049; background: radial-gradient(ellipse, #32274e, #13121d 68%); transition: background .4s }
  .chapter-panel, .chapter-mobile { display: grid; min-height: 110px; place-items: center; background: #1c172a; border: 1px solid #3f344f; border-radius: 10px; color: var(--soft); padding: 7px }
  .chapter-panel:not([hidden]) { animation: panel-in .36s var(--ease) both }
  .chapter-mobile { display: none }
  .chapter { min-height: 260px; border-top: 1px solid var(--line); display: grid; gap: 13px; align-content: center }
  .chapter h3 { font-size: clamp(1.75rem, 3.65vw, 3.5rem) }
  .chapter.current { border-top-color: #695684 }
  .chapter.current h3 { color: #e0d5ff }
  .chapter p { max-width: 51ch }
  .features > .button { margin-top: 24px }
  .platforms { display: grid; grid-template-columns: repeat(3,1fr); border-block: 1px solid var(--line); margin-bottom: 20px }
  .platforms a { display: grid; align-content: center; min-height: 105px; padding: 14px 20px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); transition: background .2s }
  .platforms a:nth-child(3n) { border-right: 0 }
  .platforms a:nth-last-child(-n+3) { border-bottom: 0 }
  .platforms a:hover { background: #1d182b }
  .platforms strong { font-size: clamp(1.2rem, 2.8vw, 2.25rem); font-weight: 650; letter-spacing: -.065em }
  .platforms span { color: var(--muted); font-size: .78rem }
}
@layer pages {
  .subpage { min-height: 72vh; padding-bottom: 85px }
  .page-head { padding-block: clamp(54px, 8vw, 108px) 48px; display: grid; gap: 17px }
  .page-head h1 { font-size: clamp(3rem, 8vw, 7rem); max-width: 16ch; font-weight: 675; letter-spacing: -.058em }
  .reading { border-top: 1px solid var(--line) }
  .reading-row { display: grid; grid-template-columns: minmax(44px, 11%) 1fr; align-items: baseline; padding-block: 29px; border-bottom: 1px solid var(--line) }
  .reading-row > span { color: var(--soft); font: .75rem var(--mono) }
  .reading-row h2, .download-list h2, .feature-tile h2 { font-size: clamp(1.45rem, 3vw, 2.6rem); letter-spacing: -.046em; margin-bottom: 9px }
  .reading-row p { max-width: 75ch; overflow-wrap: anywhere }
  .timeline time { color: var(--soft); font: .8rem var(--mono) }
  .timeline p { margin-top: 9px }
  .bottom-link { display: flex; flex-wrap: wrap; gap: 16px; padding-block: 20px }
  .feature-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px }
  .feature-tile { grid-column: span 2; padding: clamp(18px, 3vw, 38px); background: var(--surface); border: 1px solid var(--line); border-radius: 13px }
  .feature-tile:first-child, .feature-tile:last-child { grid-column: span 4 }
  .feature-tile:nth-child(3), .feature-tile:nth-child(4) { grid-column: span 3 }
  .tile-symbol { display: flex; align-items: center; gap: 11px; color: var(--soft); margin-bottom: 28px; font: 1.2rem var(--mono) }
  .tile-symbol i { font-style: normal; padding: 5px 10px; background: #25203a; border-radius: 5px }
  .filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px }
  .filters label { display: grid; align-content: start; gap: 7px; font-size: .87rem; color: var(--muted) }
  .filters input, .filters select { min-width: 0; min-height: 46px; padding: 8px 11px; border: 1px solid #555066; border-radius: 6px; background: #0f0f17; color: var(--text) }
  .catalog-summary { display: flex; gap: 16px; justify-content: space-between; padding-block: 17px; font-size: .84rem }
  .catalog-summary [role=status] { white-space: nowrap; color: var(--soft) }
  .profile-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px }
  .profile { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow-wrap: anywhere }
  .profile-category { font: .7rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em }
  .profile h2 { font-size: 1.55rem; letter-spacing: -.035em; margin: 8px 0 }
  .validation { display: inline-block; color: #e2d5ff; background: #322848; border-radius: 4px; padding: 3px 7px; font-size: .73rem }
  .validation.verified { background: #183a34; color: #adf0d6 }
  .validation.unvalidated { background: #282731; color: #dedcea }
  .commands { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: 13px 0; list-style: none }
  .commands li { padding: 3px 6px; border: 1px solid #443c56; border-radius: 4px; font-size: .69rem; color: #e5deed }
  .profile details { font-size: .8rem; color: var(--soft) }
  .profile details p { margin-top: 8px }
  .release-meta { display: flex; align-items: center; gap: 13px; padding: 11px 0; color: var(--soft); font: .83rem var(--mono) }
  .download-list article { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 23px 0; border-top: 1px solid var(--line) }
  .file-size { font: .73rem var(--mono); margin-top: 8px; overflow-wrap: anywhere }
  .unavailable { color: var(--soft); font-size: .82rem; text-align: right }
  .download-links { display: flex; flex-wrap: wrap; gap: 15px; padding: 20px 0 32px; border-top: 1px solid var(--line) }
  .faq { border-top: 1px solid var(--line) }
  .faq details { border-bottom: 1px solid var(--line); padding: 15px 0 }
  .faq summary { min-height: 44px; align-content: center; font-size: clamp(1rem, 2.2vw, 1.34rem); color: var(--text); font-weight: 650 }
  .faq summary::marker { color: var(--soft) }
  .faq details p { padding: 8px 0 10px 16px; max-width: 72ch }
  .screenshots { padding-bottom: 0 }
  .screenshots h2 { margin-bottom: 22px }
  .screenshots > div { display: grid; grid-template-columns: repeat(2,1fr); gap: 15px }
  .screenshots img { width: 100%; aspect-ratio: 16/10; object-fit: contain; background: #0d1015; height: auto; border: 1px solid var(--line); border-radius: 10px }
}
@layer motion {
  @keyframes hero-in { from { opacity: 0; transform: translateY(22px) } to { opacity: 1; transform: translateY(0) } }
  @keyframes panel-in { from { opacity: .2; transform: translateY(7px) } to { opacity: 1; transform: translateY(0) } }
  @keyframes flash { from { opacity: .75 } to { opacity: 0 } }
  .reveal.arrived { animation: hero-in .65s var(--ease) both }
  .demo-flash.pulse { animation: flash .55s var(--ease) }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important }
    .chapter-display { display: none }
    .scroll-story { grid-template-columns: 1fr }
    .chapter-mobile { display: grid }
    .chapter { padding-block: 25px; min-height: auto }
  }
}
@layer responsive {
  @media (max-width: 1080px) {
    .wrap { width: calc(100% - 66px) }
    .nav-desktop { gap: 13px }
    .nav-desktop a { font-size: .81rem }
  }
  @media (max-width: 850px) {
    .nav-wrap { grid-template-columns: 1fr auto; min-height: 65px }
    .nav-desktop { display: none }
    .nav-mobile { display: block }
    .nav-mobile summary { display: grid; align-content: center; justify-items: center; gap: 5px; width: 44px; height: 44px; list-style: none; border: 1px solid var(--line); border-radius: 7px }
    .nav-mobile summary::-webkit-details-marker { display: none }
    .nav-mobile summary span { width: 15px; height: 1px; background: var(--text) }
    .nav-mobile nav { position: absolute; top: 100%; inset-inline: 0; display: grid; padding: 12px 33px; background: #161421; border-bottom: 1px solid var(--line) }
    .nav-mobile nav a { min-height: 45px; align-content: center; border-bottom: 1px solid var(--line) }
    .nav-mobile nav a:last-child { border: 0 }
    .demo-stage { grid-template-columns: minmax(0,1fr) minmax(210px,32%); gap: 18px }
    .profile-grid { grid-template-columns: repeat(2,minmax(0,1fr)) }
  }
  @media (max-width: 590px) {
    .wrap { width: calc(100% - 36px) }
    .nav-wrap { gap: 4px; min-height: 62px }
    .nav-actions { gap: 5px }
    .nav-download { min-height: 40px; padding: 0 8px; font-size: .75rem; gap: 4px }
    .nav-mobile summary { width: 42px; height: 42px }
    .nav-mobile nav { padding-inline: 18px }
    .brand { gap: 6px; font-size: 1.08rem }
    .mark { width: 25px; height: 25px; border-radius: 7px }
    .language { min-width: 30px; font-size: .71rem }
    .demo-stage { grid-template-columns: 1fr; gap: 16px; padding: 11px }
    .scroll-story { grid-template-columns: 1fr }
    .chapter-display { display: none }
    .chapter-mobile { display: grid; min-height: 80px; margin-bottom: 4px }
    .chapter { min-height: auto; padding-block: 18px 24px }
    .platforms { grid-template-columns: repeat(2,1fr) }
    .platforms a:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 84px; padding: 12px }
    .platforms a:nth-child(2n) { border-right: 0 }
    .platforms a:nth-last-child(-n+2) { border-bottom: 0 }
    .footer .wrap { display: grid }
    .filters, .profile-grid, .feature-grid, .screenshots > div { grid-template-columns: 1fr }
    .feature-tile:nth-child(n) { grid-column: 1 }
    .catalog-summary { align-items: start }
    .download-list article { align-items: start; flex-direction: column; gap: 11px }
    .unavailable { text-align: left }
  }
}
@layer responsive {
}
