:root {
  --bg: #0a0a0a;
  --fg: #f5f5f0;
  --fg-dim: #8a8a80;
  --accent: #baff29;
  --accent-glow: rgba(186, 255, 41, 0.4);
  --border: rgba(245, 245, 240, 0.1);

  --font-display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 48px;
}

@media (max-width: 768px) {
  :root { --gutter: 24px; }
}

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

html, body { height: 100%; }

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===========================
   WIREFRAME UGV — background illustration
   =========================== */
.ugv {
  position: fixed;
  top: 50%;
  left: 50%;
  width: clamp(560px, 78vw, 1180px);
  aspect-ratio: 5 / 3;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  color: var(--fg);
  opacity: 0.42;
  animation: ugv-glitch 8.5s infinite;
  will-change: filter, transform, opacity;
}
.ugv canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes ugv-glitch {
  0%, 7%, 13%, 50%, 53%, 100% {
    transform: translate(-50%, -50%);
    filter: none;
    opacity: 0.42;
  }
  8% {
    transform: translate(calc(-50% + 6px), -50%);
    filter:
      drop-shadow(-5px 0 0 rgba(186, 255, 41, 0.55))
      drop-shadow(5px 0 0 rgba(255, 80, 120, 0.4));
    opacity: 0.7;
  }
  10% {
    transform: translate(calc(-50% - 4px), calc(-50% + 1px));
    filter:
      drop-shadow(-3px 0 0 rgba(186, 255, 41, 0.5))
      drop-shadow(3px 0 0 rgba(255, 80, 120, 0.35));
    opacity: 0.78;
  }
  12% {
    transform: translate(calc(-50% + 2px), -50%);
    filter: drop-shadow(-1px 0 0 rgba(186, 255, 41, 0.3));
    opacity: 0.55;
  }
  51% {
    transform: translate(calc(-50% - 2px), -50%);
    filter: drop-shadow(2px 0 0 rgba(186, 255, 41, 0.4));
    opacity: 0.55;
  }
}

/* ===========================
   GRAIN OVERLAY — film texture
   =========================== */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  animation: grain-shimmer 0.55s steps(6) infinite;
}

@keyframes grain-shimmer {
  0%   { background-position: 0 0; }
  16%  { background-position: 50px -30px; }
  32%  { background-position: -40px 70px; }
  48%  { background-position: 100px 50px; }
  64%  { background-position: -30px -80px; }
  80%  { background-position: 80px 20px; }
  100% { background-position: 0 0; }
}

/* ===========================
   TOP / BOTTOM BARS
   =========================== */
.top,
.bot {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--gutter);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg-dim);
}

.brand {
  display: inline-flex;
  color: var(--fg);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.brand:hover { opacity: 0.7; }
.brand__logo {
  height: 28px;
  width: auto;
  fill: currentColor;
  display: block;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.85); }
}

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 32px var(--gutter);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.prop {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 10vw, 144px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--fg);
  margin-bottom: 72px;
  font-variation-settings: "opsz" 96, "wght" 800;
}

.prop__line {
  display: block;
}

.prop__word {
  display: inline-block;
  white-space: nowrap;
  margin-right: 0.22em;
}
.prop__line .prop__word:last-child { margin-right: 0; }

.prop__dot {
  color: inherit;
}

/* ===========================
   EMAIL FORM
   =========================== */
.notify {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.notify:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(186, 255, 41, 0.15);
}

.notify__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  padding: 14px 18px;
  caret-color: var(--accent);
  text-align: left;
}
.notify__input::placeholder { color: var(--fg-dim); }
.notify__input.is-invalid {
  color: var(--accent);
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}

.notify__btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, color 0.2s ease, gap 0.2s ease;
  white-space: nowrap;
}
.notify__btn:hover { background: var(--fg); gap: 12px; }
.notify__btn:disabled { cursor: default; }
.notify__btn.is-sent {
  background: transparent;
  color: var(--accent);
  border-left: 1px solid var(--border);
}

.notify__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.notify__btn:hover .notify__arrow { transform: translateX(2px); }

/* ===========================
   LOAD ANIMATIONS
   =========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.top    { animation: fadeIn 0.7s ease both 0.15s; }
.bot    { animation: fadeIn 0.7s ease both 0.25s; }
.prop__word { animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.prop__word:nth-child(1) { animation-delay: 0.30s; }
.prop__word:nth-child(2) { animation-delay: 0.45s; }
.prop__word:nth-child(3) { animation-delay: 0.60s; }
.prop__word:nth-child(4) { animation-delay: 0.75s; }
.notify { animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both 1.0s; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 520px) {
  .notify {
    flex-direction: column;
    align-items: stretch;
  }
  .notify__btn {
    justify-content: center;
    padding: 13px 18px;
  }
  .notify__btn.is-sent {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .dot { animation: none; }
  .ugv { animation: none; }
  .grain { animation: none; }
}
