/* Public features / landing page (templates/features.html). Uses the shared
   design tokens: trail green var(--rd-accent, oklch(45% 0.16 155)), sage body var(--rd-bg, oklch(97% 0.012 140)),
   card var(--rd-surface, oklch(99% 0.005 140)). Dark mode via html.dark-mode selectors. */

body.lp-body {
    margin: 0;
    background: var(--rd-bg, oklch(97% 0.012 140));
    color: var(--rd-ink, oklch(20% 0.01 140));
}

.lp-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 72px;
}
body.has-sidebar .lp-wrap { padding: 28px 32px 64px; }

/* --- buttons --------------------------------------------------------------- */
.lp-btn {
    display: inline-block;
    box-sizing: border-box;
    text-align: center;
    background: var(--rd-accent, oklch(45% 0.16 155));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: .95em;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}
.lp-btn:hover { background: var(--rd-accent-hover, oklch(37% 0.15 155)); }
.lp-btn--ghost {
    background: #fff;
    color: var(--rd-accent, oklch(40% 0.13 155));
    border: 1px solid var(--rd-accent-border, oklch(75% 0.1 155));
}
.lp-btn--ghost:hover { background: var(--rd-accent-soft, oklch(97% 0.02 155)); }
.lp-btn--lg { padding: 13px 28px; font-size: 1.02em; }

/* --- top bar ------------------------------------------------------------- */
.lp-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: color-mix(in srgb, var(--rd-surface) 90%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rd-border, oklch(90% 0.02 140));
}
.lp-topbar__brand img { display: block; height: 34px; width: auto; }
.lp-topbar__actions { display: flex; align-items: center; gap: 10px; }

/* --- hero -------------------------------------------------------------- */
.lp-hero { text-align: center; padding: 48px 0 36px; }
.lp-hero__eyebrow {
    margin: 0 0 14px;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #94a3b8;
}
.lp-hero__title {
    margin: 0 auto 16px;
    max-width: 16ch;
    font-size: clamp(1.9rem, 5vw, 2.9rem);
    line-height: 1.15;
    color: var(--rd-heading, oklch(30% 0.12 155));
}
.lp-hero__sub {
    margin: 0 auto 28px;
    max-width: 56ch;
    font-size: 1.05em;
    line-height: 1.7;
    color: #475569;
}
.lp-hero__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.lp-hero__login {
    font-size: .92em;
    font-weight: 600;
    color: var(--rd-accent, oklch(45% 0.16 155));
    text-decoration: none;
}
.lp-hero__login:hover { text-decoration: underline; }

/* --- compare slider -------------------------------------------------------- */
.lp-compare { margin: 8px 0 56px; }
.lp-compare__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1228 / 919;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 40px oklch(0% 0 0 / .14);
    border: 1px solid var(--rd-border, oklch(88% 0.02 140));
    user-select: none;
    cursor: ew-resize;
    background: #0f172a;
}
.lp-compare__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.lp-compare__top {
    position: absolute;
    inset: 0;
    width: 100%;
    clip-path: inset(0 50% 0 0);
}
.lp-compare__handle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
    touch-action: none;
}
.lp-compare__handle::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #fff;
    transform: translateX(-50%);
}
.lp-compare__grip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: var(--rd-accent, oklch(40% 0.13 155));
    font-size: 1.1rem;
    line-height: 1;
    box-shadow: 0 2px 10px oklch(0% 0 0 / .3);
    transform: rotate(90deg);
}
.lp-compare__frame::before,
.lp-compare__frame::after {
    position: absolute;
    top: 12px;
    padding: 3px 9px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 999px;
    background: oklch(0% 0 0 / .55);
    color: #fff;
    pointer-events: none;
}
.lp-compare__frame::before { content: attr(data-before); left: 12px; }
.lp-compare__frame::after { content: attr(data-after); right: 12px; }
.lp-compare__caption {
    margin: 12px 0 0;
    text-align: center;
    font-size: .88em;
    color: #94a3b8;
}

/* --- section headings ------------------------------------------------- */
.lp-section-title {
    margin: 0 0 4px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--rd-heading, oklch(30% 0.12 155));
}
.lp-section-sub {
    margin: 0 0 24px;
    text-align: center;
    font-size: .95em;
    color: #64748b;
}

