/* ===========================
   assets/styles/global.css
   Global theme, layout & shared animations
   =========================== */

/* ---- Theme tokens ---- */
:root {
  --fg: #f8fafc;
  --bg: #0b1020;
  --muted: #e5e7eb;

  /* Grid & stars (sektion 1 uses these) */
  --grid-size: clamp(16px, 3vw, 34px);
  --star-alpha: 0.9;
  --glow-depth: 300px;

  /* Countdown flip (sektion 1) */
  --flip-base-delay: .8s;
  --flip-stagger: .35s;
  --glass-bg: rgba(255,255,255,.07);
  --glass-brd: rgba(255,255,255,.15);

  /* Sektion 2 gradient overlay */
  --s2-overlay-opacity: 0.55;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  overflow-x: hidden;
}

/* Improve focus visibility */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ---- Section layout ---- */
.section{
  position: relative;
  height: 100dvh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(1rem, 3vw, 4rem);
  isolation: isolate;
  overflow: hidden;
  background: #000;
}

.bg-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.bg-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }

.content{
  max-width: min(1200px, 95vw);
  width: 100%;
  display: grid;
  place-items: center;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
  z-index: 4;
}

/* ---- Scroll anchors (used across sections) ---- */
.scroll-next{
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  translate: -50% 0;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  color: var(--fg);
  z-index: 4;
}
#sec6 .scroll-next{ bottom: 2rem; }
.scroll-next i{
  font-size: clamp(2rem, 5.2vw, 3.25rem);
  line-height: 1;
  animation: anchorBob 1.6s ease-in-out infinite;
}

/* ---- Shared animations ---- */
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes anchorBob { 0%,100% { transform: translateY(-2px) } 50% { transform: translateY(3px) } }

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

