/* ============================================
   ARCADIA — Shared Base Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Raleway:wght@300;400;500;600&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

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

:root {
    /* Default Arcadia green/gold theme — override per page as needed */
    --bg-deep: #0a0f0a;
    --bg-card: #0d1a0d;
    --bg-card-hover: #112211;
    --bg-elevated: #132113;
    --border-vine: #1a3a1a;
    --border-glow: #2d5a2d;
    --green-bright: #4a8c4a;
    --green-light: #6abd6a;
    --green-neon: #7ddf7d;
    --gold: #c8a84e;
    --gold-light: #e8cc6e;
    --gold-dim: #8a7234;
    --silver: #c0c8c0;
    --silver-dim: #8a928a;
    --text-primary: #e0e8e0;
    --text-secondary: #a0b0a0;
    --text-dim: #607060;
    --circuit-glow: rgba(74, 140, 74, 0.15);
    --vine-shadow: rgba(45, 90, 45, 0.3);
    --focus-color: var(--green-light);
    --shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.22);
    --shadow-strong: 0 24px 70px rgba(0, 0, 0, 0.32);
    --radius-md: 16px;
    --radius-lg: 24px;
    --page-width: 1180px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', sans-serif;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(200, 168, 78, 0.06), transparent 28%),
        linear-gradient(180deg, #081008 0%, var(--bg-deep) 100%);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 168, 78, 0.28);
    color: #081008;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(45, 90, 45, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(74, 140, 74, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(200, 168, 78, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* Skip to content link (invisible until focused) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--gold);
    color: var(--bg-deep);
    font-weight: 600;
    z-index: 200;
    border-radius: 0 0 4px 4px;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(8, 15, 8, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(106, 189, 106, 0.12);
    padding: 0.95rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

nav.scrolled {
    padding: 0.7rem 2rem;
    background: rgba(8, 15, 8, 0.92);
    border-bottom-color: rgba(200, 168, 78, 0.16);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    cursor: pointer;
}

.nav-logo img {
    height: 42px;
    width: 42px;
    object-fit: contain;
}

.nav-logo span {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.16em;
}

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

.nav-links a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
    cursor: pointer;
    min-height: 44px;
}

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

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

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

.nav-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(106, 189, 106, 0.16);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.nav-mobile-toggle:hover {
    color: var(--gold-light);
    border-color: rgba(200, 168, 78, 0.24);
    background: rgba(200, 168, 78, 0.06);
}

.nav-back {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-back:hover {
    color: var(--green-light);
}

/* ============================================
   SCROLL MARGIN (for fixed nav)
   ============================================ */
section[id],
div[id] {
    scroll-margin-top: 5rem;
}

/* ============================================
   SECTION COMMONS
   ============================================ */
section {
    position: relative;
    z-index: 1;
    padding: clamp(4.5rem, 7vw, 6.5rem) 2rem;
    max-width: var(--page-width);
    margin: 0 auto;
}

.section-banner {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2.4rem;
    display: block;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--green-light);
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0.8;
}

.divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--green-bright), transparent);
    margin: 4rem auto;
}

/* ============================================
   ICON SYSTEM (replaces emojis)
   ============================================ */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon svg {
    display: block;
}

.icon-sm svg { width: 16px; height: 16px; }
.icon-md svg { width: 24px; height: 24px; }
.icon-lg svg { width: 28px; height: 28px; }
.icon-xl svg { width: 36px; height: 36px; }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 2rem 3.5rem;
    border-top: 1px solid rgba(106, 189, 106, 0.12);
    margin-top: 4rem;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

footer a {
    color: var(--green-bright);
    text-decoration: none;
    cursor: pointer;
}

footer a:hover {
    color: var(--green-light);
}

footer .footer-quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* ============================================
   SUBPAGE LAYOUT
   ============================================ */
.content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

.hero-image {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 0 auto 2.5rem;
    border-radius: 18px;
    border: 1px solid rgba(106, 189, 106, 0.14);
    box-shadow: var(--shadow-soft);
}

.page-header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 8rem 2rem 4rem;
}

.page-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.page-header .tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--green-light);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.page-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Bio text */
.bio p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.bio strong { color: var(--gold-light); }
.bio em { color: var(--green-light); }

/* Subpage title */
.content h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 4px;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--green-light);
    text-align: center;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* Subpage links row */
.links {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.links a {
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(106, 189, 106, 0.14);
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    transition: all 0.3s;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.links a:hover {
    border-color: rgba(200, 168, 78, 0.22);
    color: var(--gold-light);
    box-shadow: var(--shadow-soft);
}

/* Subpage footer (less margin) */
.subpage-footer {
    margin-top: 2rem;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page-enter {
    animation: pageIn 0.4s ease-out;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ACTIVE NAV STATE
   ============================================ */
.nav-links a.active {
    color: var(--green-light);
}

.nav-links a.active::after {
    width: 100%;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(8, 15, 8, 0.98);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.25rem 1.25rem;
        gap: 0.2rem;
        border-bottom: 1px solid rgba(106, 189, 106, 0.12);
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 0.8rem 0.5rem;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .section-title {
        font-size: 1.6rem;
        letter-spacing: 3px;
    }

    .page-header h1 {
        font-size: 2rem;
        letter-spacing: 3px;
    }

    .content h1 {
        font-size: 1.8rem;
    }
}
