/* ========== SHARED STYLES — VITA Augustów ========== */
/* Used by all pages. Page-specific styles remain in <style> blocks. */

/* FONT METRIC OVERRIDES — reduce CLS from Google Fonts swap */
@font-face {
    font-family: 'Playfair Display Fallback';
    src: local('Georgia'), local('Times New Roman'), local('serif');
    size-adjust: 112%;
    ascent-override: 97%;
    descent-override: 25%;
    line-gap-override: 0%;
}
@font-face {
    font-family: 'Inter Fallback';
    src: local('-apple-system'), local('BlinkMacSystemFont'), local('Segoe UI'), local('Roboto'), local('sans-serif');
    size-adjust: 107%;
    ascent-override: 90%;
    descent-override: 22%;
    line-gap-override: 0%;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body { font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, sans-serif; color: #1A1A1A; background: #FAFAF7; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
a { color: inherit; text-decoration: none; }

/* VARIABLES */
:root {
    --navy: #1B3A5C; --navy-light: #2A5080; --gold: #B89530; --gold-light: #D4BA6A;
    --gold-text: #8B6914; /* WCAG AA safe on light backgrounds (5.5:1 contrast) */
    --cream: #FAFAF7; --cream-dark: #F0EDE6; --text: #1A1A1A; --text-light: #555;
    --light-blue: #E8F0FE; --white: #FFFFFF;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 { font-family: 'Playfair Display', 'Playfair Display Fallback', Georgia, serif; font-weight: 600; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
p { font-size: clamp(1rem, 1.1vw, 1.125rem); color: var(--text-light); }

/* LAYOUT */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-label { font-family: 'Inter', 'Inter Fallback', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold-text) !important; margin-bottom: 16px; }
/* Gold text on light backgrounds: use --gold-text (#8B6914) for WCAG AA compliance (5.5:1) */
/* Gold on dark backgrounds: keep --gold (#B89530) — fine for contrast */
.section-title { margin-bottom: 24px; }
.section-subtitle { font-size: 1.125rem; color: var(--text-light); max-width: 640px; margin-bottom: 48px; }

/* NAV */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(250, 250, 247, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(27, 58, 92, 0.08); }
nav .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo-vita { font-family: 'Playfair Display', 'Playfair Display Fallback', Georgia, serif; font-size: 1.8rem; font-weight: 700; color: var(--navy); letter-spacing: 0.08em; }
.logo-augustow { font-family: 'Inter', 'Inter Fallback', sans-serif; font-size: 0.65rem; font-weight: 500; color: var(--gold); letter-spacing: 0.2em; text-transform: uppercase; }
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a { font-family: 'Inter', 'Inter Fallback', sans-serif; font-size: 0.9rem; font-weight: 500; color: var(--text-light); transition: color 0.3s ease; }
.nav-links a:hover { color: var(--navy); }
.nav-links a.nav-active { color: var(--navy); font-weight: 600; }
.nav-cta { background: var(--navy); color: var(--white) !important; padding: 10px 24px; border-radius: 8px; font-weight: 500 !important; transition: all 0.3s ease; }
.nav-cta:hover { background: var(--navy-light); transform: translateY(-1px); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; z-index: 1001; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); transition: all 0.3s ease; display: block; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-overlay { display: none; position: fixed; inset: 0; top: 72px; background: rgba(0,0,0,0.4); z-index: 998; }
.nav-overlay.active { display: block; }
body.nav-open { overflow: hidden; }

/* BON TURYSTYCZNY BANNER */
.bon-banner { background: var(--navy); color: rgba(255,255,255,0.85); text-align: center; padding: 8px 16px; font-family: 'Inter', 'Inter Fallback', sans-serif; font-size: 0.82rem; font-weight: 400; letter-spacing: 0.01em; position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 1001; -webkit-transform: translateZ(0); }
.bon-banner a { color: var(--gold); font-weight: 600; text-decoration: none; }
.bon-banner a:hover { text-decoration: underline; text-underline-offset: 2px; }
.bon-banner + header nav { top: 34px; }
body:has(.bon-banner) { padding-top: 34px; }
@media (max-width: 768px) {
    .bon-banner + header nav { top: 52px; }
    body:has(.bon-banner) { padding-top: 52px; }
    body:has(.bon-banner) .nav-links { top: calc(72px + 52px); max-height: calc(100dvh - 72px - 52px); }
    body:has(.bon-banner) .nav-overlay { top: calc(72px + 52px); }
}
@media (max-width: 400px) {
    .bon-banner + header nav { top: 70px; }
    body:has(.bon-banner) { padding-top: 70px; }
    body:has(.bon-banner) .nav-links { top: calc(72px + 70px); max-height: calc(100dvh - 72px - 70px); }
    body:has(.bon-banner) .nav-overlay { top: calc(72px + 70px); }
}

/* BUTTONS */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--navy); color: var(--white); padding: 16px 32px; border-radius: 12px; font-family: 'Inter', 'Inter Fallback', sans-serif; font-size: 1rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.3s ease; }
.btn-primary:hover { background: var(--navy-light); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(27, 58, 92, 0.25); }
.btn-secondary { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--navy); padding: 16px 32px; border-radius: 12px; font-family: 'Inter', 'Inter Fallback', sans-serif; font-size: 1rem; font-weight: 600; border: 2px solid rgba(27, 58, 92, 0.15); cursor: pointer; transition: all 0.3s ease; }
.btn-secondary:hover { border-color: var(--navy); transform: translateY(-2px); }

