* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Modern Wedding Palette */
    --sage-green: #87a08b;
    --sage-light: #a8bba0;
    --sage-dark: #5a6b5d;
    --black: #1a1a1a;
    --white: #ffffff;
    --off-white: #fafafa;
    --gray-light: #f5f5f5;
    --gray: #666;

    /* Colby accent */
    --colby-blue: #1c64ff;
    --colby-purple: #57a6fb;
    --colby-gradient: linear-gradient(135deg, var(--colby-blue) 0%, var(--colby-purple) 100%);

    /* Animation timing */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.6s;

    /* Common values */
    --border-radius-sm: 8px;
    --border-radius-md: 15px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
}

/* Prevent scrolling and bouncing */
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: var(--white);
    color: var(--black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

/* Full-screen sections */
.section {
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    opacity: 1; /* Always visible, controlled by transform */
    transform: translateY(100vh);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.section.visible {
    opacity: 1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
    padding: 20px;
}

/* Progress Dots - Mobile Optimized */
.progress-dots {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(135, 160, 139, 0.3);
    border: 2px solid rgba(135, 160, 139, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dot.active {
    background: var(--sage-green);
    transform: scale(1.3);
    border-color: var(--sage-green);
}

.dot-tooltip {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 26, 26, 0.9);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.dot:hover .dot-tooltip {
    opacity: 1;
}

/* Live Activity - Mobile Positioned */
.live-activity {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.pulse {
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.activity-text {
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Section 1: Welcome - Mobile First */
.section-welcome {
    background: var(--white);
}

.welcome-content {
    padding: 20px 0;
}

.massive-text {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2rem, 8vw, 4rem);
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--black);
}

.highlight-name {
    color: var(--sage-green);
    display: inline-block;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.curiosity-text {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    color: var(--gray);
    margin-top: 20px;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeInUp 1s ease 1.5s forwards;
}

.scroll-indicator span {
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.arrow-down {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--sage-green);
    border-bottom: 2px solid var(--sage-green);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(5px); }
}

/* Section 2: Wolf Video - Mobile Optimized */
.section-wolf {
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-light) 100%);
}

.wolf-content {
    width: 100%;
    max-width: 800px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    color: var(--black);
}

.video-container {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
    margin: 20px auto;
    background: #000;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-container iframe {
    width: 100%;
    height: 100%;
}

.narrative-text,
.teaser-text {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin: 15px 0;
    color: var(--gray);
}

.teaser-text {
    font-weight: 600;
    color: var(--sage-green);
}

.video-progress {
    width: 100%;
    height: 4px;
    background: rgba(135, 160, 139, 0.2);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--sage-green);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Section 3: Game - Mobile Optimized */
.section-game {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
}

#gameCanvas {
    display: block;
    background: var(--off-white);
    border: 2px solid var(--sage-green);
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
    margin: 0 auto;
    touch-action: none;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: var(--white);
    border-radius: var(--border-radius-md);
    padding: 20px;
}

.game-instructions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.desktop-instructions {
    display: none;
}

.mobile-instructions {
    display: block;
}

@media (min-width: 768px) {
    .desktop-instructions {
        display: block;
    }
    .mobile-instructions {
        display: none;
    }
}

.instruction-line {
    font-size: clamp(0.9rem, 3vw, 1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.key-hint {
    background: var(--sage-green);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    min-width: 60px;
    display: inline-block;
}

.click-to-start {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 700;
    color: var(--sage-green);
    animation: pulse 2s infinite;
    cursor: pointer;
}

.game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--white);
    border-radius: var(--border-radius-md);
}

.game-over-overlay h3 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 10px;
}

.game-over-overlay p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

#highScoreName {
    padding: 10px 15px;
    border: 2px solid var(--sage-green);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 16px;
    width: 200px;
    margin: 10px 0;
}

.neon-button {
    padding: 12px 30px;
    background: var(--sage-green);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: clamp(0.9rem, 3vw, 1rem);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.neon-button:hover {
    background: var(--sage-dark);
    transform: scale(1.05);
}

.neon-button:active {
    transform: scale(0.95);
}

.leaderboard-compact {
    width: 100%;
    max-width: 300px;
    margin-top: 20px;
}

.leaderboard-compact h4 {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 10px;
    color: var(--sage-green);
}

.score-entry {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
}

.score-entry.top-three {
    color: var(--sage-green);
}

.no-scores {
    color: var(--gray);
    font-style: italic;
    padding: 20px;
}

/* Section 4: Salesforce - Mobile Optimized */
.section-salesforce {
    background: linear-gradient(180deg, var(--gray-light) 0%, var(--white) 100%);
}

.salesforce-content {
    max-width: 600px;
    margin: 0 auto;
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--gray);
    margin-top: -10px;
    margin-bottom: 30px;
}

.salesforce-placeholder {
    position: relative;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: var(--border-radius-md);
    padding: 20px;
    box-shadow: var(--shadow-md);
    min-height: 300px;
}

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

