/* =========================================================
   Termenia — Shared Design System
   Used by index.html and impressum.html.
   Direction: quiet / precise / anticipatory — a dark utility
   surface, not a decorated one. One accent, used sparingly.
   ========================================================= */

:root {
  /* --- primitives --- */
  --violet-95: oklch(12% 0.02 288);
  --violet-90: oklch(15% 0.025 288);
  --violet-80: oklch(19% 0.03 288);
  --violet-40: oklch(62% 0.17 288);
  --violet-30: oklch(72% 0.14 288);
  --violet-20: oklch(82% 0.09 288);

  /* --- semantic tokens --- */
  --bg: var(--violet-95);
  --surface: rgb(255 255 255 / 0.045);
  --surface-2: rgb(255 255 255 / 0.075);
  --border: rgb(255 255 255 / 0.09);
  --border-strong: rgb(255 255 255 / 0.16);

  --text: rgb(255 255 255 / 0.92);
  --text-muted: rgb(255 255 255 / 0.60);
  --text-faint: rgb(255 255 255 / 0.38);

  --accent: var(--violet-40);
  --accent-hover: var(--violet-30);
  --accent-soft: rgb(150 130 255 / 0.14);
  --on-accent: #100c22;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.25), 0 12px 28px rgb(0 0 0 / 0.35);

  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --fast: 140ms;
  --base: 220ms;

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --content-width: 1080px;
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}

p {
  max-width: 65ch;
  text-wrap: pretty;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--violet-20);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}
html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- atmosphere: one quiet vignette + a faint static dot grid --- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(900px 560px at 50% -10%, rgb(129 108 255 / 0.14), transparent 60%),
    var(--bg);
}

.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / 0.10) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(70% 55% at 50% 0%, black, transparent);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- layout shells --- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.inner {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 24px;
}

/* --- header / nav --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgb(15 12 28 / 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}

.brand-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 2px;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding-inline: 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.main-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.main-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-soft);
}

/* --- buttons --- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding-inline: 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--fast) var(--ease), background-color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- cards / glass --- */

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

/* --- footer --- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-block: 32px;
}

.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.copyright {
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* --- reveal-on-load choreography --- */

.reveal > * {
  animation: rise 0.6s var(--ease) both;
}
.reveal > *:nth-child(2) { animation-delay: 70ms; }
.reveal > *:nth-child(3) { animation-delay: 140ms; }
.reveal > *:nth-child(4) { animation-delay: 210ms; }

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

/* --- launch countdown (index) --- */

.launch-section {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(48px, 10vw, 96px);
}

.launch-card {
  max-width: 560px;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 48px);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-20);
  margin-bottom: 18px;
}

.launch-title {
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.launch-sub {
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.countdown {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: 24px;
  margin-bottom: 28px;
}

.countdown-unit {
  flex: 1;
  padding-inline: 8px;
  border-left: 1px solid var(--border);
}

.countdown-unit:first-child {
  border-left: none;
}

.countdown-value {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
  font-weight: 500;
  color: var(--text);
}

.countdown-label {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.launch-contact {
  font-size: 0.88rem;
  color: var(--text-faint);
}

.launch-contact a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}

.launch-contact a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* --- legal page (impressum) --- */

.legal-section {
  padding-block: clamp(40px, 8vw, 80px) clamp(56px, 10vw, 96px);
}

.legal-inner {
  max-width: 760px;
}

.legal-title {
  font-size: clamp(2.1rem, 1.7rem + 1.6vw, 3rem);
  margin-bottom: 28px;
}

.legal-card {
  padding: clamp(24px, 5vw, 40px);
}

.legal-card h2 {
  font-size: 1.15rem;
  margin-top: 32px;
  margin-bottom: 10px;
  color: var(--text);
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p {
  max-width: none;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-placeholder {
  font-style: italic;
  color: var(--text-faint);
}

.legal-link {
  color: var(--violet-20);
  font-weight: 600;
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}

/* --- responsive --- */

@media (max-width: 640px) {
  .main-nav a {
    padding-inline: 12px;
    font-size: 0.86rem;
  }
  .inner {
    padding-inline: 16px;
  }
  .countdown-label {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }
}
