/* ── css/landing.css ──────────────────────────────────
   Public SEO Landing Page. Loaded alongside the shared css/style.css
   (theme variables, base typography, .btn/.btn-primary/.btn-secondary).
   This file is layout/spacing only for the landing page's own sections --
   it never redefines colors, fonts, or button styling that style.css
   already owns, so the landing page stays visually consistent with the
   rest of GetFit (dark background, gold accents, red primary actions)
   while feeling more spacious than an application dashboard card.

   Mobile-first: base rules target narrow phones (320px+); min-width media
   queries layer on tablet/desktop refinements. No JavaScript is required
   for any of this page's visual behavior -- see js/landing.js, which only
   ever toggles the `hidden` attribute on already-styled elements.
   ── */

/* ── Page-level ───────────────────────────────────── */
.landing-body {
    /* body:not(.gf-no-mobile-nav) in css/style.css reserves bottom padding
       for the authenticated app's mobile bottom nav -- this page never
       loads that nav (see index.html's own comment), and already carries
       the .gf-no-mobile-nav class in its <body> tag to opt out, matching
       the same class auth.html's setMobileNavVisibility() applies via JS.
       Nothing else needed here; this rule exists only as documentation. */
    overflow-x: hidden;
}

.landing-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header ───────────────────────────────────────── */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.landing-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
}

.landing-brand-mark {
    display: block;
    flex-shrink: 0;
}

.landing-brand-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.landing-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-header-actions span[data-auth-when] {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Bug fix (GetFit.one production follow-up): the rule above sets `display`
   directly on `span[data-auth-when]`, which -- being a class+attribute+type
   selector -- has higher specificity than the browser's UA-stylesheet
   `[hidden] { display: none }` rule. Without this override, js/landing.js
   setting `el.hidden = true` on the logged-out ("out") group had NO visual
   effect: the element stayed `display: flex` and remained visible even
   while hidden, so a logged-in visitor saw BOTH "Log in / Get started" AND
   "Go to Dashboard" at once. `[hidden]` here adds one more attribute
   selector than the rule above, which is enough specificity to win
   regardless of source order -- no !important needed. */
.landing-header-actions span[data-auth-when][hidden] {
    display: none;
}

/* Compact button sizing for the header, where space is tight -- the base
   .btn padding (style.css) is a little large for a sticky bar, especially
   on narrow phones. */
.landing-btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.landing-btn-lg {
    padding: 13px 28px;
    font-size: 15px;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

/* .btn is normally applied to <button> elements elsewhere in GetFit;
   every CTA here is a real <a href> (a real navigable link, not a
   JS-only click target) so it keeps working with no JS at all -- these
   two rules just make an anchor look identical to a button. */
.btn.landing-btn-sm,
.btn.landing-btn-lg {
    text-decoration: none;
    display: inline-block;
}

/* ── Theme control (Public landing page nav follow-up) ──────────────
   Reuses css/style.css's existing [data-theme] sun/moon icon-swap rules
   (.theme-icon-dark / .theme-icon-light) so the same two glyphs already
   used by the authenticated nav's theme button render correctly here --
   this only adds the compact icon-button shell itself. style.css's own
   .nav-theme-btn is a full-width profile-menu ROW (width: 100%, left-
   aligned label) and doesn't fit a sticky header, so this is a small,
   header-appropriate variant instead of reusing that class directly. */
.landing-theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: none;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.landing-theme-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--border-hover);
}

.landing-theme-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

a.btn:focus-visible,
.landing-brand:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ── Hero ─────────────────────────────────────────── */
.landing-hero {
    padding: 56px 0 48px;
    text-align: center;
}

.landing-h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: var(--text);
    max-width: 760px;
    margin: 0 auto 18px;
}

.landing-hero-sub {
    max-width: 620px;
    margin: 0 auto 28px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
}

.landing-hero-ctas span[data-auth-when] {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Same bug/fix as .landing-header-actions above -- this class is shared by
   BOTH the hero CTA area and the final CTA section (.landing-final-cta
   reuses .landing-hero-ctas), so both were affected identically. */
.landing-hero-ctas span[data-auth-when][hidden] {
    display: none;
}

/* ── Sections (shared rhythm) ─────────────────────── */
.landing-section {
    padding: 48px 0;
}

.landing-section-alt {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.landing-h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin: 0 0 10px;
}

.landing-section-sub {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 32px;
    color: var(--text-muted);
    font-size: 15px;
}

/* ── Feature cards ────────────────────────────────── */
.landing-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.landing-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
}

.landing-feature-icon {
    font-size: 26px;
    color: var(--gold);
    display: block;
    margin-bottom: 12px;
}

.landing-feature-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
}

.landing-feature-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* ── How it works ─────────────────────────────────── */
.landing-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 640px;
    margin-inline: auto;
}

.landing-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.landing-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-dim);
    color: var(--gold);
    border: 1px solid var(--gold-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14px;
}

.landing-step h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}

.landing-step p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ── Why GetFit ───────────────────────────────────── */
.landing-why {
    max-width: 700px;
}

.landing-why p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
}

.landing-why-list {
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
}

.landing-why-list li {
    margin-bottom: 4px;
}

/* ── Final CTA ────────────────────────────────────── */
.landing-final-cta {
    padding: 56px 0;
    text-align: center;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.landing-final-cta .landing-h2 {
    margin-bottom: 22px;
}

/* ── Footer ───────────────────────────────────────── */
.landing-footer {
    border-top: 1px solid var(--border);
    padding: 22px 0;
}

.landing-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.landing-footer-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--gold);
}

.landing-footer-links {
    display: flex;
    gap: 14px;
}

.landing-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.landing-footer-links a:hover,
.landing-footer-links a:focus-visible {
    color: var(--text);
    text-decoration: underline;
}

/* ── Tablet / desktop ─────────────────────────────── */
@media (min-width: 640px) {
    .landing-h1 { font-size: 42px; }
    .landing-features-grid { grid-template-columns: repeat(2, 1fr); }
    .landing-footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (min-width: 900px) {
    .landing-hero { padding: 84px 0 72px; }
    .landing-h1 { font-size: 52px; }
    .landing-hero-sub { font-size: 18px; }
    .landing-section { padding: 72px 0; }
    .landing-h2 { font-size: 32px; }
    .landing-features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Reduced motion ───────────────────────────────── */
/* This page intentionally ships with no scroll-triggered or entrance
   animation to begin with (see the file header comment) -- this rule is
   defense-in-depth so any future motion added here (or inherited via
   .btn's hover transform in css/style.css) never applies for a visitor
   who has asked their OS/browser to minimize motion. */
@media (prefers-reduced-motion: reduce) {
    .landing-header,
    .btn,
    .landing-feature-card,
    .landing-theme-btn {
        transition: none !important;
    }
}
