/* ===== Home landing page =====
   Spacing tokens: 2 4 8 12 16 24 32 40 48 64 80 96 (px). Type follows the Tailwind scale.
   Colours come from Admin → Appearance through the variables in styles.css. */

.lp {
  --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lp-ink-muted: color-mix(in srgb, var(--ink) 62%, var(--bg));
  font-family: "Manrope", var(--font);
  color: var(--ink);
}
.lp h1, .lp h2, .lp h3 { font-family: inherit; margin: 0; letter-spacing: -0.01em; }
.lp p { margin: 0; }
.lp :where(h1, h2, h3) { text-wrap: balance; }
.lp :where(p, li, .body-3) { text-wrap: pretty; }
.lp .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Text styles ---- */
.lp .heading-1 { font-size: 3.75rem; line-height: 1; font-weight: 600; }
.lp .heading-2 { font-size: 3rem; line-height: 1; font-weight: 600; }
.lp .heading-3 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; }
.lp .heading-4 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.lp .title-1 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 500; }
.lp .title-2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.lp .body-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 400; }
.lp .body-6 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.lp .button-md { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.lp .button-sm { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.lp .caption-1 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.lp .caption-3 { font-size: 0.75rem; line-height: 1rem; font-weight: 600; }

/* ---- Icons ---- */
.lp-icon { width: 24px; height: 24px; flex: none; }
.lp-icon-sm { width: 16px; height: 16px; }

/* ---- Buttons and links ---- */
.lp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px;
  background: var(--brand); color: #fff; text-decoration: none;
  transition: transform 500ms var(--lp-ease), background-color 300ms var(--lp-ease);
}
.lp-btn:hover { background: var(--brand-dark); transform: translateY(-2px); }
.lp-btn:hover .lp-icon { transform: translateX(2px); }
.lp-btn .lp-icon, .lp-link .lp-icon, .lp-calc-go .lp-icon { transition: transform 500ms var(--lp-ease); }
.lp-btn:active { transform: scale(0.98); }
.lp-btn--light { background: #fff; color: var(--brand-dark); }
.lp-btn--light:hover { background: color-mix(in srgb, #fff 88%, var(--brand)); }
.lp a:focus-visible, .lp summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px;
}
.lp-link { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); text-decoration: none; }
.lp-link:hover .lp-icon { transform: translateX(4px); }

/* ---- Hero ---- */
.lp-hero { padding-block: 96px 64px; position: relative; isolation: isolate; overflow-x: clip; }

/* Animated hero background: drifting aurora glow (::before) over a faint tech grid (::after).
   Brand colours from Admin → Appearance. Only transform/opacity animate, so it stays on the GPU. */
.lp-hero::before, .lp-hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.lp-hero::before {
  inset: -120px -10% auto; height: 760px;
  background:
    radial-gradient(38% 45% at 22% 30%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 70%),
    radial-gradient(34% 40% at 78% 22%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%),
    radial-gradient(30% 38% at 55% 70%, color-mix(in srgb, var(--brand-dark) 20%, transparent), transparent 70%);
  filter: blur(40px);
  animation: lp-aurora 18s ease-in-out infinite alternate;
}
.lp-hero::after {
  inset: 0 0 auto; height: 720px;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%);
  animation: lp-grid 24s linear infinite;
}
@keyframes lp-aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); opacity: .9; }
  50%  { transform: translate3d(4%, 3%, 0) scale(1.08) rotate(4deg); opacity: 1; }
  100% { transform: translate3d(-4%, -2%, 0) scale(1.02) rotate(-3deg); opacity: .85; }
}
@keyframes lp-grid { to { background-position: 48px 48px; } }
.lp-hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 9999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
}
.lp-hero-title {
  max-width: 680px; margin-top: 24px;
  background: linear-gradient(to right, #000000, #666666);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* The CMS headline wraps its second phrase in <em>: give it its own line, never italic. */
.lp-hero-title em { display: block; font-style: normal; }
.lp-hero-lead { max-width: 680px; margin-top: 24px; color: var(--lp-ink-muted); }
.lp-hero-lead p { margin: 0; }
.lp-hero-actions { margin-top: 32px; }
.lp-proof {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px;
  list-style: none; padding: 0; margin: 24px 0 0; color: var(--lp-ink-muted);
}
.lp-proof li { display: inline-flex; align-items: center; gap: 8px; }
.lp-proof .lp-icon { color: var(--ok); }

/* Frame around the calculators: outer 24px radius, 8px gap, so cards get 16px. */
#calculators { scroll-margin-top: 24px; }
.lp-frame {
  margin-top: 64px; padding: 8px; border-radius: 24px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.lp-frame-bar { display: flex; gap: 8px; padding: 8px 12px 12px; }
.lp-frame-bar span { width: 12px; height: 12px; border-radius: 9999px; background: var(--line); }
.lp-frame-media img { display: block; width: 100%; border-radius: 16px; margin-bottom: 8px; aspect-ratio: 21 / 9; object-fit: cover; }
.lp-calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.lp-calc {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none;
  transition: transform 500ms var(--lp-ease), border-color 300ms var(--lp-ease);
}
.lp-calc:hover { transform: translateY(-4px); border-color: var(--brand-2); }
.lp-calc:active { transform: translateY(1px); }
.lp-calc:hover .lp-calc-go .lp-icon { transform: translateX(4px); }
.lp-calc-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px;
  border-radius: 12px; background: var(--brand-tint); font-size: 1.5rem; line-height: 2rem;
}
.lp-calc p { color: var(--lp-ink-muted); flex: 1; }
.lp-calc-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--brand); }

