/* ASYST Custom — asystbn.com. Black, white, orange. */
:root {
  --bg: #000; --raise: #0c0c0c; --card: #121212; --line: #262626;
  --text: #fff; --muted: #a8a8a8; --accent: #f28c28;
  --max: 1080px;
  --head: "Anton", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--head); font-weight: 400; text-transform: uppercase; line-height: 1.02; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: clamp(3rem, 9vw, 6.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin: 0 0 1.2rem; }
.center { text-align: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(0,0,0,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 32px; width: auto; }
.brand-tag { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); border-left: 1px solid var(--line); padding-left: 12px; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: .9rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; padding: 13px 26px; background: var(--accent); color: #000; font-weight: 700; font-size: .95rem; text-decoration: none; border-radius: 999px; border: 2px solid var(--accent); transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-2px); background: #ffa04a; border-color: #ffa04a; }
.btn-ghost { background: transparent; color: var(--text); border-color: #555; }
.btn-ghost:hover { background: #1a1a1a; border-color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.nav .btn { padding: 8px 18px; font-size: .88rem; }
.nav-links a.btn, .nav-links a.btn:hover { color: #000; box-shadow: none; }

/* Sections */
section { padding: clamp(56px, 9vw, 104px) 0; }
.band { background: var(--raise); border-block: 1px solid var(--line); }
.hero { padding: clamp(64px, 11vw, 140px) 0 clamp(48px, 8vw, 96px); }
.hero.compact { padding-bottom: 24px; }
.tight { padding-top: 24px; }
.hero-visual { margin-top: clamp(40px, 7vw, 80px); }

/* Flow diagram */
.flow-svg { width: 100%; height: auto; display: block; }
.flow-svg .node { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.flow-svg .node.core { stroke: var(--accent); stroke-width: 2; }
.flow-svg .nt { fill: #fff; font-family: var(--head); font-size: 24px; letter-spacing: .03em; text-anchor: middle; }
.flow-svg .wire { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 6; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -12; } }

/* Tiles */
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tiles.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.tile h3 { margin: 18px 0 .2em; }
.tile p { margin: 0; color: var(--muted); }
.tile.link:hover { border-color: var(--accent); transform: translateY(-3px); }
.tile.here { border-color: var(--accent); }
.ic { width: 44px; height: 44px; color: var(--accent); }

/* Process rail */
.rail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; counter-reset: s; position: relative; }
.rail li { counter-increment: s; text-align: center; position: relative; padding-top: 2px; }
.rail li::before { content: ""; position: absolute; top: 15px; left: 0; right: 0; height: 2px; background: var(--line); }
.rail li:first-child::before { left: 50%; }
.rail li:last-child::before { right: 50%; }
.rail span { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.rail span::after { content: counter(s); font-size: .8rem; font-weight: 700; color: var(--accent); }
.rail b { font-family: var(--head); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 1.1rem; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.chips span { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 12px 24px; font-weight: 500; }

/* CTA */
.cta { text-align: center; }
.cta .btn-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 28px; color: var(--muted); font-size: .9rem; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer img { height: 30px; width: auto; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.fine { margin: 28px 0 0; font-size: .75rem; color: #6d6d6d; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #000; border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .brand-tag { display: none; }
  .rail { grid-template-columns: 1fr; gap: 14px; }
  .rail li { display: flex; align-items: center; gap: 16px; text-align: left; }
  .rail li::before { display: none; }
  .rail span { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .flow-svg .wire { animation: none; }
}

/* ---- Motion: reveals, pinned scroll-scrubbed scenes, carousels (scene styles apply only when html.js is set) ---- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

.js [data-r] { opacity: 0; transform: translate3d(0, 34px, 0); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.js [data-r].in { opacity: 1; transform: none; }
.js .tiles { perspective: 1100px; }
.js .tile[data-r] { transform: rotateX(42deg) translate3d(0, 50px, -60px); transform-origin: 50% 100%; }
.js .tile[data-r].in { transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); }
.js .tile[data-r].in.tilting { transition: transform .12s ease-out, border-color .15s ease; }
.js .tile[data-r].in:not(.tilting) { transition: transform .5s ease, border-color .15s ease, opacity .8s ease; }
.js .tile.link:hover { transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); }

/* ---- Pinned scene ---- */
.pin { position: relative; padding: 0; background: #000; }
.pin-stick { position: relative; }
.pin-canvas { display: none; }
.pin-vig { display: none; }
.pin-foot { display: none; }
.chap { padding: clamp(56px, 9vw, 104px) 0; }
.chap h1, .chap h2 { font-size: clamp(2.8rem, 5.4vw, 5rem); line-height: 1; margin: 0 0 .3em; }
.chap .lead { max-width: 26em; }
.chap .list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 1rem; }
.chap .list li { display: flex; align-items: center; gap: 12px; }
.chap .list li::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.chap.r .chap-in { margin-left: auto; text-align: right; }
.chap.r .list li { justify-content: flex-start; flex-direction: row-reverse; }
.chap.r .lead { margin-left: auto; }
.chap.r .btn-row { justify-content: flex-end; }

.js .pin-on { height: calc(var(--n, 4) * var(--per, 100vh) + 100vh); }
.js .pin-on .pin-stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.js .pin-on .pin-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.js .pin-on .pin-vig { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,.75) 100%); }
.js .pin-on .pin-ui { position: absolute; inset: 0; z-index: 2; padding-top: 68px; }
.js .pin-on .chap { position: absolute; inset: 68px 0 0; padding: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; will-change: transform, opacity; }
.js .pin-on .chap:first-child { opacity: 1; }
.js .pin-on .chap-in { max-width: min(44rem, 100%); }
.js .pin-on .pin-foot { display: flex; position: absolute; left: 0; right: 0; bottom: clamp(18px, 4vh, 40px); z-index: 3; align-items: center; gap: 16px; }
.pin-foot .wrap { display: flex; align-items: center; gap: 16px; width: min(100% - 40px, var(--max)); }
.pin-foot .pc, .pin-foot .pt { font-size: .75rem; letter-spacing: .24em; color: var(--muted); font-variant-numeric: tabular-nums; }
.pin-foot .pc { color: var(--text); }
.pin-foot .pbar { position: relative; flex: 0 1 180px; height: 1px; background: rgba(255,255,255,.22); overflow: hidden; }
.pin-foot .pbar b { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.pin-foot .hint { margin-left: auto; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); transition: opacity .4s; }

/* ---- Carousel ---- */
.hscroll { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab;
  padding: 8px max(20px, calc((100vw - var(--max)) / 2)) 28px; scroll-padding-left: max(20px, calc((100vw - var(--max)) / 2)); -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll.drag { cursor: grabbing; scroll-snap-type: none; }
.card3 { flex: 0 0 min(78vw, 340px); min-height: 420px; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between;
  padding: 30px 28px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(160deg, #181818, #0b0b0b); user-select: none; }
.card3 .num { font-family: var(--head); font-size: 4.5rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px #666; }
.card3 h3 { font-size: 2rem; margin: 0 0 .2em; }
.card3 p { margin: 0; color: var(--muted); }
.card3 .ic { width: 44px; height: 44px; margin-bottom: 18px; }
.card3.on { border-color: var(--accent); background: linear-gradient(160deg, #2a1707, #0b0b0b); }
.sec-head { margin-bottom: 1.4rem; }
.sec-head h2 { margin: 0; }

/* ---- Curved light band ---- */
.curve { background: #f4f2ed; color: #000; margin: 0 12px 12px; border-radius: clamp(36px, 7vw, 96px); padding: clamp(64px, 10vw, 120px) 0; position: relative; z-index: 3; text-align: center; }
.curve .eyebrow { color: #b85f0d; }
.curve h2 { color: #000; font-size: clamp(2.6rem, 8vw, 6.5rem); }
.curve .tiles { margin: 2.2rem auto 0; max-width: 900px; text-align: left; }
.curve .tile { background: #fff; border-color: #e3e0d8; color: #000; }
.curve .tile p { color: #666; }
.curve .tile.here { border-color: var(--accent); }
.curve .ic { color: #d9760f; }
.curve .btn-row { justify-content: center; }
.curve .btn { background: #000; color: #fff; border-color: #000; }
.curve .btn:hover { background: var(--accent); border-color: var(--accent); color: #000; }
.site-footer { background: #000; }

@media (max-width: 820px) {
  .js .pin-on .chap { justify-content: flex-end; padding-bottom: clamp(72px, 12vh, 110px); }
  .js .pin-on .chap-in, .chap.r .chap-in { text-align: left; margin-left: 0; max-width: 100%; }
  .chap.r .list li { justify-content: flex-start; flex-direction: row; }
  .chap.r .lead { margin-left: 0; }
  .chap.r .btn-row { justify-content: flex-start; }
  .chap h1, .chap h2 { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .chap .list { margin-top: 1rem; gap: 6px; font-size: .9rem; }
  .pin-foot .pbar { flex-basis: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  .progress { display: none; }
}
