/* ===== Tokens — Crimson / Ember palette ===== */
:root {
  --background: oklch(0.13 0.04 25);
  --foreground: oklch(0.97 0.01 30);
  --muted: oklch(0.72 0.04 30);
  --card: oklch(0.18 0.05 25);
  --border: oklch(0.30 0.08 25);
  --primary: oklch(0.62 0.24 25);          /* crimson red */
  --primary-foreground: oklch(0.99 0 0);
  --accent: oklch(0.78 0.18 55);            /* ember orange */
  --gradient-brand: linear-gradient(120deg, oklch(0.55 0.26 18), oklch(0.78 0.18 55));
  --shadow-card: 0 10px 30px -10px oklch(0 0 0 / 0.6);
  --shadow-card-hover: 0 20px 50px -15px oklch(0.62 0.24 25 / 0.55);
  --shadow-glow: 0 8px 30px -5px oklch(0.62 0.24 25 / 0.7);
  --transition: 300ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1152px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 768px; }
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Animated Ember/Nebula background ===== */
.galaxy-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.galaxy-base {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 25%, oklch(0.25 0.16 22 / 0.85) 0%, oklch(0.13 0.04 25) 60%),
    radial-gradient(ellipse at 80% 80%, oklch(0.28 0.18 35 / 0.55) 0%, transparent 60%),
    radial-gradient(ellipse at 15% 70%, oklch(0.22 0.14 12 / 0.55) 0%, transparent 55%);
}

/* Drifting nebula clouds */
.nebula {
  position: absolute; border-radius: 9999px;
  filter: blur(100px);
  mix-blend-mode: screen;
  opacity: .55;
}
.nebula-1 {
  width: 60vw; height: 60vw; left: -10vw; top: -10vw;
  background: radial-gradient(circle, oklch(0.62 0.26 18 / 0.7), transparent 70%);
  animation: nebulaFloat1 22s ease-in-out infinite alternate;
}
.nebula-2 {
  width: 55vw; height: 55vw; right: -15vw; top: 20vh;
  background: radial-gradient(circle, oklch(0.78 0.18 55 / 0.55), transparent 70%);
  animation: nebulaFloat2 28s ease-in-out infinite alternate;
}
.nebula-3 {
  width: 70vw; height: 70vw; left: 10vw; top: 60vh;
  background: radial-gradient(circle, oklch(0.50 0.22 8 / 0.6), transparent 70%);
  animation: nebulaFloat3 34s ease-in-out infinite alternate;
}
.nebula-4 {
  width: 50vw; height: 50vw; right: 5vw; bottom: -10vh;
  background: radial-gradient(circle, oklch(0.65 0.22 35 / 0.5), transparent 70%);
  animation: nebulaFloat1 26s ease-in-out infinite alternate-reverse;
}

@keyframes nebulaFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(15vw, 10vh) scale(1.15); }
}
@keyframes nebulaFloat2 {
  0%   { transform: translate(0, 0) scale(1.05); }
  100% { transform: translate(-12vw, 8vh) scale(0.95); }
}
@keyframes nebulaFloat3 {
  0%   { transform: translate(0, 0) scale(0.9); }
  100% { transform: translate(8vw, -12vh) scale(1.2); }
}

/* Aurora streaks */
.aurora {
  position: absolute; left: -20%; right: -20%;
  height: 40vh;
  background: linear-gradient(90deg,
    transparent 0%,
    oklch(0.62 0.24 25 / 0.18) 30%,
    oklch(0.78 0.18 55 / 0.22) 50%,
    oklch(0.55 0.26 12 / 0.18) 70%,
    transparent 100%);
  filter: blur(60px);
  mix-blend-mode: screen;
  transform-origin: center;
}
.aurora-1 { top: 15%; animation: auroraSway 18s ease-in-out infinite alternate; }
.aurora-2 { top: 55%; animation: auroraSway 24s ease-in-out infinite alternate-reverse; opacity: .8; }

@keyframes auroraSway {
  0%   { transform: rotate(-8deg) translateY(0) skewX(-6deg); opacity: .55; }
  50%  { opacity: .85; }
  100% { transform: rotate(6deg) translateY(20px) skewX(4deg); opacity: .55; }
}

/* Drifting starfield */
.galaxy-stars, .galaxy-stars-sparse {
  position: absolute; left: 0; right: 0; top: 0;
  height: 200%;
  background-image:
    radial-gradient(1px 1px at 20% 30%, oklch(0.95 0.04 30), transparent 50%),
    radial-gradient(1px 1px at 75% 12%, oklch(0.92 0.06 40), transparent 50%),
    radial-gradient(1.2px 1.2px at 40% 60%, white, transparent 50%),
    radial-gradient(1px 1px at 85% 70%, oklch(0.95 0.04 25), transparent 50%),
    radial-gradient(1px 1px at 10% 85%, white, transparent 50%),
    radial-gradient(1.5px 1.5px at 60% 40%, oklch(0.97 0.03 35), transparent 50%),
    radial-gradient(1px 1px at 30% 50%, white, transparent 50%);
  background-size: 600px 600px;
  opacity: .8;
  animation: galaxyDrift 90s linear infinite;
}
.galaxy-stars-sparse {
  background-image:
    radial-gradient(2px 2px at 15% 25%, oklch(0.95 0.06 30), transparent 60%),
    radial-gradient(2px 2px at 70% 65%, oklch(0.97 0.04 50), transparent 60%),
    radial-gradient(2.5px 2.5px at 45% 80%, white, transparent 60%);
  background-size: 1000px 1000px;
  animation-duration: 160s;
  opacity: .9;
}
.galaxy-twinkle {
  position: absolute; inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 25% 35%, oklch(0.95 0.06 30) 50%, transparent 100%),
    radial-gradient(2px 2px at 70% 60%, oklch(0.98 0.04 40) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 45% 80%, oklch(0.95 0.06 20) 50%, transparent 100%);
  mix-blend-mode: screen;
  animation: twinkle 4s ease-in-out infinite;
  opacity: .5;
}