/* ---- Sections ---- */
.lp-section { padding-block: 96px 0; }
.lp-section-head { max-width: 680px; margin-bottom: 48px; }
.lp-section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.lp-kicker { color: var(--brand); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.lp-section-head h2 { color: var(--ink); }

/* Benefits */
.lp-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lp-benefit {
  display: flex; flex-direction: column; gap: 12px;
  padding: 32px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
}
.lp-benefit-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px;
  border-radius: 12px; background: var(--brand-tint); color: var(--brand); font-size: 1.5rem; line-height: 2rem;
}
.lp-benefit-img { width: 100%; border-radius: 8px; aspect-ratio: 16 / 9; object-fit: cover; }
.lp-benefit-body { color: var(--lp-ink-muted); }
.lp-benefit-body p { margin: 0; }

/* Tagline reveal */
.lp-tagline { padding-block: 96px 0; }
.lp-tagline-text { max-width: 880px; margin-inline: auto; text-align: center; }
.lp-word {
  color: color-mix(in srgb, var(--ink) 30%, var(--bg));
  transition: color 500ms var(--lp-ease);
}
.lp-word.is-on { color: var(--ink); }
html:not(.lp-js) .lp-word { color: var(--ink); }

/* Steps */
.lp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.lp-step {
  display: flex; flex-direction: column; gap: 12px;
  padding: 32px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
}
.lp-step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px;
  border-radius: 9999px; background: var(--brand); color: #fff;
}
.lp-step p { color: var(--lp-ink-muted); }

