/* =========================
   64SQUARE SHARED DESIGN SYSTEM
   Site-wide shell pieces (navbar, buttons, dark branded
   header/footer sections) matching the approved homepage
   (commit 1a585d9). Interior pages link this file to pick up
   the same navbar/logo/buttons/dark-section language without
   touching homepage.css, which stays exactly as approved.

   Duplicates a subset of homepage.css by design -- homepage.css
   is the master reference and is intentionally left untouched.
========================= */

:root {
    --hp-bg: #060911;
    --hp-bg-2: #0b1220;
    --hp-blue: #2f6feb;
    --hp-blue-light: #6fa8ff;
    --hp-blue-dark: #1d4fc4;
    --hp-white: #ffffff;
    --hp-muted: rgba(255, 255, 255, 0.72);
    --hp-muted-2: rgba(255, 255, 255, 0.55);
    --hp-border: rgba(255, 255, 255, 0.12);

    --hp-section-bg: #eef3fb;
    --hp-panel-bg: #ffffff;
    --hp-ink: #0b1220;
    --hp-ink-muted: #5a6a85;
    --hp-line: #e3e9f5;
    --hp-line-hover: #c7d3ea;
    --hp-accent-red: #e2483d;
}

/* =========================
   NAVBAR (same markup/classes as the homepage navbar)
========================= */
.hp-navbar {
    background: var(--hp-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 3000;
}

.hp-navbar-inner {
    max-width: 1500px;
    margin: 0 auto;
    padding: 13px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hp-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.hp-logo-img {
    display: block;
    height: 44px;
    width: auto;
    max-width: none;
}

.hp-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.hp-nav-links a {
    color: var(--hp-muted);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.hp-nav-links a:hover {
    color: var(--hp-white);
}

.hp-nav-links a.active {
    color: var(--hp-white);
}

.hp-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Account identity chip -- populated by site.js from the existing
   /me session lookup ("Logged in as {email}"). Hidden by default
   (and while logged out) so the logged-out nav stays "Log in |
   Get Started" with no status text; site.js toggles .hp-visible
   only in the logged-in branch. Truncated so a long email can
   never wrap or overflow the navbar. */
.hp-login-status {
    display: none;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--hp-muted);
    font-size: 0.85rem;
    font-weight: 500;
    vertical-align: middle;
}

.hp-login-status.hp-visible {
    display: inline-block;
}

.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    height: 42px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.hp-btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--hp-white);
}

.hp-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

.hp-btn-primary {
    background: var(--hp-blue);
    color: #fff;
    box-shadow: 0 8px 20px rgba(47, 111, 235, 0.35);
}

.hp-btn-primary:hover {
    background: var(--hp-blue-dark);
    transform: translateY(-1px);
}

.hp-btn-lg {
    height: 52px;
    padding: 0 26px;
    font-size: 1rem;
    border-radius: 12px;
}

.hp-nav-actions .hp-btn {
    height: 38px;
    padding: 0 16px;
    font-size: 0.86rem;
    border-radius: 9px;
}

.hp-nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: var(--hp-white);
    font-size: 1.05rem;
    cursor: pointer;
    flex-shrink: 0;
}

