/* apogy.de — dark orbital landing page */
:root {
  --bg: #070912;
  --bg-2: #0d1130;
  --text: #e7e9ff;
  --muted: #8a8fb8;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(139, 92, 246, .16), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- star field ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.stars { position: absolute; inset: 0; background-repeat: repeat; }
.s1 {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 140px 90px, #cfd3ff, transparent),
    radial-gradient(1px 1px at 90px 160px, #fff, transparent),
    radial-gradient(1px 1px at 230px 210px, #b9f3ff, transparent),
    radial-gradient(1px 1px at 270px 60px, #fff, transparent);
  background-size: 300px 260px;
  opacity: .55;
}
.s2 {
  background-image:
    radial-gradient(1.5px 1.5px at 60px 120px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 330px 40px, #d9dcff, transparent),
    radial-gradient(1.5px 1.5px at 410px 300px, #fff, transparent);
  background-size: 480px 380px;
  animation: twinkle 6s ease-in-out infinite alternate;
}
.s3 {
  background-image:
    radial-gradient(2px 2px at 150px 250px, #b9f3ff, transparent),
    radial-gradient(2px 2px at 520px 120px, #fff, transparent);
  background-size: 700px 520px;
  animation: twinkle 9s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle { from { opacity: .25; } to { opacity: .9; } }

/* ---------- page + scene ---------- */
.page {
  /* Scene width: cover the screen on landscape; on portrait zoom in until the
     word fills ~88% of the width (the word's centre sits at 52.8% of the scene). */
  --w: max(100vw, min(177.8svh, 235vw));
  /* First screen: full height, but on portrait no taller than the scene's top part plus some sky. */
  --hero-h: min(100svh, calc(var(--w) * .5625 + 22svh));
  position: relative;
  z-index: 1;
  overflow: hidden;
  overflow: clip;
  display: flex;
  flex-direction: column;
  /* long enough that all of Earth scrolls into view */
  min-height: calc(var(--hero-h) + var(--w) * .625);
}

.scene {
  position: absolute;
  z-index: 0;
  /* scene y = 900 sits at the bottom of the first screen */
  top: calc(var(--hero-h) - var(--w) * .5625);
  left: calc(50% - var(--w) * .528);
  width: var(--w);
  height: auto;
  pointer-events: none;
  animation: fade-in 1.2s ease both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* the o lands at 3s, then the apogee starts to glow */
.halo { transform-box: fill-box; transform-origin: center; animation: halo-in 1.2s ease-out 2.8s both, halo-pulse 4s ease-in-out 4s infinite; }
@keyframes halo-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes halo-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
/* the moving o (orbit.js) replaces the static one when scripts run */
.o-dyn { display: none; }
.js-orbit .o-dyn { display: inline; }
.js-orbit .o-static { display: none; }

.hero {
  position: relative;
  z-index: 1;
  height: var(--hero-h);
  flex: none;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  display: grid;
  place-items: center;
  color: var(--text);
  opacity: .7;
  border-radius: 50%;
  animation: cue-in .8s ease 3.2s both, bob 2.4s ease-in-out 4s infinite;
}
.scroll-cue svg { width: 26px; height: 26px; }
.scroll-cue:hover, .scroll-cue:focus-visible { opacity: 1; }
.scroll-cue:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@keyframes cue-in { from { opacity: 0; } to { opacity: .7; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- below the fold: text beside Earth ---------- */
.more {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 16px 48px;
}
@media (min-width: 900px) {
  /* Earth fills the left half here, so the text moves right */
  .more { justify-content: flex-start; padding-left: 54%; padding-right: 32px; }
}

.card {
  max-width: 34rem;
  padding: 28px 28px 30px;
  border-radius: 20px;
  background: rgba(7, 9, 18, .5);
  border: 1px solid rgba(231, 233, 255, .08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.tagline {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .01em;
  background: linear-gradient(90deg, var(--text), #b9c0ff 60%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.definition {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: .85rem;
  line-height: 1.6;
  color: var(--muted);
}
.definition span { color: var(--text); }

.footer {
  position: relative;
  z-index: 1;
  padding: 24px 16px 28px;
  text-align: center;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .08em;
}
.footer a { color: var(--muted); text-underline-offset: 3px; }
.footer a:hover, .footer a:focus-visible { color: var(--text); }

/* ---------- Impressum ---------- */
.legal {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin: 0 auto;
  padding: 56px 16px 32px;
  line-height: 1.65;
}
.legal .back { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-decoration: none; }
.legal .back:hover, .legal .back:focus-visible { color: var(--text); }
.legal h1 { margin: 28px 0 8px; font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 600; letter-spacing: -.01em; }
.legal h2 { margin: 36px 0 8px; font-size: 1.1rem; font-weight: 600; color: var(--text); }
.legal p, .legal address { margin: 0 0 12px; color: #c3c7e8; font-style: normal; }
.legal a { color: var(--cyan); text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  html { scroll-behavior: auto; }
}
