/**
 * Phossil Marketing Page Template
 * Shared styles for collections, products, and feature pages
 * Based on the memorial.html design system
 */

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */

:root {
    /* Heirloom Gold Palette - Aligned with landing.css */
    --color-canvas: #F3F0E6;           /* Aged Vellum */
    --color-primary: #213535;          /* Deep Everglade */
    --color-accent: #D9A520;           /* Heirloom Goldenrod */
    --color-accent-soft: rgba(217, 165, 32, 0.08);
    --color-accent-hover: #EDB82F;     /* Light Gold */
    --color-accent-active: #C49420;    /* Darker gold when pressed */
    --color-surface: #FFFFFF;          /* White */
    --color-secondary: #68868A;        /* River Stone */
    --color-text-primary: #213535;
    --color-text-secondary: #68868A;
    --color-text-light: #F3F0E6;
    --color-text-muted: #8A9A9C;
    --color-text-on-accent: #FFFFFF;
    --color-border: #E5E2D9;           /* Light border */
    --color-warmth: #F5EDE8;
    --color-success: #4A7C59;          /* Muted forest green */

    /* Accent Colors */
    --color-rose: #D4A5A5;
    --color-lavender: #B8A9C9;
    --color-sage: #A8C4B8;
    --color-sky: #A9C4D4;
    --color-blush: #E8D5D5;

    /* Typography */
    --font-serif: 'Libre Baskerville', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;

    /* Spacing Scale */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;
    --space-3xl: 96px;
    --space-4xl: 128px;

    /* Container Widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;

    /* Shadows */
    --shadow-card: 0 4px 16px rgba(33, 53, 53, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(33, 53, 53, 0.12);
    --shadow-modal: 0 20px 60px rgba(33, 53, 53, 0.2);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;

    /* Focus States (Accessibility) */
    --color-focus-ring: var(--color-accent);
    --color-focus-ring-alpha: rgba(217, 165, 32, 0.3);

    /* Overlay States */
    --color-overlay: rgba(33, 53, 53, 0.75);
    --color-overlay-light: rgba(33, 53, 53, 0.5);

    /* Badge Colors */
    --color-badge-popular-bg: var(--color-accent);
    --color-badge-popular-text: var(--color-text-on-accent);
    --color-badge-bonus-bg: rgba(217, 165, 32, 0.15);
    --color-badge-bonus-text: var(--color-accent);
    --color-badge-guarantee-bg: rgba(74, 124, 89, 0.1);
    --color-badge-guarantee-text: var(--color-success);
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-canvas);
    color: var(--color-primary);
    line-height: 1.7;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    line-height: 1.3;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================================
   HEADER
   ============================================================================ */

header {
    background: rgba(243, 240, 230, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(104, 134, 138, 0.2);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-primary);
}

.logo img {
    height: 48px;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* ============================================================================
   MARKETING HEADER (Shared Component)
   ============================================================================ */

.marketing-header {
    background: var(--color-surface);
    padding: 8px 24px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
}

.marketing-header nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.marketing-header .logo-section {
    display: flex;
    align-items: center;
}

.marketing-header .logo-section img {
    height: 48px;
}

.marketing-header .logo-pro-badge {
    background: var(--color-accent);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-left: 10px;
    text-transform: uppercase;
}

.marketing-header .nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.marketing-header .nav-link {
    padding: 8px 14px;
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
    border-radius: 6px;
}

.marketing-header .nav-link:hover {
    color: var(--color-accent);
    background: rgba(33, 53, 53, 0.05);
}

.marketing-header .nav-link.current {
    color: var(--color-primary);
    font-weight: 600;
}

.marketing-header .nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.marketing-header .btn-login {
    padding: 8px 16px;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.marketing-header .btn-login:hover {
    color: var(--color-primary);
}

.marketing-header .btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--color-accent) 0%, #C49118 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.marketing-header .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 165, 32, 0.3);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}

.nav-dropdown-trigger:hover {
    background: rgba(33, 53, 53, 0.05);
}

.nav-dropdown.active .nav-dropdown-trigger {
    background: rgba(33, 53, 53, 0.05);
}

.nav-dropdown-label {
    color: #213535;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.nav-dropdown-label:hover {
    color: #D9A520;
}

.nav-dropdown.active .nav-dropdown-label {
    color: #213535;
    font-weight: 500;
}

.dropdown-arrow {
    color: #213535;
    transition: transform 0.2s;
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(45, 42, 61, 0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
    margin-top: 4px;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Position dropdowns to avoid overlap - first aligns left */
.nav-dropdown:first-of-type .nav-dropdown-menu {
    left: 0;
    right: auto;
}

/* Last dropdown aligns right to prevent viewport overflow */
.nav-dropdown:last-of-type .nav-dropdown-menu {
    left: auto;
    right: 0;
}

.dropdown-item {
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    color: #213535;
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: rgba(33, 53, 53, 0.03);
    color: #D9A520;
}

.dropdown-item.current {
    background: var(--color-accent-soft);
    color: var(--color-primary);
    font-weight: 500;
}

.dropdown-item-name {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.dropdown-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    background: var(--color-accent);
    color: white;
    border-radius: 4px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 42, 61, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* iOS scroll lock fix */
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 100%;
    height: 100%;
    background: var(--color-surface);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Ensure proper touch scrolling inside menu */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-menu-overlay.open .mobile-menu {
    transform: translateX(0);
}

/* Body scroll lock class - applied via JS */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu-close {
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
}

.mobile-menu-content {
    flex: 1;
    padding: 16px 0;
}

.mobile-menu-link {
    display: block;
    padding: 14px 24px;
    color: var(--color-text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.15s;
}

.mobile-menu-link:hover {
    background: var(--color-warmth);
    color: var(--color-primary);
}

/* Mobile Accordion */
.mobile-accordion {
    border-bottom: 1px solid var(--color-border);
}

.mobile-accordion:last-of-type {
    border-bottom: none;
}

.mobile-accordion-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
    text-align: left;
}

.accordion-arrow {
    color: var(--color-text-muted);
    transition: transform 0.2s;
}

.mobile-accordion.open .accordion-arrow {
    transform: rotate(180deg);
}

.mobile-accordion-content {
    display: none;
    background: var(--color-canvas);
    padding: 8px 0;
}

.mobile-accordion.open .mobile-accordion-content {
    display: block;
}

.mobile-accordion-content a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px 12px 40px;
    color: var(--color-text-secondary);
    font-size: 14px;
    transition: all 0.15s;
}

.mobile-accordion-content a:hover {
    background: var(--color-warmth);
    color: var(--color-primary);
}

.mobile-accordion-content a.current {
    color: var(--color-primary);
    font-weight: 500;
    background: var(--color-accent-soft);
}

.mobile-menu-cta {
    padding: 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-menu-cta .btn-primary {
    display: block;
    text-align: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--color-accent) 0%, #C49118 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
}

.mobile-menu-cta .btn-outline {
    display: block;
    text-align: center;
    padding: 14px 20px;
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn-warm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--color-accent) 0%, #C49118 100%);
    color: white;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(217, 165, 32, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-warm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-warm:hover {
    background: linear-gradient(135deg, #C49118 0%, var(--color-accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(217, 165, 32, 0.35);
}

.btn-warm:hover::before {
    left: 100%;
}

.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--color-warmth);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-soft:hover {
    background: #EDE5D8;
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--color-warmth);
    border-color: transparent;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
    padding: 140px 24px 80px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    margin: 0 auto 32px;
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    margin-bottom: 20px;
    color: var(--color-primary);
}

.hero-message {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto 32px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ============================================================================
   SECTION PATTERNS
   ============================================================================ */

.section {
    padding: 80px 24px;
}

.section-warmth {
    background: var(--color-warmth);
}

.section-surface {
    background: var(--color-surface);
}

.section-primary {
    background: var(--color-primary);
    color: white;
}

.section-primary h2,
.section-primary h3 {
    color: white;
}

.section-primary p {
    color: rgba(255, 255, 255, 0.8);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    background: var(--color-surface);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(45, 42, 61, 0.08);
    border-color: var(--color-accent);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent-soft);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-accent);
}

.card h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    font-family: var(--font-sans);
    font-weight: 600;
}

.card p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Step Cards */
.step-card {
    text-align: center;
    padding: 32px 24px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--color-warmth);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accent);
}

