/* Landing page.
 *
 * Replaces home_compact.css. Everything here reads from the --ui-* tokens in
 * unified_theme.css, so there are no one-off hex values competing with the palette.
 *
 * Layout rule followed throughout: full-bleed <section> owns the background band, an
 * inner .lp-wrap owns the max-width. That keeps alternating bands edge-to-edge without
 * each section re-declaring its own centring.
 *
 * Colour budget, roughly 60/30/10 — neutral surfaces, ink text, brand reserved for
 * actions and a small number of emphasis marks. Only two bands are dark, and both are
 * deliberate contrast beats rather than decoration.
 */

/* ---------------------------------------------------------------- foundations */

body.apple-ui .lp {
  /* Clears the fixed navbar. */
  padding-top: 64px;
}

body.apple-ui .lp-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

body.apple-ui .lp-section {
  padding: 88px 0;
}

body.apple-ui .lp-section--tight {
  padding: 56px 0;
}

/* Alternating bands. Adjacent sections must not repeat a fill, or the boundary
   disappears and the page reads as one undifferentiated column. */
body.apple-ui .lp-band-plain {
  background: var(--ui-bg);
}
body.apple-ui .lp-band-surface {
  background: var(--ui-surface);
}
body.apple-ui .lp-band-soft {
  background: var(--ui-surface-soft);
}
body.apple-ui .lp-band-dark {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(37, 99, 235, 0.22) 0%, transparent 55%),
    linear-gradient(160deg, #0b1220 0%, #131c31 100%);
  color: #e6ebf5;
}

/* Section heading block */
body.apple-ui .lp-head {
  max-width: 660px;
  margin: 0 auto 52px;
  text-align: center;
}

body.apple-ui .lp-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ui-brand) !important;
  background: var(--ui-brand-soft);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
}

body.apple-ui .lp-band-dark .lp-eyebrow {
  color: #9dc0ff !important;
  background: rgba(157, 192, 255, 0.12);
}

body.apple-ui .lp-head h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.022em;
  color: var(--ui-ink) !important;
  margin: 0 0 14px;
}

body.apple-ui .lp-band-dark .lp-head h2 {
  color: #ffffff !important;
}

body.apple-ui .lp-head p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ui-body) !important;
  margin: 0;
}

body.apple-ui .lp-band-dark .lp-head p {
  color: #aab6cd !important;
}

/* ---------------------------------------------------------------- buttons */

body.apple-ui .lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 160ms cubic-bezier(0.2, 0.8, 0.3, 1),
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

body.apple-ui .lp-btn:focus-visible {
  outline: 3px solid var(--ui-brand-ring);
  outline-offset: 2px;
}

body.apple-ui .lp-btn-primary {
  background: var(--ui-brand);
  color: var(--ui-on-brand) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.26);
}

body.apple-ui .lp-btn-primary:hover {
  background: var(--ui-brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.32);
}

body.apple-ui .lp-btn-secondary {
  background: var(--ui-surface);
  color: var(--ui-text) !important;
  border-color: var(--ui-line-strong);
}

body.apple-ui .lp-btn-secondary:hover {
  border-color: var(--ui-brand);
  color: var(--ui-brand) !important;
  transform: translateY(-2px);
}

body.apple-ui .lp-band-dark .lp-btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff !important;
}

body.apple-ui .lp-band-dark .lp-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff !important;
}

/* ---------------------------------------------------------------- hero */

body.apple-ui .lp-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 84px;
  background:
    radial-gradient(ellipse 900px 520px at 78% -8%, rgba(37, 99, 235, 0.1) 0%, transparent 68%),
    linear-gradient(180deg, var(--ui-surface) 0%, var(--ui-bg) 100%);
  border-bottom: 1px solid var(--ui-line);
}

body.apple-ui .lp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
}

body.apple-ui .lp-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.07;
  letter-spacing: -0.032em;
  color: var(--ui-ink) !important;
  margin: 18px 0 20px;
}

/* One highlighted phrase in the headline. A gradient-filled span reads as intentional
   typography; the same treatment repeated would just read as noise. */
body.apple-ui .lp-hero h1 .lp-hl {
  background: linear-gradient(100deg, var(--ui-brand) 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--ui-brand) !important;
}

body.apple-ui .lp-hero-sub {
  font-size: 1.125rem;
  line-height: 1.62;
  color: var(--ui-body) !important;
  margin: 0 0 30px;
  max-width: 54ch;
}

body.apple-ui .lp-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

body.apple-ui .lp-hero-assure {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 0;
  margin: 0;
  list-style: none;
}

body.apple-ui .lp-hero-assure li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  color: var(--ui-muted) !important;
}

