/* ==========================================================================
   Teerlink Museum Website - Main Styles
   ========================================================================== */

@import url('variables.css?v=hd8');

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

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-y: scroll;
    /* Force scrollbar to prevent layout shift */
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-book);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: rgba(255, 102, 0, 0.85);
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-black);
}

h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-weight-bold);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

.text-orange {
    color: var(--color-primary);
}

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

/* Timeline Year */
.timeline-year {
    font-family: var(--font-condensed);
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-medium);
    color: var(--color-secondary);
    letter-spacing: var(--tracking-wide);
}

/* Primary Headline - Bold with orange underline */
.headline-primary {
    font-family: var(--font-primary);
    font-size: var(--text-3xl);
    font-weight: var(--font-weight-black);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    position: relative;
    display: inline-block;
    padding-bottom: var(--space-2);
}

.headline-primary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    border-bottom: 4px double var(--color-primary);
}

/* Secondary Headline */
.headline-secondary {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
}

/* Body Copy */
.body-copy {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text-secondary);
}

/* Caption */
.caption {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Quote */
.quote {
    font-size: var(--text-xl);
    font-style: italic;
    color: var(--color-text);
    border-left: 4px solid var(--color-primary);
    padding-left: var(--space-6);
    margin: var(--space-8) 0;
}

.quote-author {
    font-size: var(--text-base);
    font-style: normal;
    color: var(--color-secondary);
    margin-top: var(--space-4);
    font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
    width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-narrow {
    width: var(--narrow-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.section {
    padding: var(--space-16) 0;
}

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

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background-color: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
}

.logo {
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.logo span {
    color: var(--color-primary);
}

.nav-menu {
    display: flex;
    gap: var(--space-6);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: rgba(255,255,255,0.78);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    padding: var(--space-2) 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-secondary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: all var(--transition-fast);
}

@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 10001;
    }

    /* Hamburger to X transformation */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        flex-direction: column;
        background: var(--color-background) !important;
        padding: 120px var(--space-8) var(--space-8) var(--space-8);
        gap: var(--space-4);
        z-index: 10000 !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

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

    .nav-link {
        font-size: var(--text-xl);
        padding: var(--space-4) 0;
        border-bottom: 1px solid rgba(255,255,255,0.10);
        display: block;
        color: var(--color-text);
    }

    .site-header {
        position: fixed !important;
        z-index: 10002 !important;
        background: rgba(0, 0, 0, 0.72) !important;
    }
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-24) var(--space-4);
    background: var(--color-background);
    position: relative;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: var(--z-behind);
    overflow: hidden;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
}

.hero-content {
    max-width: var(--container-xl);
    z-index: var(--z-above);
    display: flex;
    gap: var(--space-12);
    align-items: center;
    width: 100%;
}

.hero-tagline {
    font-family: var(--font-condensed);
    font-size: var(--text-lg);
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    margin-bottom: var(--space-4);
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-weight-black);
    line-height: var(--leading-none);
    margin-bottom: var(--space-6);
    text-transform: uppercase;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    line-height: var(--leading-relaxed);
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-8);
    justify-content: center;
}

.hero-text-column {
    flex: 1 1 65%;
}

.hero-video-column {
    flex: 1 1 35%;
    max-width: 400px;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,0.14);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,0.14);
    overflow: hidden;
}

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

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--text-6xl);
    }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-black);
}

.btn-primary:hover {
    background-color: rgba(255, 102, 0, 0.85);
    color: var(--color-black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
}

.btn-outline:hover {
    background-color: var(--color-secondary);
    color: var(--color-black);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-primary);
}

.btn-ghost:hover {
    background-color: rgba(255, 102, 0, 0.12);
}

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

.card {
    background-color: var(--color-surface);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-6);
}

.card-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.card-description {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

/* Video Card */
.video-card {
    position: relative;
}

.video-card .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: var(--z-above);
}

.video-card .play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid var(--color-black);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.video-card:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 0 8px rgba(208, 32, 48, 0.3);
}

/* ==========================================================================
   GRID LAYOUTS
   ========================================================================== */

.grid {
    display: grid;
    gap: var(--space-6);
}

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

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

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

/* ==========================================================================
   TIMELINE
   ========================================================================== */

.timeline {
    position: relative;
    padding-left: 0;
}



.timeline-date {
    font-family: var(--font-condensed);
    font-size: var(--text-xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-2);
}

.timeline-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

.timeline-content {
    color: var(--color-text-secondary);
}

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

.site-footer {
    background-color: var(--color-background);
    padding: var(--space-12) 0 var(--space-6);
    border-top: 4px solid var(--color-primary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

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

.footer-brand .logo {
    margin-bottom: var(--space-4);
}

.footer-description {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    max-width: 400px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-6);
    margin-top: var(--space-6);
    border-top: 1px solid rgba(255,255,255,0.12);
}

.footer-copyright {
    color: rgba(255,255,255,0.55);
    font-size: var(--text-xs);
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-brand {
        text-align: left;
    }

    .footer-description {
        margin: 0;
    }
}

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

.page-header {
    padding: var(--space-16) 0 var(--space-8);
    text-align: center;
    background: var(--color-background);
}

.page-header-title {
    font-size: var(--text-4xl);
    text-transform: uppercase;
    margin-bottom: var(--space-4);
}

.page-header-subtitle {
    font-size: var(--text-lg);
    color: var(--color-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.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;
}

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

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

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

.mb-0 {
    margin-bottom: 0;
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-12 {
    margin-bottom: var(--space-12);
}

.mt-0 {
    margin-top: 0;
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mt-12 {
    margin-top: var(--space-12);
}

/* Prevent body scroll when mobile nav is open */
body.nav-open {
    overflow: hidden;
}

/* Offset for fixed header */
main {
    padding-top: 72px;
    flex: 1;
}

/* ==========================================================================
   RESPONSIVE LAYOUT FIXES
   ========================================================================== */

/* Values section and similar two-column layouts */
@media (max-width: 768px) {

    /* Stack two-column grids on mobile */
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Fix hero content on mobile */
    .hero-content {
        padding: 0 var(--space-4);
    }

    /* Story page two-column layout */
    [style*="grid-template-columns: 1fr 1fr;"][style*="gap: var(--space-12)"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-8) !important;
    }
}

/* Mobile hero layout fix */
@media (max-width: 767px) {
    .hero-content {
        flex-direction: column !important;
    }

    .hero-text-column,
    .hero-video-column {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
}
