:root {
    --color-primary: #8b1f2f; /* Updated Red from Brand */
    --color-primary-light: #aa273a;
    --color-secondary: #091528; /* Navy Blue from Brand */
    --color-secondary-light: #162a4d;
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-text: #1a202c;
    --color-text-light: #4a5568;
    --color-border: #e2e8f0;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(139, 31, 47, 0.3);
    
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Texture Overlay using paperbg.webp */
.texture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../public/images/paperbg.webp');
    background-repeat: repeat;
    opacity: 0.15; /* Subtle texture overlay for premium organic feel */
    pointer-events: none; /* Let clicks pass through */
    z-index: 9999;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--color-secondary);
    line-height: 1.2;
    font-weight: 700;
}

p {
    color: var(--color-text-light);
}

.text-highlight {
    color: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(139, 31, 47, 0.39);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 31, 47, 0.23);
}

.btn-secondary {
    background-color: white;
    color: var(--color-secondary);
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--color-secondary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-secondary);
}

.logo img {
    height: 48px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

/* Hero Section */
.hero {
    padding: 12rem 0 8rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(248,249,250,1) 0%, rgba(230,235,242,0.8) 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(139, 31, 47, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ELI5 Section */
.eli5-section {
    padding: 6rem 0;
    background-color: var(--color-surface);
}

.section-header {
    text-align: center;
    margin-bottom: 4.5rem;
}

.section-header h2 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

.section-header p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

.eli5-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(139, 31, 47, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

/* Advantage Section */
.advantage-section {
    padding: 8rem 0;
    background-color: var(--color-bg);
}

.advantage-container {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.advantage-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    min-width: 400px;
}

/* GBP Interactive Widget (Premium Redesign) */
.gbp-widget.prof-style {
    display: flex;
    background: #fdfdfd;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); /* Soft large shadow */
    border: 1px solid var(--color-border);
    overflow: hidden;
    flex-direction: row; /* Desktop */
    min-height: 500px;
}

.gbp-widget-left {
    flex: 1;
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fafafa;
    border-right: 1px solid var(--color-border);
}

.gbp-toggle-container {
    margin-bottom: 3rem;
}

.gbp-toggle-hint {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    display: block;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    animation: pulseText 2s infinite ease-in-out;
}

@keyframes pulseText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.gbp-toggle {
    display: flex;
    position: relative;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    padding: 0.4rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* Moving slider background */
.gbp-toggle::before {
    content: '';
    position: absolute;
    top: 0.4rem; left: 0.4rem;
    width: calc(50% - 0.4rem);
    height: calc(100% - 0.8rem);
    background: white;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.gbp-toggle.state-after::before {
    transform: translateX(100%);
}

.gbp-tab {
    flex: 1;
    position: relative;
    z-index: 2;
    border: none;
    background: transparent;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.gbp-tab.active {
    color: var(--color-secondary);
}

.gbp-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gbp-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1.25rem 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    border: 1px solid var(--color-border);
}

.stat-label {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text);
}

.stat-pill {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 800;
    color: white;
    font-size: 1.1rem;
    min-width: 80px;
    text-align: center;
    transition: background-color 0.4s;
    border-radius: 8px;
}

.stat-pill.red { background: #ef4444; }
.stat-pill.green { background: #10b981; }

.gbp-widget-right {
    flex: 1.2;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.gbp-map-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1/1;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); /* soft lift off background */
    background: white;
}

.gbp-map-wrapper.pattern-bg {
    background-color: #f4f7f9;
    background-image: url('../../public/images/toronto_map.png');
    background-size: cover;
    background-position: center;
    border: 1px solid var(--color-border);
}

/* Subtle white overlay to ensure ranking nodes stay legible over complex maps */
.gbp-map-wrapper.pattern-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.6); /* 60% white overlay */
    z-index: 0;
}

.gbp-hex-grid {
    position: absolute;
    top: 5%; left: 5%; width: 90%; height: 90%;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 8px; /* Slightly looser gap for the dots */
    z-index: 1; /* ensure it stays above the overlay */
}

.gbp-node-prof {
    width: 90%;
    height: 90%;
    margin: auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; /* better font size for 7x7 */
    font-weight: 800;
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    background: #ef4444;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gbp-node-prof.green-state {
    background: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

@media (max-width: 768px) {
    .gbp-widget-left {
        padding: 2rem;
    }
    .gbp-widget-right {
        padding: 1.5rem;
    }
}

.advantage-content {
    flex: 1;
}

.advantage-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.advantage-content p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .gbp-widget.prof-style {
        flex-direction: column;
    }
    
    .advantage-container {
        flex-direction: column;
    }
    
    .advantage-image {
        width: 100%;
        min-width: 0;
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions .btn-outline {
        display: none;
    }
    
    .hero {
        padding: 8rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .eli5-grid {
        grid-template-columns: 1fr;
    }
    
    .advantage-content h2 {
        font-size: 2.25rem;
    }
}

/* Pricing Section */
.pricing-section {
    padding: 6rem 0;
    background-color: var(--color-surface);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-top: 2rem;
}

.pricing-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
    position: relative;
    z-index: 5;
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-8px);
}

.popular-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

.price {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-secondary);
    line-height: 1;
    margin-bottom: 1rem;
}

.price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.commitment {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.promise {
    font-weight: 600;
    min-height: 48px; /* Alignment for cards */
}

.features-list {
    list-style: none;
    flex-grow: 1;
    margin-bottom: 2.5rem;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.icon {
    font-weight: bold;
    min-width: 20px;
}

.icon.check { color: #10b981; }
.icon.cross { color: #ef4444; }
.icon.warn { color: #f59e0b; }

.pricing-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
}

/* FAQ Section */
.faq-section {
    padding: 6rem 0 8rem;
    background-color: var(--color-bg);
}

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

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--color-surface);
    user-select: none;
}

.faq-question h3 {
    font-size: 1.125rem;
    margin: 0;
}

.toggle-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 300;
    transition: transform 0.3s;
    line-height: 1;
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    opacity: 0;
}

.faq-answer p {
    margin-bottom: 0;
}

.faq-item.active .faq-answer {
    padding: 0 2rem 1.5rem;
    max-height: 500px;
    opacity: 1;
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}

/* Contact Section */
.contact-section {
    padding: 6rem 0 8rem;
    background-color: var(--color-surface);
}

.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 3rem;
    border: 1px solid var(--color-border);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--color-secondary);
    font-size: 0.95rem;
}

.form-group label .required {
    color: var(--color-primary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #94a3b8;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 31, 47, 0.1);
    background-color: var(--color-surface);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.cf-turnstile {
    margin: 0.5rem 0;
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }
}

/* Footer */
.footer {
    background-color: var(--color-secondary);
    color: white;
    padding-top: 4rem;
    position: relative;
    z-index: 10; /* Above the texture overlay */
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-logo {
    color: white;
}

/* Invert the logo color so it appears on dark background */
.footer-logo img {
    filter: brightness(0) invert(1);
}

.footer-links, .footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links h4, .footer-contact h4 {
    color: white;
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* More Responsive Breakpoints */
@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .pricing-card.popular {
        transform: scale(1);
    }
    
    .pricing-card.popular:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
