/* ================================================
   READY SCORE - SHARED STYLES
   ================================================ */

/* ================================================
   V2 COLOR PALETTE - Gray-Blue (matches hero image)

   Based on the hero image tones - cool, professional,
   family-safety focused. Slate gray-blues convey
   calm authority and preparedness without alarm.
   ================================================ */

:root {
    /* Slate - PRIMARY (calm authority, protection) */
    --slate-darkest: #1e293b;
    --slate-dark: #334155;
    --slate: #475569;
    --slate-medium: #64748b;
    --slate-light: #94a3b8;
    --slate-pale: #cbd5e1;

    /* Amber - ACCENT (warmth, attention, hope) */
    --amber-dark: #b45309;
    --amber: #d97706;
    --amber-light: #f59e0b;
    --amber-pale: #fcd34d;

    /* Cool backgrounds */
    --bg-dark: #1e293b;
    --bg-medium: #334155;
    --bg-light: #f1f5f9;
    --bg-white: #f8fafc;
    --white: #ffffff;

    /* Text colors */
    --text-dark: #1e293b;
    --text: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-on-dark: #f1f5f9;

    /* CTA - Amber for warmth against cool grays */
    --accent: #d97706;
    --accent-dark: #b45309;
    --accent-light: #f59e0b;

    /* Status colors */
    --warning: #f59e0b;
    --success: #22c55e;
    --error: #dc2626;

    /* Legacy aliases for compatibility */
    --navy-dark: var(--slate-darkest);
    --navy: var(--slate-dark);
    --navy-medium: var(--slate);
    --navy-light: var(--slate-medium);
    --earth-dark: var(--text-dark);
    --earth: var(--text);
    --earth-light: var(--text-muted);
    --cream: var(--bg-light);
    --parchment: var(--bg-light);
    --primary: var(--slate-dark);
    --bg: var(--bg-light);
    --card: var(--white);
    --border: var(--slate-light);
}

/* ================================================
   V1 COLOR PALETTE (OLD - kept for reference)

   NAVY BLUE (#133c52, #1a4a66) - Primary
   WARM WHITE (#f8f6f3) - Background
   AMBER (#d97706, #b45309) - Accent
   MAROON (#8b2323) - CTA
   SLATE (#475569, #64748b) - Secondary text
   ================================================ */

/* ================================================
   BASE STYLES
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--parchment);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.font-display {
    font-family: 'Bebas Neue', sans-serif;
}

/* ================================================
   TEXTURE OVERLAYS
   ================================================ */

/* Real texture overlay - applies site-wide texture */
.texture-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.5;
    background-image: url('bg-texture.png');
    background-repeat: repeat;
    mix-blend-mode: multiply;
}

/* Rough paper background with texture */
.paper-bg {
    background-color: var(--parchment);
    background-image: url('bg-texture.png');
    background-repeat: repeat;
    background-blend-mode: multiply;
}

/* Stormy sky background - solid color for SVG filter compatibility */
.stormy-bg {
    background-color: var(--storm);
}

/* ================================================
   HERO IPAD POSITIONING
   ================================================ */

/* Hide iPads for now */
.ipad-hero {
    display: none !important;
}

.ipad-mobile {
    display: none !important;
}

/* 1048px - 1199px */
@media (min-width: 1048px) {
    .ipad-hero {
        right: -10%;
        width: 650px;
    }
}

/* 1200px - 1279px */
@media (min-width: 1200px) {
    .ipad-hero {
        right: 5%;
        width: 580px;
    }
}

/* 1280px - 1379px */
@media (min-width: 1280px) {
    .ipad-hero {
        right: 0%;
        width: 620px;
    }
}

/* 1380px - 1535px */
@media (min-width: 1380px) {
    .ipad-hero {
        right: 3%;
        width: 660px;
    }
}

/* 1536px - 1779px */
@media (min-width: 1536px) {
    .ipad-hero {
        right: 10%;
        width: 680px;
    }
}

/* 1780px - 1999px */
@media (min-width: 1780px) {
    .ipad-hero {
        right: 10%;
        width: 750px;
    }
}

/* 2000px+ */
@media (min-width: 2000px) {
    .ipad-hero {
        right: 15%;
        width: 800px;
        top: -2%;
    }
}

