/* Shared optical materials */
:root {
  --ice: #36d6ee;
  --paper: #eff4f3;
  --ink: #0c0c0d;
  --type-secondary: #b2bfca;
  --hairline: #c7ddf52b;
  --shell: min(1440px, 90%);
}
.shell { width: var(--shell); }
.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.nav { background: #090c10ed; border-color: var(--hairline); }
.nav .shell { height: 70px; }
.navlinks { gap: clamp(24px, 3vw, 48px); font-size: .9rem; }
.navlinks a { padding: 8px 0; }
.navlinks a::after { bottom: 1px; background: var(--ice); }
.nav .btn, .hero-actions .btn, .closing .btn, .pricing-plan .btn {
  padding: 12px 21px;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 600;
}
.nav .btn { padding: 9px 18px; }
.btn.light { background: var(--paper); color: var(--ink); }
.btn.light:hover { background: var(--ice); border-color: var(--ice); }
.progress { background: var(--ice); }
.platform, .index, .hero-product figcaption, .stagebar, .gap-control output {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.platform {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #c0d8d7;
  font-size: .8rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.platform .icon { width: 16px; height: 16px; color: var(--ice); }
.text-link { text-decoration: underline; text-decoration-color: #849298; text-underline-offset: 5px; }
.text-link:hover { color: var(--ice); text-decoration-color: currentColor; }

/* Hero: keep the optical light behind the capture and text. */
.hero {
  padding: 0;
  min-height: 0;
  justify-content: center;
  background: radial-gradient(ellipse at 74% 45%, #1b3039 0%, #101b22 30%, #090d12 62%, #09090a 93%);
}
.hero::before { display: none; }
.hero canvas { opacity: 1; }
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, .79fr) minmax(0, 1.21fr);
  gap: clamp(28px, 4vw, 70px);
  align-items: center;
  padding-block: clamp(70px, 10vh, 122px) clamp(70px, 9vh, 108px);
  min-height: clamp(540px, calc(100svh - 165px), 860px);
}
.hero-copy { text-align: left; padding: 0; filter: none; }
.hero h1 {
  margin: 22px 0;
  font-weight: 545;
  font-size: clamp(4.8rem, 7.95vw, 8.5rem);
  letter-spacing: -.083em;
  line-height: .93;
}
.hero h1 span {
  color: #bcdfdf;
  background: linear-gradient(100deg, #f3f3f5 0%, #bfe9f1 48%, #7fc6d3 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-copy p { color: #c3ccd3; margin: 0; max-width: 35ch; font-size: clamp(1rem, 1.3vw, 1.17rem); }
.hero-actions { justify-content: flex-start; align-items: center; gap: 24px; margin: 30px 0 0; }
.hero-actions .text-link { font-size: .9rem; font-weight: 500; color: #dbe4e8; }
.hero-product { width: 100%; min-width: 0; max-width: 977px; margin: 0; perspective: 1500px; }
.hero-product::before { display: none; }
.product-frame {
  padding: 3px;
  border-radius: 13px;
  border: 1px solid #aec9d485;
  background: linear-gradient(135deg, #809699, #26383e 38%, #202832 72%, #80989c);
  box-shadow: 0 25px 60px -22px #000d, 0 0 30px -16px #9eeded;
  transition: transform .45s var(--ease);
}
.product-frame img { border-radius: 9px; }
.hero-product figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 11px 2px 0;
  color: #c5d8d9;
  font-size: .8rem;
}
.hero-product figcaption span, .hero-open { display: inline-flex; align-items: center; gap: 8px; }
.hero-product figcaption .icon { width: 15px; height: 15px; }
.hero-open { color: #e0eaeb; border: 0; padding: 6px 2px; background: transparent; font: inherit; }
.hero-open:hover { color: var(--ice); text-decoration: underline; text-underline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .product-frame img { animation: capture-arrive 1s var(--ease) both; }
  @keyframes capture-arrive { from { opacity: .65; } to { opacity: 1; } }
}
.capture-dialog {
  width: fit-content;
  max-width: calc(100vw - 28px);
  max-height: 94dvh;
  margin: auto;
  padding: 0;
  border: 1px solid #90acb16b;
  border-radius: 12px;
  background: #13191e;
  color: var(--paper);
  box-shadow: 0 25px 90px #000c;
  overflow: auto;
}
.capture-dialog::backdrop { background: #050506eb; }
.capture-dialog header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 8px 18px; }
.capture-dialog h2 { font-size: 1rem; letter-spacing: -.025em; }
.capture-dialog button {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--hairline); border-radius: 6px; color: var(--paper); background: transparent;
}
.capture-scroll { overflow: auto; max-height: calc(94dvh - 58px); }
.capture-scroll img { display: block; max-width: none; width: 1440px; height: auto; }
html:has(.capture-dialog[open]) { overflow: hidden; }

/* Four chapter destinations share a single navigation strip. */
#features { scroll-margin-top: -10px; }
.chapter-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  gap: 0;
  border-block: 1px solid var(--hairline);
}
.chapter-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(20px, 2.3vw, 35px) clamp(12px, 2.3vw, 35px);
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #c7cfd3;
  font-weight: 500;
  font-size: clamp(.88rem, 1.3vw, 1.16rem);
}
.chapter-nav a + a { border-left: 1px solid var(--hairline); }
.chapter-nav a.active, .chapter-nav a:hover, .chapter-nav a:not(.active):hover {
  color: #f4fffc;
  background: linear-gradient(0deg, #5ccfe212, #5ccfe203);
}
.chapter-nav a::after {
  content: ""; position: absolute; inset: auto 0 -1px; height: 2px;
  background: var(--ice); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.chapter-nav a.active::after, .chapter-nav a:hover::after { transform: scaleX(1); }
.chapter-nav .icon { color: var(--ice); }
.intro {
  grid-template-columns: 1.6fr .8fr;
  align-items: end;
  gap: 36px;
  padding: clamp(78px, 10vw, 150px) 0 clamp(46px, 5.5vw, 88px);
}
.intro h2, .chapter h2, .closing h2 { font-weight: 530; letter-spacing: -.068em; }
.intro h2 { font-size: clamp(2.2rem, 4.75vw, 4.65rem); }
.intro h2 span { color: #a1b4bd; }
.intro p { max-width: 34ch; margin: 0 0 5px; color: var(--type-secondary); }
.story { grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr); padding-bottom: clamp(50px, 7vw, 100px); }
.chapter { min-height: 83svh; }
.index { color: var(--ice); font-size: .82rem; text-transform: uppercase; letter-spacing: .075em; }
.index::before { display: none; }
.index .icon { width: 18px; height: 18px; }
.chapter h2 { margin-block: 22px 16px; }
.chapter p { color: var(--type-secondary); max-width: 35ch; }
.stage-visual, .mobile-visual {
  background: radial-gradient(ellipse at 50% 0%, #202d32, #12191e 54%, #0b1014);
  border-color: #a5d7de45;
}
.stage-visual { border-radius: 16px; aspect-ratio: 1.43; }
.stage-wipe { display: none; }
.scrubbing .stage-wipe {
  display: block;
  position: absolute;
  inset: 0 auto 0 var(--seam, 100%);
  z-index: 2;
  width: 1px;
  pointer-events: none;
  opacity: var(--seam-light, 0);
  background: linear-gradient(transparent, #c8f6ff 18%, #c8f6ff 82%, transparent);
  box-shadow: 0 0 12px 1px #95ffe278;
}
.stagebar { font-size: .8rem; color: #b8c7cd; }
.steps i { background: #556369; }
.steps i.on { background: var(--ice); }
.stage-panel[data-panel="0"] .scene { height: 69%; }
.scene img { object-position: center; }
.scene .before { filter: none; }
.scene .splitbar { background: var(--paper); }
.scene .splitbar::after { font-family: system-ui, sans-serif; color: var(--ink); background: var(--paper); border: 0; }
.scene-label { padding: 5px 9px; font-size: .8rem; }
.scene-foot, .profile-hint, .demo-caption, .scene-foot button, .filter-modes button,
.resolution-controls button, .profile-demo-tabs button { font-size: .84rem; }
.filter-modes button, .resolution-controls button, .profile-demo-tabs button {
  padding: 7px 12px;
  border-color: #879ba34d;
  background: #131c21;
}
.filter-modes button[aria-pressed="true"], .resolution-controls button[aria-pressed="true"],
.profile-demo-tabs button[aria-pressed="true"] { background: var(--ice); color: var(--ink); border-color: var(--ice); }
.pixelcanvas {
  width: 84%;
  max-height: 72%;
  aspect-ratio: 1.65;
  color: #e3fff7;
  border-color: #7ec9bc5c;
  background-color: #0a1418;
  background-image: linear-gradient(#7fe6f614 1px, transparent 1px), linear-gradient(90deg, #7fe6f614 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: center;
}
.pixelcanvas::before {
  content: ""; position: absolute; width: 66%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid #9edfc74a;
  background: repeating-radial-gradient(circle, transparent 0 24%, #b0daca33 24.2% 24.5%, transparent 24.8% 49%);
}
.pixelcanvas svg { z-index: 1; }
.cross-line { stroke: #d8fff0; }
.gap-control { margin-top: 14px; display: flex; align-items: center; gap: 12px; font-size: .9rem; color: #d6e3e6; }
.gap-control input { accent-color: var(--ice); width: clamp(90px, 12vw, 175px); }
.gap-control output { min-width: 2ch; text-align: right; }
.display-demo { width: 86%; }
.display-outline { width: 100%; max-width: 520px; container-type: inline-size; }
.display-inner {
  background: linear-gradient(#0b162324, #0b162359), url('../../public/scenes/courtyard.jpg') center / 100cqw auto no-repeat;
  border-color: #d4fff0;
}
.display-inner .ratio-text {
  color: #fff;
  background: #121a22d9;
  border-radius: 7px;
  padding: 8px 14px;
}
.profile-demo { padding: clamp(12px, 2vw, 26px); border-inline-start: 2px solid var(--ice); }
.profile-demo-heading { font-size: clamp(1.2rem, 2.2vw, 1.7rem); letter-spacing: -.04em; }
.profile-demo-heading span:last-child { font-size: .8rem; letter-spacing: 0; }
.profile-preview[data-mode="0"] { background: #162b30; }
.profile-preview[data-mode="1"] { background: #111518; }
.profile-preview[data-mode="2"] { background: #d5dedc; }

.closing { background: #e1ebe7; }
.closing .platform, .closing .platform .icon { color: #365650; }
.closing .shell { align-items: center; }
.closing .purchase { padding-block: 24px; border-block: 1px solid #405c555e; }
.closing #access-status { margin: 8px 0 17px; }
.access-faq > div { max-width: none; display: grid; grid-template-columns: .85fr 1.15fr; gap: 0 50px; }
.access-faq h3 { grid-row: 1 / span 3; align-self: start; }
.access-faq details { grid-column: 2; padding-block: 16px; }
.access-faq p { max-width: 55ch; }
.foot { background: #080c0e; }
.foot p, .foot a:not(.brand) { font-size: .85rem; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out .18s ease-out both; }
::view-transition-new(root) { animation: page-in .3s ease-out both; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .section-enter { animation: section-enter .65s var(--ease) both; }
  @keyframes section-enter { from { opacity: .45; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
  .capture-dialog[open] { animation: dialog-enter .22s var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  .scrubbing .stage-panel { clip-path: none; opacity: 0; }
  .scrubbing .stage-panel.active { opacity: 1; }
  .scrubbing .stage-wipe { display: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media (max-width: 1000px) and (min-width: 801px) {
  .hero-layout { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 28px; }
  .hero h1 { font-size: clamp(4rem, 8.4vw, 5.2rem); }
  .hero-actions { flex-wrap: wrap; gap: 14px; }
}
@media (max-width: 800px) {
  :root { --shell: min(92%, 680px); }
  .nav .shell { height: 62px; }
  .nav .brand { margin-right: auto; }
  .mobile-nav { margin-right: 10px; font-size: .9rem; }
  .mobile-nav summary { padding: 9px 5px; }
  .hero-layout { grid-template-columns: 1fr; min-height: 0; padding: 52px 0 35px; gap: 35px; }
  .hero h1 { font-size: clamp(3.9rem, 11vw, 5.9rem); margin: 16px 0; }
  .hero h1 br { display: none; }
  .hero h1 span::before { content: " "; }
  .hero-actions { margin: 22px 0 0; width: auto; flex-wrap: wrap; gap: 18px; }
  .hero-actions .btn { width: auto; }
  .hero-product { width: 100%; }
  .hero-product figcaption { margin-top: 5px; }
  .chapter-nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .chapter-nav a { padding: 16px 12px; }
  .chapter-nav a:nth-child(3) { border-left: 0; }
  .chapter-nav a:nth-child(n+3) { border-top: 1px solid var(--hairline); }
  .intro { grid-template-columns: 1fr; gap: 16px; padding: 62px 0 36px; }
  .story { display: block; }
  .chapter { min-height: auto; }
  .chapter h2 { margin: 15px 0; }
  .chapter p { max-width: 48ch; }
  .pixelcanvas { max-height: 68%; }
  .profile-demo { padding: 12px; width: 90%; }
  .access-faq > div { display: block; }
  .access-faq h3 { margin-bottom: 20px; }
  .foot .shell { align-items: center; }
}
@media (max-width: 420px) {
  .platform { font-size: .76rem; }
  .hero h1 { font-size: clamp(3rem, 12vw, 4rem); }
  .hero-actions { gap: 14px; }
  .hero-actions .text-link, .hero-actions .btn { font-size: .84rem; }
  .hero-product figcaption { font-size: .77rem; }
  .stage-panel[data-panel="0"] .scene { height: 62%; }
  .foot p { display: none; }
}
@media (max-height: 550px) and (min-width: 801px) {
  .chapter { min-height: auto; }
}
