:root {
  --bg: #05060a;
  --ink: #f4f1ea;
  --mute: rgba(244, 241, 234, 0.56);
  --dim: rgba(244, 241, 234, 0.28);
  --line: rgba(244, 241, 234, 0.12);
  --orange: #ff8a00;
  --gold: #f5b12e;
  --teal: #2bb3b1;
  --teal-deep: #066f70;
  --cedar: #00a651;
  --yn: #ff6b1a;
  --neon: #39ff14;
  --fuchsia: #ff2fb9;
  --red: #ed1c24;
  --accent: var(--ink);
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --arabic: "IBM Plex Sans Arabic", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
body[data-accent="orange"] { --accent: var(--orange); }
body[data-accent="teal"] { --accent: var(--teal); }
body[data-accent="cedar"] { --accent: var(--cedar); }
body[data-accent="fuchsia"] { --accent: var(--fuchsia); }
body[data-accent="yn"] { --accent: var(--yn); }
body[data-accent="neon"] { --accent: var(--neon); }
body[data-accent="mix"] { --accent: var(--gold); }

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.5 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.loading { overflow: hidden; }
::selection { background: var(--accent); color: #000; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,0.75) 100%); }

/* ── Loader: styles live inline in index.html so the logo shows instantly ── */

/* ── Cursor ─────────────────────────────────────── */
#cur-dot, #cur-ring { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; border-radius: 50%; }
#cur-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); }
#cur-ring {
  width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 1px solid rgba(255,255,255,0.45);
  display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s;
  mix-blend-mode: difference;
}
#cur-ring.big { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: #fff; border-color: #fff; }
#cur-ring.hold { width: 140px; height: 140px; margin: -70px 0 0 -70px; border-color: #fff; border-width: 2px; }
#cur-label { font: 600 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .2s; }
#cur-ring.big #cur-label { opacity: 1; }
@media (pointer: coarse) { #cur-dot, #cur-ring { display: none; } }
@media (pointer: fine) { body, a, button { cursor: none; } }

/* ── Nav ────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px clamp(16px, 3.4vw, 44px);
  transition: background .4s ease, padding .4s ease, border-color .4s ease, backdrop-filter .4s ease;
  border-bottom: 1px solid transparent;
}
/* Once the page scrolls, a soft dark glass so nothing shows through the menu */
.nav.scrolled {
  background: rgba(5, 6, 10, 0.72); border-bottom-color: rgba(244, 241, 234, 0.08);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  padding-top: 14px; padding-bottom: 14px;
}
.logo { display: inline-flex; align-items: center; gap: 11px; font: 700 15px var(--display); letter-spacing: .06em; }
.logo em { font-style: normal; font-weight: 300; }
.links { display: flex; gap: clamp(14px, 2.4vw, 34px); font: 500 13px var(--body); letter-spacing: .02em; }
.links a { position: relative; opacity: .8; transition: opacity .3s; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.links a:hover { opacity: 1; }
.links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-r { display: flex; align-items: center; gap: 14px; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid currentColor;
  font: 600 13px var(--body); letter-spacing: .02em; overflow: hidden; isolation: isolate;
}
.btn::before { content: ""; position: absolute; inset: 0; background: currentColor; border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--ease); z-index: -1; }
.btn:hover::before { transform: translateY(0); }
.btn span { transition: color .4s; }
.btn:hover span { color: #000; }
.btn.big { height: 64px; padding: 0 34px; font-size: clamp(15px, 2vw, 20px); color: var(--ink); border-color: var(--accent); }
.btn.big::before { background: var(--accent); }

/* ── Rail ───────────────────────────────────────── */
.rail { position: fixed; right: clamp(12px, 2.4vw, 34px); top: 50%; transform: translateY(-50%); z-index: 40; display: grid; gap: 4px; }
.rail button { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 26px; font: 500 10px var(--mono); letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.rail button span { position: absolute; right: 44px; white-space: nowrap; opacity: 0; transform: translateX(8px); transition: all .5s var(--ease); }
.rail button b { font-weight: 500; position: relative; padding-right: 18px; }
.rail button b::after { content: ""; position: absolute; right: 0; top: 50%; width: 10px; height: 1px; background: currentColor; transition: width .5s var(--ease), background .3s; }
.rail button:hover span, .rail button.on span { opacity: 1; transform: none; }
.rail button.on { color: var(--ink); }
.rail button.on b::after { width: 14px; background: var(--accent); }

/* ── Sections ───────────────────────────────────── */
main { position: relative; z-index: 2; }
.sec { position: relative; min-height: 110vh; padding: 120px clamp(18px, 7vw, 120px); display: flex; flex-direction: column; justify-content: center; }
.hero { min-height: 100vh; justify-content: flex-end; padding-bottom: 54px; }
.final { min-height: 100vh; align-items: center; text-align: center; justify-content: flex-end; padding-bottom: 32px; }

.kicker { font: 500 11px var(--mono); letter-spacing: .22em; color: var(--accent); margin: 0 0 22px; transition: color .6s; }
.h-xl { font: 900 clamp(40px, 7.6vw, 128px)/0.92 var(--display); letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.h-lg { font: 800 clamp(36px, 5.6vw, 92px)/0.95 var(--display); letter-spacing: -0.03em; margin: 0 0 26px; }
.h-xl span { display: inline-block; }
em { font-style: normal; color: var(--accent); transition: color .6s; }
.h-xl em, .h-lg em { background: linear-gradient(100deg, var(--accent), #fff 60%, var(--accent)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.lead { max-width: 30em; color: var(--mute); font-size: clamp(16px, 1.35vw, 19px); margin: 0; }
.ar { font: 500 clamp(22px, 2.6vw, 36px)/1.3 var(--arabic); margin: 18px 0 14px; color: var(--ink); opacity: .9; }

.hero-in { max-width: 1100px; }
.hero .h-xl { font-size: clamp(34px, 5.4vw, 92px); }
.hero-foot { display: flex; justify-content: space-between; margin-top: 54px; font: 500 11px var(--mono); letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }
.hint { display: inline-flex; align-items: center; gap: 10px; }
.mouse { width: 14px; height: 22px; border: 1px solid currentColor; border-radius: 8px; position: relative; }
.mouse::after { content: ""; position: absolute; left: 50%; top: 4px; width: 2px; height: 5px; margin-left: -1px; background: currentColor; border-radius: 1px; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1 } 100% { transform: translateY(8px); opacity: 0 } }

.manifesto { align-items: flex-start; }
.words { font: 700 clamp(30px, 4.6vw, 76px)/1.08 var(--display); letter-spacing: -0.025em; max-width: 16em; margin: 0; }
.words span { opacity: .12; transition: opacity .25s, color .25s; }
.words span.on { opacity: 1; }
.words span.hl.on { color: var(--gold); }

.product { flex-direction: row; align-items: center; justify-content: space-between; gap: 40px; }
.product .p-copy { max-width: 560px; }
.product.right { justify-content: flex-end; padding-right: clamp(18px, 14vw, 280px); }
.product.right .h-lg { font-size: clamp(36px, 4.6vw, 80px); }
.product .p-copy { max-width: 660px; }
.product.right .p-copy { text-align: left; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 28px 0 0; }
.chips li { font: 500 12px var(--mono); letter-spacing: .06em; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: rgba(255,255,255,0.03); backdrop-filter: blur(6px); }

/* Mock UI cards */
.product .mock { align-self: flex-end; margin-bottom: 4vh; }
.mock {
  width: min(330px, 100%); padding: 18px; border-radius: 22px; margin-right: clamp(0px, 8vw, 140px);
  background: linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.12);
  transform-style: preserve-3d; transition: transform .2s ease-out;
  font-size: 14px;
}
.m-head { display: flex; align-items: center; gap: 8px; font: 600 11px var(--mono); letter-spacing: .14em; color: var(--orange); }
.m-head.teal { color: var(--teal); }
.m-head.yn { color: var(--yn); }
.m-head.neon { color: var(--neon); }
.m-head small { margin-left: auto; color: var(--dim); font-weight: 400; letter-spacing: .1em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: ping 1.6s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 currentColor } 100% { box-shadow: 0 0 0 10px transparent } }
.m-item { margin: 16px 0 6px; font: 600 16px var(--body); }
.m-bid { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.m-bid small { color: var(--mute); }
.m-bid b { font: 800 30px var(--display); letter-spacing: -0.02em; transition: color .3s, transform .3s; display: inline-block; }
.m-bid b.pop { color: var(--gold); transform: scale(1.08); }
.m-feed { display: grid; gap: 6px; margin-top: 12px; min-height: 96px; font: 400 12.5px var(--mono); color: var(--mute); }
.m-feed div { display: flex; justify-content: space-between; animation: feedIn .5s var(--ease); }
.m-feed div b { color: var(--ink); font-weight: 600; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px) } }

.route { display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; font: 600 12px var(--mono); color: var(--mute); }
.route i { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--teal) 0 6px, transparent 6px 11px); position: relative; }
.route i b { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 18px var(--teal); transition: left 1s linear; }
.steps { display: flex; justify-content: space-between; margin-top: 14px; font: 500 11px var(--mono); color: var(--dim); }
.steps .on { color: var(--teal); }

.receipt #rc-lines { margin-top: 14px; min-height: 120px; display: grid; align-content: start; gap: 7px; font: 400 12.5px var(--mono); color: var(--mute); border-bottom: 1px dashed var(--line); padding-bottom: 12px; }
.receipt #rc-lines div { display: flex; justify-content: space-between; animation: feedIn .4s var(--ease); }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.rc-total small { display: block; font: 400 11px var(--mono); color: var(--dim); }
.rc-total b { font: 800 26px var(--display); color: var(--orange); }

.geo { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.geo small { display: block; font: 500 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.geo b { font-weight: 600; font-size: 15px; }
.mono { font-family: var(--mono); }

.final .h-xl { font-size: clamp(44px, 7vw, 120px); margin-bottom: 18px; }
.final .lead { margin: 0 auto 34px; }
.foot { display: flex; justify-content: space-between; gap: 14px; width: 100%; margin-top: 90px; padding-top: 20px; border-top: 1px solid var(--line); font: 500 11px var(--mono); letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.foot [lang="ar"] { font-family: var(--arabic); letter-spacing: 0; font-size: 13px; text-transform: none; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(40px); filter: blur(8px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal.in:nth-child(3) { transition-delay: .08s; } .reveal.in:nth-child(4) { transition-delay: .16s; } .reveal.in:nth-child(5) { transition-delay: .24s; }
.tilt.reveal.in { transition: opacity 1.1s var(--ease), filter 1.1s var(--ease), transform .25s ease-out; }

/* YetNext code card */
.code pre { margin: 14px 0 0; min-height: 132px; font: 400 12px/1.65 var(--mono); color: var(--mute); white-space: pre-wrap; }
.code pre .k { color: var(--yn); } .code pre .s { color: var(--gold); } .code pre .f { color: var(--ink); }
.code pre .cur { display: inline-block; width: 7px; height: 14px; background: var(--yn); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.m-status { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font: 500 11px var(--mono); color: var(--mute); }
.m-status i { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.m-status b { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
/* One Long Second calendar card */
.cal { display: grid; gap: 7px; margin-top: 8px; font: 400 12.5px var(--mono); }
.cal div { display: flex; justify-content: space-between; align-items: center; color: var(--mute); }
.cal div b { font-weight: 600; font-size: 10.5px; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); }
.cal div.done b { color: #000; background: var(--neon); border-color: var(--neon); }
.cal div.now b { color: var(--neon); border-color: var(--neon); }

/* Phone & tablet */
@media (max-width: 1180px) { .links { gap: 16px; font-size: 12px; } }
@media (max-width: 1020px) { .links { display: none; } }
@media (max-width: 860px) {
  .links, .rail { display: none; }
  .sec { padding: 96px 20px; min-height: 120vh; }
  .product { flex-direction: column; align-items: flex-start; justify-content: flex-start; padding-top: 52vh; min-height: 175vh; }
  .product .mock { align-self: stretch; margin-bottom: 0; }
  .p-copy, .words { text-shadow: 0 2px 24px rgba(0,0,0,0.9); }
  .mock { margin: 0; width: 100%; }
  .hero-foot { margin-top: 34px; }
  .hero-foot .hint:first-child { display: none; }
  .foot { flex-direction: column; align-items: center; margin-top: 60px; }
  .btn.big { height: 56px; padding: 0 22px; }
  .nav { padding: 16px 16px; gap: 10px; }
  .logo { font-size: 12px; gap: 7px; letter-spacing: .03em; }
  .logo svg { width: 32px; height: 18px; }
  .nav-r { gap: 6px; }
  .nav .btn { height: 36px; padding: 0 14px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .h-xl em, .h-lg em { animation: none; }
  .reveal { transition-duration: .01s; }
}