/* ================================================
   BUTTON STYLES
   ================================================ */

/* Rustic button style - dark red */
.btn-rustic {
    position: relative;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: none;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        0 4px 8px rgba(0,0,0,0.3),
        0 2px 4px rgba(0,0,0,0.2);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-rustic:hover {
    background: linear-gradient(180deg, #a52a2a 0%, var(--accent) 100%);
    transform: translateY(-2px);
}

/* Primary button (quiz style) */
.btn-primary {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    padding: 16px 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(139, 35, 35, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #a52a2a 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 35, 35, 0.4);
}

.btn-primary:disabled {
    background: var(--storm-pale);
    border-color: var(--storm-pale);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary button */
.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    padding: 16px 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-secondary:hover {
    border-color: var(--earth-dark);
    color: var(--earth-dark);
}

/* CTA button */
.btn-cta {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 18px 50px;
    font-size: 20px;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 6px 20px rgba(139, 35, 35, 0.4);
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background: linear-gradient(180deg, #a52a2a 0%, var(--accent) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 35, 35, 0.5);
}

/* ================================================
   CARD STYLES
   ================================================ */

/* Weathered card style */
.card-weathered {
    background: linear-gradient(180deg, var(--cream) 0%, var(--parchment) 100%);
    border: 1px solid #c4a77d;
    box-shadow:
        inset 0 0 30px rgba(139,69,19,0.05),
        0 4px 12px rgba(0,0,0,0.15);
}

/* Quiz card */
.quiz-card {
    background: var(--card);
    border-radius: 8px;
    padding: 50px 40px;
    box-shadow:
        0 4px 20px rgba(0,0,0,0.08),
        0 0 0 1px var(--border);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--rust-light) 100%);
}

/* ================================================
   DECORATIVE ELEMENTS
   ================================================ */

/* Book shadow effect */
.book-shadow {
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 10px 20px rgba(0,0,0,0.3),
        0 0 0 1px rgba(0, 0, 0, 0.2);
}

/* Distressed text effect */
.text-worn {
    text-shadow:
        1px 1px 0 rgba(0,0,0,0.1),
        -1px -1px 0 rgba(255,255,255,0.05);
}

/* Stamp seal style */
.stamp-seal {
    filter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='rough'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='2' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3C/svg%3E#rough");
}

/* Rough edge effect for sections */
.rough-edge {
    position: relative;
}

.rough-edge::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: inherit;
    filter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='roughEdge'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='4' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='6' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3C/svg%3E#roughEdge");
}

/* Torn paper bottom edge */
.torn-edge-bottom {
    position: relative;
    margin-bottom: 15px;
}

.torn-edge-bottom::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background:
        linear-gradient(135deg, var(--parchment) 25%, transparent 25%),
        linear-gradient(225deg, var(--parchment) 25%, transparent 25%);
    background-size: 20px 15px;
    filter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='torn'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03' numOctaves='3' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='4' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3C/svg%3E#torn");
}

/* ================================================
   QUIZ SPECIFIC STYLES
   ================================================ */

/* Container */
.container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    z-index: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out;
}

/* Badge/label style - not a button */
.badge-label {
    display: inline-block;
    background-color: var(--navy);
    color: var(--white);
    padding: 6px 16px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 24px;
    transform: rotate(-1deg);
}

/* Underline for emphasis */
.underline-hand {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Warm placeholder text */
.placeholder-earth-light::placeholder {
    color: var(--earth-light);
    opacity: 1;
}

/* Waitlist form input placeholders */
#waitlistForm input::placeholder {
    color: var(--earth);
    opacity: 0.8;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 8vw, 72px);
    color: var(--earth-dark);
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.subtitle {
    font-size: 22px;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 30px;
}

.stats-row {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 42px;
    color: var(--accent);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress Bar */
.progress-section {
    margin-bottom: 40px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--rust-light));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Question Styles */
