/* ============================================
   ARKANA — Main Stylesheet
   Medieval Fantasy Educational Website
   ============================================
   Sections:
   1.  CSS Variables
   2.  Reset & Base
   3.  Typography
   4.  Wooden Table Background & Vignette
   5.  Page Transition Overlay
   6.  Header & Royal Banner
   7.  Banner Frame & Ornaments
   8.  Royal Navigation Panel
   9.  Navigation Items & Hover Effects
   10. Kingdom Map Section
   11. Parchment Unrolling Animation
   12. Hover Zones (Locations)
   13. Dialog Box System
   14. Guardian Characters
   15. Footprint System
   16. Footer
   17. Social Icons & Tooltips
   18. Loading Sequence Animations
   19. Ambient Animations
   20. Responsive — Laptop
   21. Responsive — Tablet
   22. Responsive — Mobile
   ============================================ */


/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    /* --- Color Palette --- */
    --wine-red:        #5B1D27;
    --wine-red-dark:   #3D1219;
    --wine-red-light:  #7A2835;
    --ancient-gold:    #C9A44C;
    --dark-gold:       #8B6B28;
    --bright-gold:     #E0C068;
    --parchment:       #E7D8B3;
    --parchment-dark:  #D4C49A;
    --dark-wood:       #2C1C12;
    --wood:            #3A2418;
    --wood-light:      #4A3020;
    --bronze:          #8B6914;
    --ivory:           #F5ECD7;
    --muted-green:     #4A5D3A;
    --brown-shadow:    rgba(44, 28, 18, 0.6);
    --gold-glow:       rgba(201, 164, 76, 0.4);

    /* --- Typography --- */
    --font-title: 'Cinzel', serif;
    --font-body:  'Cormorant Garamond', serif;

    /* --- Spacing --- */
    --spacing-xs:  4px;
    --spacing-sm:  8px;
    --spacing-md:  16px;
    --spacing-lg:  24px;
    --spacing-xl:  40px;
    --spacing-xxl: 60px;

    /* --- Transitions --- */
    --transition-fast:    200ms ease;
    --transition-medium:  350ms ease;
    --transition-slow:    600ms ease;
    --transition-cinematic: 1000ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--parchment);
    background-color: var(--dark-wood);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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


/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 600;
    letter-spacing: 0.05em;
}


/* ============================================
   4. WOODEN TABLE BACKGROUND & VIGNETTE
   ============================================ */
.wood-table {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/background/wood.jpg') center center / cover no-repeat;
    z-index: 0;
}

.vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(20, 12, 6, 0.35) 75%,
        rgba(10, 6, 3, 0.6) 100%
    );
    z-index: 1;
    pointer-events: none;
}


/* ============================================
   5. PAGE TRANSITION OVERLAY
   ============================================ */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-wood);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 450ms ease;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}


/* ============================================
   6. HEADER & ROYAL BANNER
   ============================================ */
.site-header {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md) 0;
}

.royal-banner {
    max-width: 960px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(-12px);
    animation: bannerEntrance 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

.royal-banner:hover .banner-frame {
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 10px 40px rgba(44, 28, 18, 0.6),
        0 0 0 1px var(--dark-gold),
        0 0 30px var(--gold-glow),
        0 0 60px rgba(201, 164, 76, 0.15);
}

.royal-banner:hover .banner-logo {
    filter: brightness(1.08) drop-shadow(0 4px 20px rgba(201, 164, 76, 0.3));
    transform: scale(1.02);
}


/* ============================================
   7. BANNER FRAME & ORNAMENTS
   ============================================ */
.banner-frame {
    position: relative;
    padding: 18px;
    background: linear-gradient(145deg, var(--wood-light) 0%, var(--wood) 50%, var(--dark-wood) 100%);
    border: 3px solid var(--ancient-gold);
    border-radius: 4px;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(201, 164, 76, 0.1),
        0 10px 40px rgba(44, 28, 18, 0.6),
        0 0 0 1px var(--dark-gold);
    transition: box-shadow 0.5s ease;
}

.banner-frame__inner {
    position: relative;
    padding: 12px;
    background: rgba(20, 12, 6, 0.3);
    border: 1px solid var(--dark-gold);
    border-radius: 2px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.banner-logo {
    width: 100%;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.4));
    transition: filter 0.5s ease, transform 0.5s ease;
}

