/* ============================================================
   public-nav.css
   Single source of truth for the public navigation bar and
   footer used by every page that renders with
   web/templates/public/layout.html.
   Do not duplicate these selectors in page-specific stylesheets;
   override via cascade only if absolutely necessary.
   ============================================================ */

/* ------------------------------------------------------------
   PUBLIC-PAGE DESIGN TOKENS
   Public pages do not load main.css, so we redeclare the
   subset of theme tokens that public.css / auth-landing.css /
   auth-pricing.css / usecases.css reference. Without these the
   gradients, primary buttons, and text colors on the public
   pages fall back to invalid values and render invisible.
   Keep in sync with web/static/css/main.css :root.
   ------------------------------------------------------------ */
:root {
    --color-primary: #0ea5e9;
    --color-primary-hover: #38bdf8;
    --color-primary-active: #0284c7;
    --color-primary-bg: rgba(14, 165, 233, 0.08);

    --color-text: #0f172a;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    --color-text-inverse: #ffffff;

    --color-bg: #ffffff;
    --color-bg-secondary: #f1f5f9;
    --color-surface: #ffffff;
    --color-border: rgba(0, 0, 0, 0.08);

    --color-success: #22c55e;
    --color-success-dark: #059669;
    --color-warning: #f59e0b;
    --color-warning-dark: #d97706;
    --color-danger: #ef4444;
    --color-danger-dark: #dc2626;
}

/* ------------------------------------------------------------
   NAV
   ------------------------------------------------------------ */
.nav {
    position: sticky;
    top: 0;
    z-index: 999;
    height: 60px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.09);
    padding: 0 2rem;
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    gap: 2rem;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.nav__logo svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav__link:hover {
    color: #0f172a;
}

.nav__link--active {
    color: #0f172a;
    font-weight: 600;
}

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

.nav__signin {
    color: #334155;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav__signin:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.04);
}

.nav__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    background: #0284c7;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
}

.nav__cta svg {
    width: 14px;
    height: 14px;
}

.nav__cta:hover {
    background: #0369a1;
    box-shadow: 0 0 20px rgba(2, 132, 199, 0.35);
}

/* ------------------------------------------------------------
   MOBILE NAV
   ------------------------------------------------------------ */
.nav__hamburger {
    display: none;
    background: none;
    border: none;
    color: #334155;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav__hamburger:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nav__hamburger svg {
    width: 20px;
    height: 20px;
    display: block;
}

.nav__mobile-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.09);
    padding: 1rem 2rem;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 998;
}

.nav__mobile-link {
    display: block;
    padding: 0.75rem 0;
    color: #334155;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: color 0.2s;
}

.nav__mobile-link:last-child {
    border-bottom: none;
}

.nav__mobile-link:hover {
    color: #0f172a;
}

.nav__mobile-link--cta {
    color: #0284c7;
    font-weight: 700;
}

.nav__mobile-menu--open {
    display: flex;
}

@media (max-width: 820px) {
    .nav__links,
    .nav__actions {
        display: none;
    }

    .nav__hamburger {
        display: block;
    }
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.pub-footer {
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2.5rem 2rem 1.5rem;
}

.pub-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pub-footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.pub-footer__brand {
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.pub-footer__brand:hover {
    color: #fff;
}

.pub-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.pub-footer__link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.pub-footer__link:hover {
    color: #e2e8f0;
}

.pub-footer__copy {
    font-size: 0.8125rem;
    color: #475569;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1.25rem;
}

@media (max-width: 640px) {
    .pub-footer__top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .pub-footer__links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
}