.step-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.step-card p {
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* Feature Cards */
.feature-card {
    background: var(--color-surface);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(45, 42, 61, 0.08);
    border-color: var(--color-accent);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--color-accent-soft);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-accent);
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    font-family: var(--font-sans);
    font-weight: 600;
}

.feature-card p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ============================================================================
   CTA SECTION
   ============================================================================ */

.cta-section {
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(180deg, var(--color-warmth) 0%, var(--color-canvas) 100%);
}

.cta-section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

footer {
    padding: 40px 24px;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

footer p {
    font-size: 13px;
    color: var(--color-text-muted);
}

footer a {
    color: var(--color-accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 16px;
}

.footer-links a {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.footer-links a:hover {
    color: var(--color-primary);
}

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

.text-center {
    text-align: center;
}

.text-accent {
    color: var(--color-accent);
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-accent) 0%, #C49118 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.max-width-sm {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.max-width-md {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.max-width-lg {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1024px) {
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 16px;
    }

    .nav-links {
        display: none;
    }

    /* Marketing Header Mobile */
    .marketing-header .nav-links {
        display: none;
    }

    .marketing-header .btn-login {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 120px 20px 60px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-message {
        font-size: 1rem;
    }

    .section {
        padding: 60px 20px;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .card-grid,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn-warm,
    .hero-cta .btn-soft,
    .hero-cta .btn-outline {
        width: 100%;
        max-width: 300px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn-warm,
    .cta-buttons .btn-soft {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 40px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .section {
        padding: 40px 16px;
    }

    .card {
        padding: 20px;
    }

    .step-card {
        padding: 24px 16px;
    }

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

/* ============================================================================
   TYPOGRAPHY SCALE (Phase 7)
   ============================================================================ */

.hero-headline {
    font-size: clamp(48px, 7vw, 72px);
    line-height: 1.1;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: var(--space-md);
}

.hero-headline-accent {
    color: var(--color-accent);
    font-style: italic;
}

h1, .h1 {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.15;
    font-weight: 700;
    color: var(--color-primary);
}

h2, .h2 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-primary);
}

h3, .h3 {
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.3;
    font-weight: 600;
    color: var(--color-primary);
}

h4, .h4 {
    font-size: clamp(18px, 2.5vw, 24px);
    line-height: 1.35;
    font-weight: 600;
    color: var(--color-primary);
}

.text-large {
    font-size: 20px;
    line-height: 1.6;
}

.text-body {
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-primary);
}

.text-small {
    font-size: 14px;
    line-height: 1.5;
}

.text-accent {
    color: var(--color-accent);
    font-weight: 600;
}

.text-link {
    color: #4A9FE8;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.text-link:hover {
    color: #5DB3FF;
}

@media (max-width: 768px) {
    .text-large {
        font-size: 18px;
    }

    .text-body {
        font-size: 16px;
    }
}

/* ============================================================================
   BUTTON SYSTEM (Phase 8)
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-height: 52px;
}

/* Primary Gold Button */
.btn-primary {
    background: var(--color-accent);
    color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(217, 165, 32, 0.25);
}

.btn-primary:hover {
    background: var(--color-accent-active);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(217, 165, 32, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(217, 165, 32, 0.25);
}

/* Secondary Outline Button */
.btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 2.5px solid #5DB3FF;
}

.btn-secondary:hover {
    background: rgba(93, 179, 255, 0.15);
    border-color: #7DC4FF;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(93, 179, 255, 0.25);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Light variant (on light backgrounds) */
.btn-secondary-light {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-secondary);
    padding: 14px 32px;
}

.btn-secondary-light:hover {
    border-color: var(--color-primary);
    background: rgba(33, 53, 53, 0.05);
}

/* Button with sub-text */
.btn-with-subtext {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 28px;
}

.btn-text {
    font-size: 17px;
    font-weight: 600;
}

.btn-subtext {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.85;
}

/* Small button variant */
.btn-sm {
    padding: 12px 24px;
    font-size: 15px;
    min-height: 44px;
}

/* Icon in button */
.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Disabled state */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Mobile responsive buttons */
@media (max-width: 640px) {
    .btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 16px;
    }

    .btn-sm {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ============================================================================
   ACCESSIBILITY & FOCUS STATES (Phase 9)
   ============================================================================ */

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-accent);
    color: var(--color-primary);
    padding: 12px 24px;
    font-weight: 600;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.2s ease;
}

.skip-to-main:focus {
    top: 0;
}

/* Focus visible styles */
*:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Remove focus for mouse users (keep for keyboard) */
*:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-secondary {
        border-width: 3px;
    }

    .btn-primary {
        border: 2px solid var(--color-primary);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================================
   UTILITY CLASSES (Phase 10)
   ============================================================================ */

/* Margin utilities */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Padding utilities */
.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Display utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Visibility */
.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (max-width: 768px) {
    .hidden-mobile { display: none; }
}

@media (min-width: 769px) {
    .hidden-desktop { display: none; }
}
