/* ============================================
   LAST CALL AMERICA - BASE STYLESHEET
   Version 1.0
   ============================================ */

/* ============================================
   FONT FACES
   ============================================ */
@font-face {
    font-family: 'C059';
    src: url('../media/fonts/C059-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'C059';
    src: url('../media/fonts/C059-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('../media/fonts/EBGaramond-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('../media/fonts/EBGaramond-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Core Americana Palette */
    --navy: #1e2d3d;
    --navy-deep: #141f2b;
    --cream: #faf8f3;
    --cream-warm: #f5f1e8;
    --cream-dark: #e9e4d8;
    --rust: #c83737;
    --rust-light: #a34545;
    --gold: #b8942d;
    --gold-muted: #9a7d2a;

    /* Typography */
    --font-headline: 'C059', Georgia, serif;
    --font-headline-italic: 'C059', Georgia, serif;
    --font-headline-stretch: scaleY(1.125);
    --font-body: 'EB Garamond', Georgia, serif;
    --font-body-italic: 'EB Garamond', Georgia, serif;
    --font-ui: 'Lato', -apple-system, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    /* Widths */
    --content-width: 720px;
    --wide-width: 960px;
    --max-width: 1200px;
}

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

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--navy);
    line-height: 1.75;
    min-height: 100vh;
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.divider-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
}

.divider-line::before,
.divider-line::after {
    content: '';
    width: 50px;
    height: 1px;
    background: var(--navy);
    opacity: 0.2;
}

.divider-line .ornament {
    font-family: var(--font-headline);
    font-size: 0.6rem;
    color: var(--rust);
    opacity: 0.7;
    letter-spacing: 0.3em;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    background: var(--navy-deep);
    padding: var(--space-md) 0;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: block;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 1;
}

.site-logo-img {
    display: block;
    height: 40px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.main-nav a {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cream);
    text-decoration: none;
    padding: var(--space-xs) 0;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold-muted);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    opacity: 1;
}

.main-nav a:hover::after {
    width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--navy-deep);
    color: var(--cream);
    padding: var(--space-xl) 0 var(--space-lg);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(250, 248, 243, 0.08);
}

.footer-brand {
    display: block;
}

.footer-logo-img {
    display: block;
    height: 32px;
    width: auto;
}

.footer-nav {
    display: flex;
    gap: var(--space-lg);
}

.footer-nav a {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cream);
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.footer-nav a:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.35;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--cream);
    text-decoration: none;
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.footer-social a:hover {
    opacity: 1;
}

/* ============================================
   PAGE HEADER (SHARED)
   ============================================ */
.page-header {
    background: var(--cream-warm);
    padding: var(--space-md) 0 var(--space-lg);
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
}

.page-header-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    position: relative;
    z-index: 1;
}

.page-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rust);
    margin-bottom: var(--space-sm);
}

.page-title {
    font-family: var(--font-headline);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    color: var(--navy);
    transform: var(--font-headline-stretch);
    transform-origin: left top;
}

.page-subtitle {
    font-family: var(--font-headline-italic);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--navy);
    opacity: 0.7;
    line-height: 1.6;
}

/* ============================================
   IMAGE FRAMES (SHARED)
   ============================================ */
.image-frame {
    background: var(--cream);
    padding: 8px;
    box-shadow: 
        0 2px 6px rgba(30, 45, 61, 0.05),
        0 4px 14px rgba(30, 45, 61, 0.04);
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    font-family: var(--font-body-italic);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--navy);
    opacity: 0.55;
    padding: var(--space-sm) 0 0;
    text-align: center;
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

/* Hide checkbox accessibly */
.nav-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Hide hamburger on desktop */
.nav-toggle-label {
    display: none;
}

@media (max-width: 768px) {
    /* Show hamburger on mobile */
    .nav-toggle-label {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        cursor: pointer;
        position: relative;
        z-index: 100;
    }

    /* Hamburger icon - three lines */
    .hamburger,
    .hamburger::before,
    .hamburger::after {
        display: block;
        background: var(--cream);
        width: 24px;
        height: 2px;
        border-radius: 1px;
        transition: all 0.3s ease;
    }

    .hamburger {
        position: relative;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        left: 0;
    }

    .hamburger::before {
        top: -7px;
    }

    .hamburger::after {
        top: 7px;
    }

    /* Hamburger to X animation when checked */
    .nav-toggle:checked + .nav-toggle-label .hamburger {
        background: transparent;
    }

    .nav-toggle:checked + .nav-toggle-label .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle:checked + .nav-toggle-label .hamburger::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Focus state for accessibility */
    .nav-toggle:focus-visible + .nav-toggle-label {
        outline: 2px solid var(--gold);
        outline-offset: 2px;
    }

    /* Header layout adjustments */
    .header-inner {
        flex-wrap: wrap;
        padding: 0 var(--space-sm);
    }

    /* Smaller logo on mobile */
    .site-logo-img {
        height: 28px;
    }

    /* Mobile nav - dropdown panel */
    .main-nav {
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
        order: 3;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .main-nav li {
        border-top: 1px solid rgba(250, 248, 243, 0.08);
    }

    .main-nav a {
        display: flex;
        align-items: center;
        padding: var(--space-md) 0;
        font-size: 0.9rem;
        opacity: 1;
        min-height: 44px;
    }

    /* Remove underline animation on mobile */
    .main-nav a::after {
        display: none;
    }

    /* Show nav when checkbox is checked */
    .nav-toggle:checked ~ .main-nav {
        max-height: 300px;
        padding: var(--space-sm) 0;
    }

    /* Page header responsive */
    .page-header {
        padding: var(--space-md) 0 var(--space-lg);
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .page-label {
        margin-bottom: var(--space-sm);
    }

    /* Footer responsive */
    .site-footer {
        padding: var(--space-lg) 0 var(--space-md);
    }

    .footer-main {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
        padding-bottom: var(--space-md);
    }

    .footer-nav {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .footer-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .footer-social {
        gap: var(--space-md);
    }

    .footer-social a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}
