/* iTE — Coming Soon Landing Page */
/* Terminal-native aesthetic. Quiet. Compact. Editorial. */

/* ===== Design Tokens ===== */
:root {
  --bg-canvas: #131315;
  --bg-surface: #181a1d;
  --bg-surface-elevated: #202226;
  --bg-surface-higher: #232327;
  --bg-terminal: #0e0e10;
  --text-primary: #edf1f7;
  --text-secondary: #d7deea;
  --text-muted: #8c93a1;
  --text-subtle: #6b7280;
  --accent: #4edea3;
  --accent-hover: #6ae7b5;
  --accent-subtle: rgba(78, 222, 163, 0.12);
  --info: #b7c8e1;
  --warning: #ffb95f;
  --border: #303236;
  --border-subtle: #232327;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Monaco, monospace;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-display: 'Oxanium', 'Manrope', system-ui, sans-serif;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 500ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-canvas);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  --pointer-x: 0px;
  --pointer-y: 0px;
}

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

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-surface-higher);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 56px;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  background: rgba(19, 19, 21, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding: var(--space-1) var(--space-3);
  background: var(--accent-subtle);
  border-radius: 4px;
  border: 1px solid rgba(78, 222, 163, 0.2);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(56px + var(--space-12)) var(--space-6) var(--space-12);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-orb {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(78, 222, 163, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.ambient-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-field > * {
  position: absolute;
  transform:
    translate3d(
      calc(var(--pointer-x) * var(--depth, 0.12)),
      calc(var(--pointer-y) * var(--depth, 0.12)),
      0
    )
    rotate(var(--ambient-rotate, 0deg));
  will-change: transform, opacity;
}

.ambient-grid {
  width: 280px;
  height: 280px;
  border: 1px solid rgba(78, 222, 163, 0.08);
  background-image:
    linear-gradient(rgba(78, 222, 163, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 222, 163, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 34%, transparent 82%);
  opacity: 0.55;
  animation: ambient-float 14s ease-in-out infinite;
}

.ambient-grid-left {
  --depth: 0.18;
  --ambient-rotate: -12deg;
  top: 17%;
  left: 5%;
}

.ambient-grid-right {
  --depth: 0.28;
  --ambient-rotate: 14deg;
  right: 2%;
  bottom: 16%;
  animation-delay: -5s;
}

.ambient-ring {
  border-radius: 999px;
  border: 1px solid rgba(183, 200, 225, 0.12);
  box-shadow: 0 0 0 1px rgba(78, 222, 163, 0.05) inset;
  animation: ambient-float 18s ease-in-out infinite;
}

.ambient-ring-one {
  --depth: 0.1;
  width: 420px;
  height: 420px;
  right: 10%;
  top: 10%;
}

.ambient-ring-two {
  --depth: 0.16;
  width: 240px;
  height: 240px;
  left: 11%;
  bottom: 11%;
  animation-delay: -7s;
}

.ambient-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.72rem 0.95rem;
  border: 1px solid rgba(48, 50, 54, 0.9);
  border-radius: 999px;
  background: rgba(24, 26, 29, 0.72);
  backdrop-filter: blur(18px);
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(78, 222, 163, 0.04) inset;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation:
    fade-in 0.6s var(--ease-out) forwards,
    ambient-float 12s ease-in-out infinite;
}

.chip-label {
  color: var(--text-subtle);
}

.chip-value {
  color: var(--accent);
}

.ambient-chip-one {
  --depth: 0.24;
  top: 22%;
  right: 15%;
  animation-delay: 0.25s, -2s;
}

.ambient-chip-two {
  --depth: 0.2;
  left: 14%;
  top: 58%;
  animation-delay: 0.35s, -5s;
}

.ambient-chip-three {
  --depth: 0.14;
  right: 20%;
  bottom: 22%;
  animation-delay: 0.45s, -8s;
}

.ambient-comet {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(78, 222, 163, 0), rgba(78, 222, 163, 0.9), rgba(183, 200, 225, 0));
  filter: drop-shadow(0 0 16px rgba(78, 222, 163, 0.25));
  animation: comet-drift 9s linear infinite;
  opacity: 0.5;
}

.ambient-comet::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  background: rgba(183, 200, 225, 0.85);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 20px rgba(183, 200, 225, 0.3);
}

.ambient-comet-one {
  --depth: 0.22;
  --ambient-rotate: -18deg;
  top: 32%;
  left: 12%;
  width: 180px;
}

.ambient-comet-two {
  --depth: 0.3;
  --ambient-rotate: 16deg;
  width: 130px;
  right: 14%;
  bottom: 28%;
  animation-delay: -4s;
}

.ambient-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(78, 222, 163, 0.55);
  box-shadow:
    0 0 0 0 rgba(78, 222, 163, 0.22),
    0 0 24px rgba(78, 222, 163, 0.18);
  animation: ambient-pulse 4.5s ease-out infinite;
}

.ambient-pulse-one {
  --depth: 0.12;
  top: 24%;
  left: 24%;
}

.ambient-pulse-two {
  --depth: 0.18;
  right: 24%;
  top: 60%;
  animation-delay: -2s;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 640px;
}

.ascii-container {
  margin-bottom: var(--space-8);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in-up var(--duration-slow) var(--ease-out) forwards;
}

.ascii-art {
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.4vw, 12px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-muted);
  white-space: pre;
  letter-spacing: -0.02em;
}

.hero-text {
  margin-bottom: var(--space-8);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  text-wrap: balance;
}

.hero-line {
  display: block;
  opacity: 0;
  transform: translateY(16px);
  animation: fade-in-up var(--duration-slow) var(--ease-out) forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.2s; }

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fade-in var(--duration-slow) var(--ease-out) 0.35s forwards;
}

