/* Nova Space: the one look of the site (dark space, bright colours, glass cards, bold type).
   A page takes it with <Base space>: Base.astro puts class="space" on <body> and loads this file after the page's own styles.
   It works through the tokens every page already uses (--bg, --text, --accent, ...), set here on body.space, so a page's own
   rules change colour by themselves; the shared parts (buttons, cards, chips, headings) get the new shape below.
   Change a colour or a font here and every page that uses it changes. Light mode follows the phone's setting. */

body.space {
  /* brand colours */
  --sp-pink: #ff2e93;
  --sp-orange: #ff8a00;
  --sp-yellow: #ffd60a;
  --sp-cyan: #00e5ff;
  --sp-blue: #3a6bff;
  --sp-violet: #9b5cff;
  --sp-green: #2bff88;
  --sp-grad: linear-gradient(100deg in oklch, var(--sp-cyan), var(--sp-blue) 30%, var(--sp-violet) 55%, var(--sp-pink) 80%, var(--sp-orange));
  /* buttons carry white words, so their colours are deep enough for 4.5 : 1 everywhere (#0061d6, #6a2fe0, #c8106a) */
  --sp-btn: linear-gradient(100deg in oklch, #0061d6, #6a2fe0 55%, #c8106a);
  --sp-btn-solid: #6a2fe0;
  --sp-head: 'Unbounded', 'Syne', system-ui, sans-serif;
  --sp-body: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;
  --sp-radius: 22px;
  --sp-glass: rgba(255, 255, 255, .045);
  --sp-glass-hi: rgba(255, 255, 255, .08);
  --sp-line: rgba(255, 255, 255, .12);
  --sp-star: rgba(255, 255, 255, .55);
  --sp-aurora: .55;
  /* the tokens the pages use */
  --bg: #05040f;
  --bg-2: #0d0b24;
  --bg-3: #17143a;
  --border: rgba(255, 255, 255, .12);
  --accent: #00e5ff;
  --sp-ink: #00e5ff;                 /* words in the accent colour (links, small labels) */
  --accent-lo: rgba(0, 229, 255, .12);
  --accent-hi: #7af3ff;
  --violet: #9b5cff;
  --violet-lo: rgba(155, 92, 255, .16);
  --text: #f4f2ff;
  --text-2: #bdbadb;
  --text-3: #8d89b3;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body.space {
    --sp-glass: rgba(255, 255, 255, .82);
    --sp-glass-hi: #ffffff;
    --sp-line: rgba(25, 18, 70, .12);
    --sp-star: rgba(60, 40, 160, .22);
    --sp-aurora: .28;
    --sp-grad: linear-gradient(100deg in oklch, #0057b8, #5a22d6 45%, #c0105f 80%, #b34a00);
    --bg: #f5f3ff;
    --bg-2: #ffffff;
    --bg-3: #ece8ff;
    --border: rgba(25, 18, 70, .13);
    --accent: #3a7bff;               /* under dark words (5.2 : 1) */
    --sp-ink: #0057b8;               /* words in the accent colour on white (6.9 : 1) */
    --accent-lo: rgba(58, 123, 255, .12);
    --accent-hi: #2a63e0;
    --violet: #6a2fe0;
    --violet-lo: rgba(106, 47, 224, .1);
    --text: #120f2e;
    --text-2: #46426a;
    --text-3: #6b6790;
    color-scheme: light;
  }
}
:root[data-theme="light"] body.space {
  --sp-glass: rgba(255, 255, 255, .82); --sp-glass-hi: #ffffff; --sp-line: rgba(25, 18, 70, .12); --sp-star: rgba(60, 40, 160, .22); --sp-aurora: .28;
  --sp-grad: linear-gradient(100deg in oklch, #0057b8, #5a22d6 45%, #c0105f 80%, #b34a00);
  --bg: #f5f3ff; --bg-2: #ffffff; --bg-3: #ece8ff; --border: rgba(25, 18, 70, .13); --accent: #3a7bff; --sp-ink: #0057b8; --accent-lo: rgba(58, 123, 255, .12); --accent-hi: #2a63e0;
  --violet: #6a2fe0; --violet-lo: rgba(106, 47, 224, .1); --text: #120f2e; --text-2: #46426a; --text-3: #6b6790; color-scheme: light;
}

/* ── the sky: stars on the page, and the coloured glow behind the top of it ── */
body.space {
  font-family: var(--sp-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(1px 1px at 20% 30%, var(--sp-star), transparent),
    radial-gradient(1px 1px at 70% 10%, var(--sp-star), transparent),
    radial-gradient(1.5px 1.5px at 85% 60%, var(--sp-star), transparent),
    radial-gradient(1px 1px at 40% 80%, var(--sp-star), transparent),
    radial-gradient(1px 1px at 10% 70%, var(--sp-star), transparent),
    radial-gradient(1px 1px at 55% 45%, var(--sp-star), transparent);
  background-size: 420px 420px;
  -webkit-font-smoothing: antialiased;
}
body.space::before {
  content: ''; position: absolute; z-index: -1; inset: 0 0 auto 0; height: 1100px; pointer-events: none; opacity: var(--sp-aurora);
  background:
    radial-gradient(40% 45% at 78% 18%, var(--sp-violet), transparent 70%),
    radial-gradient(32% 38% at 95% 48%, var(--sp-pink), transparent 70%),
    radial-gradient(35% 40% at 12% 14%, var(--sp-cyan), transparent 70%),
    radial-gradient(30% 35% at 45% 62%, var(--sp-blue), transparent 70%);
  filter: blur(40px);
}
body.space { position: relative; isolation: isolate; }
:where(body.space) ::selection { background: var(--sp-violet); color: #fff; }

/* ── type: big bold headings, gradient words ── */
:where(body.space) :is(h1, h2, h3, .hero-h1, .section-title, .deep-h, .cta-h, .feat-title, .ft-card strong, .make-card strong, .foot-logo, .nav-logo, .sh-h) {
  font-family: var(--sp-head); letter-spacing: -.02em;
}
:where(body.space) :is(.hero-h1, .section-title, .cta-h) { font-weight: 800; line-height: 1.06; text-wrap: balance; }
:where(body.space) :is(p, li) { text-wrap: pretty; }
:where(body.space) :is(.foot-col h4, .na-band-tag, .deep-label, .ft-card small) { font-family: var(--sp-body); font-weight: 800; letter-spacing: .14em; }
:where(body.space) .g, :where(body.space) .hero-h1 em {
  background: var(--sp-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  font-style: italic; font-family: var(--sp-body); font-weight: 800; letter-spacing: -.03em; padding-right: .06em;
}
:where(body.space) .it { font-style: italic; font-family: var(--sp-body); font-weight: 800; letter-spacing: -.03em; }
:where(body.space) :is(.hero-sub, .section-sub, .na-band-p, .deep-p, .cta-sub, .feat-desc) { font-weight: 400; color: var(--text-2); }
:where(body.space) :is(.hero-sub, .na-band-p, .deep-p, .cta-sub) b, :where(body.space) .hero-sub strong { color: var(--text); font-weight: 700; }

/* ── buttons ── */
body.space :is(.btn-primary, .nav-cta) {
  background: var(--sp-btn-solid); background-image: var(--sp-btn); color: #fff; border: 0; border-radius: 14px; font-weight: 800;
  box-shadow: 0 10px 34px -10px color-mix(in srgb, var(--sp-violet) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: box-shadow .2s ease-out, opacity .15s;
}
:where(body.space) .btn-primary { padding: 15px 28px; }
body.space :is(.btn-primary, .nav-cta):hover { opacity: 1; transform: none; box-shadow: 0 14px 44px -8px color-mix(in srgb, var(--sp-pink) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
/* (nothing moves on hover or on a tap: a button that moves under a finger can be pressed by mistake; the glow says it instead) */
:where(body.space) .btn-ghost {
  background: var(--sp-glass); color: var(--text); border: 1px solid var(--sp-line); border-radius: 14px; font-weight: 700;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background-color .2s;
}
:where(body.space) .btn-ghost:hover { background: var(--sp-glass-hi); border-color: color-mix(in srgb, var(--sp-cyan) 60%, transparent); color: var(--text); }
:where(body.space) :is(.na-band-link, .ft-all a) { color: var(--sp-ink); }

/* keyboard focus: a clear cyan ring everywhere */
:where(body.space) :is(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--sp-cyan); outline-offset: 3px; border-radius: 12px; }

/* ── glass cards ── */
:where(body.space) :is(.feat-card, .ft-card, .make-card, .cta-box, .deep-visual, .editor-mockup, .ns-band-mock, .sh-box) {
  background: var(--sp-glass); border: 1px solid var(--sp-line); border-radius: var(--sp-radius);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
:where(body.space) :is(.ft-card, .make-card, .feat-card) { transition: background-color .2s ease-out, box-shadow .2s ease-out; }
@media (hover: hover) {
  :where(body.space) :is(.ft-card, .make-card, .feat-card):hover {
    background: var(--sp-glass-hi); border-color: color-mix(in srgb, var(--card-c, var(--sp-cyan)) 70%, transparent);
    box-shadow: 0 22px 50px -24px var(--card-c, var(--sp-cyan));
  }
}
:where(body.space) :is(.editor-mockup) { overflow: hidden; border: 0; padding: 1.5px; background: linear-gradient(140deg, var(--sp-cyan), var(--sp-violet) 50%, var(--sp-pink)); box-shadow: 0 40px 90px -30px color-mix(in srgb, var(--sp-violet) 70%, transparent); }
:where(body.space) .editor-mockup canvas { border-radius: calc(var(--sp-radius) - 2px); }

/* the bands of each app: a glass panel with its own colour in the corner */
:where(body.space) .na-band {
  position: relative; overflow: hidden; border-radius: 28px; border: 1px solid var(--sp-line); background: var(--sp-glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
:where(body.space) .na-band::before { content: ''; position: absolute; z-index: -1; width: 520px; height: 520px; border-radius: 50%; top: -220px; right: -160px; background: var(--band-c, var(--sp-violet)); opacity: .35; filter: blur(70px); }
:where(body.space) #studio .na-band::before { right: auto; left: -160px; }
:where(body.space) #animate { --band-c: var(--sp-orange); }
:where(body.space) #studio { --band-c: var(--sp-cyan); }

/* ── pills and chips ── */
:where(body.space) :is(.na-band-tag, .hero-eyebrow, .trust-tag, .chip) {
  background: var(--sp-glass); border: 1px solid var(--sp-line); color: var(--text-2); border-radius: 999px;
}
:where(body.space) :is(.na-band-tag, .deep-label, .ft-card small) { color: var(--sp-ink); }
:where(body.space) .chip { color: var(--text); background: var(--violet-lo); border-color: color-mix(in srgb, var(--sp-violet) 35%, transparent); }
:where(body.space) .na-band-list li::before { color: var(--sp-green); }
:root[data-theme="light"] :where(body.space) .na-band-list li::before { color: #0a8a4a; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) :where(body.space) .na-band-list li::before { color: #0a8a4a; } }

/* ── feature icons: a coloured tile with a line icon ── */
:where(body.space) .feat-icon {
  width: 48px; height: 48px; border-radius: 14px; border: 0; color: #fff;
  background: var(--card-c, var(--sp-violet)); box-shadow: 0 10px 26px -8px var(--card-c, var(--sp-violet));
}
:where(body.space) .feat-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:where(body.space) .features-grid { gap: 16px; border: 0; border-radius: 0; overflow: visible; }

/* one colour per app or card, in the order of the brand */
:where(body.space) :is(.features-grid, .make-grid) > :nth-child(6n+1) { --card-c: var(--sp-pink); }
:where(body.space) :is(.features-grid, .make-grid) > :nth-child(6n+2) { --card-c: var(--sp-orange); }
:where(body.space) :is(.features-grid, .make-grid) > :nth-child(6n+3) { --card-c: var(--sp-cyan); }
:where(body.space) :is(.features-grid, .make-grid) > :nth-child(6n+4) { --card-c: var(--sp-violet); }
:where(body.space) :is(.features-grid, .make-grid) > :nth-child(6n+5) { --card-c: var(--sp-green); }
:where(body.space) :is(.features-grid, .make-grid) > :nth-child(6n+6) { --card-c: var(--sp-blue); }
:where(body.space) .make-card { border-top: 3px solid var(--card-c); }
/* free tool cards: the colour of the app they belong to */
:where(body.space) .ft-card { --card-c: var(--sp-cyan); }
:where(body.space) .ft-card[data-app="Nova Clip"] { --card-c: var(--sp-pink); }
:where(body.space) .ft-card[data-app="Nova Studio"] { --card-c: var(--sp-cyan); }
:where(body.space) .ft-card[data-app="Nova Audio"] { --card-c: var(--sp-violet); }
:where(body.space) .ft-card[data-app="Nova Forms"] { --card-c: var(--sp-green); }
:where(body.space) .ft-card[data-app="Hindi typing"] { --card-c: var(--sp-orange); }
:where(body.space) .ft-card[data-app="QR codes"] { --card-c: var(--sp-yellow); }
:where(body.space) .ft-card[data-app="Resume maker"] { --card-c: var(--sp-blue); }
:where(body.space) .ft-card small { color: color-mix(in srgb, var(--card-c) 80%, white); }
:root[data-theme="light"] :where(body.space) .ft-card small { color: color-mix(in srgb, var(--card-c) 45%, #120f2e); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) :where(body.space) .ft-card small { color: color-mix(in srgb, var(--card-c) 45%, #120f2e); } }

/* ── navigation and footer ── */
:where(body.space) nav { background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--sp-line); }
:where(body.space) :is(.nav-animate, .nav-studio, .nav-audio, .nav-vt, .nav-install, .nav-menu summary) { border-color: var(--sp-line); border-radius: 12px; }
:where(body.space) .nav-menu-list { background: var(--bg-2); border-color: var(--sp-line); border-radius: 16px; }
:where(body.space) .nav-menu-list a { border-color: var(--sp-line); }
:where(body.space) footer { border-top-color: var(--sp-line); }

/* the CTA box at the end gets the gradient edge too */
:where(body.space) .cta-glow { width: 640px; height: 640px; background: radial-gradient(circle, color-mix(in srgb, var(--sp-violet) 22%, transparent) 0%, transparent 70%); }

@media (prefers-reduced-motion: reduce) {
  :where(body.space) *, :where(body.space) *::before, :where(body.space) *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  :where(body.space) :is(.btn-primary, .nav-cta, .ft-card, .make-card, .feat-card):hover { transform: none; }
}