/* Corner Ornaments */
.frame-ornament {
    position: absolute;
    width: 28px;
    height: 28px;
    z-index: 2;
}

.frame-ornament::before,
.frame-ornament::after {
    content: '';
    position: absolute;
    background: var(--ancient-gold);
}

.frame-ornament::before {
    width: 12px;
    height: 12px;
    border: 2px solid var(--bright-gold);
    transform: rotate(45deg);
    box-shadow: 0 0 6px var(--gold-glow);
}

.frame-ornament::after {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--bright-gold);
}

.frame-ornament--tl { top: 6px;  left: 6px;  }
.frame-ornament--tr { top: 6px;  right: 6px; }
.frame-ornament--bl { bottom: 6px; left: 6px;  }
.frame-ornament--br { bottom: 6px; right: 6px; }

.frame-ornament--tl::before,
.frame-ornament--tl::after { top: 0; left: 0; }
.frame-ornament--tr::before,
.frame-ornament--tr::after { top: 0; right: 0; }
.frame-ornament--bl::before,
.frame-ornament--bl::after { bottom: 0; left: 0; }
.frame-ornament--br::before,
.frame-ornament--br::after { bottom: 0; right: 0; }


/* ============================================
   8. ROYAL NAVIGATION PANEL
   ============================================ */
.royal-nav {
    max-width: 960px;
    margin: var(--spacing-lg) auto 0;
    padding: 0 var(--spacing-md);
    opacity: 0;
    transform: translateY(-10px);
    animation: navEntrance 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s forwards;
}

.nav-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--wine-red-light) 0%, var(--wine-red) 40%, var(--wine-red-dark) 100%);
    border-top: 2px solid var(--ancient-gold);
    border-bottom: 2px solid var(--ancient-gold);
    border-radius: 3px;
    padding: 0 var(--spacing-lg);
    box-shadow:
        inset 0 1px 0 rgba(201, 164, 76, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 6px 20px rgba(44, 28, 18, 0.5),
        0 0 0 1px rgba(139, 107, 40, 0.3);
    overflow: visible;
}

/* Metal Corner Decorations on Nav Panel */
.nav-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    z-index: 3;
}

.nav-corner::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid var(--ancient-gold);
    transform: rotate(45deg);
    background: var(--wine-red-dark);
    box-shadow: 0 0 4px var(--gold-glow);
}

.nav-corner--tl { top: -5px;  left: -5px;  }
.nav-corner--tr { top: -5px;  right: -5px; }
.nav-corner--bl { bottom: -5px; left: -5px;  }
.nav-corner--br { bottom: -5px; right: -5px; }


/* ============================================
   9. NAVIGATION ITEMS & HOVER EFFECTS
   ============================================ */
.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-family: var(--font-title);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--ancient-gold);
    padding: 14px 20px;
    display: inline-block;
    position: relative;
    transition: color 0.25s ease, transform 0.25s ease;
    text-transform: uppercase;
}

/* Golden separators between items */
.nav-item:not(:last-child):not(.nav-item--profile)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--dark-gold) 30%,
        var(--ancient-gold) 50%,
        var(--dark-gold) 70%,
        transparent 100%
    );
    opacity: 0.5;
}

/* Hover: golden light behind text + lift */
.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(201, 164, 76, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: -1;
}

.nav-link:hover {
    color: var(--bright-gold);
    transform: translateY(-3px);
}

.nav-link:hover::before {
    opacity: 1;
}

/* Active page state */
.nav-item--active .nav-link {
    color: var(--bright-gold);
    text-shadow: 0 0 12px var(--gold-glow), 0 0 24px rgba(201, 164, 76, 0.2);
    animation: activeBreathing 3s ease-in-out infinite;
}

.nav-item--active .nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ancient-gold), transparent);
    border-radius: 1px;
    box-shadow: 0 0 6px var(--gold-glow);
}

/* Profile button — separated to the right */
.nav-item--profile {
    margin-left: var(--spacing-lg);
}