/* FAQ */
.lp-faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; align-items: start; }
.lp-faq { display: flex; flex-direction: column; gap: 8px; }
.lp-faq-item { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lp-faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px; cursor: pointer; list-style: none;
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-icon { width: 16px; height: 16px; color: var(--brand); transition: transform 500ms var(--lp-ease); }
.lp-faq-item[open] .lp-faq-icon { transform: rotate(45deg); }
.lp-faq-item summary:hover { color: var(--brand); }
.lp-faq-answer { padding: 0 24px 24px; color: var(--lp-ink-muted); }
.lp-faq-answer p { margin: 0 0 8px; }

/* Final CTA */
.lp-cta {
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
  padding: 80px 32px; border-radius: 24px; background: var(--brand-dark); color: #fff;
}
.lp-cta h2 { color: #fff; }
.lp-cta p { color: color-mix(in srgb, #fff 72%, var(--brand-dark)); max-width: 680px; }
.lp-cta .lp-btn { margin-top: 16px; }
.lp { padding-bottom: 96px; }

/* ---- Scroll reveals (only when JS is running) ----
   Items in the same row share a trigger; --i staggers them 80ms apart. */
.lp-js .lp-reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 700ms var(--lp-ease), transform 700ms var(--lp-ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.lp-js .lp-reveal.is-in { opacity: 1; transform: none; }

/* ---- Hero load sequence ----
   CSS only, so it runs without JS and always ends fully visible (fill-mode both). */
@keyframes lp-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lp-pop  { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

.lp-hero-inner > * { animation: lp-rise 800ms var(--lp-ease) both; }
.lp-hero-inner > :nth-child(1) { animation-delay: 0ms; }
.lp-hero-inner > :nth-child(2) { animation-delay: 80ms; }
.lp-hero-inner > :nth-child(3) { animation-delay: 160ms; }
.lp-hero-inner > :nth-child(4) { animation-delay: 240ms; }
.lp-hero-inner > :nth-child(5) { animation-delay: 320ms; }
/* Proof items fade in one by one after the list itself has risen. */
.lp-proof li { animation: lp-fade 600ms var(--lp-ease) both; animation-delay: calc(480ms + var(--i, 0) * 80ms); }
.lp-proof .lp-icon { animation: lp-pop 500ms var(--lp-ease) both; animation-delay: calc(560ms + var(--i, 0) * 80ms); }

/* The calculator frame rises in, then its cards follow 80ms apart (capped so many cards never drag). */
.lp-frame { animation: lp-rise 900ms var(--lp-ease) 360ms both; }
.lp-calc { animation: lp-rise 700ms var(--lp-ease) both; animation-delay: calc(520ms + min(var(--i, 0), 6) * 80ms); }

/* Calculator card hover: icon lifts and tilts slightly. */
.lp-calc-icon { transition: transform 500ms var(--lp-ease); }
.lp-calc:hover .lp-calc-icon { transform: translateY(-2px) rotate(-6deg) scale(1.06); }

/* Benefit icons and step numbers pop once their card has revealed. */
.lp-js .lp-benefit-icon, .lp-js .lp-step-num {
  opacity: 0; transform: scale(0.6);
  transition: opacity 500ms var(--lp-ease), transform 500ms var(--lp-ease);
  transition-delay: calc(240ms + var(--i, 0) * 80ms);
}
.lp-js .is-in .lp-benefit-icon, .lp-js .is-in .lp-step-num { opacity: 1; transform: none; }
.lp-benefit:hover .lp-benefit-icon { transform: translateY(-2px) rotate(-6deg); transition-delay: 0ms; }

/* Primary hero CTA: a soft ring pulses three times to draw the eye, then stops. */
.lp-btn--pulse { position: relative; }
.lp-btn--pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 2px var(--brand);
  opacity: 0; animation: lp-ring 2400ms var(--lp-ease) 1400ms 3;
}
@keyframes lp-ring { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.18); } }

/* FAQ: the answer settles in when its question opens. */
.lp-faq-item[open] .lp-faq-answer { animation: lp-faq-in 500ms var(--lp-ease); }
@keyframes lp-faq-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Final CTA: arrow keeps nudging while the panel is hovered. */
.lp-cta:hover .lp-btn .lp-icon { animation: lp-nudge 1200ms var(--lp-ease) infinite; }
@keyframes lp-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(4px); } }

/* Reduced motion: no movement, only a plain fade. */
@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before, .lp *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .lp-js .lp-reveal, .lp-js .lp-benefit-icon, .lp-js .lp-step-num { transform: none; }
  .lp-hero::before, .lp-hero::after { animation: none; }
  .lp-hero-inner > *, .lp-frame, .lp-calc, .lp-proof li, .lp-proof .lp-icon, .lp-faq-item[open] .lp-faq-answer { animation: lp-fade 400ms var(--lp-ease) both; animation-delay: 0ms; }
  .lp-btn--pulse::after, .lp-cta:hover .lp-btn .lp-icon { animation: none; }
  .lp-calc:hover .lp-calc-icon, .lp-benefit:hover .lp-benefit-icon { transform: none; }
  .lp-word { color: var(--ink); }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .lp-steps { grid-template-columns: 1fr; }
  .lp-faq-wrap { grid-template-columns: 1fr; gap: 0; }
  .lp .heading-2 { font-size: 2.25rem; line-height: 2.5rem; }
}
@media (max-width: 640px) {
  .lp-hero { padding-block: 48px 40px; }
  .lp-hero::before { height: 520px; filter: blur(32px); }
  .lp-hero::after { height: 480px; background-size: 32px 32px; }
  .lp .heading-1 { font-size: 2.25rem; line-height: 2.5rem; }
  .lp .heading-2 { font-size: 1.875rem; line-height: 2.25rem; }
  .lp .heading-3 { font-size: 1.875rem; line-height: 2.25rem; }
  .lp-frame { margin-top: 40px; }
  .lp-benefits { grid-template-columns: 1fr; }
  .lp-benefit, .lp-step { padding: 24px; }
  .lp-section, .lp-tagline { padding-top: 64px; }
  .lp-section-head { margin-bottom: 32px; }
  .lp-cta { padding: 48px 24px; }
  .lp { padding-bottom: 64px; }
}
