/*
  Meridawn — Coming Soon
  Self-contained: no build step, no external requests (fonts are the three
  local files in assets/fonts/). Deploy by uploading this folder as-is.

  Visual language matches the main site's splash screen (see
  ../site/src/components/terminal/BootSequence.astro and ConnectionMark.astro)
  and the Home hero (../site/src/content/pages/home.mdx +
  ../site/src/components/MarketingPage.astro) — colours, type scale, and the
  hex/horizon/sun mark are all copied from there. If the brand tokens in
  ../site/src/styles/tokens.css ever change, mirror the values here too;
  this page intentionally has no shared build with the main site so nothing
  updates automatically.
*/

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  /* Copied from ../site/src/styles/tokens.css — keep in sync by hand. */
  --color-canvas: #0b0910;
  --color-text: #f3eff8;
  --color-text-secondary: #bdb4ca;
  --color-violet: #b49aff;

  --font-prose: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hero: "Cormorant Garamond", "Sora", "Inter", system-ui, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;

  --text-hero: clamp(2.25rem, 1.6rem + 2.6vw, 4rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-4) var(--space-2);
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: var(--font-prose);
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
}

.mark {
  width: 140px;
  margin-bottom: var(--space-1);
}

.mark svg {
  width: 100%;
  height: auto;
  overflow: visible;
  color: var(--color-text);
}

.mark .mark-hex {
  fill: none;
  stroke: currentColor;
  stroke-width: 26;
  transform-origin: 512px 512px;
  animation: mark-spin 12s linear infinite;
}

.mark .mark-horizon {
  fill: currentColor;
}

.mark .mark-sun,
.mark .mark-reflection {
  fill: none;
  stroke: currentColor;
  stroke-width: 26;
}

/* The sun rises once from fully hidden behind the horizon and stops partway
   up — "stuck rising", not fully risen — then holds there forever. The
   hexagon keeps turning around it. See mark-sun-rise-peek below for the
   exact cy values. */
.mark .mark-sun {
  cy: 674;
  animation: mark-sun-rise-peek 4s ease-out forwards;
}

.mark .mark-reflection {
  cy: 350;
  animation: mark-reflection-rise-peek 4s ease-out forwards;
}

@keyframes mark-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 674 -> 620: the sun's top edge crosses from sitting exactly on the
   horizon line (fully hidden) to 54px above it — a shallow visible arc,
   nowhere near the fully-risen cy:312 the real "connection established"
   animation settles at. */
@keyframes mark-sun-rise-peek {
  from {
    cy: 674;
  }
  to {
    cy: 620;
  }
}

/* Mirrors the sun exactly (reflection cy = 1024 - sun cy at every point). */
@keyframes mark-reflection-rise-peek {
  from {
    cy: 350;
  }
  to {
    cy: 404;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mark .mark-hex,
  .mark .mark-sun,
  .mark .mark-reflection {
    animation: none;
  }
  .mark .mark-sun {
    cy: 620;
  }
  .mark .mark-reflection {
    cy: 404;
  }
}

.wordmark {
  width: 240px;
  max-width: 70vw;
  height: auto;
  margin-bottom: var(--space-2);
}

.wm-letter {
  fill: var(--wm-color);
  opacity: 0;
  transform: translateY(6px);
  animation: wm-letter-in 1s ease forwards;
  animation-delay: calc(0.3s + var(--i) * 0.05s);
}

@keyframes wm-letter-in {
  0% {
    opacity: 0;
    transform: translateY(6px);
    fill: var(--wm-color);
  }
  25% {
    opacity: 1;
    transform: translateY(0);
  }
  60% {
    opacity: 1;
    transform: translateY(0);
    fill: var(--color-violet);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    fill: var(--color-text);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wm-letter {
    animation: none;
    opacity: 1;
    transform: none;
    fill: var(--color-text);
  }
}

h1 {
  font-family: var(--font-hero);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--color-text);
}

.lede {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 46ch;
}

.signature {
  margin: 0;
  color: var(--color-violet);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.status {
  margin: var(--space-2) 0 0;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status .status-dot {
  display: inline-block;
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status .status-dot {
    animation: none;
  }
}
