/* ── landing.css ─────────────────────────────────────────────────────────── */

.landing-body {
  padding: 0 !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header: logo left, nav right. On mobile we tighten everything so
   "Sign In" doesn't wrap onto two lines — the previous build had 32px
   horizontal padding + 24px nav gap + a button with comfortable padding,
   which together pushed the CTA off-screen on 360px viewports. */
/* Surge brand purple — sampled from the logo gradient (deep → light violet).
   Fixed across themes, like the logo itself, so the brand vibe stays put. */
:root {
  --surge-purple: #7c4dff;
  --surge-purple-light: #8d7aff;
  --surge-grad: linear-gradient(135deg, #8d7aff 0%, #6d4dff 100%);
}

/* The global html/body `overflow-x: hidden` (style.css) silently breaks
   position:sticky by making them clip containers. Relax to `overflow-x: clip`
   on marketing pages only — still no horizontal scroll, but sticky works. */
html:has(> body.landing-body),
body.landing-body { overflow-x: clip; }

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 60px;
  border-bottom: 1px solid var(--border);
  /* Sticky + translucent blur so the CTA stays reachable down the long page */
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@media (min-width: 640px) {
  .landing-header { padding: 0 32px; }
}

.landing-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .landing-nav { gap: 24px; }
}

.landing-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  /* Force "Sign In" to stay on one line. */
  white-space: nowrap;
  transition: color 0.15s;
}
.landing-nav a:hover { color: var(--text); }

/* Primary acquisition CTA — solid brand-purple, the one thing to click */
.landing-nav-cta {
  background: var(--surge-grad);
  border: none;
  color: #fff !important;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 600;
}
@media (min-width: 640px) {
  .landing-nav-cta { padding: 8px 18px; }
}
.landing-nav-cta:hover { filter: brightness(1.08); }

/* Secondary log-in link sits quietly beside the CTA (inherits muted nav style) */
.landing-nav-login { font-weight: 500; }

/* On phones, drop the page links so logo + log in + CTA never clip */
@media (max-width: 639px) {
  .landing-nav-page { display: none; }
}

.landing-main { flex: 1; }

.landing-hero {
  text-align: center;
  padding: 14px 24px 54px;
  max-width: 700px;
  margin: 0 auto;
}

.landing-tagline {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
  opacity: 0.9;
}

.landing-headline {
  font-size: clamp(28px, 5.5vw, 50px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 18px;
  text-wrap: balance;
}

.landing-sub {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 36px;
}

.landing-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.15s;
  font-family: var(--sans);
}
.landing-btn.primary { background: var(--surge-grad); color: #fff; }
.landing-btn.ghost   { border: 1px solid var(--border2); color: var(--text); }
.landing-btn:hover { filter: brightness(1.1); }

.landing-features {
  display: -webkit-grid;
  display: grid;
  -webkit-grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 80px;
  box-sizing: border-box;
}

.landing-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.landing-feature:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .landing-features { grid-template-columns: 1fr; }
}

/* Icon container — rounded square with the brand blue tint. Holds an
   inline SVG at a fixed visual weight regardless of which glyph is
   inside, so the three cards align cleanly. Replaces emojis, which
   rendered very differently across OS / browser. */
.landing-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue-dim);
  border: 1px solid var(--border2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  margin-bottom: 18px;
}
.landing-feature-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.75;
}

.landing-feature h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.landing-feature p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.landing-feature-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid var(--blue);
}

/* Footer — stack on mobile so the © line and the link list don't try
   to all share one wrap-prone row. On ≥640px viewports it's a single
   line again. */
/* Two-tier footer: brand + tagline + socials on the left, grouped link
   columns on the right, then a hairline-divided bottom bar (copyright +
   IP disclaimer). Mobile collapses to a centred stack. */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: 44px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  font-size: 13px;
  color: var(--muted);
  max-width: 1180px;
  margin: 0 auto;
  align-items: center;
  text-align: center;
}
.landing-footer-top {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  width: 100%;
}
.landing-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 340px;
  align-items: center;
}
.landing-footer-logo img { height: 26px; width: auto; display: block; }
/* the brand line reuses the hero "Cardboard with Context" tagline style */
.landing-footer-brand .landing-tagline { margin: 0; }
.landing-footer-cols {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  gap: 28px 52px;
  width: 100%;
  margin: 0 auto;
}
.landing-footer-col {
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
  min-width: 0;
  align-items: center;
}
.landing-footer-col h4 {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.55;
}
.landing-footer-col a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.landing-footer-col a:hover { color: var(--text); }

/* Social row — monochrome brand glyphs in subtle chips, tinted to the theme
   accent on hover so they sit with the existing line-icon vibe. */
.landing-footer-social {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.landing-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.landing-footer-social a:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-dim);
  transform: translateY(-1px);
}
.landing-footer-social svg { width: 19px; height: 19px; display: block; }

/* Bottom bar — copyright + IP disclaimer, divided from the top tier */
.landing-footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  width: 100%;
}
.landing-footer-disclaimer {
  width: 100%;
  max-width: 520px;
  font-size: 11px;
  line-height: 1.5;
  opacity: 0.6;
}

/* Mobile-first base above is centred; ≥760px goes to the two-column layout
   with everything left-aligned and the bottom bar split left/right. */
@media (min-width: 760px) {
  .landing-footer { padding: 52px 32px 28px; align-items: stretch; text-align: left; }
  .landing-footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 56px;
  }
  .landing-footer-brand { align-items: center; text-align: center; }
  .landing-footer-cols { display: flex; gap: 56px; flex-wrap: nowrap; justify-content: flex-end; width: auto; max-width: none; margin: 0; }
  .landing-footer-col { align-items: flex-start; flex: 0 0 auto; min-width: 88px; }
  .landing-footer-social { justify-content: flex-start; }
  .landing-footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    text-align: left;
  }
  .landing-footer-disclaimer { width: auto; max-width: 640px; text-align: right; }
}

/* Active nav link */
.landing-nav .nav-active { color: var(--text); }
.landing-footer-col .nav-active { color: var(--text); }
