/* PlaneCFD — coming soon. Self-contained: no external fonts, scripts or images. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/jetbrains-latin.woff2") format("woff2");
}

:root {
  --bg: #040b16;            /* sampled from the poster's sky */
  --fg: #eaf2ff;
  --muted: #9fb3d1;
  --faint: rgba(159, 179, 209, 0.62);
  --blue: #2f8bf0;          /* the "CFD" in the logo */
  --line: rgba(47, 139, 240, 0.18);
  --green: #3be37a;
  /* Jet-style colormap, as on the poster's streamlines and legends */
  --colormap: linear-gradient(90deg, #1b2fd8 0%, #1d8cff 22%, #19d3c5 40%, #49e05a 55%, #f4e23a 70%, #ff8a1f 85%, #e8242a 100%);
  --gutter: clamp(16px, 4.5vw, 64px);
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: "Space Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p, h1, ol, figure { margin: 0; }

::selection { background: var(--blue); color: var(--bg); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Page frame: a soft glow behind the poster ---------------------------- */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  isolation: isolate;
  padding: max(env(safe-area-inset-top), 0px) max(env(safe-area-inset-right), 0px)
           max(env(safe-area-inset-bottom), 0px) max(env(safe-area-inset-left), 0px);
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 50% 35%, rgba(22, 74, 150, 0.45) 0%, rgba(22, 74, 150, 0) 70%),
    radial-gradient(ellipse 50% 40% at 85% 100%, rgba(10, 42, 92, 0.5) 0%, rgba(10, 42, 92, 0) 70%);
  pointer-events: none;
}

/* --- Top bar ---------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px) var(--gutter) 0;
}

.wordmark {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--blue); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid rgba(47, 139, 240, 0.3);
  border-radius: 999px;
  background: rgba(10, 42, 92, 0.35);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(59, 227, 122, 0.55);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(59, 227, 122, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(59, 227, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 227, 122, 0); }
}

/* --- Main: poster on top, intro underneath ---------------------------------- */
.main {
  display: grid;
  align-content: center;
  gap: clamp(28px, 4vw, 48px);
  width: 100%;
  max-width: calc(1240px + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(20px, 3.5vh, 40px) var(--gutter) clamp(32px, 5vh, 56px);
}

/* Sized so the poster and the headline share a laptop screen. */
.poster {
  justify-self: center;
  width: min(100%, max(560px, calc((100svh - 400px) * 1.777)));
  border-radius: clamp(10px, 1.4vw, 18px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow:
    0 30px 80px -20px rgba(20, 90, 220, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.4);
}

.poster img {
  display: block;
  width: 100%;
  height: auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(20px, 5vw, 72px);
  width: 100%;
  max-width: 1120px;
  justify-self: center;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.soon {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-shadow: 0 0 32px rgba(47, 139, 240, 0.45);
}

.lede {
  max-width: 46ch;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  color: var(--muted);
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}
.pipeline span {
  margin-right: 8px;
  color: var(--faint);
}

.colormap {
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--colormap);
  opacity: 0.9;
}

/* --- Status bar (solver-style footer) --------------------------------------- */
.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding: 14px var(--gutter) clamp(16px, 2.5vw, 24px);
  border-top: 1px solid rgba(47, 139, 240, 0.14);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.readout { white-space: nowrap; }
.k {
  margin: 0 6px 0 14px;
  font-weight: 600;
  color: var(--blue);
}
.k:first-child { margin-left: 0; }

/* --- Narrow screens: single column, centred --------------------------------- */
@media (max-width: 859px) {
  .poster { width: 100%; }
  .intro {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
  .lede { margin: 0 auto; }
  .pipeline { justify-content: center; gap: 8px 20px; }
  .statusbar { justify-content: center; text-align: center; }
  .readout { order: -1; width: 100%; }
}

@media (max-width: 380px) {
  .status { padding: 6px 10px; letter-spacing: 0.04em; }
}

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