@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    /* Color Palette (HSL) */
    --primary-h: 221;
    --primary-s: 83%;
    --primary-l: 53%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    
    --accent-h: 192;
    --accent-s: 94%;
    --accent-l: 44%;
    --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
    
    --bg-h: 220;
    --bg-s: 33%;
    --bg-l: 99%;
    --background: hsl(var(--bg-h), var(--bg-s), var(--bg-l));
    
    --fg-h: 224;
    --fg-s: 35%;
    --fg-l: 12%;
    --foreground: hsl(var(--fg-h), var(--fg-s), var(--fg-l));
    
    --muted-h: 220;
    --muted-s: 14%;
    --muted-l: 91%;
    --border-color: hsl(var(--muted-h), var(--muted-s), var(--muted-l));
    
    --accent-blue-glow: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.3);
    
    /* Typography */
    --font-main: 'DM Sans', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    
    /* Geometry */
    --radius: 0.9rem;
    
    /* Spacing */
    --spacing-1: 4px;
    --spacing-2: 8px;
    --spacing-4: 16px;
    --spacing-6: 24px;
    --spacing-8: 32px;
    
    /* Transitions */
    --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Accessibility: Focus States */
:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Background Effects */
.bg-canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gmn-noise {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, hsla(280, 80%, 60%, 0.03) 0%, transparent 50%);
    animation: ambientGlow 20s ease-in-out infinite alternate;
}

@keyframes ambientGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
    50% { transform: scale(1.1) translate(-2%, 2%); opacity: 1; }
    100% { transform: scale(1) translate(2%, -2%); opacity: 0.8; }
}

.gmn-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(hsla(var(--muted-h), var(--muted-s), var(--muted-l), 0.5) 1px, transparent 1px),
        linear-gradient(90deg, hsla(var(--muted-h), var(--muted-s), var(--muted-l), 0.5) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 90%);
    mask-image: radial-gradient(circle at center, black, transparent 90%);
    opacity: 0.4;
}

/* Typography Enhancements */
h1, h2, h3, .gmn-display {
    font-family: var(--font-display);
    letter-spacing: -0.04em;
    font-weight: 700;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background-color: hsla(var(--bg-h), var(--bg-s), var(--bg-l), 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), height 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
}

.navbar.is-scrolled {
    height: 80px;
    background-color: hsla(var(--bg-h), var(--bg-s), var(--bg-l), 0.94);
    box-shadow: 0 12px 36px -24px rgba(15, 23, 42, 0.24);
}

.navbar.is-hidden {
    transform: translateY(-110%);
}

.navbar-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.nav-left, .nav-right {
    flex: 1;
    display: flex;
}

.nav-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex: 1;
    min-width: 0;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    flex: 0 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--foreground);
    text-decoration: none;
    font-family: var(--font-display);
    letter-spacing: -0.04em;
}

.logo span {
    color: var(--primary);
}

.nav-cta {
    display: flex;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--background);
    cursor: pointer;
    gap: 5px;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 19px;
    height: 2.5px;
    border-radius: 999px;
    background: var(--foreground);
    transition: var(--transition-base);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.animate-text-reveal {
    animation: textReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fade-in,
.fade-in-up,
.animate-fade-up,
.animate-tag,
.accent-line {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible,
.fade-in-up.visible,
.animate-fade-up.visible,
.animate-tag.visible,
.accent-line.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.glow-text {
    text-shadow: 0 0 24px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.16);
}

.glow-on-hover {
    will-change: transform, box-shadow;
}

.glow-on-hover:hover {
    box-shadow: 0 32px 64px -16px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.14);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--foreground);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-base);
    opacity: 0.7;
}

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

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
    border-radius: 100px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--foreground);
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px var(--accent-blue-glow);
}

.btn-primary:active {
    transform: translateY(0) scale(0.96);
}

.btn-secondary {
    background-color: white;
    color: var(--foreground);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--background);
    border-color: var(--primary);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

/* Sections */
section {
    padding: 120px 0;
}

.hero {
    padding: 180px 0 120px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 24px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.sub-headline {
    font-size: 1.15rem;
    color: var(--foreground);
    opacity: 0.7;
    max-width: 650px;
    margin: 0 auto 40px;
}

/* Service Cards */
.services {
    background-color: transparent;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 64px;
}

.services-cta {
    display: flex;
    justify-content: center;
}

.service-card {
    background: hsla(var(--bg-h), var(--bg-s), var(--bg-l), 0.6);
    padding: 48px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.4);
    background: white;
    box-shadow: 0 32px 64px -16px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.08);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-icon svg {
    width: 28px;
    height: 28px;
}

/* Scrollytelling Problem Section */
.problem-scroll-container {
    height: 400vh;
    background-color: transparent;
}

.problem-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.problem-sticky .container {
    width: 100%; /* Force container to fill available space */
}

.problem-statements {
    min-height: 250px;
    width: 100%;
    position: relative;
    margin: 0 auto;
}

.statement-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
    pointer-events: none;
}

.statement-wrap.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.reveal-text-line {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4.5vw, 3rem); /* Slightly smaller to ensure fit */
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.25;
    width: 100%;
    max-width: 900px; /* Aligned with user's preference */
    margin: 0 auto;
    white-space: normal;
    text-align: center;
    display: block;
}

