/* Public site (R4-01): enterprise header and footer of views/layouts/public.php and the home page sections of
   views/public/home.php. Loaded after app.css and uses its tokens, so light, dark and system themes and the brand colour
   (Core\Color::brandCss) apply unchanged. Landing-only tokens follow the same three blocks as app.css. No web fonts. */

:root { --lp-out: #d9fdd3; --lp-dot-1: #ef4444; --lp-dot-2: #f59e0b; --lp-dot-3: #22c55e; }
[data-theme="dark"] { --lp-out: #0b4d3f; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] { --lp-out: #0b4d3f; }
}

html { scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
.public .wrap { max-width: 1200px; }
.public main { min-height: 60vh; }

/* Header */
.lp-header { transition: box-shadow .2s ease; }
.lp-header.is-scrolled { box-shadow: var(--sh-md); }
.lp-header .wrap { display: flex; align-items: center; gap: var(--s-4); min-height: 64px; }
.lp-header .brand { min-width: 0; flex: 0 1 auto; }
.brand .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.lp-links { display: flex; align-items: center; gap: var(--s-1); margin: 0 auto; }
.lp-links a { color: var(--text-muted); font-weight: 550; padding: 6px 10px; border-radius: var(--r-sm); white-space: nowrap; }
.lp-links a:hover, .lp-links a.is-active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.lp-actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; flex: none; }
.lp-links + .lp-actions { margin-left: 0; }
.lp-login { color: var(--text-muted); font-weight: 550; padding: 6px 8px; white-space: nowrap; }
.lp-login:hover { color: var(--text); text-decoration: none; }
.lp-menu { display: none; }
.lp-menu-panel { width: min(320px, calc(100vw - 24px)); padding: var(--s-2); }
.lp-menu-panel nav { display: grid; gap: 2px; }
.lp-menu-panel .menu-item { font-size: var(--fs-base); padding: 10px 12px; }
.lp-menu-panel .btn { margin-top: var(--s-2); }
@media (max-width: 1099.98px) {
  .lp-links { display: none; }
  .lp-menu { display: block; }
}
@media (max-width: 639.98px) {
  .lp-login { display: none; }
  .brand .brand-name { max-width: 46vw; }
}
@media (max-width: 479.98px) {
  .lp-cta-top { display: none; }
  .public .wrap { padding: 0 var(--s-4); }
}

/* Hero */
.lp-hero { padding: var(--s-12) 0 64px; background: radial-gradient(1200px 520px at 85% -10%, var(--primary-soft), transparent 70%), linear-gradient(180deg, var(--primary-soft), var(--bg) 85%); }
.lp-hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.lp-hero h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.1; letter-spacing: -.025em; margin: var(--s-4) 0; }
.lp-hero h1 span { display: block; }
.lp-hero .lead { font-size: 17px; }
.lp-badge { white-space: normal; text-align: left; font-size: var(--fs-sm); padding: 4px 12px; margin: 0; }
.lp-hero .hero-points { gap: var(--s-2) var(--s-5); }