/* Shooting stars */
.shooting-star {
  position: absolute;
  width: 140px; height: 2px;
  background: linear-gradient(90deg, transparent, oklch(0.95 0.05 30), oklch(0.78 0.18 55));
  border-radius: 9999px;
  filter: drop-shadow(0 0 6px oklch(0.78 0.18 55 / 0.8));
  opacity: 0;
  transform: rotate(-25deg);
}
.shooting-star.s1 { top: 18%; left: -20%; animation: shoot 7s linear infinite; animation-delay: 1s; }
.shooting-star.s2 { top: 55%; left: -20%; animation: shoot 9s linear infinite; animation-delay: 4s; }
.shooting-star.s3 { top: 78%; left: -20%; animation: shoot 11s linear infinite; animation-delay: 7s; }

@keyframes shoot {
  0%   { transform: translate(0, 0) rotate(-25deg); opacity: 0; }
  10%  { opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(140vw, 60vh) rotate(-25deg); opacity: 0; }
}

@keyframes galaxyDrift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
@keyframes twinkle {
  0%, 100% { opacity: .25; }
  50% { opacity: .7; }
}

/* ===== Header / Nav ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: oklch(0.13 0.04 25 / 0.4);
  border-bottom: 1px solid oklch(0.62 0.24 25 / 0.15);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.nav-links a { transition: color var(--transition); }
.nav-links a:hover { color: var(--accent); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 96px 24px 0;
  text-align: center;
}
.hero-title {
  font-size: clamp(48px, 11vw, 144px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  text-shadow: 0 0 60px oklch(0.62 0.24 25 / 0.4);
}
.hero-sub {
  margin: 32px auto 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
}
.hero-cta {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
}
.scroll-cue {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 9999px;
  font-size: 14px; font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
  cursor: pointer; border: 0;
}
.btn:hover { transform: scale(1.05); }
.btn-primary {
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { box-shadow: var(--shadow-card-hover); }
.btn-ghost {
  border: 1px solid oklch(0.62 0.24 25 / 0.6);
  background: oklch(0.18 0.05 25 / 0.4);
  backdrop-filter: blur(8px);
  color: var(--foreground);
}
.btn-ghost:hover { border-color: oklch(0.78 0.18 55 / 0.7); color: var(--accent); }

/* ===== Sections ===== */
.section { position: relative; padding: 128px 24px; }
.section-head { text-align: center; margin-bottom: 64px; }
.eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.eyebrow.muted { color: var(--muted); }
.section-title { font-size: clamp(36px, 5vw, 60px); font-weight: 700; letter-spacing: -.02em; }
.section-sub { margin: 16px auto 0; max-width: 32rem; color: var(--muted); }

/* ===== Grid / Cards ===== */
.grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }

.card {
  position: relative; overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-8px); border-color: oklch(0.62 0.24 25 / 0.6); box-shadow: var(--shadow-card-hover); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms cubic-bezier(.4,0,.2,1); }
.card:hover .card-media img { transform: scale(1.1); }
.card-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, var(--card), oklch(0.18 0.05 25 / 0.4) 50%, transparent);
  opacity: .9;
}
.card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px; }
.card-body .tag { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.card-body h3 { font-size: 20px; font-weight: 600; }

/* ===== Contact cards ===== */
.contact-card {
  position: relative; overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.contact-card:hover { transform: translateY(-4px); border-color: oklch(0.62 0.24 25 / 0.6); box-shadow: var(--shadow-card-hover); }
.contact-glow {
  position: absolute; right: -40px; top: -40px;
  width: 128px; height: 128px; border-radius: 9999px;
  background: oklch(0.62 0.24 25 / 0.25);
  filter: blur(48px);
  transition: background var(--transition);
}
.contact-card:hover .contact-glow { background: oklch(0.62 0.24 25 / 0.45); }
.contact-glow.accent { background: oklch(0.78 0.18 55 / 0.22); }
.contact-card:hover .contact-glow.accent { background: oklch(0.78 0.18 55 / 0.45); }
.icon {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.icon-primary { background: oklch(0.62 0.24 25 / 0.18); color: var(--primary); }
.icon-accent { background: oklch(0.78 0.18 55 / 0.18); color: var(--accent); }
.handle { position: relative; margin-top: 4px; font-size: 24px; font-weight: 600; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid oklch(0.62 0.24 25 / 0.2); padding: 40px 24px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
@media (min-width: 640px) { .footer-inner { flex-direction: row; } }
.upper { text-transform: uppercase; letter-spacing: .2em; }

/* ===== Animations ===== */
.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp .8s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s cubic-bezier(.4,0,.2,1), transform .8s cubic-bezier(.4,0,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