/* --- feature accordion --------------------------------------------------- */
.lp-features { margin-bottom: 56px; }
.lp-features__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 14px;
}
.lp-feature {
    background: var(--rd-surface, oklch(99% 0.005 140));
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 12px oklch(0% 0 0 / .05);
    overflow: hidden;
}
.lp-feature__summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 18px;
    cursor: pointer;
    list-style: none;
}
.lp-feature__summary::-webkit-details-marker { display: none; }
.lp-feature__icon { font-size: 1.4rem; line-height: 1.3; flex-shrink: 0; }
.lp-feature__heading { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.lp-feature__title { margin: 0; font-size: 1rem; font-weight: 700; color: #1a1a2e; }
.lp-feature__blurb { font-size: .88em; color: #64748b; line-height: 1.5; }
.lp-feature__chevron {
    flex-shrink: 0;
    font-size: 1.4rem;
    color: #94a3b8;
    transition: transform .18s ease;
    line-height: 1;
}
.lp-feature[open] .lp-feature__chevron { transform: rotate(90deg); }
.lp-feature__body {
    padding: 0 18px 18px 48px;
}
.lp-feature__body p {
    margin: 0 0 10px;
    font-size: .92em;
    line-height: 1.65;
    color: #475569;
}
.lp-feature__body ul { margin: 0; padding-left: 18px; }
.lp-feature__body li {
    font-size: .9em;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 4px;
}

/* --- CTA band ----------------------------------------------------------- */
.lp-cta {
    text-align: center;
    background: var(--rd-accent-soft, oklch(95% 0.04 155));
    border: 1px solid var(--rd-accent-border, oklch(85% 0.08 155));
    border-radius: 16px;
    padding: 40px 28px;
    margin-bottom: 40px;
}
.lp-cta h2 { margin: 0 0 8px; font-size: 1.5rem; color: var(--rd-accent-border, oklch(28% 0.12 155)); }
.lp-cta p { margin: 0 0 22px; color: #475569; font-size: 1em; }
.lp-cta__buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* --- video modal ------------------------------------------------------- */
.lp-video-open { display: inline-flex; align-items: center; gap: 8px; }
.lp-video-open__icon { font-size: .8em; }

.lp-video-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lp-video-modal[hidden] { display: none; }
.lp-video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: oklch(0% 0 0 / .72);
}
.lp-video-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 900px;
}
.lp-video-modal__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px oklch(0% 0 0 / .5);
}
.lp-video-modal__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.lp-video-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #1a1a2e;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 12px oklch(0% 0 0 / .5);
}
.lp-video-modal__close:hover { background: #f1f5f9; }

/* --- footer ----------------------------------------------------------- */
.lp-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    font-size: .84em;
    color: #94a3b8;
}
.lp-footer a { color: #94a3b8; text-decoration: underline; text-underline-offset: 2px; }
.lp-footer a:hover { color: var(--rd-accent, oklch(45% 0.16 155)); }

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 760px) {
    .lp-features__grid { grid-template-columns: 1fr; }
    .lp-topbar { padding: 10px 16px; }
    .lp-topbar__brand img { height: 28px; }
    .lp-btn { padding: 9px 15px; font-size: .9em; }
    .lp-feature__body { padding-left: 18px; }
}

/* --- dark mode ----------------------------------------------------------- */
html.dark-mode body.lp-body { background: var(--rd-bg, oklch(14% 0.018 155)); color: #cbd5e1; }
html.dark-mode .lp-topbar { background: color-mix(in srgb, var(--rd-surface) 90%, transparent); border-bottom-color: #1e293b; }
html.dark-mode .lp-hero__title,
html.dark-mode .lp-section-title { color: var(--rd-accent, oklch(75% 0.12 155)); }
html.dark-mode .lp-hero__sub,
html.dark-mode .lp-section-sub { color: #94a3b8; }
html.dark-mode .lp-btn--ghost { background: #1e293b; color: var(--rd-accent, oklch(75% 0.12 155)); border-color: #334155; }
html.dark-mode .lp-btn--ghost:hover { background: #0f172a; }
html.dark-mode .lp-feature { background: var(--rd-surface, oklch(20% 0.015 155)); border-color: #334155; }
html.dark-mode .lp-feature__title { color: #e2e8f0; }
html.dark-mode .lp-feature__blurb,
html.dark-mode .lp-feature__body p,
html.dark-mode .lp-feature__body li { color: #94a3b8; }
html.dark-mode .lp-cta { background: var(--rd-surface, oklch(18% 0.05 155)); border-color: var(--rd-accent-border, oklch(28% 0.08 155)); }
html.dark-mode .lp-cta h2 { color: var(--rd-accent, oklch(75% 0.12 155)); }
html.dark-mode .lp-cta p { color: #94a3b8; }
html.dark-mode .lp-compare__frame { border-color: #334155; }

body.rd-page.lp-body, body.rd-page.lp-body :is(button, input) { font-family: "IBM Plex Sans", Helvetica, Arial, sans-serif; }
body.rd-page.lp-body :is(.lp-hero__title, .lp-section-title) { color: var(--rd-heading); }

/* --- site background photo (admin-managed, see _site_background.html) ---- */
body.has-site-bg.lp-body { padding: 0; }
body.has-site-bg .lp-wrap {
    margin: 40px auto 56px;
    padding-inline: 32px;
    background: var(--rd-surface, #fff);
    border-radius: 16px;
    box-shadow: 0 24px 64px oklch(0% 0 0 / .3);
}
@media (max-width: 760px) {
    body.has-site-bg .lp-wrap { margin: 16px 12px 32px; padding-inline: 18px; }
}
