/**
 * landing.css — Landing page styles (chunk 205)
 *
 * Self-contained styles for the marketing home page at /.
 * Uses CSS custom properties from design-tokens.css where available,
 * falls back to safe defaults so the page works standalone.
 *
 * Dependencies: design-tokens.css (optional), global.css (optional)
 * Used on: / route only
 */

/* ── Reset for landing sections ────────────────────────────────── */
.landing-nav,
.landing-hero,
.landing-features,
.landing-proof,
.landing-cta,
.landing-footer {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Navigation ────────────────────────────────────────────────── */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.landing-nav__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-nav__brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary, #2563eb);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.landing-nav__login {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-muted, #4b5563);
    text-decoration: none;
    /* Lighthouse SEO: tap target must be at least 48×48 px on mobile */
    padding: 0.625rem 0.5rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s;
}

.landing-nav__login:hover {
    color: var(--color-text, #111827);
}

.landing-nav__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.landing-btn--sm {
    font-size: 0.9rem;
    /* Lighthouse SEO: ensure 48px minimum tap target height */
    padding: 0.625rem 1.125rem;
    min-height: 48px;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.landing-hero {
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    /* WHY: WebKit background-color consistency fix (XBRO-2a) — the `background`
       shorthand resets background-color to transparent in WebKit/Safari, which
       causes a visible mismatch at section boundaries on mobile. Split into
       explicit background-color fallback + background-image gradient so WebKit
       always has a deterministic base color even if the gradient is not applied. */
    background-color: #f8fafc;
    background-image: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.landing-hero__inner {
    max-width: 720px;
    margin: 0 auto;
}

.landing-hero__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-text, #111827);
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem;
}

.landing-hero__sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.6;
    color: var(--color-text-muted, #4b5563);
    margin: 0 0 2rem;
}

.landing-hero__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.landing-hero__note {
    /* Lighthouse SEO: minimum 12px for legibility; 0.875rem = 14px */
    font-size: 0.875rem;
    color: var(--color-text-muted, #4b5563);
    margin: 0;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.landing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
    border: none;
    line-height: 1.4;
    min-height: 48px;
}

.landing-btn:hover {
    transform: translateY(-1px);
}

.landing-btn:active {
    transform: translateY(0);
}

.landing-btn--primary {
    background: var(--color-primary, #2563eb);
    color: #fff;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.landing-btn--primary:hover {
    background: var(--color-primary-dark, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.landing-btn--ghost {
    background: transparent;
    color: var(--color-primary, #2563eb);
    border: 1px solid var(--color-border, #d1d5db);
}

.landing-btn--ghost:hover {
    border-color: var(--color-primary, #2563eb);
    background: rgba(37, 99, 235, 0.04);
}

.landing-btn--lg {
    font-size: 1.125rem;
    padding: 0.875rem 2rem;
}

/* ── Features ─────────────────────────────────────────────────── */
.landing-features {
    padding: 4rem 1.5rem;
    /* WHY: WebKit background-color consistency fix (XBRO-2a) — explicit
       background-color ensures the features section matches the hero gradient
       end-color (#fff) in WebKit where the `background` shorthand alone
       can leave the computed value inconsistent across adjacent sections. */
    background-color: #fff;
}

.landing-features__inner {
    max-width: 1120px;
    margin: 0 auto;
    text-align: center;
}

.landing-section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-text, #111827);
    margin: 0 0 0.5rem;
}

.landing-section-sub {
    font-size: 1.0625rem;
    color: var(--color-text-muted, #4b5563);
    margin: 0 0 2.5rem;
}

.landing-features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ── Feature cards ────────────────────────────────────────────── */
.landing-card {
    padding: 1.75rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    /* WHY: WebKit background-color consistency fix (XBRO-2a) — explicit
       background-color property so WebKit renders card surface as #fff
       consistently with the containing features section background. */
    background-color: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.landing-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: var(--color-primary, #2563eb);
}

.landing-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
    color: var(--color-primary, #2563eb);
}

/* Inline SVG icons inside feature cards (chunk 463) */
.landing-card__icon svg {
    display: block;
    width: 28px;
    height: 28px;
}

.landing-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text, #111827);
    margin: 0 0 0.5rem;
}

.landing-card__text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-muted, #4b5563);
    margin: 0;
}

/* ── Social proof / trust strip ───────────────────────────────── */
.landing-proof {
    padding: 3rem 1.5rem;
    background: var(--color-bg-muted, #f9fafb);
    border-top: 1px solid var(--color-border, #e5e7eb);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.landing-proof__inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    text-align: center;
}

.landing-proof__stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.landing-proof__number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary, #2563eb);
}

.landing-proof__label {
    font-size: 0.875rem;
    color: #5f6368; /* #767676 fails 4.5:1 on #f9fafb (4.34:1); #5f6368 gives 5.79:1 (WCAG AA) */
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Bottom CTA ───────────────────────────────────────────────── */
.landing-cta {
    padding: 4rem 1.5rem;
    text-align: center;
    background: #fff;
}

.landing-cta__inner {
    max-width: 640px;
    margin: 0 auto;
}

.landing-cta__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-text, #111827);
    margin: 0 0 0.75rem;
}

.landing-cta__sub {
    font-size: 1.0625rem;
    color: var(--color-text-muted, #4b5563);
    margin: 0 0 1.5rem;
}

/* ── Footer ───────────────────────────────────────────────────── */
.landing-footer {
    padding: 3rem 1.5rem 2rem;
    background: var(--color-bg-dark, #1f2937);
    color: #d1d5db;
}

.landing-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
}

.landing-footer__cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.landing-footer__col h4 {
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.landing-footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.landing-footer__col li {
    margin-bottom: 0.5rem;
}

.landing-footer__col a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
    /* Lighthouse SEO: 48px minimum tap target for mobile */
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0.25rem 0;
}

.landing-footer__col a:hover {
    color: #fff;
}

.landing-footer__col a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 2px;
    color: #fff;
}

/* CTA-style signup link in footer */
.landing-footer__col a[data-footer-link="signup"] {
    color: #60a5fa;
    font-weight: 500;
}

.landing-footer__col a[data-footer-link="signup"]:hover {
    color: #93c5fd;
}

.landing-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    /* Lighthouse SEO: minimum 12px for legibility; 0.875rem = 14px */
    font-size: 0.875rem;
    /* WCAG AA: #d1d5db on #1f2937 = ~9.1:1 — well above 4.5:1 for normal text */
    color: #d1d5db;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
    .landing-hero {
        padding: 3rem 1rem 2.5rem;
    }

    .landing-hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .landing-btn {
        width: 100%;
        max-width: 320px;
    }

    .landing-proof__inner {
        gap: 1.5rem;
    }

    .landing-proof__number {
        font-size: 1.5rem;
    }

    .landing-features {
        padding: 3rem 1rem;
    }

    .landing-cta {
        padding: 3rem 1rem;
    }
}

/* ── Brand accent ────────────────────────────────────────────── */
/* WCAG AA: #1d4ed8 on white = ~5.6:1 — passes 4.5:1 for normal text */
.brand-accent {
    color: #1d4ed8;
    font-weight: inherit;
}

/* ── Footer headings ─────────────────────────────────────────── */
/* The footer partial uses <h3 class="landing-footer__heading"> */
.landing-footer__heading,
.landing-footer__col h3 {
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

/* ── Focus-visible styles ────────────────────────────────────── */
/* Lighthouse a11y: all interactive elements need visible focus indicator */
.landing-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.landing-nav__brand:focus-visible,
.landing-nav__login:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Reduced motion preference ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .landing-btn,
    .landing-card,
    .landing-nav__login,
    .landing-footer__col a {
        transition: none;
    }

    .landing-btn:hover {
        transform: none;
    }
}

/* ── Lighthouse a11y: Windows High Contrast / forced-colors ─── */
/* Ensures focus rings, borders, and button outlines remain visible
   when the user activates a high-contrast theme (e.g., Windows HCM). */
@media (forced-colors: active) {
    .landing-btn:focus-visible,
    .landing-nav__brand:focus-visible,
    .landing-nav__login:focus-visible,
    .landing-footer__col a:focus-visible {
        outline: 2px solid LinkText;
        outline-offset: 2px;
    }

    .landing-btn--primary {
        border: 2px solid ButtonText;
    }

    .landing-card {
        border: 1px solid CanvasText;
    }

    .landing-pricing__feature-item::before {
        color: LinkText;
    }
}

/* ── Lighthouse a11y: CTA button min tap targets ────────────── */
/* Prevents "Tap targets are not sized appropriately" on mobile */
.landing-cta .landing-btn--lg {
    min-height: 48px;
    min-width: 48px;
}

.landing-pricing__cta {
    min-height: 48px;
    min-width: 48px;
}

/* ── Cross-browser normalization (Webkit/Blink parity) ───────── */
/* WHY: Safari and Chrome render SVG dimensions, font metrics,
   and spacing with subtle subpixel differences. Explicit sizes,
   font-smoothing, and box-model normalization reduce drift. */

/* Logo SVG: enforce exact dimensions so Webkit engines agree */
.landing-nav__brand svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    /* Normalize SVG rendering across Webkit engines */
    shape-rendering: geometricPrecision;
}

/* Heading text: normalize font rendering across Webkit browsers */
.landing-hero__title {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Prevent Webkit text-size-adjust drift */
    -webkit-text-size-adjust: 100%;
}

/* Feature card icons: consistent SVG rendering */
.landing-card__icon svg,
.landing-features svg {
    shape-rendering: geometricPrecision;
}

/* Footer links: explicit line-height prevents spacing drift across engines */
.landing-footer__col li {
    line-height: 1.5;
}

.landing-footer__col a {
    line-height: 1.5;
    /* Explicit box-sizing prevents padding differences across engines */
    box-sizing: border-box;
}

/* Skip-link: ensure fully hidden when not focused across all Webkit variants */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    /* Clip fallback for older Webkit */
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: #fff;
    color: #111827;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