/* Product mockup (illustration, aria-hidden content inside role="img") */
.lp-mock { position: relative; margin: 0; }
.lp-mock-win { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--sh-lg); overflow: hidden; }
.lp-mock-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lp-dot-1); }
.lp-dot + .lp-dot { background: var(--lp-dot-2); }
.lp-dot + .lp-dot + .lp-dot { background: var(--lp-dot-3); }
.lp-mock-title { flex: 1; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600; margin-right: 46px; }
.lp-mock-title .icon { width: 14px; height: 14px; }
.lp-mock-body { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 58%); min-height: 320px; }
.lp-mock-list { list-style: none; margin: 0; padding: var(--s-2); border-right: 1px solid var(--border); display: grid; align-content: start; gap: 2px; }
.lp-mock-list li { display: flex; align-items: center; gap: var(--s-2); padding: 8px; border-radius: var(--r-md); }
.lp-mock-list li.is-active { background: var(--primary-soft); }
.lp-mock-item { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lp-mock-item strong { font-size: var(--fs-sm); }
.lp-mock-item span { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-mock-time { font-size: 11px; color: var(--text-subtle); align-self: flex-start; }
.lp-av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; color: #ffffff; background: #2563eb; }
.lp-av-1 { background: #15803d; }
.lp-av-3 { background: #9333ea; }
.lp-mock-chat { background: var(--wa-chat); padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.lp-mock-head { display: flex; align-items: center; gap: var(--s-2); padding-bottom: var(--s-2); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.lp-msg { max-width: 88%; padding: 7px 10px; border-radius: 10px; font-size: var(--fs-sm); line-height: 1.4; color: var(--text); box-shadow: 0 1px 1px rgba(0, 0, 0, .1); }
.lp-in { background: var(--wa-bubble); align-self: flex-start; border-top-left-radius: 2px; }
.lp-out { background: var(--lp-out); align-self: flex-end; border-top-right-radius: 2px; }
.lp-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 18px; background: var(--primary-soft); color: var(--primary-text); vertical-align: 1px; }
.lp-mock-head .lp-tag { margin-left: auto; }
.lp-product { display: flex; align-items: center; gap: var(--s-2); width: 88%; }
.lp-product-img { width: 40px; height: 40px; border-radius: 6px; background: var(--surface); display: grid; place-items: center; color: var(--text-subtle); flex: none; }
.lp-product-text { display: flex; flex-direction: column; min-width: 0; }
.lp-product-text span { font-size: var(--fs-xs); color: var(--text-muted); }
.lp-product-btn { margin-left: auto; font-size: var(--fs-xs); font-weight: 700; color: var(--primary-text); border: 1px solid currentColor; border-radius: 6px; padding: 2px 8px; }
.lp-mock-card { position: absolute; left: -28px; bottom: -32px; width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 10px 12px; }
.lp-mock-card-label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.lp-mock-card-label .icon { width: 14px; height: 14px; color: var(--primary-text); }
.lp-spark { display: block; width: 100%; height: 48px; }
.lp-spark-line { fill: none; stroke: var(--primary); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.lp-spark-area { fill: var(--primary-soft); }
@media (max-width: 1099.98px) {
  .lp-mock-card { left: auto; right: 12px; bottom: -24px; }
}
@media (max-width: 900px) {
  .lp-hero .wrap { grid-template-columns: minmax(0, 1fr); gap: var(--s-10); }
  .lp-mock { max-width: 620px; }
}
@media (max-width: 639.98px) {
  .lp-hero { padding: var(--s-8) 0 var(--s-10); }
  .lp-mock-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .lp-mock-list { display: none; }
  .lp-mock-card { position: static; width: auto; margin-top: var(--s-3); box-shadow: var(--sh-sm); }
}

/* Trust stats and customer logos */
.lp-stats { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: var(--s-6) 0; }
.lp-stats-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-4); text-align: center; }
.lp-stats-list strong { display: block; font-size: var(--fs-3xl); font-weight: 750; letter-spacing: -.02em; color: var(--text); line-height: 1.2; }
.lp-stats-list span { color: var(--text-muted); font-size: var(--fs-sm); }
.lp-kicker { text-align: center; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 650; margin: 0 0 var(--s-4); }
.lp-logos { padding: var(--s-8) 0 0; }
.lp-logo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); }
.lp-logo-list li { background: #ffffff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 14px; }
.lp-logo-list img { display: block; width: 140px; height: 48px; object-fit: contain; filter: grayscale(1); opacity: .85; }
.lp-logo-list li:hover img { filter: none; opacity: 1; }

/* Features by category */
.lp-jump ul { list-style: none; margin: 0 0 var(--s-6); padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }
.lp-jump a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 550; }
.lp-jump a:hover { border-color: var(--primary); color: var(--primary-text); text-decoration: none; }
.lp-jump .icon { width: 16px; height: 16px; color: var(--primary-text); }
.lp-cat { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--s-8); padding: var(--s-8) 0; border-top: 1px solid var(--border); }
.lp-cat-head h3 { font-size: var(--fs-xl); margin: var(--s-3) 0 var(--s-1); }
.lp-cat-head p { color: var(--text-muted); margin: 0; }
.lp-cat-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-6); }
.lp-feature, .lp-sec { display: flex; gap: var(--s-3); align-items: flex-start; }
.lp-feature-icon { width: 34px; height: 34px; border-radius: var(--r-md); background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; flex: none; }
.lp-feature-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-feature-text strong { font-size: var(--fs-base); font-weight: 650; color: var(--text); }
.lp-feature-text span { font-size: var(--fs-sm); color: var(--text-muted); }
.lp-cat-more { display: none; margin-top: var(--s-4); }
@media (max-width: 900px) {
  .lp-cat { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); padding: var(--s-6) 0; }
}
@media (max-width: 639.98px) {
  .lp-cat-items { grid-template-columns: minmax(0, 1fr); }
  /* small screens: the first cards of each category, then "Show all" (only with JS; without JS every card shows) */
  .lp-js .lp-cat-more { display: inline-flex; }
  .lp-js .lp-cat:not(.is-open) .lp-cat-items > li:nth-child(n+5) { display: none; }
}

