/* =========================================================================
   Synodia landing — mirrors the app's design system.
   Dark-first "map cinema", route-blue accent, Inter, layered slate surfaces.
   ========================================================================= */

:root {
  --bg: #0a0e1a;
  --surface: #121826;
  --surface-2: #1a2233;
  --surface-3: #232e42;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --foreground: #f2f5fa;
  --muted: #9aa7bd;
  --faint: #647089;

  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --on-accent: #ffffff;

  --danger: #fb7185;
  --success: #34d399;

  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.625rem;

  --shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 18px 48px -12px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 0 1px rgba(59, 130, 246, 0.35),
    0 10px 34px -8px rgba(59, 130, 246, 0.4);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--foreground);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.glow {
  position: fixed;
  top: -30vh;
  left: 50%;
  transform: translateX(-50%);
  width: 120vw;
  height: 90vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    50% 50% at 50% 50%,
    rgba(59, 130, 246, 0.16) 0%,
    rgba(59, 130, 246, 0.05) 40%,
    transparent 70%
  );
  filter: blur(10px);
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

/* --- Header --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--foreground);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.55rem;
  background: linear-gradient(140deg, var(--accent-hover), var(--accent-strong));
  box-shadow: var(--shadow-glow);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(60% 60% at 30% 25%, rgba(255, 255, 255, 0.45), transparent 60%);
}

.brand-name {
  font-size: 1.15rem;
}

.header-cta {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.header-cta:hover {
  color: var(--foreground);
  border-color: var(--border-strong);
  background: var(--surface);
}

/* --- Hero --- */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6.5rem) 1.5rem 3rem;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  background: var(--accent-soft);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin: 0 0 1.4rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 1.2rem;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent-hover), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--muted);
  max-width: 40ch;
  margin: 0 auto 2rem;
}

.hero-cta {
  font-size: 1.02rem;
  padding: 0.9rem 1.6rem;
}

.hero-sub {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--faint);
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent-strong);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 0.8rem 1.3rem;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out), box-shadow var(--dur);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--accent);
  box-shadow: var(--shadow-glow);
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

/* --- Features --- */
.features {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.4rem;
  transition: border-color var(--dur), transform var(--dur) var(--ease-out);
}
.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.feature-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-hover);
  margin-bottom: 1rem;
}
.feature-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.feature h3 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* --- Register --- */
.register {
  max-width: 620px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

.register-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  padding: clamp(1.75rem, 5vw, 2.75rem);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.register-card h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.02em;
  font-weight: 750;
}
.register-sub {
  margin: 0 auto 1.6rem;
  color: var(--muted);
  max-width: 34ch;
}

#signup-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.field-row {
  display: flex;
  gap: 0.6rem;
  width: 100%;
}

#email {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 1rem;
  color: var(--foreground);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
#email::placeholder {
  color: var(--faint);
}
#email:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.cf-turnstile {
  min-height: 65px;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* spinner inside button */
.spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.is-loading .spinner {
  display: inline-block;
}
.is-loading .btn-label {
  opacity: 0.7;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-message {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.92rem;
  font-weight: 500;
}
.form-message.error {
  color: var(--danger);
}
.form-message.success {
  color: var(--success);
}

.privacy-note {
  margin: 1.4rem 0 0;
  font-size: 0.82rem;
  color: var(--faint);
}

/* --- Footer --- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem 1.5rem 3rem;
  color: var(--faint);
  font-size: 0.88rem;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--foreground);
}

@media (max-width: 480px) {
  .field-row {
    flex-direction: column;
  }
  .field-row .btn-primary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
