/* ─────────────────────────────────────────
   PULSE — Landing Page Styles
   ───────────────────────────────────────── */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Skip link — keyboard / screen readers */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 10000;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 18px;
  clip: auto;
  overflow: visible;
  white-space: normal;
  background: rgba(18, 22, 32, 0.98);
  border: 1px solid rgba(124, 108, 240, 0.45);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: clamp(15px, 2.5vw, 18px);
  background-color: #0b0b16;
  background-image: linear-gradient(
    160deg,
    #0b0b16 0%,
    #100a1c 20%,
    #140e22 45%,
    #0e101c 70%,
    #0a0c14 100%
  );
  background-attachment: fixed;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Top glow */
body::before {
  content: '';
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124, 108, 240, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input { font-family: inherit; }

/* ── Gradient text utility ── */
.gradient-text {
  background: linear-gradient(90deg, #7C6CF0 0%, #9B8FFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--delay, 0s);
}

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

.reveal--delay-1 { --delay: 0.10s; }
.reveal--delay-2 { --delay: 0.18s; }
.reveal--delay-3 { --delay: 0.26s; }
.reveal--delay-4 { --delay: 0.36s; }


/* ════════════════════════════════════════
   NAV
   ════════════════════════════════════════ */

.nav {
  position: relative;
  z-index: 10;
  padding: clamp(22px, 3.2vw, 36px) clamp(20px, 5vw, 48px) clamp(18px, 2.8vw, 28px);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 16px);
  transition: opacity 0.2s ease;
}

.nav__logo:hover { opacity: 0.8; }

.nav__logo-frame {
  flex-shrink: 0;
  width: clamp(42px, 6vw, 54px);
  height: clamp(42px, 6vw, 54px);
  border-radius: clamp(11px, 1.4vw, 14px);
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(124, 108, 240, 0.35);
}

.nav__logo-frame--sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(124, 108, 240, 0.28);
}

.nav__logo-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.14);
  transform-origin: center center;
}

