/*
 * Chrome for the logged-out surfaces: the public topbar, the public footer and
 * the handful of primitives the public pages share (hero, card grid, table,
 * pagination, sign-in CTA).
 *
 * Loaded by app/Views/template/public_topbar.php. The signed-in app never pulls
 * this file - a member sees the normal SPA shell instead.
 *
 * Palette is the user-side redesign palette, same tokens the landing page uses.
 */

:root {
    /* Near-black with the app's orange, matching the landing page and the
       logged-in app. See docs/PUBLIC-SEO.md. */
    --lp-bg:           #0d0d0e;
    --lp-bg-2:         #09090a;
    --lp-card:         #151516;
    --lp-card-hover:   #1b1b1d;
    --lp-border:       rgba(255, 153, 0, 0.22);
    --lp-border-soft:  rgba(255, 255, 255, 0.07);
    --lp-accent:       #ff9900;
    --lp-accent-2:     #ffb84d;
    --lp-text:         #f2f2f2;
    --lp-text-soft:    rgba(242, 242, 242, 0.76);
    --lp-text-muted:   rgba(242, 242, 242, 0.60);
    --lp-f-display:    'Rajdhani', system-ui, -apple-system, sans-serif;
    --lp-f-body:       'Exo 2', system-ui, -apple-system, sans-serif;
    --lp-f-mono:       'IBM Plex Mono', ui-monospace, monospace;
    --lp-ease:         cubic-bezier(.21, .61, .35, 1);
}

html, body {
    background: var(--lp-bg);
    color: var(--lp-text);
    font-family: var(--lp-f-body);
}

.lp-shell {
    /* Push content below the fixed 64px-tall nav */
    padding-top: 64px;
    min-height: 100vh;
    background: var(--lp-bg);
}

/* Fixed nav (port of the fabby landing .lp-nav) */
.lp-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(13, 13, 14, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--lp-border);
    transition: background 0.3s var(--lp-ease);
}
.lp-nav.scrolled { background: rgba(13, 13, 14, 0.94); }

.lp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: 0 0 auto;
}
.lp-brand img { width: 32px; height: 32px; }
.lp-brand > span {
    font-family: var(--lp-f-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--lp-text);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.lp-brand-dot { color: var(--lp-accent); }

.lp-nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0; padding: 0;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.lp-nav-links::-webkit-scrollbar { display: none; }
.lp-nav-links a {
    font-family: var(--lp-f-mono);
    font-size: 0.75rem;
    color: var(--lp-text-soft);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.25s var(--lp-ease);
    position: relative;
    text-decoration: none;
    white-space: nowrap;
}
.lp-nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--lp-accent);
    transition: width 0.3s var(--lp-ease);
}
.lp-nav-links a:hover,
.lp-nav-links a.active { color: var(--lp-accent); }
.lp-nav-links a:hover::after,
.lp-nav-links a.active::after { width: 100%; }

/* Sign-in button in the nav */
.lp-nav-cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: 0;
    border: 1px solid var(--lp-border);
    background: rgba(255, 153, 0, 0.08);
    color: var(--lp-accent);
    font-family: var(--lp-f-mono);
    font-size: .72rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: background .25s var(--lp-ease), color .25s var(--lp-ease);
}
.lp-nav-cta:hover { background: var(--lp-accent); color: #161617; }

/* Page primitives shared by the public pages */
.lp-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}
.lp-page-head { margin-bottom: 2rem; }
.lp-page-head h1 {
    font-family: var(--lp-f-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: .5px;
    margin: 0 0 .5rem;
    color: var(--lp-text);
}
.lp-page-head p {
    margin: 0;
    color: var(--lp-text-soft);
    max-width: 70ch;
    line-height: 1.6;
}

.lp-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    font-family: var(--lp-f-mono);
    font-size: .7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--lp-text-muted);
    margin-bottom: 1rem;
}
.lp-crumbs a { color: var(--lp-text-muted); text-decoration: none; }
.lp-crumbs a:hover { color: var(--lp-accent); }

.lp-card {
    background: var(--lp-card);
    border: 1px solid var(--lp-border-soft);
    border-radius: 0;
    padding: 1.25rem;
    transition: background .2s var(--lp-ease), border-color .2s var(--lp-ease);
}
a.lp-card { display: block; text-decoration: none; color: inherit; }
a.lp-card:hover { background: var(--lp-card-hover); border-color: var(--lp-border); }

