/* ===================================================
   THE ROYAL RETREAT FINDER — Premium Quiz Stylesheet
   Royal Blue Ventures · Luxury Redesign
   ===================================================

   DESIGN TOKENS
   ─────────────
   Background:     #FAF6F1  (Warm Cream)
   Card:           #F5EFE7  (Soft Beige)
   Heading/Text:   #204ECF  (Royal Blue — matches index)
   Accent:         #C9A96E  (Champagne Gold)
   Accent Hover:   #B08D4F  (Deep Gold)
   Muted Text:     #7A8499  (Slate)
   Border:         #E8DFD1  (Warm Sand)
   =================================================== */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Design Tokens ─── */
:root {
    --quiz-bg: #FAF6F1;
    --quiz-card: #F5EFE7;
    --quiz-royal: #204ECF;
    --quiz-royal-light: #85A5F2;
    --quiz-accent: #C9A96E;
    --quiz-accent-hover: #B08D4F;
    --quiz-muted: #7A8499;
    --quiz-border: #E8DFD1;
    --quiz-white: #FFFFFF;
    --quiz-text-body: #3D4A5C;

    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

/* ─── Global Reset for Quiz Page ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Body & Background ─── */
body {
    background-color: var(--quiz-bg);
    color: var(--quiz-text-body);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ─── Margin Decorations (Botanical Line Art) ─── */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    bottom: 0;
    width: 280px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
    background-repeat: repeat-y;
    background-size: 260px auto;
}

body::before {
    left: 0;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 800' fill='none' stroke='%23204ECF' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M130 50 Q160 80 150 130 Q145 160 130 180 Q115 160 110 130 Q100 80 130 50Z'/%3E%3Cpath d='M130 50 L130 180'/%3E%3Cpath d='M120 90 Q110 100 105 95'/%3E%3Cpath d='M140 90 Q150 100 155 95'/%3E%3Cpath d='M118 120 Q105 130 100 125'/%3E%3Cpath d='M142 120 Q155 130 160 125'/%3E%3Cpath d='M80 250 Q130 230 160 280 Q140 260 120 260 Q100 260 80 250Z'/%3E%3Cpath d='M80 250 Q110 270 130 310 Q120 290 100 280 Q90 270 80 250Z'/%3E%3Cpath d='M80 250 L130 295'/%3E%3Cpath d='M170 420 Q200 380 190 440 Q185 480 160 500 Q165 460 170 420Z'/%3E%3Cpath d='M170 420 Q140 450 150 500 Q155 480 170 420Z'/%3E%3Cpath d='M170 420 L160 500'/%3E%3Cpath d='M100 580 Q120 550 140 570 Q130 560 120 565 Q110 570 100 580Z'/%3E%3Cpath d='M100 580 Q90 620 110 650 Q100 630 100 580Z'/%3E%3Cpath d='M100 580 Q130 600 120 640'/%3E%3Cpath d='M60 700 Q80 680 90 710 Q80 700 60 700Z'/%3E%3Cpath d='M180 750 Q200 730 195 760 Q190 750 180 750Z'/%3E%3C/svg%3E");
}

body::after {
    right: 0;
    background-position: center;
    transform: scaleX(-1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 800' fill='none' stroke='%23204ECF' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M130 50 Q160 80 150 130 Q145 160 130 180 Q115 160 110 130 Q100 80 130 50Z'/%3E%3Cpath d='M130 50 L130 180'/%3E%3Cpath d='M120 90 Q110 100 105 95'/%3E%3Cpath d='M140 90 Q150 100 155 95'/%3E%3Cpath d='M118 120 Q105 130 100 125'/%3E%3Cpath d='M142 120 Q155 130 160 125'/%3E%3Cpath d='M80 250 Q130 230 160 280 Q140 260 120 260 Q100 260 80 250Z'/%3E%3Cpath d='M80 250 Q110 270 130 310 Q120 290 100 280 Q90 270 80 250Z'/%3E%3Cpath d='M80 250 L130 295'/%3E%3Cpath d='M170 420 Q200 380 190 440 Q185 480 160 500 Q165 460 170 420Z'/%3E%3Cpath d='M170 420 Q140 450 150 500 Q155 480 170 420Z'/%3E%3Cpath d='M170 420 L160 500'/%3E%3Cpath d='M100 580 Q120 550 140 570 Q130 560 120 565 Q110 570 100 580Z'/%3E%3Cpath d='M100 580 Q90 620 110 650 Q100 630 100 580Z'/%3E%3Cpath d='M100 580 Q130 600 120 640'/%3E%3Cpath d='M60 700 Q80 680 90 710 Q80 700 60 700Z'/%3E%3Cpath d='M180 750 Q200 730 195 760 Q190 750 180 750Z'/%3E%3C/svg%3E");
}

/* ─── Navigation Header ─── */
#nav-header {
    background: var(--quiz-white);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 1px 0 var(--quiz-border);
    border-bottom: 1px solid var(--quiz-border);
}

#nav-header nav {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#nav-header a {
    color: var(--quiz-royal);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-family: var(--font-body);
    transition: color 0.3s ease;
    position: relative;
}

#nav-header a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--quiz-accent);
    transition: width 0.3s ease;
}

