:root {
    /* Black Marble & Sand Palette */
    --bg-black: #050505;
    --bg-secondary: #0a0a0a;
    --sand-light: #f2f0ed;
    --sand-medium: #d6ccc2;
    --gold-foil: #bf953f;
    --gold-bright: #e2c275;
    --ice-light: #f8fafc;
    --ice-medium: #e2e8f0;
    --ice-dark: #94a3b8;
    
    /* Legacy Variable Aliases (for compatibility) */
    --marble-white: #fdfdfd;
    --marble-cream: var(--bg-black);
    --gold-leaf: var(--gold-foil);
    --gold-accent: var(--gold-foil);
    --gold-muted: var(--ice-dark);
    --stone-deep: #ffffff;
    --stone-text: var(--ice-medium);
    --stone-muted: var(--ice-dark);
    
    /* Glassmorphism */
    --glass-bg: rgba(10, 10, 10, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-serif: "Playfair Display", serif;
    --font-sans: "Plus Jakarta Sans", sans-serif;
    
    /* Transitions & Shadows */
    --shadow-lux: 0 20px 50px rgba(0, 0, 0, 0.5);
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-black);
    color: var(--stone-text);
    font-family: var(--font-sans);
    line-height: 1.8;
    letter-spacing: 0.02em;
    overflow-x: clip; /* clip (not hidden) — avoids creating a scroll container / BFC
                         that clips native OS <select> dropdown popups in Chrome */
    font-size: 1.1rem;
    -webkit-font-smoothing: antialiased;
}

/* Video Background & Dark Marble Overlay */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: var(--bg-black);
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.35;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(5, 5, 5, 0.55), rgba(5, 5, 5, 0.45)),
        url('https://www.transparenttextures.com/patterns/black-mamba.png');
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Fixed Glass Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background: rgba(5, 5, 5, 0.95);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--ice-medium);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition);
    opacity: 0.7;
    white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
    opacity: 1;
}

.nav-emergency {
    background: #fdf5e6;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    color: #ef4444;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    white-space: nowrap;
    border: 1.5px solid #ef4444;
    flex-shrink: 0;
}

.nav-emergency:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Grid & Cards */
.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 3rem 0;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.wall-item {
    background: var(--bg-secondary);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    transition: var(--transition);
    text-align: left;
    box-shadow: var(--shadow-lux);
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    height: 60px;
}

.wall-item:hover {
    transform: translateX(5px);
    border-color: var(--gold-foil);
    background: rgba(255, 255, 255, 0.08);
}

.wall-item span {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--gold-foil);
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

/* Monument Sections */
.monument {
    padding: 12rem 0 6rem;
    text-align: center;
}

.subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--gold-foil);
    margin-bottom: 1.5rem;
    display: inline-block;
    font-weight: 700;
}

.monument-title {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.monument-desc {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 4rem;
    color: var(--ice-dark);
    line-height: 1.8;
}

/* White form cards sit on a dark-background page.
   Without color-scheme: light the browser may render native form controls
   (select dropdowns, input carets, scrollbars) using dark-mode colours,
   making option text invisible against the white dropdown background.
   Setting color-scheme: light here fixes native select/input rendering
   on all pages that use .form-card (submission, contact, etc.). */
.form-card {
    color-scheme: light;
}

/* Glass monolith card */
.monolith-card {
    background: var(--glass-bg);
    padding: 4rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    margin: 4rem 0;
    box-shadow: var(--shadow-lux);
    border-radius: 8px;
    text-align: center;
}

/* Gold Foil Text */
.gold-foil {
    background: linear-gradient(135deg, #a67c00 0%, #bf953f 25%, #8a6d3b 50%, #aa771c 75%, #7a5a1f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Buttons */
.btn-engraved {
    padding: 1.2rem 3rem;
    background: #fff;
    border: 1px solid #fff;
    color: var(--bg-black);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-weight: 800;
    border-radius: 4px;
}

.btn-engraved:hover {
    background: transparent;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}

/* Footer */
footer {
    padding: 6rem 0;
    text-align: left;
    background: #030303;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand .logo {
    font-size: 1.1rem;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 1rem;
    color: var(--ice-dark);
    font-weight: 500;
}

.footer-copy {
    text-align: right;
    color: var(--ice-dark);
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-copy p {
    margin-bottom: 0.2rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--gold-foil);
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    border-radius: 8px;
    box-shadow: var(--shadow-lux);
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--gold-foil);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.modal-text {
    color: var(--ice-medium);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: left;
}

.modal-close-btn {
    background: var(--gold-foil);
    color: #000;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: var(--gold-bright);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(191, 149, 63, 0.4);
}

/* Section Prev / Next navigation — styled as gold serif text, not buttons */
.section-nav-link {
    background: linear-gradient(135deg, #a67c00 0%, #bf953f 25%, #8a6d3b 50%, #aa771c 75%, #7a5a1f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border: none;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 0;
    transition: opacity 0.25s ease;
}
.section-nav-link:hover { opacity: 0.65; }

/* Search deep-link row highlight */
.highlighted-row td {
    background: rgba(191, 149, 63, 0.18) !important;
    animation: highlight-fade 3s ease-out forwards;
}
@keyframes highlight-fade {
    0%   { background: rgba(191, 149, 63, 0.45) !important; }
    100% { background: rgba(191, 149, 63, 0.18) !important; }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: none; /* "none" removes the stacking context; translateY(0) would keep it
                        and clip native <select> dropdowns to the element's bounds */
}

@media (max-width: 900px) {
    .navbar { padding: 1rem 0; }
    .navbar .container { flex-direction: column; gap: 1rem; }
    .nav-links { gap: 1.5rem; }
}

@media (max-width: 768px) {
    .monument-title { font-size: 2.5rem; }
    .monolith-card { padding: 2rem; }
    .monument { padding: 8rem 0 4rem; }
}
