/* Bloblings 1.1.0: the app's Night Sky theme for every page of bloblings.app.
   Loaded after each page's own <style>, so it re-points the shared tokens and restyles the shared
   pieces (sky, type, buttons, surfaces). Sources: DESIGN.md (the panel's system) and
   app/Sources/Bloblings/Theme.swift (PetTheme.nightSky). Two rules carry over from the panel:
   lamp yellow means "this needs you" (on the site: the one Download action), and text never goes
   dimmer than Dusk Lavender (#bdb7e6). Sentence case everywhere; no tracked capitals. */

:root {
  /* Night Sky, from Theme.swift: sky rgb(.14,.12,.32) to rgb(.06,.06,.15) */
  --sky-top: #241f52;
  --sky-bottom: #0f0f26;
  --bg: #17143a;
  --bg-2: #100e27;
  --panel: #221f47;
  --facade: #221f47;
  --facade-line: #2f2b5c;
  --lit-top: #3a2f52;
  --lit-bottom: #2a2448;
  /* Inks (DESIGN.md): moonlit, pale lavender, dusk lavender. --faint is the quiet floor. */
  --ink: #f1eeff;
  --muted: #cfcaf0;
  --faint: #bdb7e6;
  --line: rgba(255,255,255,.06);
  --glass: rgba(255,255,255,.045);
  /* Signals */
  --lamp: #ffc46b;
  --lamp-ink: #3b2508;
  --lamp-soft: #ffe2b0;
  --amber: #ffc46b;
  --teal: #6fe0cf;
  --blue: #66a6ff;    /* the theme's working colour */
  --pink: #ff86bf;
  --rose: #ff86bf;
  --violet: #b9a8ff;
  --green: #66f28c;   /* the theme's "your turn" */
  --question: #ffc3df;
  --reply: #e8e3ff;
  --tip: #d9c9ff;
  --tag-bg: #c9c3f2;
  --tag-ink: #1d1940;
  /* Two voices: rounded for names, headings and actions; system text for everything explanatory.
     Safari draws ui-rounded (SF Pro Rounded); other browsers get Nunito, the nearest free rounded face. */
  --display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* The theme's title gradient: teal, violet, rose */
  --rainbow: linear-gradient(90deg, #59ebd1, #8c73ff, #ff73bf, #8c73ff, #59ebd1);
  --radius: 22px;
}

body { background: var(--sky-bottom); color: var(--ink); }
::selection { background: #8c73ff; color: #fff; }

/* The sky: the app's gradient, its two glows (teal top left, rose bottom right), a faint dot
   texture and slow drifting sparks in teal, rose and amber. */
.sky { background:
    radial-gradient(760px 620px at 0% 0%, rgba(89,235,209,.20), transparent 70%),
    radial-gradient(820px 700px at 100% 100%, rgba(255,115,191,.15), transparent 70%),
    linear-gradient(180deg, var(--sky-top) 0%, #1a1740 45%, var(--sky-bottom) 100%) !important; }
.sky::before { content: ""; position: absolute; inset: 0; animation: none; opacity: 1;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.055) 1px, transparent 1.4px);
  background-size: 22px 22px; }
.sky::after { content: ""; position: absolute; inset: -40% 0 0 0; opacity: .85;
  background-image:
    radial-gradient(2px 2px at 40px 60px, rgba(89,235,209,.9), transparent),
    radial-gradient(1.6px 1.6px at 190px 140px, rgba(255,115,191,.85), transparent),
    radial-gradient(2px 2px at 310px 40px, rgba(255,199,89,.8), transparent),
    radial-gradient(1.4px 1.4px at 120px 260px, rgba(89,235,209,.7), transparent),
    radial-gradient(1.8px 1.8px at 260px 300px, rgba(255,115,191,.7), transparent),
    radial-gradient(1.2px 1.2px at 360px 210px, rgba(255,255,255,.6), transparent);
  background-size: 400px 340px; animation: sparks 90s linear infinite; will-change: transform; }
@keyframes sparks { from { transform: translateY(0); } to { transform: translateY(-340px); } }
@media (prefers-reduced-motion: reduce) { .sky::after { animation: none; } }

/* Type */
body { font-family: var(--body); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.015em; }
h1 { letter-spacing: -.025em; }
.eyebrow { font: 700 16px/1.2 var(--display) !important; letter-spacing: -.005em !important; text-transform: none !important; color: var(--teal); }
.lede { color: var(--muted); }
.rainbow-text { background: var(--rainbow); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
code, kbd, pre { font-family: var(--mono); }

/* Buttons: the Download is the page's one primary action, so it gets the lamp, like the app's
   one primary button. Everything else is a quiet tonal button. */
.btn { font-family: var(--display); font-weight: 700; border-radius: 14px; letter-spacing: -.005em; }
.btn-primary, .get .btn, .bar .links .btn, .nav-links .btn {
  color: var(--lamp-ink) !important;
  background: linear-gradient(180deg, #ffd48a, var(--lamp)) !important;
  box-shadow: 0 10px 28px rgba(255,168,70,.22), 0 2px 6px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,240,210,.6) !important; }
.btn-primary:hover, .get .btn:hover { filter: brightness(1.04); }
.btn-ghost { color: var(--muted) !important; background: rgba(255,255,255,.06) !important; box-shadow: none !important; }
.btn-ghost:hover { color: var(--ink) !important; background: rgba(255,255,255,.09) !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Nav and footer: tone, not lines */
nav { background: rgba(23,20,58,.94) !important;  /* near-solid, no blur: scroll judder (28 Oct) */ border-bottom: 0 !important; box-shadow: 0 1px 0 rgba(255,255,255,.05); }
.logo, .nav-links a { font-family: var(--display); }
footer { border-top: 1px solid rgba(255,255,255,.06) !important; }
footer .links a { font-family: var(--display); }

/* Surfaces: tonal facade, no hairline borders (Light-Not-Lines) */
details { background: rgba(255,255,255,.045) !important; box-shadow: none !important; }
summary { font-family: var(--display); font-weight: 700; }
.chip { box-shadow: none !important; background: rgba(255,255,255,.055); color: var(--muted); font-family: var(--display); }

/* The signal colours for small text pills keep the panel's tags */
.tag-lilac { background: var(--tag-bg); color: var(--tag-ink); border-radius: 999px; padding: 2px 7px; font: 600 11px/1.3 var(--display); }

/* Sign-up boxes: a quiet lamp button, so the Download stays the one loud action */
.signup button[type=submit] { background: rgba(255,226,176,.14) !important; color: var(--lamp-soft) !important; font-family: var(--display) !important; border-radius: 12px !important; }
.signup input[type=email] { border-radius: 12px !important; box-shadow: none !important; background: rgba(16,14,39,.55) !important; }
.signup-inline, .signup-card { background: rgba(255,255,255,.045) !important; box-shadow: 0 10px 30px rgba(0,0,0,.25) !important; }
.signup-card { background: #221f47 !important; }

/* 1.1 announcement (Nick, 1 Nov: "introducing the new look Bloblings"): one slim line above the
   nav on every page, linking to the 1.1.0 entry on /updates. It scrolls away; the nav stays. */
.announce { position: relative; z-index: 51; display: block; padding: 9px 16px; text-align: center; text-decoration: none;
  background: #100e27; font: 600 14px/1.35 var(--display); color: var(--muted); }
.announce b { font-weight: 700; background: linear-gradient(90deg, var(--teal), var(--violet), var(--pink), var(--amber), var(--teal));
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: announce-slide 8s linear infinite; }
.announce .go { color: var(--teal); white-space: nowrap; }
.announce:hover .go { text-decoration: underline; }
@keyframes announce-slide { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .announce b { animation: none; } }
