/* Quasova — light from the dark */
:root {
  --void: #050507;
  --ink-1: #0b0b0f;
  --ink-2: #14141a;
  --line: #24242d;
  --line-2: #33333e;
  --star: #f5f3ee;
  --muted: #a3a1ab;
  --dim: #6f6d78;
  --core: #fff7e6;
  --flare: #ffc861;
  --jet: #ff6a2b;
  --glow: rgb(255 176 80 / .35);
  --radius: 18px;
  --wrap: 1180px;
  --display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
:root[lang="ar"] {
  --display: 'Noto Kufi Arabic', 'Unbounded', sans-serif;
  --body: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--void); color: var(--star);
  font: 400 17px/1.65 var(--body); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3 { font-weight: 700; line-height: 1.45; letter-spacing: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 4.1rem); }
h2, .h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); }
h3 { font-size: 1.12rem; }
h1 em, h2 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--core) 0%, var(--flare) 45%, var(--jet) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.big { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #d9d7d0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50; background: var(--flare); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--flare); outline-offset: 3px; border-radius: 6px; }

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgb(5 5 7 / .62); border-bottom: 1px solid rgb(255 255 255 / .06); }
.bar { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo img { height: 26px; width: auto; }
#nav { margin-inline-start: auto; }
#nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
#nav a { text-decoration: none; color: var(--muted); font-size: .94rem; transition: color .2s; }
#nav a:hover { color: var(--star); }
.bar-end { display: flex; align-items: center; gap: 12px; }
.lang { text-decoration: none; font-size: .85rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; }
.lang:hover { color: var(--star); border-color: var(--dim); }
.menu { display: none; background: none; border: 1px solid var(--line-2); border-radius: 10px; width: 42px; height: 38px; padding: 0; cursor: pointer; position: relative; }
.menu i { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--star); transition: transform .25s var(--ease); }
.menu i:first-of-type { top: 14px; } .menu i:last-of-type { top: 21px; }
.menu[aria-expanded="true"] i:first-of-type { transform: translateY(3.5px) rotate(45deg); }
.menu[aria-expanded="true"] i:last-of-type { transform: translateY(-3.5px) rotate(-45deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; text-decoration: none; cursor: pointer;
  font: 600 .98rem/1 var(--body); padding: 15px 24px; border-radius: 999px; border: 0;
  color: #120a02; background: linear-gradient(100deg, var(--core), var(--flare) 55%, #ff9a45);
  box-shadow: 0 0 0 1px rgb(255 200 97 / .3), 0 10px 30px -10px var(--glow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgb(255 200 97 / .5), 0 16px 40px -10px rgb(255 160 60 / .55); }
.btn.ghost { background: transparent; color: var(--star); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--flare); }
.btn.small { padding: 10px 16px; font-size: .88rem; }

/* Hero */
.hero { position: relative; padding: clamp(48px, 9vw, 120px) 0 clamp(60px, 9vw, 120px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; }
.eyebrow, .kicker { font: 500 .78rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--flare); margin-bottom: 18px; }
:root[lang="ar"] .eyebrow, :root[lang="ar"] .kicker { font-family: var(--body); letter-spacing: 0; font-size: .9rem; }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: #cfcdc6; max-width: 36em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-text > * { animation: rise 1s var(--ease) both; }
.hero-text > :nth-child(1) { animation-delay: .9s; } .hero-text > :nth-child(2) { animation-delay: 1.05s; }
.hero-text > :nth-child(3) { animation-delay: 1.2s; } .hero-text > :nth-child(4) { animation-delay: 1.35s; }

/* The quasar */
.quasar { position: relative; aspect-ratio: 1; width: min(100%, 520px); margin-inline: auto; display: grid; place-items: center; }
.quasar > svg { position: relative; width: 58%; z-index: 2; filter: drop-shadow(0 0 30px rgb(255 190 100 / .35)); }
.quasar > svg circle[stroke] { stroke-dasharray: 503; stroke-dashoffset: 503; animation: draw-ring 1.4s var(--ease) .15s forwards; }
.quasar > svg path { transform-origin: 128px 128px; transform: scale(0); animation: jet-out .7s var(--ease) 1.05s forwards; }
.quasar > svg circle:last-of-type { transform-origin: 128px 128px; transform: scale(0); animation: ignite .6s var(--ease) .85s forwards; }
.quasar > svg circle:first-of-type:not([stroke]) { opacity: 0; animation: fade-in 1.2s ease 1s forwards; }
.disc { position: absolute; inset: 9%; border-radius: 50%; z-index: 1;
  background: conic-gradient(from 0deg, transparent 0 10%, rgb(255 200 97 / .55) 22%, transparent 34%, rgb(255 106 43 / .35) 58%, transparent 70%, rgb(255 247 230 / .4) 86%, transparent 96%);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%, #000 64%, transparent 72%);
  mask: radial-gradient(circle, transparent 54%, #000 56%, #000 64%, transparent 72%);
  filter: blur(6px); opacity: 0; animation: fade-in 1.4s ease .6s forwards, spin 14s linear infinite; }
.halo { position: absolute; inset: 0; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgb(255 190 100 / .2), rgb(255 106 43 / .07) 40%, transparent 68%);
  opacity: 0; animation: fade-in 2s ease .8s forwards, breathe 6s ease-in-out 2.8s infinite; }
.beam { position: absolute; z-index: 1; left: 50%; top: 50%; width: 3px; height: 95%; transform-origin: 50% 0;
  transform: rotate(-45deg) scaleY(0);
  background: linear-gradient(to bottom, rgb(255 247 230 / .9), rgb(255 200 97 / .5) 30%, rgb(255 106 43 / .18) 70%, transparent);
  filter: blur(1.5px); animation: beam 1.1s var(--ease) 1.15s forwards; }
.beam.counter { transform: rotate(135deg) scaleY(0); opacity: .45; animation-name: beam-counter; }
:root[dir="rtl"] .quasar { direction: ltr; }

@keyframes draw-ring { to { stroke-dashoffset: 0; } }
@keyframes ignite { 0% { transform: scale(0); } 60% { transform: scale(1.6); } 100% { transform: scale(1); } }
@keyframes jet-out { to { transform: scale(1); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes breathe { 50% { transform: scale(1.06); } }
@keyframes beam { to { transform: rotate(-45deg) scaleY(1); } }
@keyframes beam-counter { to { transform: rotate(135deg) scaleY(.55); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Sections */
.band { position: relative; padding: clamp(70px, 9vw, 130px) 0; }
.band + .band { border-top: 1px solid rgb(255 255 255 / .05); }
.sec-head { max-width: 760px; margin-bottom: 48px; }
.sec-head p:last-child { color: var(--muted); font-size: 1.08rem; }
.sub-h { margin: 72px 0 24px; color: var(--muted); font-size: 1rem; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; }
:root[lang="ar"] .sub-h { font-family: var(--body); letter-spacing: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { position: relative; padding: 28px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgb(255 255 255 / .035), rgb(255 255 255 / .01)); border: 1px solid var(--line);
  transition: border-color .3s, transform .3s var(--ease); }
.card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(255 200 97 / .14), transparent 45%); }
.card:hover { border-color: #3d3a36; transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); margin: 0; }
.ico { width: 30px; height: 30px; color: var(--flare); margin-bottom: 22px; }

.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.process li { padding: 22px 4px 0; border-top: 1px solid var(--line-2); position: relative; }
.process li::before { content: ''; position: absolute; top: -4px; inset-inline-start: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--flare); box-shadow: 0 0 14px var(--flare); }
.process .num { font: 500 .8rem var(--mono); color: var(--dim); }
.process h3 { margin: 8px 0 6px; }
.process p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Ecosystem */
.eco { background: radial-gradient(70% 60% at 50% 0%, rgb(255 160 70 / .07), transparent 70%); }
.orbit { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.orbit-card { grid-column: span 2; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); }
.orbit-card:nth-child(4), .orbit-card:nth-child(5) { grid-column: span 3; }
.orbit-card h3 { font-family: 'Unbounded', var(--display); font-weight: 600; margin-top: 16px; }
.orbit-card p { color: var(--muted); margin: 0; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px; }
:root[lang="ar"] .status { font-family: var(--body); letter-spacing: 0; font-size: .82rem; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.s-live .status { color: var(--core); border-color: rgb(255 200 97 / .45); }
.s-live .status::before { background: var(--flare); box-shadow: 0 0 10px var(--flare); animation: pulse 2s ease-in-out infinite; }
.s-live { border-color: rgb(255 200 97 / .35); background: linear-gradient(160deg, rgb(255 200 97 / .08), var(--ink-1) 55%); }
.s-research .status::before, .s-design .status::before { background: #d9a35a; }
@keyframes pulse { 50% { opacity: .35; } }

/* Vision */
.vision-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 64px; align-items: start; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.principles li { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); }
.principles p { color: var(--muted); margin: 0; }

/* Mark */
.mark-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.mark-big { aspect-ratio: 1; display: grid; place-items: center; border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 50%, rgb(255 190 100 / .12), transparent 60%), var(--ink-1); }
.mark-big svg { width: 62%; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.brief { display: grid; gap: 16px; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); }
.brief label { display: grid; gap: 8px; font-size: .9rem; color: var(--muted); }
.brief input, .brief select, .brief textarea { font: inherit; font-size: 1rem; color: var(--star); background: var(--void);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; width: 100%; }
.brief textarea { resize: vertical; }
.brief input:focus, .brief select:focus, .brief textarea:focus { outline: none; border-color: var(--flare); box-shadow: 0 0 0 3px rgb(255 200 97 / .15); }
.brief [aria-invalid="true"] { border-color: var(--jet); }
.brief .btn { justify-self: start; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 56px 0 28px; background: rgb(5 5 7 / .7); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.foot-grid img { height: 28px; width: auto; margin-bottom: 18px; }
.foot-grid p { max-width: 520px; font-size: .88rem; }
.foot-links { display: grid; gap: 10px; justify-items: end; align-content: start; }
.foot-links a { text-decoration: none; color: var(--muted); }
.foot-links a:hover { color: var(--star); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: .85rem; }

/* Brand page */
.page .band:first-child { padding-top: clamp(48px, 7vw, 90px); }
.brand-hero { padding: clamp(40px, 8vw, 90px); border-radius: 28px; border: 1px solid var(--line); background: radial-gradient(circle at 20% 50%, rgb(255 190 100 / .1), transparent 50%), var(--ink-1); display: grid; place-items: center; }
.brand-hero img { width: min(100%, 560px); height: auto; }
.swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.swatches li { display: grid; gap: 4px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); }
.chip { height: 90px; border-radius: 12px; border: 1px solid var(--line-2); margin-bottom: 10px; }
.swatches code { font-family: var(--mono); color: var(--flare); font-size: .85rem; }
.swatches .muted { font-size: .88rem; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.type-sample { padding: 32px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); }
.t-display { font: 600 clamp(1.6rem, 3vw, 2.4rem)/1.2 'Unbounded', sans-serif; }
.t-ar { font: 700 clamp(1.5rem, 2.8vw, 2.2rem)/1.5 'Noto Kufi Arabic', sans-serif; }
.t-mono { font: 500 .9rem var(--mono); color: var(--flare); letter-spacing: .1em; margin: 0; }
.downloads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.downloads a { display: grid; gap: 4px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-1); text-decoration: none; transition: border-color .2s; }
.downloads a:hover { border-color: var(--flare); }
.downloads .muted { font: 500 .8rem var(--mono); }
.lost { min-height: 60vh; display: grid; align-items: center; padding: 80px 0; }

/* Reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.cards .reveal:nth-child(3n+2), .orbit .reveal:nth-child(3n+2), .process .reveal:nth-child(2) { transition-delay: .08s; }
.cards .reveal:nth-child(3n), .orbit .reveal:nth-child(3n), .process .reveal:nth-child(3) { transition-delay: .16s; }
.process .reveal:nth-child(4) { transition-delay: .24s; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .vision-grid, .mark-grid, .contact-grid, .type-grid { grid-template-columns: 1fr; gap: 40px; }
  .quasar { width: min(86vw, 420px); order: -1; }
  .cards, .swatches, .downloads { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .orbit-card, .orbit-card:nth-child(4), .orbit-card:nth-child(5) { grid-column: span 3; }
  .orbit-card:first-child { grid-column: 1 / -1; }
  .mark-big { max-width: 360px; }
}
@media (max-width: 760px) {
  .menu { display: block; }
  .bar-end .btn { display: none; }
  #nav { position: fixed; inset: 68px 0 auto 0; background: rgb(5 5 7 / .97); border-bottom: 1px solid var(--line);
    padding: 12px 16px 20px; display: none; }
  #nav.open { display: block; }
  #nav ul { flex-direction: column; gap: 0; }
  #nav a { display: block; padding: 14px 4px; font-size: 1.05rem; color: var(--star); border-bottom: 1px solid var(--line); }
  .cards, .swatches, .downloads, .process { grid-template-columns: 1fr; }
  .orbit-card, .orbit-card:nth-child(4), .orbit-card:nth-child(5) { grid-column: 1 / -1; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-links { justify-items: start; }
  .foot-base { flex-direction: column; }
  .quasar { width: min(78vw, 340px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print { #stars, .top, .quasar, .brief { display: none; } body { background: #fff; color: #000; } }
