/* ---------- Tokens ---------- */

:root {
  /* Neutral scale */
  --chalk: #FFFFFF;
  --hairline: rgba(255, 255, 255, 0.14);
  --muted: rgba(255, 255, 255, 0.68);

  /* Deep gradient surfaces (span the whole page) */
  --deep-1: #081A13;
  --deep-2: #0F2B20;
  --deep-3: #051009;

  /* Glass panels */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);

  /* Accent */
  --accent: #34E29A;
  --accent-2: #22B8CF;
  --accent-ink: #052015;

  /* Fonts */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "Space Mono", monospace;

  /* Spacing (4px grid) */
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* ---------- Reset ---------- */

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

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(180deg, var(--deep-1) 0%, var(--deep-2) 50%, var(--deep-3) 100%);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, table, form {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

section[id] {
  scroll-margin-top: 88px;
}

/* ---------- Layout ---------- */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: 620px;
}

.section {
  padding: var(--space-20) 0;
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-4);
  }
  .section {
    padding: var(--space-12) 0;
  }
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 8px 24px -8px rgba(52, 226, 154, 0.55);
}

.btn-primary:hover {
  box-shadow: 0 10px 30px -6px rgba(52, 226, 154, 0.65);
}

.btn-ghost {
  background: transparent;
  color: var(--chalk);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* ---------- Glass panels ---------- */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.4);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 26, 19, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--chalk);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(52, 226, 154, 0.5);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.nav-cta:hover {
  box-shadow: 0 10px 26px -6px rgba(52, 226, 154, 0.65);
}

.nav-cta:active {
  transform: scale(0.98);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-24) 0 var(--space-20);
}

.hero-glow {
  position: absolute;
  top: -220px;
  right: -160px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(52, 226, 154, 0.35) 0%, rgba(52, 226, 154, 0) 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: var(--space-16);
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--chalk);
  max-width: 14ch;
  margin-bottom: var(--space-6);
}

@media (max-width: 640px) {
  .hero-headline {
    font-size: 36px;
  }
}

.hero-subhead {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  max-width: 46ch;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ---------- Hero card visual ---------- */

.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

.card-stack {
  position: relative;
  width: 320px;
  aspect-ratio: 1.586;
}

@media (max-width: 640px) {
  .card-stack {
    width: 260px;
  }
}

.card-mock {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
}

.card-mock--back {
  background: linear-gradient(135deg, var(--deep-2), var(--deep-3));
  transform: translate(18px, 26px) rotateZ(-6deg);
  opacity: 0.6;
}

.card-mock--front {
  background: linear-gradient(135deg, #17493A 0%, #0C2A20 55%, #051209 100%);
  transform: rotateX(8deg) rotateY(-16deg) rotateZ(-4deg);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.65),
    0 0 90px -20px rgba(52, 226, 154, 0.45);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--chalk);
  animation: floatCard 6s ease-in-out infinite;
  overflow: hidden;
}

.card-mock--front::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -20%;
  width: 60%;
  height: 220%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 60%);
  transform: rotate(20deg);
  pointer-events: none;
}

@keyframes floatCard {
  0%, 100% { transform: rotateX(8deg) rotateY(-16deg) rotateZ(-4deg) translateY(0); }
  50% { transform: rotateX(8deg) rotateY(-16deg) rotateZ(-4deg) translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .card-mock--front {
    animation: none;
  }
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card-chip {
  width: 34px;
  height: 24px;
  border-radius: 5px;
  background: linear-gradient(135deg, #F0D9A6, #B98A46);
}

.card-wave {
  color: rgba(255, 255, 255, 0.85);
}

.card-number {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
}

.card-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.card-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Feature strip ---------- */

.features {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 800px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -18px rgba(52, 226, 154, 0.3);
}

.feature-icon {
  color: var(--accent-2);
  margin-bottom: var(--space-4);
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: var(--space-2);
}

.feature-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Waitlist ---------- */

.waitlist-panel {
  padding: var(--space-10);
  border-radius: var(--radius-lg);
  text-align: center;
}

@media (max-width: 640px) {
  .waitlist-panel {
    padding: var(--space-8) var(--space-5);
  }
}

.waitlist-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--chalk);
  margin-bottom: var(--space-3);
}

@media (max-width: 640px) {
  .waitlist-heading {
    font-size: 26px;
  }
}

.waitlist-subhead {
  font-size: 16px;
  color: var(--muted);
  max-width: 44ch;
  margin: 0 auto var(--space-8);
}

.waitlist-form {
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
}

.waitlist-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.waitlist-row {
  display: flex;
  gap: var(--space-3);
}

@media (max-width: 480px) {
  .waitlist-row {
    flex-direction: column;
  }
}

.waitlist-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--chalk);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  min-height: 48px;
}

.waitlist-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.waitlist-input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(45, 212, 224, 0.22);
}

.waitlist-input.is-invalid {
  border-color: #FF8A75;
}

.waitlist-button {
  white-space: nowrap;
}

.waitlist-error {
  color: #FF8A75;
  font-size: 14px;
  margin-top: var(--space-2);
}

.waitlist-fineprint {
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--space-3);
}

.waitlist-confirmation {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--accent);
  text-align: center;
  margin-top: var(--space-6);
}

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

.footer {
  border-top: 1px solid var(--hairline);
  padding: var(--space-10) 0;
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-wordmark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--chalk);
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: var(--space-2);
}

.footer-meta {
  text-align: right;
}

@media (max-width: 480px) {
  .footer-meta {
    text-align: left;
  }
}

.footer-link {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-copyright {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: var(--space-2);
}