.waitlist-form {
  width: 100%;
  max-width: 420px;
  margin-bottom: var(--space-10);
}

.input-wrapper {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-1);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.input-wrapper:focus-within {
  border-color: var(--border);
}

.waitlist-input {
  flex: 1;
  height: 44px;
  padding: 0 var(--space-4);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
}

.waitlist-input::placeholder {
  color: var(--text-subtle);
}

.waitlist-input:focus-visible {
  outline: none;
}

.waitlist-input:-webkit-autofill,
.waitlist-input:-webkit-autofill:hover,
.waitlist-input:-webkit-autofill:focus,
.waitlist-input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-surface) inset;
  box-shadow: 0 0 0 1000px var(--bg-surface) inset;
  transition: background-color 9999s ease-out 0s;
  caret-color: var(--text-primary);
}

.btn {
  height: 44px;
  padding: 0 var(--space-5);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-terminal);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(14, 14, 16, 0.3);
  border-top-color: var(--bg-terminal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.btn.loading .btn-text {
  display: none;
}

.btn.loading .btn-loader {
  display: block;
}

.form-status {
  display: block;
  margin-top: var(--space-3);
  font-size: 13px;
  min-height: 20px;
  color: var(--text-muted);
}

.form-status.success {
  color: var(--accent);
}

.form-status.error {
  color: #f1a4a4;
}

.bot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0;
  animation: fade-in var(--duration-slow) var(--ease-out) 0.5s forwards;
}

.status-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.status-pulse {
  width: 6px;
  height: 6px;
  background: var(--warning);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.status-dot {
  width: 4px;
  height: 4px;
  background: var(--text-subtle);
  border-radius: 50%;
}

.status-value {
  color: var(--text-secondary);
}

.status-label {
  color: var(--text-secondary);
}

.footer {
  padding: var(--space-6);
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.footer-text {
  font-size: 13px;
  color: var(--text-muted);
}

@keyframes fade-in-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes slide-in-left {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes ambient-float {
  0%, 100% {
    margin-top: 0;
    margin-left: 0;
  }
  50% {
    margin-top: -14px;
    margin-left: 8px;
  }
}

@keyframes comet-drift {
  0% {
    opacity: 0;
    filter: drop-shadow(0 0 10px rgba(78, 222, 163, 0.1));
  }
  15%, 85% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    filter: drop-shadow(0 0 24px rgba(78, 222, 163, 0.28));
  }
}

@keyframes ambient-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(78, 222, 163, 0.24),
      0 0 18px rgba(78, 222, 163, 0.14);
    opacity: 0.8;
  }
  70% {
    box-shadow:
      0 0 0 18px rgba(78, 222, 163, 0),
      0 0 30px rgba(78, 222, 163, 0.22);
    opacity: 0.2;
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(78, 222, 163, 0),
      0 0 18px rgba(78, 222, 163, 0.14);
    opacity: 0.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ambient-field > * {
    transform: none !important;
  }
}

@media (max-width: 480px) {
  .topbar {
    height: 64px;
    padding: 0 var(--space-4);
  }

  .hero {
    justify-content: flex-start;
    padding: calc(64px + var(--space-8)) var(--space-4) var(--space-10);
    min-height: auto;
  }

  .hero-orb {
    width: 480px;
    height: 480px;
    top: 22%;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
  }

  .ascii-container {
    margin-bottom: var(--space-6);
  }

  .ascii-art {
    font-size: 7px;
    line-height: 1.18;
    opacity: 0.82;
  }

  .hero-text {
    margin-bottom: var(--space-6);
  }

  .hero-title {
    font-size: clamp(32px, 11vw, 52px);
    line-height: 0.96;
    margin-bottom: var(--space-3);
  }

  .hero-subtitle {
    max-width: 320px;
    font-size: 18px;
    line-height: 1.45;
  }

  .waitlist-form {
    max-width: 100%;
    margin-bottom: var(--space-8);
  }

  .input-wrapper {
    flex-direction: column;
    background: transparent;
    border: none;
    gap: 14px;
    padding: 0;
  }

  .waitlist-input {
    min-height: 66px;
    padding: 0 22px;
    font-size: 16px;
    line-height: 1.2;
    background: rgba(24, 26, 29, 0.92);
    border: 1px solid rgba(48, 50, 54, 0.95);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    -webkit-appearance: none;
    appearance: none;
  }

  .waitlist-input::placeholder {
    font-size: 16px;
  }

  .btn {
    width: 100%;
    min-height: 66px;
    border-radius: 16px;
    font-size: 16px;
  }

  .status-bar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 14px 16px;
    font-size: 11px;
    border-radius: 14px;
  }

  .ambient-grid {
    width: 140px;
    height: 140px;
    opacity: 0.22;
  }

  .ambient-chip {
    font-size: 9px;
    padding: 0.52rem 0.72rem;
    opacity: 0.82;
  }

  .ambient-chip-one {
    right: 2%;
    top: 14%;
  }

  .ambient-chip-two {
    left: 3%;
    top: 72%;
  }

  .ambient-chip-three {
    display: none;
  }

  .ambient-comet-two,
  .ambient-pulse-two {
    display: none;
  }

  .ambient-ring-one {
    right: -22%;
    top: 6%;
    width: 360px;
    height: 360px;
    opacity: 0.5;
  }

  .ambient-ring-two {
    left: -8%;
    bottom: 10%;
    width: 220px;
    height: 220px;
    opacity: 0.38;
  }

  .footer {
    padding: var(--space-5) var(--space-4);
  }
}
