:root {
  --blue: #0b3c8c;
  --off-white: #fafaf9;
  --light-blue: #3f7be0;
  --pale-blue: #a9bde6;
  --muted-on-blue: #c9d6f2;
  --sans: 'Archivo', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 64px);
  --ease-rise: cubic-bezier(.2, .7, .1, 1);
}

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

body {
  margin: 0;
  background: var(--off-white);
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--off-white);
  font-family: var(--sans);
  color: var(--blue);
}

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

[hidden] { display: none !important; }

/* Pulsing status dot (header + success message) */
.dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--light-blue);
  animation: k-pulse 2s ease-out infinite;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 24px var(--gutter);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: k-fade 1s ease .1s both;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--blue);
  padding: 7px 12px;
}

.site-header .contact {
  color: var(--blue);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 56px 20px 72px;
  text-align: center;
}

.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(11, 60, 140, .16) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 20%, transparent 75%);
  pointer-events: none;
  animation: k-fade 2s ease .2s both;
}

.lockup {
  position: relative;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: clamp(44px, 9vw, 112px);
  font-weight: inherit;
}

.mark {
  width: 1.36em;
  height: 1.36em;
  flex-shrink: 0;
  animation: k-pop 1.1s cubic-bezier(.2, .8, .2, 1) .05s both;
}

.wordmark {
  font-weight: 600;
  font-size: 1em;
  line-height: 1;
  color: var(--blue);
  display: flex;
  gap: 0.35em;
}

.letter {
  display: inline-block;
  animation: k-rise .9s var(--ease-rise) both;
}
.letter:nth-child(1) { animation-delay: .25s; }
.letter:nth-child(2) { animation-delay: .33s; }
.letter:nth-child(3) { animation-delay: .41s; }
.letter:nth-child(4) { animation-delay: .49s; }

.letter-m { position: relative; }

/* Light-blue copy of the M, shown only below the moving wave */
.m-fill {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--light-blue);
  -webkit-clip-path: url(#m-wave);
  clip-path: url(#m-wave);
}

.tag {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: k-rise .9s var(--ease-rise) .8s both;
}

.tag .rule {
  width: 40px;
  height: 1px;
  background: var(--blue);
}

/* ---------- Wave band ---------- */
.wave-band {
  line-height: 0;
  margin-bottom: -1px;
}

.wave-band svg {
  display: block;
  width: 100%;
  height: clamp(90px, 15vw, 220px);
}

/* ---------- Blue section ---------- */
.blue {
  background: var(--blue);
  color: var(--off-white);
  padding: 16px var(--gutter) 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.signup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 560px;
}

.signup-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}

.signup-form {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  border: 1px solid var(--light-blue);
  padding: 4px;
  background: rgba(250, 250, 249, .04);
  transition: border-color .2s;
}
.signup-form:focus-within { border-color: var(--off-white); }

.signup-form input {
  flex: 1 1 220px;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--off-white);
  font-family: var(--sans);
  font-size: 16px;
  outline: none;
}
.signup-form input::placeholder { color: var(--pale-blue); }

.signup-form button {
  flex: 0 0 auto;
  height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 0;
  background: var(--off-white);
  color: var(--blue);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .25s, color .25s, gap .25s;
}
.signup-form button:hover:not(:disabled),
.signup-form button:focus-visible {
  background: var(--light-blue);
  color: var(--off-white);
  gap: 16px;
}
.signup-form button:focus-visible { outline: 1px solid var(--off-white); outline-offset: 2px; }
.signup-form button:disabled { cursor: progress; opacity: .75; }

/* Narrow screens: button drops below the input at full width */
@media (max-width: 480px) {
  .signup-form button { flex: 1 1 100%; }
}

.signup-error {
  margin: 0;
  font-size: 13px;
  color: var(--off-white);
}

.signup-success {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  animation: k-rise .6s var(--ease-rise) both;
}

/* ---------- Ticker ---------- */
.ticker {
  /* Bleed past the section's side padding to the viewport edges */
  width: calc(100% + 2 * var(--gutter));
  overflow: hidden;
  border-top: 1px solid rgba(250, 250, 249, .18);
  border-bottom: 1px solid rgba(250, 250, 249, .18);
  padding: 14px 0;
}

.ticker-track {
  display: flex;
  width: max-content;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-on-blue);
  animation: k-scroll 40s linear infinite;
}

/* Spacing lives inside each item (not as flex gap) so the -50% loop lands exactly on an item boundary */
.ticker-item {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-right: 48px;
  white-space: nowrap;
}

.ticker-sep { color: var(--light-blue); }

/* ---------- Footer ---------- */
.site-footer {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--muted-on-blue);
}

.site-footer .contact {
  color: var(--off-white);
}

/* ---------- Keyframes ---------- */
@keyframes k-rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes k-pop {
  0%   { opacity: 0; transform: scale(.6) rotate(-25deg); }
  70%  { transform: scale(1.04) rotate(2deg); }
  100% { opacity: 1; transform: none; }
}

@keyframes k-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes k-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(63, 123, 224, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(63, 123, 224, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 123, 224, 0); }
}

@keyframes k-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* CSS animations jump to their end state; SVG (SMIL) animations are paused in site.js */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
}
