/* ==================== TABLE OF CONTENTS ==================== */
/*
1. CSS VARIABLES & RESET
2. GLOBAL BASE STYLES  
3. TYPOGRAPHY SYSTEM
4. LAYOUT CONTAINERS
5. HEADER & NAVIGATION
   - Logo Styles
   - Main Navigation 
   - Mobile Navigation
6. CONTENT SECTIONS
   - Unified Content Container
   - Special Content Types
7. LINKS & INTERACTIVE ELEMENTS
8. PAGE-SPECIFIC STYLES
   - Members List
   - Contributors
   - Documents
   - Gratitude
   - Homepage
9. FOOTER STYLES
   - Tooltip System
10. COOKIE NOTICE
11. ACCESSIBILITY
12. RESPONSIVE STYLES
*/

/* ==================== 1. CSS VARIABLES & RESET ==================== */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
    scroll-behavior: smooth;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* Color System */
:root {
    --color-black: #000;
    --color-white: #fff;
    --color-offwhite: #f5f3f0;
    --color-light-beige: #e0dedb;
    --color-gray-light: #808080;
    --color-gray-medium: #666;
    --color-gray-dark: #2a2a2a;
    --color-gold: #b59e5f;
    --color-gold-dark: #a08a4f;
}

/* Typography System */
:root {
    --text-base: clamp(1.125rem, 1.4375rem, 1.4375rem);
    --text-lg: clamp(1.25rem, 1.5625rem, 1.5625rem);
    --text-xl: clamp(1.4375rem, 1.8rem, 1.8rem);
    --text-2xl: clamp(1.75rem, 2.25rem, 2.25rem);
    --text-3xl: clamp(2rem, 2.5rem, 2.5rem);
    --line-height-normal: 1.5;
    --line-height-tight: 1.3;
}

/* ==================== 2. GLOBAL BASE STYLES ==================== */
body {
    font-family: 'Garamond', 'Times New Roman', serif;
    background-color: var(--color-offwhite);
    color: var(--color-gray-dark);
    font-size: var(--text-base);
    line-height: var(--line-height-normal);
}

/* ==================== 3. TYPOGRAPHY SYSTEM ==================== */
h1 {
    font-size: var(--text-3xl);
    letter-spacing: 0.125rem;
    margin: 0;
    font-weight: normal;
    line-height: var(--line-height-tight);
}

h2 {
    font-size: var(--text-xl);
    letter-spacing: clamp(0.125rem, 1vw, 0.25rem);
    text-transform: uppercase;
    margin-top: 0.625rem;
    font-weight: normal;
    color: var(--color-gold);
    line-height: var(--line-height-tight);
}

h3 {
    font-size: var(--text-2xl);
    line-height: var(--line-height-tight);
    margin-bottom: 2.5rem;
    font-weight: normal;
}

h4 {
    font-size: var(--text-lg);
    line-height: var(--line-height-tight);
}

/* ==================== 4. LAYOUT CONTAINERS ==================== */
.container {
    max-width: 56.25rem; /* 900px */
    margin: 0 auto;
    padding: 0 1.25rem; /* 20px */
}

/* ==================== 5. HEADER & NAVIGATION ==================== */
header {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--color-gold);
}

/* Logo Styles */
.logo-image {
    max-height: 60px;
    width: auto;
    margin: 0 auto;
}

/* Main Navigation */
nav {
    background-color: var(--color-black);
    padding: 0.9375rem 0;
    text-align: center;
}

nav a {
    color: var(--color-white);
    text-decoration: none;
    margin: 0 0.9375rem;
    letter-spacing: 0.0625rem;
    font-size: var(--text-base);
    transition: color 0.3s ease;
}

nav a:hover,
nav a:focus,
nav a.active {
    color: var(--color-gold);
    outline: none;
}

/* Mobile Navigation */
.mobile-menu {
    display: none;
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: fixed;
    top: 1.5rem;
    right: 1rem;
    z-index: 1001;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    background-color: rgba(181, 158, 95, 0.2);
    outline: none;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-dropdown {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-black);
    z-index: 1000;
    padding-top: 4rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-dropdown.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-item {
    display: block;
    color: var(--color-white);
    text-decoration: none;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--color-gray-dark);
    transition: background-color 0.3s ease;
    font-size: var(--text-lg);
    letter-spacing: 0.0625rem;
}

.mobile-menu-item:hover,
.mobile-menu-item:focus {
    background-color: var(--color-gray-dark);
    color: var(--color-gold);
    outline: none;
}

/* ==================== 6. CONTENT SECTIONS ==================== */
/* Unified Content Container */
.content-container {
    padding: 5rem 0;
    text-align: center;
}

