/* NeoMind — holding page
   Brand: navy #163055, teal #3BCDBF, off-white #EFEFEF
   Type: Montserrat (headings), Open Sans (body) — self-hosted, OFL licensed */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/montserrat-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/open-sans-latin-300-normal.woff2") format("woff2");
}

:root {
  --navy-950: #070f1f;
  --navy-900: #0d1f3a;
  --navy-850: #0f2342;
  --navy: #163055;
  --navy-600: #1f4170;
  --steel: #6386aa;
  --teal: #3bcdbf;
  --teal-soft: rgba(59, 205, 191, 0.14);
  --ink: #efefef;
  --ink-muted: rgba(239, 239, 239, 0.66);
  --ink-faint: rgba(239, 239, 239, 0.6);
  --line: rgba(239, 239, 239, 0.16);

  --font-head: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  background-color: var(--navy-900);
  background-image:
    /* faint teal horizon */
    radial-gradient(90% 45% at 50% 115%, rgba(59, 205, 191, 0.1) 0%, rgba(59, 205, 191, 0) 70%),
    /* "midnight": brand navy behind the logo, falling to near-black navy at the edges */
    radial-gradient(120% 90% at 50% 30%, var(--navy) 0%, var(--navy-850) 45%, var(--navy-950) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Faint circuit grid, fading out towards the edges */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(239, 239, 239, 0.16) 1px, transparent 1.6px),
    linear-gradient(rgba(239, 239, 239, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 239, 239, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 42%, #000 0%, transparent 100%);
  mask-image: radial-gradient(70% 60% at 50% 42%, #000 0%, transparent 100%);
}

/* Soft teal glow behind the logo */
body::after {
  content: "";
  position: fixed;
  left: 50%;
  top: 30%;
  width: min(820px, 120vw);
  aspect-ratio: 1.6;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(59, 205, 191, 0.13), rgba(59, 205, 191, 0) 100%);
  filter: blur(10px);
}

main,
footer {
  position: relative;
  z-index: 1;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(3rem, 8vh, 6rem) 16px 2rem;
}

/* ---------- Logo ---------- */

.logo {
  display: block;
  width: clamp(210px, 26vw, 320px);
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.logo .brain {
  fill: none;
  stroke: var(--ink);
  stroke-width: 8.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo .ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.1;
}

.logo .signal {
  fill: none;
  stroke: var(--teal);
  stroke-width: 8.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 0.07 1.2;
  stroke-dashoffset: 0.07;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(59, 205, 191, 0.75));
}

.logo .neo {
  fill: var(--teal);
}

.logo .mind {
  fill: var(--ink);
}

/* ---------- Text ---------- */

.tagline {
  margin: clamp(2rem, 5vh, 2.75rem) 0 0;
  font-family: var(--font-head);
  font-weight: 300;
  font-size: clamp(1.45rem, 0.9rem + 2.3vw, 2.35rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
}

/* ---------- Call to action ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: clamp(2rem, 5vh, 2.75rem);
  padding: 0.8em 1.6em;
  border: 1px solid rgba(59, 205, 191, 0.55);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(59, 205, 191, 0.06);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.cta svg {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  flex: none;
}

.cta:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--navy-900);
  box-shadow: 0 8px 28px -8px rgba(59, 205, 191, 0.6);
}

.cta:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

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

footer {
  padding: 0 16px clamp(1.5rem, 4vh, 2.5rem);
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

footer .rule {
  width: 56px;
  height: 1px;
  margin: 0 auto 1.1rem;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.7;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--ink-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .logo .brain {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 2.2s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
  }

  .logo .ring {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: pop 0.6s ease-out 2.2s forwards;
  }

  .logo .signal {
    animation: signal 7s linear 3.2s infinite;
  }

  .logo .word,
  .tagline,
  .cta,
  footer {
    opacity: 0;
    animation: rise 0.9s ease-out forwards;
  }

  .logo .word { animation-delay: 0.9s; }
  .tagline { animation-delay: 1.4s; }
  .cta { animation-delay: 1.7s; }
  footer { animation-delay: 2s; }
}

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

@keyframes pop {
  0% { opacity: 0; transform: scale(0.4); }
  70% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

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

/* A short teal pulse travels the line, then rests */
@keyframes signal {
  0% { stroke-dashoffset: 0.07; opacity: 0; }
  3% { opacity: 1; }
  38% { opacity: 1; }
  42% { stroke-dashoffset: -1; opacity: 0; }
  100% { stroke-dashoffset: -1; opacity: 0; }
}

/* ---------- Utilities ---------- */

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

@media (max-width: 480px) {
  .cta {
    font-size: 0.75rem;
  }
}
