@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable-Italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark light;

  /* Gems brand: lime accent + glow tints sampled from the diamond logo facets */
  --lime: #e4fe20;

  /* Dark theme (default) — jewel box */
  --bg: #0b0812;
  --text: #f6f4fa;
  --muted: #9b93ad;
  --surface: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.13);
  --border-focus: #1085fe;
  --cta: #0f73ff;
  --cta-hover: #1085fe;
  --on-cta: #ffffff;
  --error: #ff7a8a;
  --success: #b7f36b;
  --glow-pink: rgba(253, 123, 226, 0.22);
  --glow-violet: rgba(124, 108, 233, 0.26);
  --glow-teal: rgba(77, 204, 183, 0.16);
  --focus-ring: rgba(16, 133, 254, 0.35);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfaff;
    --text: #17121f;
    --muted: #6b6380;
    --surface: #ffffff;
    --border: #e2ddef;
    --cta: #006aff;
    --cta-hover: #0059d6;
    --border-focus: #006aff;
    --error: #d92645;
    --success: #3f7a12;
    --glow-pink: rgba(253, 123, 226, 0.2);
    --glow-violet: rgba(124, 108, 233, 0.18);
    --glow-teal: rgba(77, 204, 183, 0.18);
    --focus-ring: rgba(0, 106, 255, 0.28);
  }
}

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

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

body {
  font-family: "Inter", system-ui, sans-serif;
  font-optical-sizing: auto;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Atmosphere — prismatic light spilling from the gem */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.glow-pink {
  width: 52vmax;
  height: 52vmax;
  top: -22vmax;
  right: -14vmax;
  background: radial-gradient(circle, var(--glow-pink) 0%, transparent 65%);
  animation: drift-a 16s ease-in-out infinite alternate;
}

.glow-violet {
  width: 58vmax;
  height: 58vmax;
  top: -26vmax;
  left: -16vmax;
  background: radial-gradient(circle, var(--glow-violet) 0%, transparent 65%);
  animation: drift-b 20s ease-in-out infinite alternate;
}

.glow-teal {
  width: 46vmax;
  height: 46vmax;
  bottom: -26vmax;
  left: 50%;
  background: radial-gradient(circle, var(--glow-teal) 0%, transparent 65%);
  animation: drift-c 18s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-5vmax, 4vmax) scale(1.1);
  }
}

@keyframes drift-b {
  from {
    transform: translate(0, 0) scale(1.08);
  }
  to {
    transform: translate(4vmax, 3vmax) scale(1);
  }
}

@keyframes drift-c {
  from {
    transform: translate(-50%, 0) scale(1);
  }
  to {
    transform: translate(-58%, -4vmax) scale(1.12);
  }
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Layout */
.page {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo-wrap {
  animation: bob 6s ease-in-out infinite;
}

.logo {
  display: block;
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 10px 30px rgba(56, 87, 185, 0.45));
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.eyebrow {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 640;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.headline {
  margin-top: 16px;
  font-size: clamp(34px, 7.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
}

.tagline {
  margin-top: 18px;
  max-width: 40ch;
  font-size: clamp(16px, 2.6vw, 18px);
  line-height: 1.6;
  color: var(--muted);
}

.brand-name {
  font-weight: 700;
  color: var(--text);
}

/* Form */
.form {
  margin-top: 32px;
  width: 100%;
  max-width: 440px;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.input-row input[type="email"]::placeholder {
  color: var(--muted);
}

.input-row input[type="email"]:focus-visible {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

button[type="submit"] {
  position: relative;
  height: 52px;
  padding: 0 26px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.01em;
  color: var(--on-cta);
  background: var(--cta);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

button[type="submit"]:hover:not(:disabled) {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
}

button[type="submit"]:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-loading {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
}

.form[data-loading] .btn-label {
  visibility: hidden;
}

.form[data-loading] .btn-loading {
  display: flex;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.status {
  min-height: 24px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
}

.status[data-ok] {
  color: var(--success);
}

.status[data-error] {
  color: var(--error);
}

.footnote {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

/* Staggered load reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.reveal:nth-child(1) {
  animation-delay: 0.05s;
}
.reveal:nth-child(2) {
  animation-delay: 0.15s;
}
.reveal:nth-child(3) {
  animation-delay: 0.25s;
}
.reveal:nth-child(4) {
  animation-delay: 0.35s;
}
.reveal:nth-child(5) {
  animation-delay: 0.45s;
}
.reveal:nth-child(6) {
  animation-delay: 0.55s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .logo-wrap,
  .glow-pink,
  .glow-violet,
  .glow-teal,
  .eyebrow-dot {
    animation: none;
  }
}

/* Small screens: top-align and tighten spacing so the input stays high,
   clear of the fold and the software keyboard */
@media (max-width: 600px) {
  body {
    align-items: flex-start;
  }
  .page {
    padding-top: max(7dvh, 32px);
  }
  .logo {
    width: 64px;
    height: 64px;
  }
  .eyebrow {
    margin-top: 20px;
  }
  .tagline {
    margin-top: 14px;
  }
  .form {
    margin-top: 24px;
  }
}

/* Narrow phones: stack the input and button */
@media (max-width: 430px) {
  .input-row {
    flex-direction: column;
  }
  .input-row input[type="email"] {
    /* flex: 1 controls height in column direction and collapses the input */
    flex: none;
    width: 100%;
  }
  button[type="submit"] {
    width: 100%;
  }
}
