/* ────────────────────────────────────────────────────────────────────────
   Collexius — public landing page & pre-authentication pages.

   Deliberately separate from collection/style.css (the app's own themes
   in SiteSettings.THEME_CHOICES) — this is marketing/entrance surface,
   not the application shell, so redesigning it never touches how the app
   itself looks. Shares typography with the product (Spectral / Inter /
   IBM Plex Mono, already loaded by collection/base.html) so the two
   still feel like the same thing.

   DESIGN TOKENS — the block below is written as a token set on purpose:
   colour, type, spacing and radius are named and grouped so they can be
   lifted wholesale into a shared design system later (see
   docs/ARCHITECTURE.md's "Public pages design language" note). Nothing
   in the authenticated app reads these yet — that migration is a
   deliberate future step, not a side effect of this pass.
   ──────────────────────────────────────────────────────────────────── */

:root {
  /* Colour — surfaces */
  --navy:        #0d1420;   /* primary dark surface (hero, nav, footer) */
  --navy-2:      #131b2a;   /* secondary dark surface (cards on navy) */
  --charcoal:    #1a2029;   /* footer / deepest surface */
  --ivory:       #f7f3ea;   /* primary light surface */
  --ivory-2:     #efe8d8;   /* secondary light surface (cards on ivory) */

  /* Colour — text */
  --ink:         #211d16;   /* primary text on light */
  --ink-muted:   #6b6457;   /* secondary text on light */
  --cream:       #f3efe3;   /* primary text on dark */
  --cream-muted: #99a1b3;   /* secondary text on dark */

  /* Colour — accent (used sparingly: labels, numerals, rules, one CTA) */
  --gold:        #b6925c;   /* accent on dark surfaces */
  --gold-soft:   #dcc394;   /* accent hover, on dark surfaces */
  --gold-dark:   #7d5f33;   /* accent on light surfaces — meets 4.5:1 on ivory */

  /* Colour — structure */
  --rule-dark:   rgba(243, 239, 227, 0.12);
  --rule-light:  #e4ddc7;
  --focus-ring:  var(--gold-dark); /* 3:1+ against both navy and ivory */

  /* Type */
  --serif: 'Spectral', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Spacing scale (used for section rhythm — see .lp-section) */
  --space-section-lg: 112px;
  --space-section-md: 96px;
  --space-section-sm: 64px;

  --radius-sm: 3px;
  --radius-md: 6px;

  --content-width: 1160px;
}

html, body { margin: 0; padding: 0; }
.lp * { box-sizing: border-box; }

.lp {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.lp img { max-width: 100%; display: block; }

/* :where() keeps this at zero specificity on purpose — it only needs to
   beat the user agent's default link color (author origin always wins
   over UA regardless of specificity), and must never outrank a single
   class like .lp-btn--gold or .lp-nav__signin further down this file.
   A plain `.lp a` selector did exactly that by accident (class+element
   beats a single class), which silently broke several link colors. */
:where(.lp) a { color: inherit; text-decoration: none; }

/* Accessible, on-brand focus treatment for every interactive element —
   :focus-visible so mouse clicks don't show a ring, only keyboard/AT
   navigation does. --focus-ring meets the 3:1 non-text contrast minimum
   against both navy and ivory, so one rule works everywhere on the page. */
.lp a:focus-visible,
.lp button:focus-visible,
.lp-faq summary:focus-visible,
.lp-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

.lp__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
}

.lp-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

.lp-eyebrow--gold { color: var(--gold); }
.lp-eyebrow--gold-dark { color: var(--gold-dark); }
.lp-eyebrow--muted-dark { color: var(--cream-muted); }
.lp-eyebrow--muted-light { color: var(--ink-muted); }

/* ── Buttons (variants sized/coloured independently — see design-token
   note above; these are the reusable button styles a future shared
   system would start from) ─────────────────────────────────────────── */

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.lp-btn:hover { transform: translateY(-1px); }
.lp-btn:active { transform: translateY(0); }

.lp-btn--lg { padding: 16px 30px; font-size: 0.98rem; }
.lp-btn--block { width: 100%; }

.lp-btn--gold { background: var(--gold); color: var(--navy); }
.lp-btn--gold:hover { background: var(--gold-soft); }

.lp-btn--ghost-dark { border-color: var(--rule-dark); color: var(--cream); }
.lp-btn--ghost-dark:hover { border-color: var(--gold); color: var(--gold-soft); }