body.apple-ui .lp-tick {
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--ui-brand-soft);
  color: var(--ui-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
}

/* Hero side panel: the pricing comparison. Dark, because it is the one number on the
   page that should stop a reader, and it anchors the light hero beside it. */
body.apple-ui .lp-hero-panel {
  position: relative;
  border-radius: var(--ui-radius-lg);
  padding: 30px;
  background: linear-gradient(158deg, #101a2f 0%, #1b2744 100%);
  box-shadow: var(--ui-shadow-lg);
  color: #dfe6f3;
}

body.apple-ui .lp-panel-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #93b4ff !important;
  margin: 0 0 6px;
}

body.apple-ui .lp-panel-figure {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff !important;
  margin: 0 0 6px;
}

body.apple-ui .lp-panel-note {
  font-size: 0.875rem;
  color: #9fadc7 !important;
  margin: 0 0 22px;
}

body.apple-ui .lp-panel-rows {
  list-style: none;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 13px;
}

body.apple-ui .lp-panel-rows li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 0.9rem;
  color: #b9c5da !important;
}

/* unified_theme.css carries a blanket `body.apple-ui span { color: var(--ui-text) }`.
   A direct rule beats inheritance, so every span on these dark surfaces rendered
   near-black on navy and disappeared — only the white <strong> values stayed legible.
   Restoring inheritance lets each span take its container's colour. */
body.apple-ui .lp-hero-panel span,
body.apple-ui .lp-band-dark span {
  color: inherit;
}

body.apple-ui .lp-panel-rows li strong {
  color: #ffffff !important;
  font-weight: 600;
  text-align: right;
}

/* ---------------------------------------------------------------- trust strip */

body.apple-ui .lp-trust {
  padding: 30px 0;
  background: var(--ui-surface);
  border-bottom: 1px solid var(--ui-line);
}

body.apple-ui .lp-trust-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-muted) !important;
  margin: 0 0 20px;
}

body.apple-ui .lp-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px 52px;
}

/* Desaturated by default so a set of mismatched vendor logos reads as one calm row
   rather than six competing brand colours. */
body.apple-ui .lp-logos img {
  height: 26px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.5;
  transition: filter 220ms ease, opacity 220ms ease;
}

body.apple-ui .lp-logos img:hover {
  filter: grayscale(0);
  opacity: 1;
}

/* ---------------------------------------------------------------- product cards */

body.apple-ui .lp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

body.apple-ui .lp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  padding: 30px 26px;
  box-shadow: var(--ui-shadow-sm);
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.3, 1),
    box-shadow 200ms ease,
    border-color 200ms ease;
}

body.apple-ui .lp-card:hover {
  transform: translateY(-4px);
  border-color: var(--ui-line-strong);
  box-shadow: var(--ui-shadow-lg);
}

body.apple-ui .lp-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ui-brand-soft);
  color: var(--ui-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

body.apple-ui .lp-card-icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.apple-ui .lp-card h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
  color: var(--ui-ink) !important;
  margin: 0 0 9px;
}

body.apple-ui .lp-card p {
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--ui-body) !important;
  margin: 0 0 18px;
}

body.apple-ui .lp-card-meta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--ui-line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

body.apple-ui .lp-price {
  font-size: 0.8125rem;
  color: var(--ui-muted) !important;
}

body.apple-ui .lp-price strong {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ui-ink) !important;
}

body.apple-ui .lp-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ui-brand) !important;
  text-decoration: none;
  white-space: nowrap;
}

body.apple-ui .lp-card-link:hover {
  text-decoration: underline;
}

/* The one card allowed extra visual weight. */
body.apple-ui .lp-card--featured {
  border-color: var(--ui-brand);
  box-shadow: 0 0 0 1px var(--ui-brand), var(--ui-shadow-md);
}

body.apple-ui .lp-tag {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ui-brand) !important;
  background: var(--ui-brand-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------------------------------------------------------------- steps */

body.apple-ui .lp-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 34px 26px;
  counter-reset: lp-step;
}

body.apple-ui .lp-step {
  position: relative;
  counter-increment: lp-step;
  padding-top: 52px;
}

body.apple-ui .lp-step::before {
  content: counter(lp-step);
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ui-brand);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Connector between steps. Hidden on the last one and on narrow screens, where the
   grid stacks and a horizontal rule would point at nothing. */
body.apple-ui .lp-step::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 50px;
  right: -26px;
  height: 1px;
  background: linear-gradient(90deg, var(--ui-line-strong), transparent);
}

body.apple-ui .lp-step:last-child::after {
  display: none;
}