.fake-input {
    padding: 10px;
    background: var(--gray-light);
    border-radius: var(--border-radius-sm);
    text-align: left;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    color: var(--gray);
    min-height: 40px;
    display: flex;
    align-items: center;
}

.typing-animation {
    color: var(--sage-green);
    font-style: italic;
}

.dull-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
    opacity: 0;
    animation: fadeIn 2s ease 3s forwards;
}

.dull-overlay p {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    color: var(--white);
    text-align: center;
    padding: 20px;
}

/* Section 5: Colby - Mobile Optimized */
.section-colby {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: var(--white);
}

.colby-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.colby-logo {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 900;
    background: var(--colby-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.tagline {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--gray);
    margin-bottom: 30px;
}

/* Colby Demo - Mobile Optimized */
.colby-demo {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 15px;
    margin: 30px auto;
    max-width: 100%;
    box-shadow: var(--shadow-lg);
}

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

/* Mobile: Hide chat sidebar, show only CRM fields */
.chat-sidebar {
    display: none;
}

@media (min-width: 768px) {
    .demo-container {
        flex-direction: row;
    }

    .chat-sidebar {
        display: block;
        flex: 1;
        background: var(--gray-light);
        border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
        padding: 15px;
    }

    .crm-fields {
        flex: 2;
    }
}

.chat-header {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--black);
    font-size: 14px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.ai-message {
    justify-content: flex-start;
}

.message-bubble {
    background: var(--colby-blue);
    color: var(--white);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    max-width: 80%;
    font-size: 12px;
    line-height: 1.4;
}

.ai-message .message-bubble {
    background: var(--sage-green);
}

.crm-fields {
    background: var(--white);
    padding: 15px;
    border-radius: var(--border-radius-md);
}

.record-section {
    margin-bottom: 20px;
    padding: 10px;
    background: var(--gray-light);
    border-radius: var(--border-radius-sm);
}

.record-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.record-icon {
    font-size: 20px;
}

.record-title {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    font-weight: 600;
    color: var(--black);
}

.record-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crm-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crm-field label {
    font-size: 11px;
    color: var(--gray);
    font-weight: 500;
}

.field-value {
    background: var(--white);
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-height: 28px;
    display: flex;
    align-items: center;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: var(--black);
}

.field-content {
    color: var(--colby-blue);
    font-weight: 500;
}

.field-cursor {
    color: var(--colby-blue);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Features Grid - Mobile Optimized */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

@media (min-width: 768px) {
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.feature p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: var(--white);
    line-height: 1.4;
}

.feature small {
    color: var(--gray);
    font-size: 0.85em;
}

/* Value Prop - Mobile Optimized */
.value-prop {
    text-align: center;
    margin: 40px 0;
}

.big-stat {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 900;
    color: var(--sage-green);
    margin-bottom: 10px;
}

.stat-subtitle {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    color: var(--gray);
}

.final-message {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin: 20px 0;
    line-height: 1.3;
}

.urgency-text {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    color: var(--gray);
    margin-bottom: 30px;
}

/* CTA Buttons - Mobile Optimized */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.cta-buttons .neon-button {
    min-width: 200px;
    padding: 15px 30px;
    font-size: clamp(1rem, 3vw, 1.1rem);
}

.cta-buttons .primary {
    background: var(--colby-gradient);
}

.cta-buttons .secondary {
    background: transparent;
    border: 2px solid var(--sage-green);
}

/* Floating Leaves Animation */
.leaves-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.leaf {
    position: absolute;
    width: 20px;
    height: 20px;
    opacity: 0.3;
}

.leaf::before {
    content: '🍃';
    font-size: 20px;
    display: block;
}

.leaf.small::before {
    font-size: 15px;
}

.leaf.large::before {
    font-size: 25px;
}

.leaf.light {
    opacity: 0.2;
}

.leaf.dark {
    opacity: 0.4;
}

.leaf.floating {
    animation: float 8s infinite ease-in-out;
}

.leaf.swaying {
    animation: sway 6s infinite ease-in-out;
}

.leaf.delay-0 { animation-delay: 0s; }
.leaf.delay-1 { animation-delay: 1s; }
.leaf.delay-2 { animation-delay: 2s; }
.leaf.delay-3 { animation-delay: 3s; }
.leaf.delay-4 { animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(0) rotate(-5deg); }
    75% { transform: translateY(20px) rotate(3deg); }
}

@keyframes sway {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-15px) rotate(-5deg); }
    50% { transform: translateX(0) rotate(0deg); }
    75% { transform: translateX(15px) rotate(5deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .progress-dots {
        right: 10px;
    }

    .live-activity {
        top: 10px;
        left: 10px;
        padding: 4px 8px;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    .game-container {
        padding: 0 10px;
    }

    .colby-demo {
        padding: 10px;
    }

    .features {
        gap: 15px;
    }

    .feature {
        padding: 15px;
    }
}

/* Prevent text selection on mobile */
@media (max-width: 768px) {
    * {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    input, textarea {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    .section {
        height: -webkit-fill-available;
    }

    body {
        height: -webkit-fill-available;
    }
}