.hp-mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px 32px 20px;
    background: var(--hp-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hp-mobile-menu.hp-open {
    display: flex;
}

.hp-mobile-menu a {
    color: var(--hp-muted);
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 500;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hp-mobile-menu .hp-mobile-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.hp-mobile-menu .hp-btn {
    flex: 1;
}

/* Hamburger threshold raised from 1180px: desktop nav now carries
   7 primary links (Home, Features, Game Analysis, Position Analysis,
   Opening Lab, Pricing, Resources) plus the account area, which in
   the logged-in state also shows a truncated email chip (up to
   220px) alongside History and Logout. Estimated worst-case content
   width (logo + 7 links + logged-in identity chip) comfortably
   exceeds what fit at 1180px, so the threshold -- and .hp-navbar-inner's
   max-width alongside it -- were both raised together: raising only
   the media query would have no effect once .hp-navbar-inner's own
   max-width caps available width below what the content needs.
   1500px gives a safety margin above the estimated requirement so
   the desktop nav switches to the hamburger before it would ever
   wrap. Re-verify against real rendering; this was sized without a
   browser available. */
@media (max-width: 1500px) {
    .hp-nav-links,
    .hp-nav-actions {
        display: none;
    }

    .hp-nav-toggle {
        display: flex;
    }
}

@media (max-width: 640px) {
    .hp-navbar-inner {
        padding: 14px 20px;
    }

    .hp-mobile-menu {
        padding: 8px 20px 18px;
    }

    .hp-logo {
        flex-shrink: 1;
        min-width: 0;
    }

    .hp-logo-img {
        height: 34px;
    }
}

/* =========================
   COMPACT PAGE HEADER
   Dark branded header for interior pages that don't have a full
   marketing hero -- same photography/gradient treatment as the
   homepage hero, scaled down. Sits directly under .hp-navbar.
========================= */
.hp-page-header {
    background:
        linear-gradient(90deg,
            rgba(6, 9, 17, 0.94) 0%,
            rgba(6, 9, 17, 0.86) 40%,
            rgba(6, 9, 17, 0.55) 70%,
            rgba(6, 9, 17, 0.2) 100%),
        linear-gradient(180deg, var(--hp-bg) 0%, var(--hp-bg-2) 100%);
    padding: 40px 32px;
}

/* Page-specific header photo. Each interior page sets --hp-header-photo
   via a second modifier class (.hp-page-header-photo--game, etc.) so this
   rule stays the single source of truth for geometry/gradient/crop
   behaviour across all seven photographed pages.

   These images are wide + short (~2103x748) with the subject already
   composed toward the right and dark negative space baked in on the
   left, so `cover` + `right center` is used instead of the old fixed
   `auto 340px` sizing: at normal header widths it crops top/bottom only
   (the box is proportionally flatter than the image), and only falls
   back to horizontal cropping at very narrow widths -- where trimming
   from the right-anchored position takes from the left (dark space)
   rather than the right (subject). */
.hp-page-header-photo {
    background:
        linear-gradient(90deg,
            rgba(6, 9, 17, 0.94) 0%,
            rgba(6, 9, 17, 0.88) 32%,
            rgba(6, 9, 17, 0.6) 58%,
            rgba(6, 9, 17, 0.15) 82%,
            rgba(6, 9, 17, 0) 100%),
        var(--hp-header-photo) right center / cover no-repeat,
        linear-gradient(180deg, var(--hp-bg) 0%, var(--hp-bg-2) 100%);
    min-height: 250px;
    display: flex;
    align-items: center;
}

.hp-page-header-photo--features { --hp-header-photo: url('/static/img/features-header.png'); }
.hp-page-header-photo--game { --hp-header-photo: url('/static/img/game-analysis-header.png'); }
.hp-page-header-photo--position-analysis { --hp-header-photo: url('/static/img/position-analysis.png'); }
.hp-page-header-photo--opening { --hp-header-photo: url('/static/img/opening-lab-header.png'); }
.hp-page-header-photo--pricing { --hp-header-photo: url('/static/img/pricing-header.png'); }
.hp-page-header-photo--resources { --hp-header-photo: url('/static/img/resources-header.png'); }
.hp-page-header-photo--history { --hp-header-photo: url('/static/img/history-header.png'); }

.hp-page-header-inner {
    max-width: 1360px;
    margin: 0 auto;
}

.hp-page-header-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hp-blue-light);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.hp-page-header h1 {
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--hp-white);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.hp-page-header p {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--hp-muted);
    max-width: 620px;
    margin: 0;
}

@media (max-width: 640px) {
    .hp-page-header {
        padding: 28px 20px;
    }

    .hp-page-header h1 {
        font-size: 1.5rem;
    }

    .hp-page-header-photo {
        background:
            linear-gradient(rgba(6, 9, 17, 0.78), rgba(6, 9, 17, 0.78)),
            linear-gradient(180deg, var(--hp-bg) 0%, var(--hp-bg-2) 100%);
        min-height: 0;
        display: block;
    }
}

/* =========================
   FINAL CTA / DARK FOOTER SECTION
   Same markup/classes as the homepage final CTA.
========================= */
.hp-final-cta {
    background:
        radial-gradient(circle at 85% 30%, rgba(47, 111, 235, 0.22), transparent 55%),
        radial-gradient(circle at 15% 80%, rgba(212, 175, 55, 0.10), transparent 50%),
        linear-gradient(180deg, var(--hp-bg) 0%, var(--hp-bg-2) 100%);
    padding: 88px 32px;
}

.hp-final-cta-inner {
    max-width: 1360px;
    margin: 0 auto;
}

.hp-final-cta h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--hp-white);
    letter-spacing: -0.01em;
    margin: 0 0 14px;
    max-width: 640px;
}

.hp-final-cta p {
    font-size: 1.08rem;
    color: var(--hp-muted);
    margin: 0 0 32px;
    max-width: 540px;
}

.hp-final-cta-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.hp-final-cta-note {
    font-size: 0.88rem;
    color: var(--hp-muted-2);
    margin: 0;
}

