/* =========================================================================
   Landing page layout.

   Same contract as styles.css: tokens only, no raw colours. Anything reusable
   (gradients, reveal utilities, the component classes) lives in ui/.
   ========================================================================= */

/* Decorative full-bleed layers (the aurora, the hero wash) must never be able
   to nudge the page sideways. `clip` rather than `hidden` so the sticky nav
   keeps working — `hidden` would make <body> a scroll container. */
body { overflow-x: clip; }

/* ---- nav -------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  border-bottom: 1px solid transparent;
  transition:
    background var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    backdrop-filter var(--dur-base) var(--ease-out);
}
/* Materialises once you leave the hero. */
.nav.is-scrolled {
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border-subtle);
}
.nav-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 64px;
  display: flex;
  align-items: center;
  gap: var(--space-7);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
}
.brand:hover { color: var(--text-primary); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--accent), var(--accent-press));
  color: var(--accent-fg);
  font-size: 11px;
  box-shadow: var(--shadow-sm), var(--edge-highlight);
}
.nav-links { display: flex; align-items: center; gap: var(--space-6); margin-right: auto; }
.nav-links a {
  color: var(--text-secondary);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }

/* ---- hero ------------------------------------------------------------- */
.hero { padding: var(--space-12) 0 var(--space-11); }
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
  padding-bottom: var(--space-11);
}
.hero-eyebrow { padding: var(--space-1) var(--space-4); }
.hero-title {
  font-size: var(--text-hero);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 16ch;
}
.hero-lead {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  max-width: 60ch;
}
.hero-actions { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; justify-content: center; }
.hero-note { font-size: var(--text-sm); color: var(--text-tertiary); }

/* ---- product preview -------------------------------------------------- */
.preview {
  position: relative;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--gradient-surface);
  box-shadow: var(--shadow-xl), var(--edge-highlight);
  overflow: hidden;
}
/* Gradient hairline along the top edge — the panel catching the light. */
.preview::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--gradient-border);
}
.preview-chrome {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}
.preview-dots { display: flex; gap: var(--space-2); }
.preview-dots i {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
}
.preview-url {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}
.preview-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--space-5);
  padding: var(--space-5);
  position: relative;
}
.preview-col { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }

/* The alert that lands last in the choreography. */
.preview-alert {
  position: absolute;
  right: var(--space-5);
  bottom: var(--space-5);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 320px;
  padding: var(--space-4);
  background: var(--surface-overlay);
  border: 1px solid var(--border-default);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.preview-alert-icon { font-size: var(--text-md); line-height: 1.2; }
.preview-alert strong { display: block; font-size: var(--text-base); margin-bottom: 2px; }
.preview-alert span { font-size: var(--text-sm); color: var(--text-secondary); }

/* ---- sections --------------------------------------------------------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  max-width: 46ch;
}
.section-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--gradient-surface);
  box-shadow: var(--shadow-md), var(--edge-highlight);
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.feature:hover { border-color: var(--border-default); transform: translateY(-2px); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  font-size: var(--text-md);
}
.feature h3 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
}
.feature p { color: var(--text-secondary); line-height: var(--leading-relaxed); }

/* ---- how it works ----------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); }
.step { display: flex; flex-direction: column; gap: var(--space-3); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-accent);
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: var(--text-base); font-weight: var(--weight-semibold); }
.step p { color: var(--text-secondary); line-height: var(--leading-relaxed); font-size: var(--text-base); }

/* ---- closing cta ------------------------------------------------------ */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-11) var(--space-6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: var(--gradient-surface);
  box-shadow: var(--shadow-lg), var(--edge-highlight);
}
.cta-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
}
.cta-lead { margin-bottom: var(--space-3); }
.cta-actions { justify-content: center; }

/* ---- footer ----------------------------------------------------------- */
.footer { margin-top: var(--space-11); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-top: var(--space-6);
  padding-bottom: var(--space-9);
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}
.footer-note { font-size: var(--text-xs); color: var(--text-tertiary); max-width: 62ch; }

/* ---- auth modal ------------------------------------------------------- */
.auth-tabs { width: 100%; margin-bottom: var(--space-5); }
.auth-tabs button { flex: 1; }
.auth-form { display: flex; flex-direction: column; }
.auth-error { display: block; margin-bottom: var(--space-4); min-height: 1em; }
.auth-error:empty { display: none; }
.auth-alt {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}
.auth-alt p { font-size: var(--text-xs); color: var(--text-tertiary); margin-top: var(--space-2); }
.auth-invite-note { display: block; padding: var(--space-3) 0 var(--space-5); }

/* ---- responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-title { font-size: var(--text-3xl); }
  .preview-body { grid-template-columns: 1fr; }
  .preview-alert { position: static; max-width: none; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: var(--space-9); }
  .hero-title { font-size: var(--text-2xl); max-width: none; }
  .nav-inner { padding: 0 var(--space-4); gap: var(--space-4); }
  .nav-actions .ui-btn--ghost { display: none; }
  .hero-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .hero-actions .ui-btn { justify-content: center; }
}