#nav-header a:hover {
    color: var(--quiz-accent-hover);
}

#nav-header a:hover::after {
    width: 100%;
}

/* ─── Hero / Header Section ─── */
.hero-quiz {
    text-align: center;
    padding: 70px 24px 30px;
    position: relative;
    z-index: 1;
}

.hero-quiz h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 700;
    color: var(--quiz-royal);
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.hero-quiz p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--quiz-muted);
    font-weight: 400;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─── Decorative Divider below Hero ─── */
.hero-quiz::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--quiz-accent);
    margin: 32px auto 0;
    border-radius: 2px;
}

/* ─── Quiz Card Container ─── */
.glass-panel {
    background: var(--quiz-card);
    max-width: 740px;
    margin: 0 auto 80px auto;
    padding: 48px 52px 52px;
    border-radius: 20px;
    box-shadow:
        0 4px 24px rgba(32, 78, 207, 0.06),
        0 1px 4px rgba(32, 78, 207, 0.04);
    border: 1px solid var(--quiz-border);
    text-align: center;
    position: relative;
    z-index: 1;
    transition: box-shadow 0.4s ease;
}

.glass-panel:hover {
    box-shadow:
        0 8px 40px rgba(32, 78, 207, 0.09),
        0 2px 8px rgba(32, 78, 207, 0.05);
}

/* ─── Progress Bar ─── */
#progress-bar {
    width: 100%;
    height: 5px;
    background: var(--quiz-border);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    border: none;
    box-shadow: none;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--quiz-accent), var(--quiz-accent-hover));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
}

/* Subtle shimmer on the progress fill */
#progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.35) 50%,
            transparent 100%);
    animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ─── Question Counter ─── */
#question-count {
    color: var(--quiz-muted);
    font-weight: 600;
    margin-bottom: 28px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-body);
}

/* ─── Question Text ─── */
#question-text {
    font-family: var(--font-heading);
    color: var(--quiz-royal);
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    font-weight: 600;
    margin-bottom: 36px;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

/* ─── Button Grid ─── */
.btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ─── Quiz Buttons ─── */
.quiz-btn {
    padding: 18px 24px;
    background: var(--quiz-white);
    border: 1.5px solid var(--quiz-border);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--quiz-royal);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(32, 78, 207, 0.04);
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.2s ease;
    text-align: center;
    line-height: 1.4;
}

.quiz-btn:hover {
    border-color: var(--quiz-royal);
    background: var(--quiz-royal-light);
    color: var(--quiz-white);
    box-shadow: 0 4px 16px rgba(32, 78, 207, 0.15);
    transform: translateY(-2px);
}

.quiz-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(32, 78, 207, 0.1);
}

/* ─── Focus States (Accessibility) ─── */
.quiz-btn:focus-visible {
    outline: 2px solid var(--quiz-accent);
    outline-offset: 2px;
}

/* ─── Back Button ─── */
.back-btn {
    background: none;
    border: none;
    color: var(--quiz-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: var(--quiz-royal);
    text-decoration: underline;
}

/* ─── Hidden utility ─── */
.hidden {
    display: none !important;
}

/* ─── Winner / Results Showcase ─── */
.winner-showcase img {
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--quiz-border);
    box-shadow: 0 8px 32px rgba(32, 78, 207, 0.08);
    margin: 20px 0;
}

#winner-name {
    font-size: 2.6rem;
    color: var(--quiz-royal);
    font-family: var(--font-heading);
    font-weight: 700;
}

/* ─── CTA Buttons (Find Your Retreat) ─── */
.cta-link,
.cta-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 16px 40px;
    background: var(--quiz-royal);
    color: var(--quiz-white);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: 12px;
    border: 1.5px solid var(--quiz-royal);
    box-shadow: 0 4px 16px rgba(32, 78, 207, 0.2);
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.2s ease;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.cta-link:hover,
.cta-btn:hover {
    background: var(--quiz-accent-hover);
    border-color: var(--quiz-accent-hover);
    box-shadow: 0 8px 28px rgba(176, 141, 79, 0.3);
    transform: translateY(-2px);
    color: var(--quiz-white);
}

.cta-link:active,
.cta-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(32, 78, 207, 0.15);
}

/* ─── Twemoji sizing ─── */
img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 .05em 0 .1em;
    vertical-align: -0.1em;
}

/* ─── Responsive: Tablet ─── */
@media (max-width: 840px) {
    .glass-panel {
        margin-left: 24px;
        margin-right: 24px;
        padding: 36px 32px 40px;
    }

    .hero-quiz {
        padding: 56px 20px 24px;
    }

    body::before,
    body::after {
        width: 140px;
        opacity: 0.04;
    }
}

/* ─── Responsive: Mobile ─── */
@media (max-width: 600px) {
    .btn-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .glass-panel {
        margin-left: 16px;
        margin-right: 16px;
        padding: 28px 20px 32px;
        border-radius: 16px;
    }

    .hero-quiz h1 {
        font-size: 2rem;
    }

    .hero-quiz p {
        font-size: 0.95rem;
    }

    #question-text {
        font-size: 1.3rem;
    }

    .quiz-btn {
        padding: 16px 20px;
        font-size: 0.9rem;
    }

    body::before,
    body::after {
        display: none;
    }
}