/* Industries, integrations, security, testimonials */
.lp-ind-grid, .lp-sec-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.lp-sec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-ind, .lp-sec, .lp-int-group, .lp-quote { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); }
.section-alt .lp-ind, .section-alt .lp-sec, .section-alt .lp-int-group, .section-alt .lp-quote { background: var(--bg); }
.lp-ind h3 { margin: var(--s-3) 0 var(--s-1); }
.lp-ind p { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.lp-int-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.lp-int-group h3 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: var(--s-3); }
.lp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.lp-chips li { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 12px; font-size: var(--fs-sm); font-weight: 550; }
.lp-sec-cta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-6) 0 0; color: var(--text-muted); }
.lp-sec-cta .icon { color: var(--primary-text); }
.lp-sec-cta a { font-weight: 650; }
.lp-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-4); }
.lp-quote { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4); }
.lp-quote blockquote { margin: 0; }
.lp-quote blockquote p { margin: 0; font-size: var(--fs-md); color: var(--text); }
.lp-quote blockquote p::before { content: "\201C"; color: var(--primary-text); font-weight: 700; margin-right: 2px; }
.lp-quote blockquote p::after { content: "\201D"; color: var(--primary-text); font-weight: 700; margin-left: 2px; }
.lp-quote figcaption strong { display: block; }
.lp-quote figcaption span { color: var(--text-muted); font-size: var(--fs-sm); }
@media (max-width: 1099.98px) {
  .lp-ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-sec-grid, .lp-int-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639.98px) {
  .lp-ind-grid, .lp-sec-grid, .lp-int-groups { grid-template-columns: minmax(0, 1fr); }
  .section { padding: var(--s-10) 0; }
  .section-head h2 { font-size: var(--fs-2xl); }
}

/* Pricing preview, FAQ, final call to action */
.lp-price-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lp-price-foot { text-align: center; margin-top: var(--s-6); }
.lp-price-foot p { margin: 0 0 var(--s-2); }
.lp-price-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s-2) var(--s-3); }
.lp-price-links a { font-weight: 650; display: inline-flex; align-items: center; gap: 2px; }
.lp-price-links span { color: var(--text-muted); }
.lp-faq summary span { flex: 1; }
.lp-faq summary .icon { transition: transform .15s ease; }
.lp-final-box { background: var(--primary); color: var(--primary-fg); border-radius: 16px; padding: 56px var(--s-6); text-align: center; box-shadow: var(--sh-lg); }
.lp-final-box h2 { color: var(--primary-fg); font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; margin-bottom: var(--s-2); }
.lp-final-box p { margin: 0 auto; max-width: 560px; opacity: .92; font-size: var(--fs-md); }
.lp-final-box .cta { justify-content: center; }
.lp-final-box .btn-primary { background: var(--primary-fg); color: var(--primary); }
.lp-final-box .btn-secondary { background: transparent; color: var(--primary-fg); border-color: var(--primary-fg); box-shadow: none; }
.lp-final-box .btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.lp-final-box .btn:focus-visible { box-shadow: 0 0 0 3px var(--primary-fg); }

/* Footer */
.lp-footer { padding: var(--s-10) 0 var(--s-6); }
.lp-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 3fr); gap: var(--s-8); }
.lp-footer-brand .brand { margin-bottom: var(--s-3); }
.lp-footer-brand p { margin: 0 0 var(--s-2); }
.lp-footer-brand a:not(.brand) { display: inline-flex; align-items: center; gap: 6px; }
.lp-footer .lp-footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); }
.lp-footer-cols h2 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin: 0 0 var(--s-3); }
.lp-footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.lp-footer a { color: var(--text-muted); }
.lp-footer a:hover { color: var(--text); }
.lp-footer .brand, .lp-footer .brand:hover { color: var(--text); }
.lp-footer-bottom { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: var(--s-4); margin: 0; font-size: var(--fs-xs); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-4); }
@media (max-width: 900px) {
  .lp-footer .wrap { grid-template-columns: minmax(0, 1fr); }
  .lp-footer .lp-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Privacy page */
.lp-privacy .prose { margin: 0 auto; }
.lp-privacy h1 { font-size: var(--fs-3xl); letter-spacing: -.01em; }
.lp-privacy .prose ul { padding-left: var(--s-5); }
.lp-privacy .banner { margin: var(--s-4) 0 var(--s-6); }

/* Dark themes: --primary is the brand colour as set, so a very dark brand would hide the highlighted plan, its
   ribbon, the selected billing cycle and the step numbers. They use the contrast-checked --primary-text instead. */
[data-theme="dark"] .price-card.featured { border-color: var(--primary-text); box-shadow: 0 0 0 1px var(--primary-text), var(--sh-md); }
[data-theme="dark"] .price-card .ribbon { background: var(--surface); box-shadow: inset 0 0 0 1px var(--primary-text); }
[data-theme="dark"] .cycle-toggle .btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--primary-text); }
[data-theme="dark"] .steps li::before { background: var(--primary-text); color: var(--bg); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .price-card.featured { border-color: var(--primary-text); box-shadow: 0 0 0 1px var(--primary-text), var(--sh-md); }
  [data-theme="system"] .price-card .ribbon { background: var(--surface); box-shadow: inset 0 0 0 1px var(--primary-text); }
  [data-theme="system"] .cycle-toggle .btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--primary-text); }
  [data-theme="system"] .steps li::before { background: var(--primary-text); color: var(--bg); }
}

@media (prefers-reduced-motion: reduce) {
  .lp-header, .lp-faq summary .icon { transition: none; }
}