.nav-link--profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--dark-gold);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 1px 0 rgba(201, 164, 76, 0.1);
}

.nav-link--profile:hover {
    transform: translateY(-3px);
    border-color: var(--ancient-gold);
    box-shadow:
        inset 0 1px 0 rgba(201, 164, 76, 0.2),
        0 4px 12px rgba(201, 164, 76, 0.2);
}

.profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--ancient-gold);
    background: rgba(139, 107, 40, 0.2);
    color: var(--ancient-gold);
}


/* ============================================
   10. KINGDOM MAP SECTION
   ============================================ */
.kingdom-map-section {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: var(--spacing-xxl) var(--spacing-md) var(--spacing-xl);
    min-height: 60vh;
}

.parchment-container {
    position: relative;
    max-width: 1200px;
    width: 100%;
}

.parchment {
    position: relative;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    /* Initial state for unrolling animation */
    clip-path: inset(0 0 100% 0);
    transform: scale(0.97) translateY(-8px);
    opacity: 0.7;
    box-shadow: 0 5px 15px rgba(44, 28, 18, 0.3);
}

.parchment.unrolled {
    animation: unrollParchment 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(44, 28, 18, 0.3));
}


/* ============================================
   11. PARCHMENT UNROLLING ANIMATION
   ============================================ */
@keyframes unrollParchment {
    0% {
        clip-path: inset(0 0 100% 0);
        transform: scale(0.97) translateY(-8px);
        opacity: 0.7;
        box-shadow: 0 5px 15px rgba(44, 28, 18, 0.3);
    }
    60% {
        clip-path: inset(0 0 5% 0);
        transform: scale(0.99) translateY(-2px);
        opacity: 0.9;
        box-shadow: 0 10px 30px rgba(44, 28, 18, 0.5);
    }
    100% {
        clip-path: inset(0 0 0% 0);
        transform: scale(1) translateY(0);
        opacity: 1;
        box-shadow:
            0 15px 40px rgba(44, 28, 18, 0.6),
            0 5px 15px rgba(44, 28, 18, 0.4),
            0 0 0 1px rgba(139, 107, 40, 0.15);
    }
}


/* ============================================
   12. HOVER ZONES (LOCATIONS)
   ============================================ */
.location-zone {
    position: absolute;
    z-index: 6;
    cursor: pointer;
    border-radius: 50%;
    outline: none;
}

.location-zone:focus-visible .zone-pulse {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.1);
}

.zone-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(201, 164, 76, 0.3) 0%,
        rgba(201, 164, 76, 0.1) 40%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    animation: none;
}

.location-zone:hover .zone-pulse,
.location-zone.active .zone-pulse {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
    animation: zoneGlowPulse 2.5s ease-in-out infinite;
}


/* ============================================
   13. DIALOG BOX SYSTEM
   ============================================ */
.dialog-box {
    position: absolute;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    width: 380px;
    max-width: 85%;
}

.dialog-box.visible {
    opacity: 1;
    transform: translateY(0);
}

.dialog-frame-wrapper {
    position: relative;
    width: 100%;
}

.dialog-frame-image {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 20px rgba(44, 28, 18, 0.7));
}

.dialog-content {
    position: absolute;
    top: 14%;
    left: 14%;
    right: 14%;
    bottom: 14%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.dialog-text {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    font-style: italic;
    color: var(--dark-wood);
    text-align: center;
    line-height: 1.55;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease 0.15s, transform 0.3s ease 0.15s;
}

.dialog-box.visible .dialog-text {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================
   14. GUARDIAN CHARACTERS
   ============================================ */
.dialog-character {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 110px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
    z-index: 21;
    pointer-events: none;
}

.dialog-character.side-left {
    left: -50px;
}

.dialog-character.side-right {
    right: -50px;
}

.dialog-box.visible .dialog-character {
    opacity: 1;
    animation: guardianFloat 3s ease-in-out infinite;
}

.character-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(44, 28, 18, 0.5));
}


/* ============================================
   15. FOOTPRINT SYSTEM
   ============================================ */
.footprint-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
    overflow: hidden;
}

