/* Paper2Quote landing — shared design tokens + base styles + nav + footer.
   Phase 1 of the 0.3.0 landing rework: extracted from the duplicated <style>
   blocks in index.html / main_page.html / changelog.html and the duplicated
   `globalCss` template literals in login_page.html / register_page.html /
   user_dashboard.html / admin_dashboard.html.

   Token values match the vanilla landing pages (index/main_page/changelog).
   The four React-CDN pages were drifting slightly (--muted: #516377) and are
   re-aligned here on the canonical vanilla values (--muted: #5a6e82).

   Phase 2 evolves these tokens + selectors toward the desktop app's Ds visual
   language. */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Sora:wght@300;400;500;600;700;800&family=Epilogue:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg: #f0f4f8;
    --bg-2: #e8eef5;
    --surface: #ffffff;
    --surface-2: #f5f8fb;
    --surface-3: #eef2f7;
    --border: #dde5ee;
    --border-strong: #c0cdd9;
    --primary: #2e9cd4;
    --primary-dark: #1e7fb5;
    --accent: #7c3aed;
    --accent-light: #ede9fe;
    --cyan: #06b6d4;
    --text: #1a2535;
    --text-2: #2d3a4a;
    --muted: #5a6e82;
    --muted-light: #8fa3b8;
    --red: #ef4444;
    --red-light: #fee2e2;
    --green: #16a34a;
    --green-light: #dcfce7;
    --orange: #f59e0b;
    --orange-light: #fef3c7;
    --brand-gradient: linear-gradient(135deg, #2e9cd4 0%, #7c3aed 100%);
    --brand-gradient-soft: linear-gradient(135deg, rgba(46, 156, 212, 0.12) 0%, rgba(124, 58, 237, 0.12) 100%);
    --shadow-sm: 0 1px 3px rgba(26, 37, 53, 0.08), 0 1px 2px rgba(26, 37, 53, 0.04);
    --shadow: 0 4px 16px rgba(26, 37, 53, 0.08), 0 1px 4px rgba(26, 37, 53, 0.04);
    --shadow-lg: 0 16px 48px rgba(26, 37, 53, 0.12), 0 4px 12px rgba(26, 37, 53, 0.06);
    --shadow-xl: 0 32px 80px rgba(26, 37, 53, 0.14), 0 8px 24px rgba(26, 37, 53, 0.06);
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Epilogue', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* Circular logos — landing rebrand directive (Phase 2 0.3.0). The Tauri brand
   mark is square; framing it inside a circle with overflow:hidden gives the
   sleek rounded chip we want in the nav, footer, and slideshow title bar. */
.nav-logo img,
.footer-brand-logo img,
.win-titlebar-icon {
    border-radius: 50%;
    object-fit: cover;
}

.disabled-link {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: rgba(240, 244, 248, 0.88);
    backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, box-shadow 0.3s;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}

.nav-wordmark {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.04em;
    display: flex;
    align-items: baseline;
}

.nav-wordmark .q {
    color: var(--primary);
}

.nav-wordmark .e {
    color: var(--text-2);
}

/* Header tab pill switcher — translated from packages/ui/primitives/DsTabSwitch.tsx
   (the same primitive the desktop app uses for Package/Takeoff/Details/etc. tabs).
   Container holds an inset shadow + slate border; the .nav-pill is an absolutely
   positioned div that JS slides under the active link (matches the React primitive's
   sliding-pill behaviour). Inactive links keep the same line-height so the pill
   measurement stays stable. */
.nav-links {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 100px;
    box-shadow: inset 0 1px 2px rgba(26, 37, 53, 0.04);
}

.nav-pill {
    position: absolute;
    top: 4px;
    bottom: 4px;
    background: var(--surface);
    border-radius: 100px;
    box-shadow: 0 2px 6px rgba(26, 37, 53, 0.10), 0 4px 12px rgba(26, 37, 53, 0.06);
    transition: left 0.25s ease-out, width 0.25s ease-out, opacity 0.15s ease-out;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
}

.nav-pill.ready {
    opacity: 1;
}

.nav-links li {
    position: relative;
    z-index: 1;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 100px;
    color: var(--muted);
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

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

.nav-links a.active {
    color: var(--primary-dark);
}

.nav-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-nav-ghost {
    padding: 7px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-nav-ghost:hover:not(.disabled-link) {
    border-color: var(--border-strong);
    color: var(--text);
    background: var(--surface-3);
}

.btn-nav-primary {
    padding: 7px 18px;
    border-radius: 100px;
    border: none;
    background: linear-gradient(135deg, #2e9cd4, #7c3aed);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(46, 156, 212, 0.3);
}

.btn-nav-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(46, 156, 212, 0.35);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* FOOTER */
footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 48px 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 13px;
    line-height: 1.6;
    max-width: 250px;
    color: rgba(255, 255, 255, 0.45);
}

.footer-col-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover:not(.disabled-link) {
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom-links a:hover:not(.disabled-link) {
    color: rgba(255, 255, 255, 0.6);
}

/* Page-specific responsive @media rules (nav collapse, footer-inner grid)
   stay inline in their respective HTML files because their breakpoints
   diverge: index/main_page use 768px, changelog uses 640px+900px, others
   use various values. Phase 2 will rationalize. */
