:root {
  color-scheme: dark;
  --page: #101418;
  --surface: #191f25;
  --line: #3e4954;
  --text: #f1f3f5;
  --muted: #aab3bb;
  --raw: #b7b3aa;
  --purple: #b848c3;
  --purple-light: #d36bdd;
  --mono: "DejaVu Sans Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 28px 90px rgb(0 0 0 / 50%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 300px; margin: 0; background: linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px), var(--page); background-size: 46px 46px; color: var(--text); font-family: var(--sans); line-height: 1.55; text-rendering: optimizeLegibility; }
a { color: var(--purple-light); text-underline-offset: .2em; }
button, a { -webkit-tap-highlight-color: transparent; }
.wrap { width: min(1260px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 9px 13px; transform: translateY(-160%); background: #fff; color: #111; font-family: var(--mono); }
.skip-link:focus { transform: none; }
.scroll-meter { position: fixed; z-index: 80; inset: 0 0 auto; height: 3px; }
.scroll-meter span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--raw), var(--purple)); }
.site-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid rgb(255 255 255 / 8%); background: rgb(16 20 24 / 89%); backdrop-filter: blur(16px); }
.topbar { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 24px; }
.prompt-brand { display: inline-flex; align-items: stretch; color: #fff; font-family: var(--mono); font-size: .78rem; font-weight: 700; line-height: 34px; text-decoration: none; white-space: nowrap; }
.seg { display: inline-block; padding: 0 17px 0 16px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.seg:first-child { padding-left: 11px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); }
.seg + .seg { margin-left: -7px; }
.seg-mark { background: #4c4c49; }
.seg-dir { background: #6a6964; }
.seg-mode { background: #7f3686; }
.nav-links { display: flex; gap: 24px; font-family: var(--mono); font-size: .72rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.hero { padding: clamp(64px, 9vw, 120px) 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .72fr) minmax(520px, 1.28fr); align-items: center; gap: clamp(42px, 7vw, 90px); }
.kicker { margin: 0 0 12px; color: var(--purple-light); font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.kicker span { color: var(--raw); }
h1, h2 { font-family: var(--mono); }
h1 { margin: 0; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .9; letter-spacing: -.075em; }
h1 span { color: var(--purple-light); }
.lede { max-width: 650px; margin: 28px 0; color: #cbd1d6; font-size: clamp(1rem, 1.5vw, 1.15rem); }
.actions, .end-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.button { display: inline-flex; padding: 12px 17px; border: 1px solid var(--purple); border-radius: 4px; background: rgb(184 72 195 / 9%); color: var(--text); font-family: var(--mono); font-size: .76rem; font-weight: 700; text-decoration: none; }
.button:hover { border-color: var(--purple-light); }
.text-link { font-family: var(--mono); font-size: .72rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
figure { margin: 0; }
figure button { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-photo, .media-card { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); }
.hero-photo button { aspect-ratio: 5 / 4; overflow: hidden; }
.hero-photo figcaption, .media-card figcaption { display: flex; justify-content: space-between; gap: 16px; padding: 11px 14px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .67rem; }
.hero-photo figcaption span:first-child, .media-card figcaption span { color: var(--purple-light); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(60px, 9vw, 110px); border-block: 1px solid var(--line); }
.facts div { padding: 22px clamp(12px, 2vw, 26px); }
.facts div + div { border-left: 1px solid var(--line); }
.facts span { display: block; color: var(--muted); font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.facts strong { font-family: var(--mono); font-size: .84rem; }
.section { padding: clamp(82px, 11vw, 140px) 0; scroll-margin-top: 66px; }
.dark-section, .finish-section { border-block: 1px solid var(--line); background: rgb(25 31 37 / 72%); }
.section-heading { max-width: 820px; margin-bottom: clamp(40px, 6vw, 68px); }
.section-heading h2 { margin: 0; font-size: clamp(2.1rem, 5vw, 4.5rem); line-height: 1; letter-spacing: -.06em; }
.section-heading > p:last-child { max-width: 730px; margin: 21px 0 0; color: var(--muted); font-size: 1.02rem; }
.media-card button { aspect-ratio: 4 / 3; overflow: hidden; }
.media-card.portrait button { aspect-ratio: 3 / 4; }
.frame-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.frame-grid figure:first-child { grid-column: span 2; }
.alignment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.alignment-grid figure:nth-child(4) { grid-column: span 2; }
.setup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.setup-grid figure:first-child { grid-column: 1 / -1; }
.finish-layout { display: grid; grid-template-columns: 1fr .7fr .7fr; align-items: center; gap: 20px; }
.finish-layout .section-heading { margin: 0 30px 0 0; }
.final-grid { display: grid; grid-template-columns: 1.25fr .75fr; align-items: start; gap: 20px; }
.end-actions { justify-content: center; margin-top: 58px; }
.site-footer { display: flex; min-height: 104px; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-family: var(--mono); font-size: .7rem; }
.site-footer a { text-decoration: none; }
.lightbox { width: min(95vw, 1600px); max-width: none; max-height: 94vh; padding: 48px 12px 12px; border: 1px solid var(--line); border-radius: 6px; background: #07090b; color: var(--text); box-shadow: 0 30px 100px #000; }
.lightbox::backdrop { background: rgb(0 0 0 / 88%); backdrop-filter: blur(5px); }
.lightbox img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(94vh - 90px); margin: auto; object-fit: contain; }
.lightbox p { margin: 9px 4px 0; color: var(--muted); font-family: var(--mono); font-size: .68rem; text-align: center; }
.lightbox-close { position: absolute; top: 10px; right: 12px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--text); font-family: var(--mono); cursor: pointer; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .facts div:nth-child(4) { border-top: 1px solid var(--line); }
  .frame-grid, .alignment-grid, .finish-layout, .final-grid { grid-template-columns: repeat(2, 1fr); }
  .frame-grid figure:first-child, .alignment-grid figure:nth-child(4) { grid-column: span 2; }
  .finish-layout .section-heading { grid-column: 1 / -1; margin: 0 0 20px; }
}

@media (max-width: 580px) {
  .wrap { width: min(100% - 24px, 1260px); }
  .site-header { position: relative; }
  .topbar { min-height: 60px; }
  .seg-mode { display: none; }
  .hero { padding-top: 50px; }
  .hero-photo button { aspect-ratio: 4 / 3; }
  .facts div { padding: 16px 10px; }
  .frame-grid, .alignment-grid, .setup-grid, .finish-layout, .final-grid { grid-template-columns: 1fr; }
  .frame-grid figure:first-child, .alignment-grid figure:nth-child(4), .setup-grid figure:first-child, .finish-layout .section-heading { grid-column: auto; }
  .hero-photo figcaption, .media-card figcaption { display: block; }
  .hero-photo figcaption span, .media-card figcaption span { display: block; }
  .site-footer { display: block; padding: 30px 0; }
  .site-footer span { display: block; margin-top: 8px; }
}

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