.footprint {
    position: absolute;
    width: 32px;
    height: 54px;
    pointer-events: none;
    opacity: 0.75;
    z-index: 7;
    filter: drop-shadow(0 2px 3px rgba(44, 28, 18, 0.4));
    transition: opacity 1s ease-out;
}

.footprint img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footprint.fade-out {
    opacity: 0;
}


/* ============================================
   16. FOOTER
   ============================================ */
.site-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
}

.footer-ornament {
    width: 200px;
    height: 2px;
    margin: 0 auto var(--spacing-lg);
    background: linear-gradient(90deg, transparent, var(--dark-gold), var(--ancient-gold), var(--dark-gold), transparent);
    opacity: 0.5;
    position: relative;
}

.footer-ornament::before {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--ancient-gold);
    font-size: 10px;
    background: var(--dark-wood);
    padding: 0 8px;
}

.footer-ornament--bottom {
    margin: var(--spacing-lg) auto 0;
}

.footer-title {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--ancient-gold);
    margin-bottom: var(--spacing-lg);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(201, 164, 76, 0.2);
    position: relative;
    display: inline-block;
}

.footer-title::before,
.footer-title::after {
    content: '—';
    margin: 0 12px;
    opacity: 0.4;
    color: var(--dark-gold);
}


/* ============================================
   17. SOCIAL ICONS & TOOLTIPS
   ============================================ */
.social-icons {
    display: flex;
    justify-content: flex-start;
    gap: var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--spacing-md);
}

.social-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--ancient-gold);
    transition: color 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(139, 107, 40, 0.3);
    border-radius: 50%;
    background: rgba(44, 28, 18, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(201, 164, 76, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.3);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    color: var(--bright-gold);
    transform: scale(1.08);
    border-color: var(--ancient-gold);
    box-shadow:
        inset 0 1px 0 rgba(201, 164, 76, 0.2),
        0 4px 12px rgba(201, 164, 76, 0.25),
        0 0 0 1px rgba(201, 164, 76, 0.15);
}

.social-icon:hover svg {
    transform: scale(1.1);
}

/* Parchment-style Tooltips */
.tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: linear-gradient(135deg, var(--parchment) 0%, var(--parchment-dark) 100%);
    color: var(--dark-wood);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid var(--dark-gold);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow:
        0 3px 10px rgba(44, 28, 18, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 100;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--parchment-dark);
}

.social-icon:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ============================================
   18. LOADING SEQUENCE ANIMATIONS
   ============================================ */