.problem-footer {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 40px));
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    pointer-events: none;
}

.problem-footer.active {
    opacity: 1;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.problem-footer h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 24px;
}

/* Our Process / How We Work */
.how-we-work {
    background-color: transparent;
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--foreground);
    opacity: 0.6;
    margin-top: 8px;
    margin-bottom: 48px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.step-card {
    background: white;
    padding: 48px 32px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-align: left;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.step-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.05);
}

.step-num {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.4;
    margin-bottom: 24px;
    display: block;
}

.step-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--foreground);
}

.step-card p {
    font-size: 1rem;
    color: var(--foreground);
    opacity: 0.7;
    line-height: 1.6;
}

.steps-cta {
    margin-top: 64px;
    display: flex;
    justify-content: center;
}

@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .step-card {
        padding: 32px;
    }
}

/* FAQ Section Design */
.faq {
    background-color: transparent;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-base);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    padding: 24px 32px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--foreground);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition-base);
    font-weight: 400;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: hsla(var(--bg-h), var(--bg-s), var(--bg-l), 0.5);
}

.faq-answer p {
    padding: 0 32px 24px;
    color: var(--foreground);
    opacity: 0.7;
    line-height: 1.6;
}

/* Final CTA Section */
.final-cta {
    padding: 100px 0;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 40px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 32px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.final-cta h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--foreground);
}

.final-cta p {
    font-size: 1.2rem;
    color: var(--foreground);
    opacity: 0.7;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
}

.glow-btn {
    box-shadow: 0 20px 40px -10px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.4);
}

.trust-line {
    margin-top: 24px;
    font-size: 0.9rem;
    opacity: 0.5;
    font-weight: 500;
}

/* Footer Section Design */
.footer {
    padding: 100px 0 40px;
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.footer .gmn-grid {
    opacity: 0.15;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr;
    gap: 64px;
    margin-bottom: 80px;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 24px;
}

.footer-brand .tagline {
    font-size: 1rem;
    color: var(--foreground);
    opacity: 0.6;
    line-height: 1.6;
    max-width: 300px;
}

.footer h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 24px;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 12px;
}

.footer ul a {
    text-decoration: none;
    color: var(--foreground);
    opacity: 0.7;
    transition: var(--transition-base);
    font-size: 0.95rem;
}

.footer ul a:hover {
    color: var(--primary);
    opacity: 1;
}

.footer-contact p {
    margin-bottom: 12px;
    color: var(--foreground);
    opacity: 0.7;
    font-size: 0.95rem;
}

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
    transition: var(--transition-base);
}

.social-icons a:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--foreground);
    opacity: 0.5;
}

.footer-bottom a {
    color: var(--foreground);
    text-decoration: none;
}

.main-site-link {
    font-weight: 700;
    color: var(--primary) !important;
    opacity: 1 !important;
}

@media (max-width: 900px) {
    .navbar {
        height: auto;
        min-height: 84px;
        padding: 12px 0;
    }

    .navbar-grid {
        flex-wrap: wrap;
        gap: 12px;
        align-items: flex-start;
    }

    .nav-left {
        flex: 1 1 auto;
        justify-content: flex-start;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        margin-left: auto;
        margin-top: 2px;
        flex: 0 0 auto;
    }

    .nav-panel {
        display: none;
        flex: 1 1 100%;
        order: 3;
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 18px 16px 20px;
        margin-top: 6px;
        border: 1px solid var(--border-color);
        border-radius: 20px;
        background: hsla(var(--bg-h), var(--bg-s), var(--bg-l), 0.96);
        box-shadow: 0 24px 60px -30px rgba(15, 23, 42, 0.2);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }

    .navbar.is-menu-open .nav-panel {
        display: flex;
    }

    .nav-center,
    .nav-right {
        flex: 1 1 auto;
        justify-content: flex-start;
        width: 100%;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        min-height: 44px;
        width: 100%;
        font-size: 1rem;
        opacity: 1;
    }

    .nav-cta {
        width: 100%;
    }

    .nav-cta .btn,
    .nav-right .btn {
        width: 100%;
    }

    .hero {
        padding-top: 160px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    section {
        padding: 96px 0;
    }

    .hero {
        padding: 150px 0 96px;
    }

    .hero-actions {
        width: 100%;
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .service-card,
    .step-card,
    .cta-content {
        padding: 32px 24px;
    }

    .problem-scroll-container {
        height: 320vh;
    }

    .problem-footer {
        width: calc(100% - 32px);
    }

    .problem-footer h2 {
        margin-bottom: 16px;
    }

    .faq-question {
        padding: 20px 24px;
    }

    .faq-answer p {
        padding: 0 24px 20px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .navbar.is-menu-open .nav-panel {
        padding: 16px 14px 18px;
    }

    .nav-links {
        gap: 0.35rem;
    }

    .nav-links a {
        font-size: 0.98rem;
    }
}

@media (min-width: 901px) {
    .mobile-menu-toggle {
        display: none;
    }
}

body.nav-menu-open {
    overflow: hidden;
}