.lp-btn--ghost-light { border-color: var(--rule-light); color: var(--ink); }
.lp-btn--ghost-light:hover { border-color: var(--gold-dark); color: var(--gold-dark); }

/* ── Navigation ─────────────────────────────────────────────────────── */

.lp-nav {
  background: var(--navy);
  border-bottom: 1px solid var(--rule-dark);
  position: sticky;
  top: 0;
  z-index: 40;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

/* Set by a small scroll listener (see landing.html) once the page has
   scrolled past the hero — a quiet depth cue, not a layout change. */
.lp-nav.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.lp-nav__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Reserved for a future wordmark/logo — deliberately left as plain,
   generously letter-spaced type. No mark, no icon.
   Selector is `.lp-nav .lp-nav__brand` (not just `.lp-nav__brand`) so its
   color wins over the generic `.lp a { color: inherit }` reset above —
   a bare single-class selector loses that specificity fight when this
   element is a link (it's a <span> on the landing page but an <a> back
   to the dashboard on the entrance/auth pages). */
.lp-nav .lp-nav__brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.09em;
  color: var(--cream);
  font-weight: 500;
  white-space: nowrap;
}

.lp-nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 0.92rem;
  color: var(--cream-muted);
}

.lp-nav__links a,
.lp-footer__links a {
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.lp-nav__links a:hover,
.lp-footer__links a:hover {
  color: var(--cream);
  text-decoration-color: currentColor;
}

.lp-nav__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
}

.lp-nav .lp-nav__signin {
  font-size: 0.92rem;
  color: var(--cream-muted);
  transition: color 0.15s ease;
  padding: 10px 2px;
  margin: -10px -2px;
}
.lp-nav .lp-nav__signin:hover { color: var(--cream); }

/* ── Hero ───────────────────────────────────────────────────────────── */

.lp-hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--cream);
  padding: var(--space-section-lg) 0 var(--space-section-md);
}

.lp-hero__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}

.lp-hero__eyebrow { margin-bottom: 24px; }

.lp-hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.75rem;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 28px;
  color: var(--cream);
}

.lp-hero__sub {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--cream-muted);
  max-width: 46ch;
  margin: 0 0 40px;
}

.lp-hero__ctas {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.lp-hero__note {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--cream-muted);
  opacity: 0.8;
}

/* Reserved hero image — placeholder only, replace with real studio
   photography. Styled as an empty frame rather than a broken image. */
.lp-hero__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius-md);
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(182, 146, 92, 0.10), transparent 60%),
    linear-gradient(160deg, var(--charcoal) 0%, var(--navy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lp-hero__frame::before,
.lp-hero__frame::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--gold);
  opacity: 0.55;
}
.lp-hero__frame::before { top: 18px; left: 18px; border-top: 1px solid; border-left: 1px solid; }
.lp-hero__frame::after { bottom: 18px; right: 18px; border-bottom: 1px solid; border-right: 1px solid; }

.lp-hero__frame-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-muted);
  opacity: 0.6;
}

/* ── Generic section rhythm ─────────────────────────────────────────── */

.lp-section { padding: var(--space-section-lg) 0; }

.lp-section--ivory { background: var(--ivory); color: var(--ink); }
.lp-section--ivory-2 { background: var(--ivory-2); color: var(--ink); }
.lp-section--navy { background: var(--navy); color: var(--cream); }
.lp-section--charcoal { background: var(--charcoal); color: var(--cream); }

.lp-section__head {
  max-width: 620px;
  margin: 0 0 68px;
}

.lp-section__head--center { margin-left: auto; margin-right: auto; text-align: center; }

.lp-section__head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.15rem;
  line-height: 1.28;
  letter-spacing: -0.008em;
  margin: 18px 0 0;
}

.lp-section--navy .lp-section__head h2,
.lp-section--charcoal .lp-section__head h2 { color: var(--cream); }

/* ── Features ───────────────────────────────────────────────────────── */

.lp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-light);
  border: 1px solid var(--rule-light);
}

.lp-feature {
  background: var(--ivory);
  padding: 44px 38px;
}

.lp-feature__num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gold-dark);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 20px;
}

.lp-feature h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 11px;
  line-height: 1.35;
}

.lp-feature p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

/* ── How it works / Guarantee (shared numbered-pillar pattern) ───────── */

.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
}

.lp-step__num {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 22px;
  font-weight: 400;
}

.lp-step h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--cream);
}