.lp-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.lp-table-wrap { overflow-x: auto; }
.lp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.lp-table th {
    text-align: left;
    font-family: var(--lp-f-mono);
    font-size: .68rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--lp-text-muted);
    padding: .65rem .8rem;
    border-bottom: 1px solid var(--lp-border-soft);
    white-space: nowrap;
}
.lp-table td {
    padding: .7rem .8rem;
    border-bottom: 1px solid var(--lp-border-soft);
    color: var(--lp-text);
}
.lp-table tbody tr:hover { background: var(--lp-card-hover); }
.lp-table a { color: inherit; text-decoration: none; }
.lp-table a:hover { color: var(--lp-accent); }
.lp-table .ta-r { text-align: right; }

.lp-pager {
    display: flex;
    gap: .5rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.lp-pager a, .lp-pager span {
    padding: .45rem .8rem;
    border-radius: 0;
    border: 1px solid var(--lp-border-soft);
    font-family: var(--lp-f-mono);
    font-size: .75rem;
    color: var(--lp-text-soft);
    text-decoration: none;
}
.lp-pager a:hover { border-color: var(--lp-border); color: var(--lp-accent); }
.lp-pager .is-current { background: var(--lp-card); color: var(--lp-accent); border-color: var(--lp-border); }

/* The conversion unit: every public page ends on one of these */
.lp-cta {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 0;
    border: 1px solid var(--lp-border);
    background: linear-gradient(135deg, rgba(255,153,0,.10), rgba(255,153,0,.02));
    text-align: center;
}
.lp-cta h2 {
    font-family: var(--lp-f-display);
    font-size: 1.5rem;
    margin: 0 0 .5rem;
    color: var(--lp-text);
}
.lp-cta p {
    margin: 0 auto 1.25rem;
    max-width: 60ch;
    color: var(--lp-text-soft);
    line-height: 1.6;
}
.lp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1.5rem;
    border-radius: 0;
    background: var(--lp-accent);
    color: #161617;
    font-family: var(--lp-f-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .2s var(--lp-ease);
}
.lp-cta-btn:hover { background: var(--lp-accent-2); color: #161617; }

/* Footer */
.lp-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: 1.6rem 2rem;
    background: var(--lp-bg-2);
    border-top: 1px solid var(--lp-border);
    font-family: var(--lp-f-mono);
    font-size: 0.75rem;
    color: var(--lp-text-muted);
    letter-spacing: 0.3px;
}
.lp-footer a { color: var(--lp-text-muted); text-decoration: none; }
.lp-footer a:hover { color: var(--lp-accent); }
.lp-footer-brand {
    font-family: var(--lp-f-display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--lp-text);
}
.lp-footer-brand .dot { color: var(--lp-accent); }
.lp-footer-copy {
    font-size: 0.72rem;
    color: var(--lp-text-muted);
    margin-top: 2px;
}
.lp-footer-right {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.lp-footer-right a {
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 0.7rem;
    transition: color 0.2s var(--lp-ease);
}

@media (max-width: 860px) {
    .lp-nav { padding: 0 1.2rem; }
    .lp-nav-links { gap: 1.1rem; }
    .lp-nav-links a { font-size: .7rem; letter-spacing: 1px; }
}
@media (max-width: 720px) {
    .lp-page { padding: 1.75rem 1rem 3rem; }
    .lp-footer { flex-direction: column; align-items: flex-start; padding: 1.4rem 1.2rem; }
    .lp-footer-right { gap: 1rem; }
}

/*
 * Legal-page variant of the nav: three columns so the four legal sub-pages sit
 * in the middle with Home/Blog on the right. Used by template/public_topbar_legal.php.
 */
.lp-nav--legal {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
}
.lp-nav--legal > .lp-brand { justify-self: start; }
.lp-nav--legal .lp-nav-center { justify-self: center; }
.lp-nav--legal .lp-nav-right  { justify-self: end; }

@media (max-width: 960px) {
    .lp-nav--legal .lp-nav-center { display: none; }
    .lp-nav--legal { grid-template-columns: 1fr auto; }
}
