/* Zaheer Gillani — portfolio v2
   Tokens first. Every colour pair is contrast-checked (contrast.mjs) — see README. */
:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --surface: #11141a;
  --surface-2: #141821;
  --line: rgb(255 255 255 / .08);
  --line-2: rgb(255 255 255 / .14);
  --ink: #eceef2;          /* 16.9:1 on bg */
  --ink-2: #a3abb8;        /* 8.5:1 on bg, 7.7:1 on surface-2 */
  --ink-3: #7d8696;        /* 5.3:1 on bg — small print only */
  --violet: #8b7cf6;       /* 5.9:1 on bg */
  --violet-soft: #b4a9fb;  /* 9.3:1 on bg */
  --violet-btn: #6d5deb;   /* white text 4.8:1 */
  --amber: #f2994a;        /* 8.8:1 on bg */
  --live: #3ccf8e;

  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-4: clamp(2.3rem, 1.7rem + 2.7vw, 3.7rem);

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;
  --r-sm: 8px; --r: 14px; --r-lg: 20px;
  --wrap: 75rem;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; overflow-x: clip; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: var(--s3); z-index: 100; padding: var(--s2) var(--s4);
  background: var(--ink); color: var(--bg); border-radius: var(--r-sm); }
.skip:focus { left: var(--s3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease; }
.site-header.is-stuck { background: rgb(10 12 16 / .82); backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; margin-right: auto; }
.brand-mark { width: 2.25rem; height: 2.25rem; border-radius: 10px; display: grid; place-items: center;
  font: 600 .8rem/1 var(--display); letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, var(--violet-btn), #c0603a); }
.brand-name { font: 600 1rem/1.15 var(--display); }
.brand-role { display: block; font: 400 var(--step--1)/1.2 var(--body); color: var(--ink-2); }
.nav { display: flex; gap: var(--s1); }
.nav a { text-decoration: none; color: var(--ink-2); font-size: .95rem; padding: .55rem .8rem; border-radius: 999px;
  transition: color 160ms ease, background-color 160ms ease; }
.nav a:hover { color: var(--ink); background: rgb(255 255 255 / .05); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px;
  padding: 0 1.35rem; border-radius: 999px; font: 600 .95rem/1 var(--body); text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--violet-btn); color: #fff; box-shadow: 0 8px 28px -10px rgb(109 93 235 / .7); }
.btn-primary:hover { background: #7a6bf0; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: rgb(255 255 255 / .02); }
.btn-ghost:hover { border-color: rgb(255 255 255 / .28); background: rgb(255 255 255 / .05); }
.btn-sm { min-height: 40px; padding: 0 1rem; font-size: .9rem; }
.btn .arrow { transition: transform 160ms var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* Mobile menu — native <details>, works without JS */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; border: 1px solid var(--line-2); }
.menu summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: var(--ink);
  border-radius: 2px; position: relative; transition: transform 200ms var(--ease-out), opacity 150ms ease; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; } .menu-icon::after { top: 6px; }
.menu[open] .menu-icon { background: transparent; }
.menu[open] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu[open] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
.menu-panel { position: absolute; right: 0; top: calc(100% + .6rem); width: min(18rem, calc(100vw - 2.5rem));
  padding: var(--s3); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / .8); display: grid; gap: 2px; transform-origin: top right; }
.menu[open] .menu-panel { animation: pop 180ms var(--ease-out); }
.menu-panel a { padding: .8rem .9rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.menu-panel a:hover { background: rgb(255 255 255 / .06); }
.menu-panel .btn { margin-top: var(--s2); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@media (max-width: 880px) {
  .nav, .header-cta { display: none; }
  .menu { display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: var(--s7) var(--s7); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -4.25rem 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48rem 26rem at 78% 18%, rgb(109 93 235 / .17), transparent 65%),
    radial-gradient(34rem 22rem at 98% 62%, rgb(242 153 74 / .09), transparent 70%),
    linear-gradient(rgb(255 255 255 / .022) 1px, transparent 1px) 0 0 / 100% 64px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
          mask-image: linear-gradient(#000 55%, transparent); }
.hero-grid { display: grid; gap: var(--s7); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--s8); } }

.status { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .9rem .45rem .7rem;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgb(255 255 255 / .03);
  font-size: var(--step--1); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none;
  box-shadow: 0 0 0 0 rgb(60 207 142 / .55); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 8px rgb(60 207 142 / 0); } }

.hero h1 { font-size: var(--step-4); line-height: 1.04; margin-top: var(--s5); text-wrap: balance; }
.hero h1 .accent { background: linear-gradient(100deg, var(--violet-soft) 10%, var(--amber) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.role-line { margin-top: var(--s5); font: 500 var(--step-1)/1.4 var(--display); color: var(--ink); }
.role-line span { color: var(--ink-2); font-weight: 400; }
.lede { margin-top: var(--s4); max-width: 38rem; font-size: var(--step-1); line-height: 1.6; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.facts { list-style: none; padding: 0; margin: var(--s6) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.facts li { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2); font-size: var(--step--1); }
.facts svg { width: 15px; height: 15px; color: var(--violet-soft); flex: none; }

/* ---------- Hero window: real products ---------- */
.window { margin: 0; border-radius: var(--r-lg); background: linear-gradient(180deg, #151923, #10131a);
  border: 1px solid var(--line-2); box-shadow: 0 40px 90px -40px rgb(0 0 0 / .9), 0 0 0 1px rgb(0 0 0 / .4);
  overflow: hidden; min-width: 0; }
.window-bar { display: flex; align-items: center; gap: var(--s3); padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.lights { display: flex; gap: 6px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.window-title { font: 500 .8rem/1 var(--mono); color: var(--ink-3); margin-inline: auto; padding-right: 47px; }
.window-body { padding: var(--s4) var(--s4) var(--s3); }
.window-label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
  font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  padding: 0 .35rem var(--s3); }
.products { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.product { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: var(--s3); align-items: center;
  padding: .7rem .75rem; border-radius: 12px; background: rgb(255 255 255 / .025); border: 1px solid var(--line); }
.p-icon { width: 2.5rem; height: 2.5rem; border-radius: 10px; display: grid; place-items: center; }
.p-icon svg { width: 20px; height: 20px; }
.p-meta { display: block; }
.i-green { background: rgb(60 207 142 / .12); color: #3ccf8e; }
.i-amber { background: rgb(242 153 74 / .13); color: #f2994a; }
.i-violet { background: rgb(139 124 246 / .14); color: #b4a9fb; }
.i-blue { background: rgb(96 165 250 / .13); color: #7db4fb; }
.i-gold { background: rgb(250 204 21 / .12); color: #f5cf4b; }
.contact h2 { margin-top: var(--s3); }
.p-name { font: 600 .95rem/1.25 var(--display); color: var(--ink); }
.p-meta { font-size: .8rem; line-height: 1.4; color: var(--ink-2); }
.p-tag { font: 500 .7rem/1 var(--mono); letter-spacing: .04em; padding: .35rem .5rem; border-radius: 6px;
  color: var(--ink-2); border: 1px solid var(--line-2); white-space: nowrap; }
.p-tag.live { color: var(--live); border-color: rgb(60 207 142 / .35); background: rgb(60 207 142 / .07); }
.window-foot { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s3) .4rem 0;
  font: 400 .75rem/1.3 var(--mono); color: var(--ink-3); }
@media (max-width: 420px) { .p-tag { display: none; } .product { grid-template-columns: 2.5rem minmax(0, 1fr); } }

/* Rows arrive one by one — pure CSS, so they always appear even if JS fails */
.product { animation: row-in 420ms var(--ease-out) both; }
.product:nth-child(1) { animation-delay: 250ms; } .product:nth-child(2) { animation-delay: 360ms; }
.product:nth-child(3) { animation-delay: 470ms; } .product:nth-child(4) { animation-delay: 580ms; }
.product:nth-child(5) { animation-delay: 690ms; }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Numbers ---------- */
.numbers { border-block: 1px solid var(--line); background: rgb(255 255 255 / .012); }
.numbers ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.numbers li { padding: var(--s6) var(--s5); border-left: 1px solid var(--line); }
.numbers li:first-child { border-left: 0; padding-left: 0; }
.num { display: block; font: 600 clamp(2rem, 1.6rem + 1.6vw, 2.9rem)/1 var(--display); letter-spacing: -.03em; }
.num small { font-size: .55em; color: var(--violet-soft); margin-left: 2px; }
.num-label { display: block; margin-top: var(--s2); font-size: var(--step--1); color: var(--ink-2); line-height: 1.45; }
@media (max-width: 860px) {
  .numbers ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers li { padding: var(--s5) var(--s4); }
  .numbers li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .numbers li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; padding-block: var(--s5); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; gap: var(--s6); animation: slide 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { display: inline-flex; align-items: center; gap: var(--s6); white-space: nowrap;
  font: 500 var(--step-1)/1 var(--display); color: var(--ink-2); }
.ticker-track span::after { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--amber); transform: rotate(45deg); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: var(--s9); }
.section-head { display: grid; gap: var(--s3); margin-bottom: var(--s7); }
.eyebrow { font: 500 .78rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--violet-soft); }
.eyebrow b { color: var(--amber); font-weight: 500; margin-right: .6rem; }
.section h2 { font-size: var(--step-2); line-height: 1.15; max-width: 30ch; text-wrap: balance; }

.about-grid { display: grid; gap: var(--s7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .about-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: var(--s8); } }
.about-copy p + p { margin-top: var(--s4); }
.about-copy p { color: var(--ink-2); max-width: 62ch; }
.about-copy p:first-child { color: var(--ink); font-size: var(--step-1); line-height: 1.6; }
.about-copy strong { color: var(--ink); font-weight: 600; }
.card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: var(--s5); }
.card h3 { font-size: 1rem; margin-bottom: var(--s4); }
.facts-table { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); }
.facts-table dt, .facts-table dd { margin: 0; padding: .7rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.facts-table dt { color: var(--ink-3); padding-right: var(--s5); }
.facts-table dd { color: var(--ink); text-align: right; }
.facts-table dt:first-of-type, .facts-table dt:first-of-type + dd { border-top: 0; }
.open { color: var(--live) !important; }

/* ---------- Contact / footer ---------- */
.contact { padding-block: var(--s8); border-top: 1px solid var(--line); }
.contact-box { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 900px) { .contact-box { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
.contact h2 { font-size: var(--step-2); max-width: 22ch; }
.contact p { color: var(--ink-2); margin-top: var(--s3); max-width: 46ch; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.contact-list a { display: flex; align-items: center; gap: var(--s3); padding: .85rem 1rem; border-radius: 12px;
  border: 1px solid var(--line); text-decoration: none; background: var(--surface);
  transition: border-color 160ms ease, background-color 160ms ease; }
.contact-list a:hover { border-color: var(--line-2); background: var(--surface-2); }
.contact-list svg { width: 18px; height: 18px; color: var(--violet-soft); flex: none; }
.contact-list small { display: block; color: var(--ink-3); font-size: .75rem; }
.site-footer { padding-block: var(--s5) var(--s6); color: var(--ink-3); font-size: var(--step--1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .ticker, .menu, .actions, .hero::before { display: none !important; }
  body { background: #fff; color: #000; }
  .window, .card { border-color: #ccc; }
}