.question {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

.question-header {
    margin-bottom: 30px;
}

.question-category {
    display: inline-block;
    background: var(--parchment);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 15px;
}

.question-text {
    font-size: 26px;
    font-weight: 600;
    color: var(--earth-dark);
    line-height: 1.3;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    background: var(--cream);
    border: 2px solid var(--border);
    padding: 20px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 18px;
}

.option:hover {
    border-color: var(--accent);
    background: white;
    transform: translateX(4px);
}

.option.selected {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 4px 12px rgba(139, 35, 35, 0.15);
}

.option::before {
    content: '';
    position: absolute;
    left: -2px;
    top: -2px;
    bottom: -2px;
    width: 4px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option.selected::before {
    opacity: 1;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    justify-content: space-between;
}

/* Email Capture Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    padding: 50px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 30px;
}

.modal h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 1px;
    color: var(--earth-dark);
}

.modal p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Crimson Pro', serif;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
}

.privacy-note {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 15px;
}

/* Results Section */
.results {
    display: none;
}

.results.active {
    display: block;
    animation: fadeInUp 0.8s ease-out;
}

.score-display {
    text-align: center;
    padding: 50px 30px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--accent), var(--rust-light));
    border-radius: 12px;
    color: white;
    position: relative;
    overflow: hidden;
}

.score-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(255,255,255,0.1) 20px,
        rgba(255,255,255,0.1) 40px
    );
    animation: moveStripes 20s linear infinite;
}

.score-content {
    position: relative;
    z-index: 1;
}

.score-label {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.score-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 96px;
    line-height: 1;
    margin-bottom: 10px;
}

.score-rating {
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.category-results {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
}

.category-result {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    letter-spacing: 1px;
}

.category-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    color: var(--accent);
}

.category-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.category-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-feedback {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.5;
}

.gaps-section {
    background: #fffbeb;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--warning);
    margin-bottom: 40px;
}

.gaps-section h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: var(--earth-dark);
}

.gap-list {
    list-style: none;
}

.gap-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(139, 35, 35, 0.1);
    color: var(--text);
    font-size: 17px;
}

.gap-list li:last-child {
    border-bottom: none;
}

.gap-list li::before {
    content: '\26A0';
    color: var(--warning);
    font-weight: bold;
    margin-right: 12px;
}

.cta-box {
    background: var(--earth-dark);
    color: white;
    padding: 50px 40px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 3s infinite;
}

.cta-box h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.cta-box p {
    font-size: 19px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes moveStripes {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

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

/* ================================================
   RESPONSIVE STYLES
   ================================================ */
@media (max-width: 768px) {
    .quiz-card {
        padding: 35px 25px;
    }

    .modal-content {
        padding: 35px 25px;
    }

    h1 {
        font-size: 48px;
    }

    .question-text {
        font-size: 22px;
    }

    .option {
        padding: 16px 20px;
        font-size: 16px;
    }

    .stats-row {
        gap: 20px;
    }

    .stat-number {
        font-size: 36px;
    }

    /* Hero section - hide image, use solid gradient on mobile */
    .hero-bg-image {
        display: none !important;
    }

    .hero-gradient {
        background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
    }

    /* Increase hero h1 font size on mobile */
    .hero-v2 h1 {
        font-size: 4rem !important;
    }

    /* Add more padding to hero on mobile */
    header.relative > div:last-child {
        padding-top: 68px !important;
        padding-bottom: 68px !important;
    }
}

/* Story card source styling */
.story-source {
    font-size: 1rem;
    line-height: 1.5rem;
}

/* Hero section text overrides */
.hero-v2 p.text-xl {
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 400;
}

.hero-v2 .text-2xl {
    font-size: 1.3rem;
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 4px;
}

.hero-v2 .text-3xl {
    font-size: 1.6rem;
    line-height: 1.8;
    font-weight: 500;
    margin-bottom: 5px;
}

@media (min-width: 768px) {
    .hero-v2 p.text-xl,
    .hero-v2 p.md\:text-2xl {
        font-size: 1.2rem;
        line-height: 1.4;
        font-weight: 400;
    }

    .hero-v2 .md\:text-3xl {
        font-size: 1.8rem;
        line-height: 2rem;
        font-weight: 500;
        margin-bottom: 5px;
    }
}

@media (min-width: 1024px) {
    .hero-v2 p.text-xl,
    .hero-v2 p.md\:text-2xl {
        font-size: 1.4rem;
        line-height: 1.4;
        font-weight: 500;
    }

    .hero-v2 .lg\:text-3xl {
        font-size: 2rem;
        line-height: 2.2rem;
        font-weight: 500;
        margin-bottom: 6px;
    }
}