.nav__logo-text {
  font-size: clamp(21px, 3.2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1;
}


/* ════════════════════════════════════════
   HERO
   ════════════════════════════════════════ */

.hero {
  position: relative;
  z-index: 1;
  padding: clamp(40px, 7vw, 80px) clamp(20px, 5vw, 48px) clamp(60px, 9vw, 100px);
  text-align: center;
}

.hero__inner {
  max-width: 740px;
  margin: 0 auto;
}

.hero__heading {
  font-size: clamp(36px, 7.5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: rgba(255, 255, 255, 0.96);
  margin-bottom: clamp(16px, 2.5vw, 22px);
}

.hero__subtitle {
  font-size: clamp(15px, 2.5vw, 18px);
  color: rgba(255, 255, 255, 0.45);
  max-width: 460px;
  margin: 0 auto clamp(28px, 4vw, 40px);
  line-height: 1.65;
  font-weight: 400;
}

/* ── Waitlist ── */
.waitlist {
  max-width: 460px;
  margin: 0 auto;
}

.waitlist__form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.waitlist__field {
  flex: 1 1 220px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.waitlist__input {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.waitlist__input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.waitlist__input:focus {
  border-color: rgba(124, 108, 240, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.waitlist__input.is-error {
  border-color: rgba(255, 88, 88, 0.6);
  background: rgba(255, 88, 88, 0.04);
  animation: shake 0.3s ease;
}

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

.waitlist__error {
  margin: 6px 0 0;
  padding-left: 3px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  color: rgba(255, 110, 110, 0.95);
  text-align: left;
}

.waitlist__error[hidden] {
  display: none !important;
}

/* ── Success toast (top-right, after API OK only) ── */
.toast-root {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: max(clamp(14px, 3vw, 22px), env(safe-area-inset-top, 0px));
  padding-right: max(clamp(14px, 3vw, 22px), env(safe-area-inset-right, 0px));
  padding-left: clamp(14px, 3vw, 22px);
  padding-bottom: clamp(14px, 3vw, 22px);
  pointer-events: none;
  max-width: 100vw;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: min(340px, calc(100vw - 28px));
  padding: 14px 16px 14px 14px;
  border-radius: 14px;
  background: rgba(18, 22, 32, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(52, 211, 153, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 4px 20px rgba(52, 211, 153, 0.08);
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.toast__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  color: rgba(52, 211, 153, 0.95);
}

/* Inline SVG icons (Heroicons-style stroke) */
.icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon--toast {
  width: 22px;
  height: 22px;
}

.toast__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.toast__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(167, 243, 208, 0.98);
  line-height: 1.25;
}

.toast__sub {
  font-size: 12.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition-duration: 0.12s;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  background: linear-gradient(135deg, #7C6CF0 0%, #9B8FFF 100%);
  border: none;
  border-radius: 13px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 20px rgba(124, 108, 240, 0.2);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(124, 108, 240, 0.38);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(124, 108, 240, 0.2);
}

/* ── Counter ── */
.hero__counter {
  margin-top: clamp(14px, 2vw, 18px);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.01em;
}

.hero__counter-num {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}


/* ════════════════════════════════════════
   CHAIN DEMO
   ════════════════════════════════════════ */

.chain {
  margin: clamp(36px, 5vw, 56px) auto 0;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
}

.chain__card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(4px);
  transition: border-color 0.25s ease;
}

.chain__card:hover {
  border-color: rgba(255, 255, 255, 0.09);
}

.chain__card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
}

/* Trigger card */
.chain__card--trigger {
  background: rgba(124, 108, 240, 0.1);
  border-color: rgba(124, 108, 240, 0.22);
}

.chain__card--trigger:hover {
  border-color: rgba(124, 108, 240, 0.35);
}

/* Action card */
.chain__card--action {
  background: rgba(52, 211, 153, 0.04);
  border-color: rgba(52, 211, 153, 0.18);
}

.chain__card--action:hover {
  border-color: rgba(52, 211, 153, 0.3);
}

.chain__card--action .chain__card-inner {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.chain__tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  flex-shrink: 0;
}

.chain__tag--trigger {
  background: rgba(124, 108, 240, 0.25);
  color: rgba(161, 148, 255, 0.9);
  border: 1px solid rgba(124, 108, 240, 0.3);
}

.chain__action-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(52, 211, 153, 0.65);
}

.chain__text {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
  flex: 1;
}

.chain__text--action {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.chain__badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 4px 9px;
  border-radius: 7px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.chain__badge--red {
  background: rgba(248, 113, 113, 0.1);
  color: rgba(252, 165, 165, 0.9);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.chain__badge--amber {
  background: rgba(251, 191, 36, 0.08);
  color: rgba(252, 211, 77, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.18);
}

.chain__badge--green {
  background: rgba(52, 211, 153, 0.08);
  color: rgba(52, 211, 153, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.18);
}

.chain__arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 0;
  color: rgba(124, 108, 240, 0.28);
}


/* ════════════════════════════════════════
   DIVIDER
   ════════════════════════════════════════ */

.divider {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 280px;
  height: 1px;
  margin: clamp(32px, 5vw, 56px) auto;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
}


/* ════════════════════════════════════════
   FEATURES
   ════════════════════════════════════════ */

.features {
  position: relative;
  z-index: 1;
  padding: 0 clamp(20px, 5vw, 48px) clamp(40px, 6vw, 64px);
}

.features__inner {
  max-width: 800px;
  margin: 0 auto;
}

.features__header {
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.features__heading {
  font-size: clamp(24px, 4.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 10px;
  line-height: 1.15;
}

.features__subtitle {
  font-size: clamp(14px, 2vw, 16px);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(10px, 1.5vw, 14px);
}

.feature-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  /* Include opacity + transform so reveal animation fires; delay is staggered via --delay */
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
  transition-delay: var(--delay, 0s);
  cursor: default;
}

/* Once visible, reset delay so hover feels instant */
.feature-card.is-visible {
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
  transition-delay: 0s;
}

.feature-card:hover {
  border-color: rgba(124, 108, 240, 0.28);
  background: rgba(124, 108, 240, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 108, 240, 0.08);
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 14px;
  line-height: 0;
  color: rgba(155, 143, 255, 0.95);
}

.feature-card:hover .feature-card__icon {
  color: rgba(189, 179, 255, 1);
}

.feature-card__title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  line-height: 1.3;
}

.feature-card__body {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
  font-weight: 400;
}


/* ════════════════════════════════════════
   CTA
   ════════════════════════════════════════ */

.cta {
  position: relative;
  z-index: 1;
  padding: clamp(20px, 4vw, 40px) clamp(20px, 5vw, 48px) clamp(60px, 9vw, 100px);
  text-align: center;
}

.cta__inner {
  max-width: 740px;
  margin: 0 auto;
}

.cta__heading {
  font-size: clamp(28px, 5.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: clamp(12px, 2vw, 16px);
}

.cta__subtitle {
  font-size: clamp(15px, 2.5vw, 17px);
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: clamp(24px, 3.5vw, 36px);
  font-weight: 400;
}

.cta__note {
  margin-top: clamp(12px, 1.5vw, 16px);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.02em;
}


/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: clamp(20px, 3vw, 28px) clamp(20px, 5vw, 48px);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}

.footer__logo:hover { opacity: 0.7; }

.footer__logo-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.55);
}

.footer__copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 400;
}


/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */

/* Narrow screens: stack form */
@media (max-width: 479px) {
  .waitlist__form {
    flex-direction: column;
  }

  .waitlist__field,
  .waitlist__input,
  .btn {
    width: 100%;
    flex: none;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .hero__heading {
    letter-spacing: -0.025em;
  }
}

/* Two columns on tablet */
@media (min-width: 480px) and (max-width: 767px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Footer on small screens */
@media (max-width: 479px) {
  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
}

/* Large screens — subtle adjustments */
@media (min-width: 1440px) {
  .hero__inner,
  .cta__inner {
    max-width: 780px;
  }
}