.lp-step p {
  color: var(--cream-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
  max-width: 34ch;
}

/* ── Testimonials ───────────────────────────────────────────────────── */

.lp-testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.lp-testimonial {
  padding: 36px 32px;
  background: var(--ivory);
  border: 1px solid var(--rule-light);
  border-radius: var(--radius-md);
  position: relative;
}

.lp-testimonial::before {
  content: '\201C';
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--gold-dark);
  opacity: 0.35;
  display: block;
  margin-bottom: 4px;
}

.lp-testimonial blockquote {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.55;
  margin: 0 0 22px;
  color: var(--ink);
}

.lp-testimonial cite {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-style: normal;
}

/* ── FAQ ────────────────────────────────────────────────────────────── */

.lp-faq { max-width: 760px; margin: 0 auto; }

.lp-faq details {
  border-top: 1px solid var(--rule-light);
  padding: 26px 0;
}
.lp-faq details:last-child { border-bottom: 1px solid var(--rule-light); }

.lp-faq summary {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--ink);
}
.lp-faq summary::-webkit-details-marker { display: none; }

.lp-faq summary::after {
  content: '+';
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--gold-dark);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.lp-faq details[open] summary::after { transform: rotate(45deg); }

.lp-faq__answer {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 14px 0 0;
  max-width: 62ch;
}

/* ── Closing CTA ────────────────────────────────────────────────────── */

.lp-closing {
  text-align: center;
  padding: 128px 0;
  background: var(--navy);
  color: var(--cream);
}

.lp-closing h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.35rem;
  letter-spacing: -0.008em;
  max-width: 17ch;
  margin: 20px auto 36px;
  line-height: 1.25;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.lp-footer {
  background: var(--charcoal);
  color: var(--cream-muted);
  padding: 56px 0 40px;
  border-top: 1px solid var(--rule-dark);
}

.lp-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 40px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--rule-dark);
}

.lp-footer__brand {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--cream);
}

.lp-footer__tagline {
  font-size: 0.88rem;
  color: var(--cream-muted);
  margin-top: 8px;
  max-width: 32ch;
}

.lp-footer__links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.lp-footer__bottom {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--cream-muted);
  opacity: 0.7;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  :root { --space-section-lg: 88px; --space-section-md: 72px; }
  .lp-hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .lp-hero__frame { aspect-ratio: 16 / 10; order: -1; }
  .lp-hero h1 { font-size: 2.5rem; }
  .lp-features { grid-template-columns: 1fr 1fr; }
  .lp-steps { grid-template-columns: 1fr; gap: 40px; }
  .lp-testimonials { grid-template-columns: 1fr; gap: 20px; }
  .lp-nav__links { display: none; }
  .lp-section__head { margin-bottom: 48px; }
  .lp-closing { padding: 96px 0; }
}

@media (max-width: 640px) {
  :root { --space-section-lg: 64px; --space-section-md: 56px; }
  .lp-hero { padding: 48px 0 56px; }
  .lp-hero h1 { font-size: 2.1rem; }
  .lp-hero__sub { font-size: 1.04rem; }
  .lp-btn--lg { padding: 14px 26px; font-size: 0.94rem; width: 100%; }
  .lp-hero__ctas { flex-direction: column; align-items: stretch; }
  .lp-features { grid-template-columns: 1fr; }
  .lp-nav__inner { padding: 0 16px; height: 64px; }
  .lp__inner, .lp-hero__inner, .lp-nav__inner { padding-left: 16px; padding-right: 16px; }
  .lp-nav .lp-nav__brand { font-size: 1rem; }
  .lp-nav .lp-nav__signin { font-size: 0.82rem; padding: 10px 0; margin: -10px 0; }
  .lp-nav__actions { gap: 10px; }
  .lp-nav__actions .lp-btn { padding: 9px 14px; font-size: 0.82rem; }
  .lp-closing { padding: 72px 0; }
  .lp-closing h2 { font-size: 1.7rem; }
  .lp-footer__top { flex-direction: column; }
  .lp-footer__bottom { display: flex; flex-direction: column; gap: 6px; }
}

/* Respect reduced-motion preferences — the only animation on this page
   is the subtle button lift, nav scroll-shadow fade, and FAQ icon
   rotation, so this is a small, complete override. */
@media (prefers-reduced-motion: reduce) {
  .lp-btn, .lp-nav, .lp-faq summary::after, .lp-nav__links a, .lp-footer__links a {
    transition: none !important;
  }
  .lp-btn:hover { transform: none; }
}