@media (max-width: 640px) {
    .hp-final-cta {
        padding: 56px 20px;
    }

    .hp-final-cta h2 {
        font-size: 1.7rem;
    }

    .hp-final-cta p {
        font-size: 1rem;
    }

    .hp-final-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hp-final-cta-buttons .hp-btn {
        width: 100%;
        min-width: 0;
        white-space: normal;
        text-align: center;
    }
}

/* =========================
   AUTH PAGES (Login / Signup / Forgot Password / Reset Password)
   Shared card component -- homepage blue accent, no gold, no duplicate
   in-card logo (the navbar above already carries the brand mark).
========================= */
body.hp-auth-page {
    background: var(--hp-section-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.hp-auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.hp-auth-card {
    background: var(--hp-panel-bg);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(11, 18, 32, 0.10);
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    min-width: 0;
}

.hp-auth-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--hp-ink);
    text-align: center;
    margin: 0 0 6px;
    overflow-wrap: break-word;
}

.hp-auth-subtitle {
    color: var(--hp-ink-muted);
    text-align: center;
    font-size: 0.95rem;
    margin: 0 0 32px;
    overflow-wrap: break-word;
}

.hp-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    min-width: 0;
}

.hp-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.hp-auth-field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--hp-ink);
}

.hp-auth-field input {
    padding: 12px 16px;
    border: 1.5px solid var(--hp-line);
    border-radius: 12px;
    font-size: 0.97rem;
    font-family: inherit;
    color: var(--hp-ink);
    background: #f7faff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.hp-auth-field input:focus {
    border-color: var(--hp-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(47, 111, 235, 0.15);
}

.hp-auth-submit {
    margin-top: 6px;
    padding: 14px;
    background: var(--hp-blue);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 20px rgba(47, 111, 235, 0.28);
}

.hp-auth-submit:hover {
    background: var(--hp-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(47, 111, 235, 0.35);
}

.hp-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.hp-auth-error {
    color: #dc2626;
    font-size: 0.88rem;
    text-align: center;
    display: none;
    padding: 10px 14px;
    background: #fef2f2;
    border-radius: 10px;
    border: 1px solid #fecaca;
    overflow-wrap: break-word;
}

.hp-auth-success {
    color: #16a34a;
    font-size: 0.88rem;
    text-align: center;
    display: none;
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    overflow-wrap: break-word;
}

.hp-auth-perks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
    background: var(--hp-section-bg);
    border: 1px solid var(--hp-line);
    border-radius: 14px;
    padding: 16px 18px;
}

.hp-auth-perk {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #374151;
    min-width: 0;
}

.hp-auth-perk i {
    color: #16a34a;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.hp-auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--hp-ink-muted);
    overflow-wrap: break-word;
}

.hp-auth-footer a {
    color: var(--hp-blue);
    font-weight: 600;
    text-decoration: none;
}

.hp-auth-footer a:hover {
    color: var(--hp-blue-dark);
    text-decoration: underline;
}

.hp-auth-notice {
    text-align: center;
    padding: 24px 0;
    color: var(--hp-ink-muted);
    overflow-wrap: break-word;
}

.hp-auth-notice a {
    color: var(--hp-blue);
    font-weight: 600;
    text-decoration: none;
}

.hp-auth-notice a:hover {
    color: var(--hp-blue-dark);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .hp-auth-main {
        padding: 32px 16px;
    }

    .hp-auth-card {
        padding: 32px 22px;
    }
}

/* =========================
   COMPACT FUNCTIONAL FOOTER
   Low-weight closing footer used on public/product pages.
   Sits below the dark final-CTA section -- not a hero, not a CTA.
========================= */
.hp-footer {
    background: var(--hp-bg-2);
    border-top: 1px solid var(--hp-border);
    padding: 28px 32px;
}

.hp-footer-inner {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hp-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.hp-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hp-footer-logo {
    height: 22px;
    width: auto;
    display: block;
}

.hp-footer-tagline {
    font-size: 0.82rem;
    color: var(--hp-muted-2);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.hp-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.hp-footer-links a {
    font-size: 0.85rem;
    color: var(--hp-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.hp-footer-links a:hover {
    color: var(--hp-white);
}

.hp-footer-bottom {
    padding-top: 14px;
    border-top: 1px solid var(--hp-border);
}

.hp-footer-copyright {
    font-size: 0.78rem;
    color: var(--hp-muted-2);
}

@media (max-width: 640px) {
    .hp-footer {
        padding: 22px 20px;
    }

    .hp-footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .hp-footer-links {
        gap: 10px 16px;
    }
}
