/* ─────────────────────────────────────────────────────
   Shared site theme — palette, fonts, aurora, grain.
   Linked by every page; page-specific styles live in
   each page's own stylesheet/<style> block.
   ───────────────────────────────────────────────────── */

:root {
  --bg: #07080f;
  --bg-deep: #03040a;
  --surface: rgba(14, 15, 24, 0.72);
  --surface-2: rgba(22, 23, 36, 0.82);
  --surface-dark: rgba(8, 9, 16, 0.78);
  --border: rgba(255, 255, 255, 0.1);
  --border-hi: rgba(255, 255, 255, 0.22);
  --text: #f4f0e8;
  --text-2: #b8b2c4;
  --text-3: #807a8e;
  --accent: #5fe6ff;
  --accent-2: #c47bff;
  --accent-3: #ff7a9f;
  --accent-rgb: 95, 230, 255;
  --success: #6dffb4;
  --warning: #ffc97a;
  --danger: #ff8aa3;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { min-height: 100%; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  background:
    radial-gradient(circle at 15% 18%, rgba(95, 230, 255, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 85% 82%, rgba(196, 123, 255, 0.07) 0%, transparent 42%),
    linear-gradient(160deg, #0a0b15 0%, #04050b 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
}

/* Vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 100% 70% at 50% 50%, transparent 35%, rgba(3, 4, 10, 0.55) 100%),
    radial-gradient(ellipse 70% 100% at 50% 100%, rgba(3, 4, 10, 0.7) 0%, transparent 50%);
}

/* Subtle grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ─── Aurora background ───────────────────────────── */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  mix-blend-mode: screen;
  will-change: transform;
  transform: translateZ(0);
}

.blob-1 {
  width: 60vw; height: 60vw;
  max-width: 800px; max-height: 800px;
  background: radial-gradient(circle, rgba(95, 230, 255, 0.32), transparent 65%);
  top: -20%; left: -15%;
  animation: aurora-drift-1 28s ease-in-out infinite;
}

.blob-2 {
  width: 50vw; height: 50vw;
  max-width: 700px; max-height: 700px;
  background: radial-gradient(circle, rgba(196, 123, 255, 0.3), transparent 65%);
  top: 10%; right: -18%;
  animation: aurora-drift-2 34s ease-in-out infinite;
}

.blob-3 {
  width: 65vw; height: 65vw;
  max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(70, 100, 255, 0.26), transparent 65%);
  bottom: -25%; left: 15%;
  animation: aurora-drift-3 32s ease-in-out infinite;
}

.blob-4 {
  width: 40vw; height: 40vw;
  max-width: 580px; max-height: 580px;
  background: radial-gradient(circle, rgba(255, 122, 159, 0.24), transparent 65%);
  bottom: 5%; right: 5%;
  animation: aurora-drift-4 30s ease-in-out infinite;
}

@keyframes aurora-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(35vw, 25vh) scale(1.3); }
  66%      { transform: translate(15vw, 55vh) scale(0.85); }
}
@keyframes aurora-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-30vw, 30vh) scale(1.2); }
  66%      { transform: translate(-12vw, -12vh) scale(0.9); }
}
@keyframes aurora-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(20vw, -32vh) scale(1.15); }
  66%      { transform: translate(-18vw, -10vh) scale(0.95); }
}
@keyframes aurora-drift-4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-28vw, -20vh) scale(1.25); }
  66%      { transform: translate(-42vw, 10vh) scale(0.9); }
}

#shape-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* ─── Common chrome ───────────────────────────────── */

.kicker {
  margin: 0 0 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  padding: 0.78rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  /* Springy bounce-back on release; quick crisp press handled by :active */
  transition:
    transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 220ms ease,
    color 200ms ease,
    background 200ms ease,
    border-color 200ms ease;
}

.btn:hover { transform: translateY(-2px); }

.btn:active {
  transform: translateY(0) scale(0.94);
  transition: transform 70ms ease-in, box-shadow 70ms ease-in;
}

.btn-primary:active {
  box-shadow:
    0 2px 12px rgba(var(--accent-rgb), 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07080f;
  border: 0;
  box-shadow:
    0 6px 24px rgba(var(--accent-rgb), 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: blur(14px);
  opacity: 0.45;
  z-index: -1;
  transition: opacity 220ms ease;
}

.btn-primary:hover {
  box-shadow:
    0 10px 32px rgba(var(--accent-rgb), 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.btn-primary:hover::before { opacity: 0.85; }

.btn-ghost {
  border-color: var(--border-hi);
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--text-2);
  background: var(--surface-2);
}

.btn-danger {
  border-color: rgba(255, 138, 163, 0.4);
  color: var(--danger);
  background: rgba(255, 138, 163, 0.08);
}

.btn-danger:hover {
  border-color: var(--danger);
  background: rgba(255, 138, 163, 0.16);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.btn:disabled::before { opacity: 0 !important; }

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.6);
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob { animation: none; }
}

/* ─── Shooting stars ──────────────────────────────── */

.shooting-stars {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow:
    0 0 4px rgba(255, 255, 255, 0.9),
    0 0 12px rgba(255, 255, 255, 0.5),
    0 0 24px rgba(95, 230, 255, 0.4);
  /* Two animations: smooth ease-out translate, separate linear fade so the
     star dims gradually rather than vanishing at the end. */
  animation:
    star-translate var(--dur, 1.4s) cubic-bezier(0.18, 0.55, 0.3, 1) forwards,
    star-fade      var(--dur, 1.4s) linear forwards;
}

.shooting-star::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.7) 100%);
  transform: translateY(-50%) rotate(var(--rot, 0deg));
  transform-origin: 100% 50%;
}

@keyframes star-translate {
  from { transform: translate(0, 0) scale(0.4); }
  to   { transform: translate(var(--tx), var(--ty)) scale(0.95); }
}

@keyframes star-fade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  35%  { opacity: 1; }
  100% { opacity: 0; }
}