.content-container .container {
    max-width: 50rem;
    text-align: left;
}

.content-container h3 {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.content-container p {
    margin-bottom: 1.5625rem;
    text-align: left;
}

.content-container strong {
    color: var(--color-gold);
    font-weight: bold;
}

/* Special Content Types */
.members-container {
    background-color: var(--color-black);
    color: var(--color-white);
}

.members-container p {
    color: var(--color-gold);
}

.hero-container {
    background-color: var(--color-light-beige);
    padding: 5rem 1.25rem;
}

.themed-container {
    background-color: var(--color-light-beige);
}

/* ==================== 7. LINKS & INTERACTIVE ELEMENTS ==================== */
.back-link {
    display: block;
    text-align: left;
    margin: 0 0 1.875rem 0;
    color: var(--color-gold);
    text-decoration: none;
    width: fit-content;
    transition: color 0.3s ease;
}

.back-link:hover,
.back-link:focus {
    color: var(--color-gold-dark);
    outline: none;
}

.gold-link {
    color: var(--color-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.gold-link:hover,
.gold-link:focus {
    color: var(--color-gold-dark);
    outline: none;
    text-decoration: underline;
}

.lang-link {
    color: var(--color-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.lang-link:hover,
.lang-link:focus {
    text-decoration: underline;
    color: var(--color-gold-dark);
    outline: none;
}

/* ==================== 8. PAGE-SPECIFIC STYLES ==================== */
/* Members List */
.members-list {
    margin: 1.875rem 0;
}

.member {
    margin-bottom: 0.3125rem;
    padding-left: 1.25rem;
}

.member strong {
    color: var(--color-gray-dark);
    font-weight: bold;
}

.member em {
    color: var(--color-gray-medium);
    font-style: italic;
}

/* Contributors */
.contributor {
    margin-bottom: 0.3125rem;
    padding-left: 0;
    text-align: center;
}

.contributor strong {
    color: var(--color-gray-dark);
    font-weight: bold;
    font-size: var(--text-xl);
}

.contributor.deceased::before {
    content: '✠ ';
    color: var(--color-gold);
    font-size: 0.8em;
    margin-right: 0.5rem;
    opacity: 0.9;
}

/* Documents */
.documents-content {
    max-width: 46.875rem;
    margin: 0 auto;
    line-height: var(--line-height-normal);
}

.document-item {
    margin-bottom: 0.9375rem;
    padding: 0;
    background-color: transparent;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.document-item h4 {
    margin: 0;
    font-size: var(--text-lg);
    color: var(--color-gray-dark);
    font-weight: bold;
}

.document-bullet {
    margin: 0 0.9375rem;
    color: var(--color-gold);
    font-weight: bold;
}

.document-link {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.0625rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.document-link:hover,
.document-link:focus {
    color: var(--color-gold-dark);
    text-decoration: underline;
    outline: none;
}

/* Gratitude */
.gratitude-content {
    font-style: normal;
}

.memorial-note {
    font-size: 1.3rem;
    text-align: center;
    display: block;
    margin-top: 2.5rem;
    color: var(--color-gray-medium);
}

/* Homepage */
.photo-section {
    width: 100%;
    background: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.photo-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.main-photo {
    width: 100%;
    height: auto;
    display: block;
}

/* ==================== 9. FOOTER STYLES ==================== */
footer {
    background-color: var(--color-black);
    color: var(--color-gray-light);
    text-align: center;
    padding: 1.875rem 0;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    border-top: 1px solid;
    border-top-color: var(--color-gold);
}

footer p {
    margin: 0;
}

/* Tooltip System */
.tooltip-container {
    position: relative;
    display: inline-block;
    margin-left: 0.3rem;
}

.tooltip-arrow {
    color: var(--color-gold);
    font-size: 0.8em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.tooltip-arrow:hover {
    color: var(--color-gold-dark);
}

.tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-gold);
    color: var(--color-black);
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-radius: 3px;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
    width: 280px;
    z-index: 1001;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--color-gold) transparent transparent transparent;
}

.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* ==================== 10. COOKIE NOTICE ==================== */
.cookie-notice {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 1.25rem;
    border: 1px solid var(--color-gold);
    max-width: 20rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.4;
    z-index: 1000;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3);
}

.cookie-notice p {
    margin: 0 0 0.9375rem 0;
}

.cookie-notice-buttons {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.cookie-accept,
.cookie-decline {
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    letter-spacing: 0.0625rem;
    text-transform: uppercase;
    transition: all 0.3s;
    flex: 1;
    min-width: 5rem;
}

.cookie-accept {
    background-color: var(--color-gold);
    color: var(--color-black);
}

.cookie-accept:hover,
.cookie-accept:focus {
    background-color: var(--color-gold-dark);
    outline: none;
}

.cookie-decline {
    background-color: transparent;
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
}

.cookie-decline:hover,
.cookie-decline:focus {
    background-color: var(--color-gold);
    color: var(--color-black);
    outline: none;
}

.cookie-notice.hidden {
    display: none;
}

/* ==================== 11. ACCESSIBILITY ==================== */
.skip-link {
    position: absolute;
    top: -2.5rem;
    left: 0.375rem;
    background: var(--color-gold);
    color: var(--color-black);
    padding: 0.5rem;
    text-decoration: none;
    z-index: 1001;
    font-size: 0.875rem;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0.375rem;
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

a:focus,
button:focus,
input:focus,
[tabindex="0"]:focus {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* Accessibility Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .skip-link {
        transition: none;
    }
}

@media (prefers-contrast: high) {
    :root {
        --color-gold: #ffd700;
        --color-gold-dark: #ffc800;
    }
    
    .cookie-notice,
    .cookie-decline {
        border-width: 2px;
    }
}

/* ==================== 12. RESPONSIVE STYLES ==================== */
/* Tablet and Below - 768px */
@media screen and (max-width: 48rem) {
    :root {
        --text-base: clamp(1rem, 1.125rem, 1.125rem);
        --text-lg: clamp(1.125rem, 1.25rem, 1.25rem);
        --text-xl: clamp(1.25rem, 1.5rem, 1.5rem);
        --text-2xl: clamp(1.5rem, 1.75rem, 1.75rem);
        --text-3xl: clamp(1.75rem, 2rem, 2rem);
    }
    
    header {
        padding: 2rem 0;
    }
    
    .logo-image {
        max-height: 50px;
    }
    
    .content-container,
    .hero-container,
    .themed-container {
        padding: 2.5rem 0;
    }
    
    nav {
        display: none;
    }
    
    nav a {
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .document-item {
        margin-bottom: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .document-item h4 {
        display: block;
        margin-bottom: 0.3125rem;
    }
    
    .document-bullet {
        display: none;
    }
    
    .document-link {
        margin-left: 0;
    }
    
    .cookie-notice {
        bottom: 0.625rem;
        right: 0.625rem;
        left: 0.625rem;
        max-width: none;
    }
    
    .cookie-notice-buttons {
        flex-direction: column;
    }
    
    .contributors-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
    
    .contributor strong {
        font-size: var(--text-base);
    }
    
    .hero-image-section {
        height: 40vh;
        min-height: 250px;
        max-height: 400px;
    }
    
    /* Tooltip responsive styles */
    .tooltip {
        width: 250px;
        max-width: calc(100vw - 2rem);
    }
    
    .tooltip-right .tooltip {
        left: auto;
        right: 0;
        transform: none;
    }
}

/* Mobile Large - 480px */
@media screen and (max-width: 30rem) {
    .contributors-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .tooltip {
        width: 200px;
        max-width: calc(100vw - 1.5rem);
    }
}

/* Mobile Medium - 425px */
@media screen and (max-width: 26.5625rem) {
    .tooltip {
        width: 180px;
        max-width: calc(100vw - 1rem);
    }
}

/* Mobile Small - 375px */
@media screen and (max-width: 23.4375rem) {
    .contributors-grid {
        gap: 0.5rem;
    }
    
    .tooltip {
        width: 160px;
        max-width: calc(100vw - 1rem);
    }
}

/* Mobile Tiny - 320px */
@media screen and (max-width: 20rem) {
    .tooltip {
        width: 140px;
        max-width: calc(100vw - 0.75rem);
    }
}

/* Tablet Landscape - 1024px to 769px */
@media screen and (max-width: 64rem) and (min-width: 48.0625rem) {
    .hero-image-section {
        height: 50vh;
        min-height: 300px;
        max-height: 500px;
    }
}

/* High DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .cookie-notice,
    nav,
    .skip-link {
        display: none;
    }
    
    body {
        font-size: 12pt;
        background-color: white;
        color: black;
    }
    
    header {
        background-color: transparent;
        color: black;
        border-bottom: 2px solid black;
    }
    
    .content-container,
    .themed-container {
        background-color: transparent;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
    }
    
    .gold-link,
    .lang-link {
        color: black;
    }
    
    .members-container {
        background-color: transparent;
        color: black;
    }
    
    .members-container p {
        color: black;
    }
    
    footer {
        background-color: transparent;
        color: black;
        border-top: 1px solid black;
    }
}