@keyframes bannerEntrance {
    0% {
        opacity: 0;
        transform: translateY(-12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navEntrance {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================
   19. AMBIENT ANIMATIONS
   ============================================ */
@keyframes zoneGlowPulse {
    0%, 100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes guardianFloat {
    0%, 100% {
        transform: translateY(-50%) translateY(0);
    }
    50% {
        transform: translateY(-50%) translateY(-5px);
    }
}

@keyframes activeBreathing {
    0%, 100% {
        text-shadow: 0 0 12px var(--gold-glow), 0 0 24px rgba(201, 164, 76, 0.2);
    }
    50% {
        text-shadow: 0 0 16px var(--gold-glow), 0 0 32px rgba(201, 164, 76, 0.3);
    }
}

/* Subtle gold shimmer on banner frame */
.banner-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 164, 76, 0.06) 50%,
        transparent 100%
    );
    animation: goldShimmer 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 3;
}

@keyframes goldShimmer {
    0%, 100% { left: -100%; }
    50% { left: 200%; }
}


/* ============================================
   20. RESPONSIVE — LAPTOP (992px – 1199px)
   ============================================ */
@media (max-width: 1199px) {
    .royal-banner,
    .royal-nav {
        max-width: 860px;
    }

    .parchment-container {
        max-width: 1000px;
    }

    .nav-link {
        font-size: 12px;
        padding: 12px 16px;
    }

    .dialog-box {
        width: 340px;
    }

    .dialog-text {
        font-size: 16px;
    }
}


/* ============================================
   21. RESPONSIVE — TABLET (768px – 991px)
   ============================================ */
@media (max-width: 991px) {
    .royal-banner,
    .royal-nav {
        max-width: 720px;
    }

    .parchment-container {
        max-width: 800px;
    }

    .nav-link {
        font-size: 11px;
        padding: 10px 12px;
        letter-spacing: 0.1em;
    }

    .nav-item--profile {
        margin-left: var(--spacing-md);
    }

    .dialog-box {
        width: 300px;
    }

    .dialog-text {
        font-size: 15px;
    }

    .dialog-character {
        width: 90px;
        height: 110px;
    }

    .dialog-character.side-left  { left: -40px; }
    .dialog-character.side-right { right: -40px; }

    .footprint {
        width: 26px;
        height: 44px;
    }
}


/* ============================================
   22. RESPONSIVE — MOBILE (767px and below)
   ============================================ */
@media (max-width: 767px) {
    .site-header {
        padding: var(--spacing-md) var(--spacing-sm) 0;
    }

    .royal-banner,
    .royal-nav {
        max-width: 100%;
        padding: 0 var(--spacing-sm);
    }

    .banner-frame {
        padding: 12px;
    }

    .banner-frame__inner {
        padding: 8px;
    }

    .frame-ornament {
        width: 20px;
        height: 20px;
    }

    .frame-ornament::before {
        width: 9px;
        height: 9px;
    }

    /* Hamburger Button */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 10px;
        position: absolute;
        top: 50%;
        right: var(--spacing-sm);
        transform: translateY(-50%);
        z-index: 50;
        border: 1px solid var(--dark-gold);
        border-radius: 4px;
        background: rgba(44, 28, 18, 0.6);
    }

    .hamburger-line {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--ancient-gold);
        transition: all 0.3s ease;
        transform-origin: center;
    }

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

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

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

    /* Mobile Navigation */
    .nav-panel {
        justify-content: flex-start;
        padding: 12px var(--spacing-sm);
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, var(--wine-red-dark) 0%, var(--dark-wood) 100%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-sm);
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 99;
        border-left: 2px solid var(--ancient-gold);
        padding: var(--spacing-lg);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    }

    .nav-list.open {
        right: 0;
    }

    .nav-item {
        width: 80%;
        text-align: center;
    }

    .nav-item:not(:last-child):not(.nav-item--profile)::after {
        display: none;
    }

    .nav-link {
        font-size: 15px;
        padding: 14px 20px;
        width: 100%;
        border-bottom: 1px solid rgba(139, 107, 40, 0.2);
    }

    .nav-item--profile {
        margin-left: 0;
        margin-top: var(--spacing-md);
    }

    .nav-link--profile {
        justify-content: center;
    }

    /* Map */
    .kingdom-map-section {
        padding: var(--spacing-lg) var(--spacing-sm) var(--spacing-md);
    }

    .parchment-container {
        max-width: 100%;
    }

    .dialog-box {
        width: 260px;
        max-width: 80%;
    }

    .dialog-content {
        top: 12%;
        left: 12%;
        right: 12%;
        bottom: 12%;
    }

    .dialog-text {
        font-size: 14px;
    }

    .dialog-character {
        width: 75px;
        height: 95px;
    }

    .dialog-character.side-left  { left: -32px; }
    .dialog-character.side-right { right: -32px; }

    .footprint {
        width: 22px;
        height: 38px;
    }

    /* Footer */
    .social-icons {
        justify-content: center;
        padding-left: 0;
    }

    .footer-title {
        font-size: 17px;
        letter-spacing: 0.2em;
    }

    .footer-title::before,
    .footer-title::after {
        margin: 0 8px;
    }
}

@media (max-width: 480px) {
    .royal-banner {
        padding: 0 4px;
    }

    .banner-frame {
        padding: 8px;
    }

    .banner-frame__inner {
        padding: 6px;
    }

    .nav-link {
        font-size: 13px;
    }

    .dialog-box {
        width: 220px;
    }

    .dialog-text {
        font-size: 13px;
    }

    .dialog-character {
        width: 65px;
        height: 80px;
    }
}


/* ============================================
   ACCESSIBILITY: Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .parchment {
        clip-path: none;
        transform: none;
        opacity: 1;
    }

    .royal-banner,
    .royal-nav {
        opacity: 1;
        transform: none;
    }
}