/* ANIMATION */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ACCESSIBILITY */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.sr-only:focus { position: static; width: auto; height: auto; padding: 8px 16px; margin: 0; overflow: visible; clip: auto; background: var(--navy); color: #fff; z-index: 10001; font-family: 'Inter', 'Inter Fallback', sans-serif; }
:focus-visible { outline: 2px solid #D4A574; outline-offset: 2px; }
main p a, main li a, .content a { text-decoration: underline; }

/* TABLET NAV */
@media (max-width: 1280px) {
    .nav-links { gap: 14px; }
    .nav-links a { font-size: 0.8rem; }
    .nav-cta { padding: 8px 14px; font-size: 0.8rem; }
}

/* MOBILE NAV (10 nav items need hamburger below 1100px) */
@media (max-width: 1100px) {
    .nav-links { display: none; position: fixed; top: 72px; left: 0; right: 0; background: var(--cream); flex-direction: column; padding: 16px 24px; gap: 0; box-shadow: 0 4px 20px rgba(0,0,0,0.1); border-bottom: 1px solid rgba(27,58,92,0.08); z-index: 999; max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto; }
    body:has(.bon-banner) .nav-links { top: calc(72px + 34px); max-height: calc(100dvh - 72px - 34px); }
    body:has(.bon-banner) .nav-overlay { top: calc(72px + 34px); }
    .nav-links.active { display: flex; }
    .nav-links li { list-style: none; }
    .nav-links a { display: block; padding: 12px 0; font-size: 1rem; border-bottom: 1px solid rgba(27,58,92,0.06); text-align: center; }
    .nav-links li:last-child a { border-bottom: none; }
    .nav-links.active a { color: var(--text-light) !important; }
    .nav-links.active a:hover { color: var(--navy) !important; }
    .nav-links.active .nav-cta { display: block; background: var(--navy); color: var(--white) !important; margin: 12px 0 0; padding: 14px 24px; border-radius: 8px; text-align: center; border-bottom: none; }
    .nav-toggle { display: flex; }
    body.has-sticky-cta { padding-bottom: 70px; }
}

/* MINI HERO — subpage headers (prevent CLS from font swap) */
.mini-hero { min-height: 240px; contain: paint; }
@media (max-width: 768px) { .mini-hero { min-height: 280px; } }

/* BACK TO TOP */
.back-to-top { display: none; position: fixed; bottom: 20px; left: 20px; z-index: 9998; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--white); border: none; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.15); align-items: center; justify-content: center; transition: opacity 0.3s, transform 0.3s; opacity: 0; }
.back-to-top.visible { display: flex; opacity: 0.6; }
.back-to-top:hover { opacity: 1; transform: scale(1.1); }
body.has-sticky-cta .back-to-top { bottom: 80px; }
@media (max-width: 768px) { body.has-sticky-cta .back-to-top { bottom: 90px; } }
@media print { .back-to-top { display: none !important; } }

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .fade-in { transition: none; opacity: 1; transform: none; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* PRINT */
@media print {
    nav, .sticky-cta, #cookieBanner, .feedback-trigger, .nav-toggle { display: none !important; }
    .hero, .page-hero, .mini-hero { min-height: auto !important; padding: 40px 0 !important; background: #fff !important; color: #000 !important; }
    .hero::before { display: none !important; }
    body { font-size: 12pt; color: #000; background: #fff; }
    a { color: #000; text-decoration: underline; }
    .fade-in { opacity: 1 !important; transform: none !important; }
}
