:root {
  --navy: #0C2244;
  --navy-deep: #071831;
  --line-strong: rgba(122, 168, 255, 0.16);
  --line-faint: rgba(122, 168, 255, 0.07);
  --ink: #F5F9FF;
  --ink-soft: #B9CDF0;
  --anno: #8FB4FF;
  --orange: #FF8A2A;
  --orange-hover: #FFA14E;
  --on-orange: #3A1D00;
  --grid-minor: 24px;
  --grid-major: 96px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--navy);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
  text-align: center;
}

/* ---------- Blueprint background ---------- */

.blueprint {
  position: fixed;
  inset: -80px;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.bp-layer { position: absolute; inset: 0; }

.bp-minor-h {
  background-image: linear-gradient(var(--line-faint) 1px, transparent 1px);
  background-size: var(--grid-minor) var(--grid-minor);
  transform-origin: top;
  animation: drawY 1.4s cubic-bezier(.4, 0, .2, 1) both;
}
.bp-minor-v {
  background-image: linear-gradient(90deg, var(--line-faint) 1px, transparent 1px);
  background-size: var(--grid-minor) var(--grid-minor);
  transform-origin: left;
  animation: drawX 1.4s cubic-bezier(.4, 0, .2, 1) both;
}
.bp-major-h {
  background-image: linear-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: var(--grid-major) var(--grid-major);
  transform-origin: top;
  animation: drawY 1.8s cubic-bezier(.4, 0, .2, 1) both;
}
.bp-major-v {
  background-image: linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
  background-size: var(--grid-major) var(--grid-major);
  transform-origin: left;
  animation: drawX 1.8s cubic-bezier(.4, 0, .2, 1) both;
}

.bp-vignette {
  background: radial-gradient(ellipse at center, transparent 55%, var(--navy-deep) 130%);
}

@keyframes drawX { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes drawY { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

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

.hero {
  position: relative;
  z-index: 1;
  padding: 3rem 1.5rem 2rem;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rise {
  animation: rise .7s cubic-bezier(.2, .7, .3, 1) both;
  animation-delay: var(--d, 0s);
}

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

.mark { position: relative; margin-bottom: .25rem; cursor: pointer; }

.mark .filament {
  animation: flicker 4s ease-in-out 2s infinite;
  transition: filter .4s ease;
}

.bulb-glow {
  opacity: 0;
  filter: blur(7px);
  transition: opacity .5s ease;
}

/* Power-on: hover with a mouse, or .lit toggled by tap on touch devices */
.mark:hover .bulb-glow,
.mark.lit .bulb-glow { opacity: .55; }

.mark:hover .filament,
.mark.lit .filament {
  animation: none;
  filter: drop-shadow(0 0 4px rgba(255, 138, 42, .9));
}

@keyframes flicker {
  0%, 88%, 94%, 100% { opacity: 1; }
  91% { opacity: .35; }
}

.svg-anno {
  font-family: 'Caveat', cursive;
  font-size: 13px;
  fill: var(--anno);
}

.anno {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: var(--anno);
  white-space: nowrap;
}

.anno-mark {
  position: absolute;
  left: -7.5rem;
  top: 30%;
}

.anno-mark::after {
  content: '';
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--anno);
  opacity: .5;
  vertical-align: middle;
  margin-left: 8px;
}

.wordmark {
  font-size: clamp(2.6rem, 8vw, 4.25rem);
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.05;
  color: var(--ink);
  display: inline-block;
}

/* Orange "drafting baseline" — brand accent without the two-tone wordmark */
.wordmark::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin: .6rem auto 0;
  background: var(--orange);
  border-radius: 3px;
}

.fig {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  color: var(--anno);
  margin-top: .5rem;
}

.tagline {
  font-size: clamp(1.35rem, 3.4vw, 1.8rem);
  font-weight: 500;
  margin-top: 2rem;
}

.tagline .accent { color: var(--orange); }

.tease {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-top: .85rem;
}

/* ---------- Rotating tease line ---------- */

.rotator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: .5rem;
  font-size: 1rem;
  color: var(--ink-soft);
  min-height: 1.5em;
}

.rotator-tick {
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--anno);
  transform: rotate(45deg);
  flex: none;
}

.rotator-word {
  color: var(--orange);
  font-weight: 500;
  transition: opacity .35s ease, transform .35s ease;
}

.rotator-word.swap { opacity: 0; transform: translateY(4px); }

/* ---------- Signup ---------- */

.signup { position: relative; margin-top: 2.25rem; width: 100%; max-width: 420px; }

#waitlist { display: flex; gap: 10px; }

#email {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: rgba(12, 34, 68, 0.6);
  border: 1px solid rgba(143, 180, 255, 0.4);
  border-radius: 999px;
  padding: .8rem 1.25rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

#email::placeholder { color: rgba(185, 205, 240, 0.55); }

#email:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 138, 42, 0.18);
}

#waitlist button {
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  color: var(--on-orange);
  background: var(--orange);
  border: none;
  border-radius: 999px;
  padding: .8rem 1.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .15s;
}

#waitlist button:hover { background: var(--orange-hover); }
#waitlist button:active { transform: scale(.97); }

.form-hint {
  font-size: .85rem;
  color: var(--orange-hover);
  margin-top: .6rem;
  min-height: 1.2em;
}

.success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--ink);
  padding: .8rem 0;
}

.success[hidden] { display: none; }

.anno-form {
  position: absolute;
  right: -8.5rem;
  top: .35rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Socials & footer ---------- */

.socials {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.75rem;
}

.socials a {
  color: var(--ink-soft);
  opacity: .75;
  transition: color .2s, opacity .2s, transform .2s;
}

.socials a:hover {
  color: var(--orange);
  opacity: 1;
  transform: translateY(-2px);
}

footer {
  position: relative;
  z-index: 1;
  font-size: .8rem;
  color: rgba(185, 205, 240, 0.5);
  padding: 1.25rem 0 1.75rem;
}

/* ---------- Responsive & motion ---------- */

@media (max-width: 860px) {
  .anno-mark, .anno-form { display: none; }
}

@media (max-width: 480px) {
  #waitlist { flex-direction: column; }
  #waitlist button { padding: .85rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bp-layer, .rise, .mark .filament { animation: none !important; }
  .blueprint { transform: none !important; }
  .rotator-word { transition: none !important; }
}