body.apple-ui .lp-step h3 {
  font-size: 1.0625rem;
  color: var(--ui-ink) !important;
  margin: 0 0 8px;
}

body.apple-ui .lp-step p {
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--ui-body) !important;
  margin: 0;
}

/* ---------------------------------------------------------------- comparison */

body.apple-ui .lp-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

body.apple-ui .lp-compare-col {
  border-radius: var(--ui-radius-lg);
  padding: 28px 26px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
}

body.apple-ui .lp-compare-col--win {
  border-color: var(--ui-brand);
  background: linear-gradient(180deg, var(--ui-brand-soft) 0%, var(--ui-surface) 62%);
  box-shadow: var(--ui-shadow-md);
}

body.apple-ui .lp-compare-col h3 {
  font-size: 1.0625rem;
  color: var(--ui-ink) !important;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ui-line);
}

body.apple-ui .lp-compare-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

body.apple-ui .lp-compare-col li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ui-body) !important;
}

body.apple-ui .lp-mark {
  flex: none;
  margin-top: 1px;
  font-weight: 700;
  font-size: 0.8125rem;
}

body.apple-ui .lp-mark--yes {
  color: var(--ui-success) !important;
}
body.apple-ui .lp-mark--no {
  color: var(--ui-muted) !important;
}

/* ---------------------------------------------------------------- featured products */

body.apple-ui .lp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

body.apple-ui .lp-section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.125rem);
  letter-spacing: -0.022em;
  color: var(--ui-ink) !important;
  margin: 0;
}

body.apple-ui .lp-section-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ui-brand) !important;
  text-decoration: none;
}

body.apple-ui .lp-section-link:hover {
  text-decoration: underline;
}

/* Reuses .product-item, which homepage_content.js emits, so the JS needs no changes. */
body.apple-ui .lp-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

body.apple-ui .lp-products .product-item {
  background: var(--ui-surface) !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius-md) !important;
  padding: 18px !important;
  text-align: left;
  box-shadow: var(--ui-shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

body.apple-ui .lp-products .product-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--ui-shadow-md);
}

body.apple-ui .lp-products .product-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--ui-surface-soft);
  border-radius: var(--ui-radius-sm);
  margin-bottom: 12px;
}

body.apple-ui .lp-products .product-item h3 {
  font-size: 0.9375rem;
  color: var(--ui-ink) !important;
  margin: 0 0 6px;
}

body.apple-ui .lp-products .product-item p {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ui-body) !important;
  margin: 0 0 4px;
}

/* homepage_content.js renders the price as the second <p>. */
body.apple-ui .lp-products .product-item p:nth-of-type(2) {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ui-ink) !important;
}

/* ---------------------------------------------------------------- closing CTA */

body.apple-ui .lp-cta-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

body.apple-ui .lp-cta-inner h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #ffffff !important;
  margin: 0 0 14px;
}

body.apple-ui .lp-cta-inner p {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #aab6cd !important;
  margin: 0 0 28px;
}

body.apple-ui .lp-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------------------------------------------------------------- reveal */

/* Paired with the IntersectionObserver in index.html. The no-preference guard matters:
   without it this is exactly the vestibular trigger the reduced-motion setting exists
   for, and an un-fired observer would otherwise leave content stuck at opacity 0. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 620ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.show {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 940px) {
  body.apple-ui .lp-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  body.apple-ui .lp-hero-sub {
    max-width: none;
  }

  body.apple-ui .lp-step::after {
    display: none;
  }
}

@media (max-width: 640px) {
  body.apple-ui .lp-wrap {
    padding: 0 18px;
  }

  body.apple-ui .lp-section {
    padding: 60px 0;
  }

  body.apple-ui .lp-hero {
    padding: 52px 0 60px;
  }

  body.apple-ui .lp-head {
    margin-bottom: 38px;
  }

  body.apple-ui .lp-hero-panel {
    padding: 24px;
  }

  body.apple-ui .lp-panel-figure {
    font-size: 2.1rem;
  }

  /* Full-width stacked buttons: side-by-side pills below ~380px leave tap targets
     narrower than the 44px minimum. */
  body.apple-ui .lp-hero-cta,
  body.apple-ui .lp-cta-actions {
    flex-direction: column;
  }

  body.apple-ui .lp-hero-cta .lp-btn,
  body.apple-ui .lp-cta-actions .lp-btn {
    width: 100%;
  }

  body.apple-ui .lp-logos {
    gap: 22px 32px;
  }

  body.apple-ui .lp-logos img {
    height: 21px;
  }

  body.apple-ui .lp-card {
    padding: 24px 20px;
  }

  body.apple-ui .lp-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
