/* EuraPort coming-soon page. Single dark theme, locked (Section 4.11). */

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0d12;
  --bg-elevated: #10151c;
  --text: #eef2f5;
  --text-muted: #8d97a3;
  --border: rgba(255, 255, 255, 0.09);
  --accent: #4fa3d1;
  --radius-interactive: 6px;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

/* Fixed grain texture, isolated from scrolling containers (Section 6.E) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.035) 1px, transparent 0);
  background-size: 28px 28px;
}

.topbar,
.hero,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- Topbar ---------- */

.topbar {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  color: var(--text);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

/* ---------- Hero ---------- */

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: calc(100dvh - 72px);
  display: flex;
  align-items: center;
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  padding: 48px 0 64px;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw + 1rem, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 24ch;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 46ch;
  margin: 0;
}

/* ---------- Hero visual ---------- */

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

#route-graphic {
  width: 100%;
  height: auto;
  max-width: 480px;
}

.routes .route {
  stroke: var(--accent);
  stroke-width: 1.4;
  opacity: 0.45;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw-route 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.routes .route:nth-child(2) { animation-delay: 0.12s; }
.routes .route:nth-child(3) { animation-delay: 0.24s; }
.routes .route:nth-child(4) { animation-delay: 0.36s; }
.routes .route:nth-child(5) { animation-delay: 0.48s; }

.nodes .node {
  fill: var(--text-muted);
  opacity: 0;
  animation: fade-in 0.6s ease forwards;
  animation-delay: 1.4s;
}

.node-live {
  animation: fade-in 0.6s ease forwards, pulse-live 2.6s ease-in-out infinite;
  animation-delay: 1.4s, 2s;
}

@keyframes draw-route {
  to { stroke-dashoffset: 0; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes pulse-live {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .routes .route,
  .nodes .node,
  .node-live {
    animation: none !important;
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 32px 0 48px;
  }

  .hero-visual {
    order: -1;
  }

  #route-graphic {
    max-width: 320px;
  }

  .hero-copy h1 {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 0 16px;
  }

  .hero {
    padding: 0 16px;
  }

  .site-footer {
    padding: 20px 16px 28px;
  }
}
