/* =====================================================================
 * Been There — shared stylesheet
 * Loaded by every page (index, privacy, terms, support).
 * Page-specific styles remain inline in each HTML file.
 * ===================================================================== */

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== DESIGN TOKENS ===== */
:root {
    /* Brand purple — mirrors app Colors.ts */
    --purple-primary: #6B46C1;
    --purple-80: #7C5ACE;
    --purple-60: #9F7AEA;
    --purple-40: #C3B1E1;
    --purple-20: #D9CEF0;
    --purple-10: #EAE5F7;
    --purple-5: #F5F2FB;
    --purple-pressed: #5A3BA8;
    --purple-deep: #44337A;

    /* Surfaces */
    --bg-primary: #F5F5F5;
    --bg-secondary: #F5F3F8;
    --card: #FCFCFC;

    /* Text */
    --text-primary: #121212;
    --text-secondary: #8C8C8C;
    --text-disabled: #C2C2C2;
    --white: #FFFFFF;

    /* Category colors — match app PlaceCategory */
    --cat-restaurant: #1CC05B;
    --cat-bar: #E537CE;
    --cat-cafe: #37BDE5;
    --cat-pub: #E75F10;

    /* Fonts */
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-std: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-pill: 100px;

    /* Shadows */
    --shadow-subtle: 0 2px 4px rgba(107, 70, 193, 0.08);
    --shadow-elevated: 0 12px 28px rgba(107, 70, 193, 0.10);
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADER =====
 * Default state: transparent (used on landing over purple hero).
 * .scrolled state: solid white with blur (used on landing after scroll,
 *                  and on every secondary page from page-load).
 */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-subtle);
    padding: 12px 32px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.35s ease;
}

.header.scrolled .logo { color: var(--purple-primary); }

.header-links a {
    font-family: var(--font-heading);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.35s ease;
}

.header.scrolled .header-links a { color: var(--text-secondary); }
.header-links a:hover { opacity: 0.7; }
.header.scrolled .header-links a:hover { color: var(--purple-primary); opacity: 1; }

/* ===== FOOTER ===== */
.footer {
    background: #0D0D14;
    padding: 32px 24px;
}

.footer-inner {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo { width: 32px; height: 32px; border-radius: var(--radius-sm); }

.footer-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    color: white;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-right a {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.25s;
}

.footer-right a:hover { color: rgba(255, 255, 255, 0.75); }

.footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-body);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
}

/* ===== UTILITIES ===== */

/* Visually-hidden for accessibility (labels, skip-links) */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip-to-content link, visible on focus */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 1000;
    padding: 12px 20px;
    background: var(--purple-primary);
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus { top: 16px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header { padding: 16px 20px; }
    .header.scrolled { padding: 12px 20px; }

    .footer-inner { justify-content: center; text-align: center; }
    .footer-left { justify-content: center; }
}

/* ===== REDUCED MOTION =====
 * Respect user OS setting to disable decorative animations.
 * Does not affect essential transitions under 100ms (too short to feel).
 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
