/* ===================================================
   ROYAL BLUE VENTURES — Price Estimator
   Premium Luxury Redesign (matches Quiz page)
   ===================================================

   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 {
    --est-bg: #FAF6F1;
    --est-card: #F5EFE7;
    --est-royal: #204ECF;
    --est-royal-light: #85A5F2;
    --est-royal-deep: #1A3CAF;
    --est-accent: #C9A96E;
    --est-accent-hover: #B08D4F;
    --est-muted: #7A8499;
    --est-border: #E8DFD1;
    --est-white: #FFFFFF;
    --est-text-body: #3D4A5C;
    --est-success: #4DAA7D;

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

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

html {
    scroll-behavior: smooth;
}

/* ─── Body & Background ─── */
body {
    background-color: var(--est-bg);
    color: var(--est-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(--est-white);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 1px 0 var(--est-border);
    border-bottom: 1px solid var(--est-border);
}

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

#nav-header a {
    color: var(--est-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(--est-accent);
    transition: width 0.3s ease;
}

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

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

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

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

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

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

/* ─── Forecaster Container ─── */
#forecaster-container {
    max-width: 820px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ─── Glass Card (Main Estimator Card) ─── */
.glass-card {
    background: var(--est-card);
    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(--est-border);
    position: relative;
    transition: box-shadow 0.4s ease;
}

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

.glass-card h2 {
    font-family: var(--font-heading);
    color: var(--est-royal);
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.instruction {
    color: var(--est-muted);
    font-size: 0.95rem;
    margin-bottom: 30px;
    font-weight: 400;
}

/* ─── Input Grid ─── */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin: 0 0 16px 0;
}

.input-grid .input-group {
    margin-bottom: 0;
}

/* ─── Input Groups ─── */
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: var(--est-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-body);
}

input,
select {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 0;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1.5px solid var(--est-border);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    background: var(--est-white);
    color: var(--est-royal);
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 1px 3px rgba(32, 78, 207, 0.04);
    -webkit-appearance: none;
    appearance: none;
}

input:focus,
select:focus {
    border-color: var(--est-royal);
    box-shadow: 0 0 0 3px rgba(32, 78, 207, 0.1);
}

input::placeholder {
    color: var(--est-muted);
    font-weight: 400;
}

select option {
    background: var(--est-white);
    color: var(--est-royal);
}

/* ─── Points Section ─── */
.points-section {
    margin: 24px 0;
    text-align: center;
}

.points-toggle {
    padding: 14px 28px;
    background: var(--est-white);
    border: 1.5px solid var(--est-border);
    color: var(--est-royal);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-body);
    border-radius: 12px;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(32, 78, 207, 0.04);
    letter-spacing: 0.3px;
}

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

.points-toggle.active {
    background: var(--est-success);
    border-color: var(--est-success);
    color: var(--est-white);
    box-shadow: 0 4px 16px rgba(77, 170, 125, 0.2);
}

.points-status {
    color: var(--est-success);
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

/* ─── Calculate Button ─── */
.calc-btn {
    width: 100%;
    padding: 16px;
    background: var(--est-royal);
    color: var(--est-white);
    border: 1.5px solid var(--est-royal);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-body);
    border-radius: 12px;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.2s ease;
    box-shadow: 0 4px 16px rgba(32, 78, 207, 0.2);
    margin-top: 8px;
    letter-spacing: 0.5px;
}

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

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

/* ─── Info Box (Preview) ─── */
.info-box {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--est-white);
    border-left: 3px solid var(--est-accent);
    border-radius: 8px;
    color: var(--est-text-body);
    font-size: 0.92rem;
    border: 1px solid var(--est-border);
    border-left: 3px solid var(--est-accent);
}

/* ─── Result Display ─── */
#result-display {
    margin-top: 32px;
    padding: 32px;
    background: var(--est-white);
    color: var(--est-text-body);
    border-radius: 16px;
    border: 1px solid var(--est-border);
    position: relative;
    box-shadow: 0 4px 24px rgba(32, 78, 207, 0.06);
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--est-border);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--est-text-body);
}

.price-row.total {
    margin-top: 16px;
    padding-top: 16px;
    border-bottom: none;
    border-top: 2px solid var(--est-border);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--est-royal);
}

#price-output {
    color: var(--est-accent-hover);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.insight-text {
    margin-top: 16px;
    padding-top: 12px;
    color: var(--est-muted);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-top: 1px solid var(--est-border);
}

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

/* ─── Footer ─── */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--est-muted);
    border-top: 1px solid var(--est-border);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-body);
    margin-top: 0;
    position: relative;
    z-index: 1;
}

footer a {
    color: var(--est-royal);
    text-decoration: none;
    font-weight: 600;
    margin-left: 16px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--est-accent-hover);
}

/* ─── Responsive: Tablet ─── */
@media (max-width: 840px) {
    .glass-card {
        padding: 36px 28px 40px;
    }

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

    .input-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

    #forecaster-container {
        padding: 0 16px;
    }

    .glass-card {
        padding: 24px 20px 28px;
        border-radius: 16px;
    }

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

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

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