html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #0d0d0d;
    --accent-color: #ffffff;
    --text-color: #f0f0f0;
    --dim-text: rgba(255, 255, 255, 0.4);
}

@font-face {
    font-family: 'Outfit';
    src: url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;400;700&display=swap');
}

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

body {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0d0d0d 100%);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 1500vh; /* Accommodate bi-directional loop clones */
    background-attachment: fixed; 
    scroll-behavior: smooth;
}

header {
    width: 100%;
    padding: 46px 50px;
    position: fixed;
    top: 0;
    z-index: 1000; /* Higher than page-frame if needed, or same as page-frame */
    pointer-events: none; /* Allow events through to header content below */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto; /* Re-enable for logo and links */
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dim-text);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    transition: color 0.3s ease;
}

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

.menu-btn {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--dim-text);
    cursor: pointer;
}

/* ── Hamburger Button (hidden on desktop) ─────────────────── */
.hamburger {
    display: none; /* shown only via media query */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1100;
    pointer-events: auto;
}

.ham-bar {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--accent-color);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                opacity   0.35s ease,
                width     0.35s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: center;
}

/* Animate into X when open */
.hamburger.open .ham-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.hamburger.open .ham-bar:nth-child(2) {
    opacity: 0;
    width: 0;
}
.hamburger.open .ham-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Mobile Menu Dropdown (Glassmorphism) ───────────────── */
.mobile-menu {
    position: fixed;
    /* top/left/right adjusted in media queries to match frame */
    z-index: 1040;

    /* Glass effect */
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);

    /* Inner highlight border + bottom accent */
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top: none;
    /* border-radius set in media queries */
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);

    display: flex;
    flex-direction: column;
    padding: 0 32px 28px;
    padding-top: 0;

    /* Hidden by default */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.48s cubic-bezier(0.23, 1, 0.32, 1),
                opacity    0.32s cubic-bezier(0.23, 1, 0.32, 1),
                padding    0.48s cubic-bezier(0.23, 1, 0.32, 1),
                top        0.4s  ease,
                left       0.4s  ease,
                right      0.4s  ease;
}

.mobile-menu.open {
    max-height: 520px;
    opacity: 1;
    pointer-events: auto;
    padding-top: 80px;
    padding-bottom: 32px;
}

/* ── Close Button inside dropdown ──────────────────────── */
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 1101;
}

.mobile-menu-close:hover {
    background: rgba(230, 57, 70, 0.2);
    transform: rotate(90deg);
}

.mobile-menu-close span {
    position: absolute;
    width: 14px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition: background 0.2s ease;
}
.mobile-menu-close span:first-child { transform: rotate(45deg); }
.mobile-menu-close span:last-child  { transform: rotate(-45deg); }

.mobile-menu-close:hover span { background: #e63946; }

/* Nav links inside overlay */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.mobile-nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: block;
    transition: color 0.25s ease, padding-left 0.25s ease;
    /* entrance */
    opacity: 0;
    transform: translateY(-8px);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Stagger entrance animation (drop down) */
.mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
    transition: color 0.25s ease,
                padding-left 0.25s ease,
                opacity  0.35s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.12s; }
.mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.17s; }
.mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.22s; }
.mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.27s; }
.mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.32s; }

.mobile-nav-link:hover {
    color: #e63946;
    padding-left: 6px;
}

/* Footer caption inside dropdown */
.mobile-menu-footer {
    margin-top: 18px;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--dim-text);
}

/* Typography */
.font-condensed {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 0.85;
    letter-spacing: -0.02em;
}

h1.font-condensed {
    font-size: clamp(4rem, 7vw, 10rem); /* Reduced to fit words on one line */
    margin: 0;
    line-height: 0.9;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}


.accent-text {
    color: #e63946; /* Vibrant Red/Coral from reference */
}

.hero .white-text,
.hero .word.white-text {
    color: #ffffff !important;
}

/* Hero Section Refactor */
.hero {
    height: 100vh;
    padding: 80px; /* Increased padding to breathe within the frame */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    pointer-events: none; /* Allow events to pass through to the blob backdrop */
}

/* HUD Markers */
.hud-marker {
    position: absolute;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.7);
    z-index: 20;
}

.hud-marker.top-left { top: 40px; left: 40px; }
.hud-marker.top-center { 
    display: none;
}
.hud-marker.top-right { top: 40px; right: 40px; }

.dot-indicator {
    width: 6px;
    height: 6px;
    background: #e63946;
    border-radius: 50%;
    display: inline-block;
}

/* Hero Content */
.hero-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    position: relative;
}

.blob-container {
    position: fixed;
    left: 50%; 
    top: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    z-index: 5; /* Behind text (text is at 10) and behind blue panel (at 20) */
    pointer-events: auto; /* Explicitly interactive */
    filter: url(#liquid) contrast(1.2);
    opacity: 1; /* Visible at start */
    /* transition: opacity 2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 2s cubic-bezier(0.2, 0.8, 0.2, 1); */
    /* Remove transition for scroll-driven movement to avoid lag, or keep it very fast */
    transition: opacity 2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: left, top, transform; /* Optimize for movement */
}

body.entrance-ready .blob-container {
    opacity: 1;
}

/* Fixed container during scroll transition */
.blob-container.scrolling {
    position: fixed;
}

.blob-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.25) 0%, rgba(69, 123, 157, 0.1) 50%, transparent 75%);
    filter: blur(80px);
    z-index: -1;
    animation: pulse-glow 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.blob {
    position: absolute;
    background: radial-gradient(circle, #e63946 0%, #457b9d 50%, #1d3557 100%);
    opacity: 0.5;
    mix-blend-mode: screen;
    border-radius: 50%;
    will-change: transform, border-radius;
    transition: opacity 0.5s ease;
}

.blob-container:hover .blob {
    opacity: 0.8;
}

.blob-1 { width: 600px; height: 600px; left: 100px; top: 100px; animation: morph1 10s ease-in-out infinite; }
.blob-2 { width: 480px; height: 480px; left: 160px; top: 160px; animation: morph2 7s ease-in-out infinite; opacity: 0.6; }
.blob-3 { width: 360px; height: 360px; left: 220px; top: 220px; animation: morph1 12s ease-in-out infinite reverse; opacity: 0.4; }
.blob-4 { width: 280px; height: 280px; left: 260px; top: 260px; animation: morph2 5s ease-in-out infinite reverse; opacity: 0.5; }

@keyframes morph1 {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

@keyframes morph2 {
    0%, 100% { border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; }
    50% { border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%; }
}

/* Ripple Effect Styles */
.ripple {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #e63946 0%, #457b9d 50%, #1d3557 100%);
    opacity: 0.6;
    border-radius: 50%;
    pointer-events: none;
    z-index: 4; /* Behind main blobs */
    mix-blend-mode: screen;
    animation: ripple-out 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes ripple-out {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(8);
        opacity: 0;
    }
}

.hero-text {
    position: relative;
    z-index: 10;
    width: 100%;
    text-align: center; /* Center aligned text */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center aligned flex items */
    pointer-events: auto; /* Re-enable for text selection or future links */
    opacity: 1; /* Visible at start */
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

body.entrance-ready .hero-text {
    opacity: 1;
    transform: translateY(0);
}

/* Bottom Elements */
.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    z-index: 20;
    pointer-events: auto;
    opacity: 1; /* Visible at start */
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

body.entrance-ready .hero-bottom {
    opacity: 1;
    transform: translateY(0);
}


.hero-mission {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    max-width: 550px;
    text-align: left;
}

.bottom-marker {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 5px; /* Visual alignment with mission text baseline */
    font-size: 18px;
    margin-bottom: 60px;
}

.bottom-marker .dot-indicator {
    width: 8px;
    height: 8px;
}

.text-rotator {
    display: inline-grid;
    align-items: center;
    justify-items: start;
    overflow: hidden;
    height: 1.2em;
    position: relative;
    /* Optional: fixed width if text changes layout width */
}

.rotator-item {
    grid-area: 1 / 1;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.6s ease;
    white-space: nowrap;
}

.rotator-item.active {
    transform: translateY(0);
    opacity: 1;
    z-index: 2;
}

.rotator-item.exit {
    transform: translateY(-100%);
    opacity: 0;
    z-index: 1;
}

.scroll-tag {
    position: absolute;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    font-size: 16px;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    z-index: 25;
    animation: breathe 3s ease-in-out infinite;
    opacity: 1; /* Visible at start */
    transition: opacity 1s ease-out;
    will-change: opacity, transform;
}

body.entrance-ready .scroll-tag {
    opacity: 1;
}

@keyframes breathe {
    0%, 100% { opacity: 0.4; transform: translateX(-50%); }
    50% { opacity: 0.8; transform: translateX(-50%); }
}



/* Founder Links */
.founder-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.founder-link:hover {
    color: #e63946;
}

.link-arrow {
    font-size: 1.25rem; /* Increased from 0.8em */
    opacity: 0.6;
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.3s ease;
}

.founder-link:hover .link-arrow {
    transform: translate(2px, -2px);
    opacity: 1;
}

/* Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

h1:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Cursor */
.cursor {
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, #90e0ef 0%, #00b4d8 50%, #0077b6 100%);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 999;
    mix-blend-mode: screen;
    opacity: 0.95;
    transform: translate(-50%, -50%);
    animation: morphCursor 2s ease-in-out infinite;
    left: -100px;
    top: -100px;
}

@keyframes morphCursor {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

@media (max-width: 768px) {
    .cursor {
        display: none !important;
    }
}

/* Page Frame - Sharp outer, Rounded inner */
.page-frame {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: none;
    border-radius: 30px;
    box-shadow: 0 0 0 50vmax #ffffff; /* Fills everything outside the rounded box */
    pointer-events: none;
    z-index: 1000;
}

/* Scroll Reveal Section */
.scroll-reveal {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px;
    position: relative;
    z-index: 10;
    pointer-events: none; /* Pass through to blob */
}

.reveal-content {
    max-width: 1200px;
    width: 100%;
    pointer-events: auto; /* Re-enable for content */
}

.reveal-message {
    max-width: 800px;
    opacity: 0;
}

.reveal-message h2 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 40px;
    color: var(--accent-color);
}

.reveal-sub {
    max-width: 500px;
    color: var(--dim-text);
    font-size: 1.1rem;
    line-height: 1.6;
}

#services .reveal-message {
    opacity: 1; 
    transform: none;
    text-align: left;
    margin: 0;
}

#services .reveal-sub {
    margin: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 100px;
    margin-top: 100px;
}

.service-item {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-item:hover {
    transform: translateY(-10px);
}

#why-choose-us {
    padding-top: 60vh;
    margin-top: 150px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.section-badge .dot {
    width: 6px;
    height: 6px;
    background: #e63946;
    border-radius: 50%;
}

.reveal-message.centered {
    text-align: center;
    margin-bottom: 15px;
    opacity: 1;
    max-width: none;
    transform: none;
}

.reveal-message.centered h2.why-title {
    font-size: clamp(2.5rem, 7vw, 6rem);
    letter-spacing: -0.02em;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.1;
}

.why-title .char {
    display: inline-block;
    filter: blur(15px);
    opacity: 0;
    transform: scale(1.1);
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.why-title .char.revealed {
    filter: blur(0px);
    opacity: 1;
    transform: scale(1);
}

#why-choose-us .reveal-sub {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 1.2s; /* Delayed reveal after header characters */
    margin: 0 auto;
}

#why-choose-us.active .reveal-sub {
    opacity: 1;
    transform: translateY(0);
}

.why-architectural-grid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 20vh;
}

.why-row {
    display: grid;
    grid-template-columns: 1fr 3px 1fr;
    min-height: 40vh;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.why-row:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.why-divider {
    background: #e63946; /* Accent color for the divider */
    height: 0;
    transition: height 1.5s cubic-bezier(0.2, 1, 0.3, 1);
    align-self: center;
}

.why-row.revealed .why-divider {
    height: 80%; /* Divider grows when row is revealed */
}

.why-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 8%;
    opacity: 0;
    transform: translateY(30px);
    filter: blur(10px);
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.why-col.left {
    text-align: right;
    align-items: flex-end;
}

.why-col.right {
    text-align: left;
    align-items: flex-start;
}

.why-row.revealed .why-col {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
}

.why-row.revealed .why-col.left { transition-delay: 0.1s; }
.why-row.revealed .why-col.right { transition-delay: 0.3s; }

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.card-icon svg {
    width: 20px;
    height: 20px;
}

.card-icon.check {
    background: rgba(230, 57, 70, 0.15);
    color: #e63946;
}

.card-icon.cross {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.3);
}

.why-col h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.why-col p {
    font-size: 1.2rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
    max-width: 450px;
}

.why-col.left p {
    text-align: right;
}

.container-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.service-number {
    display: block;
    font-size: 0.8rem;
    color: #e63946; /* Accent color */
    letter-spacing: 0.2em;
    font-weight: 700;
    margin-bottom: 20px;
}

.service-item h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.service-item p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    max-width: 450px;
}

.hero-text h1 {
    display: flex;
    flex-wrap: nowrap; /* Prevent words from wrapping to new lines */
    justify-content: center;
    gap: 0.3em;
}

.word {
    display: inline-block;
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}

.char {
    display: inline-block;
    will-change: transform, opacity, filter;
}

/* Contour Background */
.contour-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; /* Behind content but fixed */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    /* Masking controlled by JS velocity/direction */
    -webkit-mask-image: linear-gradient(var(--reveal-dir, to bottom), rgba(0,0,0,1) 0%, rgba(0,0,0,0) var(--reveal-strength, 0%));
    mask-image: linear-gradient(var(--reveal-dir, to bottom), rgba(0,0,0,1) 0%, rgba(0,0,0,0) var(--reveal-strength, 0%));
}

.contour-container.active {
    opacity: 1;
}

.contour-container svg {
    width: 100%;
    height: 100%;
    transform: scale(1.2); /* Slight scale to overfill */
}

/* Tech Stack Section */
.tech-stack {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px;
    position: relative;
    z-index: 10;
}

/* Tech Marquee */
.tech-marquee {
    width: 100%;
    padding: 70px 0;
    overflow: hidden;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
}

.marquee-label {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0.9;
    z-index: 15;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 4px;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    width: max-content;
    will-change: transform;
}

/* Duplicate for seamless loop */
.marquee-content::after {
    content: '';
    display: flex;
}

.marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 50px;
    height: 80px;
    color: #ffffff;
    transition: all 0.4s ease;
    cursor: pointer;
}

.marquee-item svg {
    width: 60px;
    height: 60px;
    opacity: 1;
    transition: all 0.4s ease;
}

.marquee-item:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.5));
}

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

/* Duplicate the items in HTML for seamless loop or use JS. 
   Since we want a simple solution, let's just duplicate them once in HTML. */

/* Process & Blue Sections Container to control sticky behavior */
.process-blue-container {
    position: relative;
    width: 100%;
}

/* Process Section - Massive Unblur Reveal */
.process {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 5;
    overflow: hidden;
}

.process-content {
    width: 100%;
    max-width: 1800px;
    padding: 0 5vw;
}

.process-title {
    font-size: clamp(4rem, 15vw, 12rem);
    text-align: center;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #ffffff;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.process-title .char {
    display: inline-block;
    filter: blur(15px);
    opacity: 0;
    transform: scale(1.1);
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

/* Character reveal class to be controlled by scrollProgress in JS */
.process-title .char.revealed {
    filter: blur(0px);
    opacity: 1;
    transform: scale(1);
}

/* Blue Section Split Layout */
/* Blue Sections - Split Content Layout */
.blue-sections-wrapper {
    position: relative;
    width: 100%;
    padding: 10vh 0;
    background: #457b9d; /* The blue background */
    z-index: 20; /* Bring above sticky process and blob */
}

.process-row {
    display: grid;
    grid-template-columns: 1fr 3px 1fr;
    min-height: 60vh;
    width: 100%;
}

.process-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 10%;
}

.process-col.left {
    text-align: right;
    align-items: flex-end;
}

.process-col.right {
    text-align: left;
    align-items: flex-start;
}

.continuous-divider {
    position: absolute;
    top: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 20;
    height: 0px; 
    transition: height 0.1s linear;
}

.split-content-block {
    max-width: 500px;
    margin-bottom: auto; /* Push content apart */
}

.process-row .split-content-block > * {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(10px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

.process-row.revealed .split-content-block > * {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
}

.process-row.revealed .split-content-block h2 { transition-delay: 0.1s; }
.process-row.revealed .split-content-block p { transition-delay: 0.2s; }

/* Specific position adjustments based on references */
.align-bottom {
    margin-top: auto;
    margin-bottom: 10vh;
}

.align-bottom-offset {
    margin-top: auto;
    margin-bottom: 25vh;
}

.offset-text {
    margin-top: 40vh;
    margin-bottom: 15vh;
}

.offset-text-top {
    margin-top: 15vh;
}

/* Typography for Blue Sections */
.split-title {
    font-family: 'Inter', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 20px;
}

.split-content-block p {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 500px;
    margin: 0;
}

.process-col.left .split-content-block p {
    margin-left: auto;
}

.split-content-block p::before {
    content: '○';
    margin-right: 10px;
    font-size: 0.8rem;
    vertical-align: middle;
    opacity: 0.6;
}

/* Specific Alignment Utilities */
.process-row:nth-child(even) .process-col.left {
    padding-top: 18vh;
}

.process-row:nth-child(odd) .process-col.right {
    padding-top: 18vh;
}

.contact:not(.contact-loop) {
    margin-top: 250px; /* Space from preceding section - only for real contact */
}

.contact {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: transparent; /* Reveal global blobs */
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 100px 0;
    overflow: hidden;
}

.contact-container {
    width: 100%;
    max-width: 1400px;
    padding: 0 5vw;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 100px;
    padding-bottom: 50px;
}

.contact-header {
    text-align: left;
    margin-bottom: 60px;
}

/* Removed revealed class dependencies for header/grid opacity from CSS as they'll be handled by character level reveals or simpler transitions if needed */
.contact-header h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.9;
    margin-bottom: 20px;
}

.contact-intro {
    font-size: 14px;
    letter-spacing: 0.3em;
    color: var(--dim-text);
    text-transform: uppercase;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 100px;
    flex-grow: 1;
}

/* Removed revealed class dependencies */
/* Glassmorphism Form */
.glass-form {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    height: 120px;
    resize: none;
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 0;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--dim-text);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    font-size: 8px;
    color: #e63946;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #e63946;
}

.contact-btn {
    position: relative;
    padding: 20px 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 3px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s ease;
    align-self: flex-start;
}

.contact-btn span {
    position: relative;
    z-index: 2;
}

.btn-hover-fill {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #e63946;
    transition: left 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    z-index: 1;
}

.contact-btn:hover {
    border-color: #e63946;
}

.contact-btn:hover .btn-hover-fill {
    left: 0;
}

/* Contact Info */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 60px;
    justify-content: center;
}

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

.info-label {
    font-size: 12px;
    letter-spacing: 0.2em;
    color: #e63946;
    font-weight: 700;
}

.info-link, .info-text {
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.info-link:hover {
    color: #e63946;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
}

.social-link {
    font-size: 13px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: white;
}

/* Footer */
.contact-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.3);
}

.footer-pill {
    padding: 6px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   RESPONSIVE – TABLET  (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .contact-container {
        padding-top: 80px;
        overflow-y: auto;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .why-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        min-height: auto;
    }

    .why-divider { display: none; }

    .why-col {
        padding: 40px 6%;
        text-align: left;
        align-items: flex-start;
    }
    .why-col.left { text-align: left; align-items: flex-start; }
    .why-col.left p { text-align: left; }

    /* Process section: keep desktop 2-column layout at tablet,
       just tighten the row height and padding */
    .process-row {
        min-height: 40vh;
    }
    .process-col {
        padding: 30px 5%;
    }
}

.contact-header h1 .char {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px) scale(1.1);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

/* Form Input Enhancements */
.form-group input:hover,
.form-group textarea:hover {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #e63946;
}

/* ============================================================
   RESPONSIVE – MOBILE  (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* --- Page frame --- */
    .page-frame {
        top: 10px; left: 10px; right: 10px; bottom: 10px;
        border-radius: 20px;
        box-shadow: 0 0 0 20vmax #ffffff;
    }

    /* --- Nav / Header --- */
    header {
        padding: 20px 24px;
    }

    .nav-links {
        display: none;
    }

    .logo img {
        height: 32px;
    }

    /* Fit mobile menu inside the 10px frame */
    .mobile-menu {
        top: 10px;
        left: 10px;
        right: 10px;
        border-radius: 20px;
    }

    /* Show hamburger on mobile */
    .hamburger {
        display: flex;
    }

    /* --- Hero section --- */
    .hero {
        padding: 24px;
        height: 100svh;
    }

    h1.font-condensed {
        font-size: clamp(2.6rem, 11vw, 5rem);
        line-height: 1;
    }

    /* Allow words to wrap on small screens */
    .hero-text h1 {
        flex-wrap: wrap;
        gap: 0.1em;
        justify-content: center;
    }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .hero-mission {
        font-size: 13px;
        max-width: 100%;
        line-height: 1.5;
    }

    .bottom-marker {
        font-size: 14px;
        margin-bottom: 0;
    }

    .scroll-tag {
        font-size: 11px;
        bottom: 20px;
    }

    .hud-marker.top-right { top: 20px; right: 20px; }

    /* --- Blob – scale down for mobile --- */
    .blob-container {
        width: 340px;
        height: 340px;
    }

    .blob-container::before {
        width: 300px;
        height: 300px;
    }

    .blob-1 { width: 260px; height: 260px; left: 40px; top: 40px; }
    .blob-2 { width: 210px; height: 210px; left: 65px; top: 65px; }
    .blob-3 { width: 160px; height: 160px; left: 90px; top: 90px; }
    .blob-4 { width: 120px; height: 120px; left: 110px; top: 110px; }



    /* --- Scroll-reveal sections --- */
    .scroll-reveal {
        padding: 60px 24px;
        height: auto;
        min-height: 100vh;
    }

    .reveal-message h2 {
        font-size: clamp(2rem, 9vw, 3.5rem);
        margin-bottom: 24px;
    }

    .reveal-sub {
        font-size: 0.95rem;
    }

    /* --- Services — centre-align on mobile --- */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-top: 50px;
    }

    /* Centre the OUR SERVICES heading & sub on mobile */
    #services .reveal-message {
        text-align: center;
    }
    #services .reveal-sub {
        margin: 0 auto;
        text-align: center;
    }
    #services .service-item {
        text-align: center;
    }
    #services .service-number {
        text-align: center;
    }

    .service-item h3 {
        font-size: 1.8rem;
    }

    /* --- Tech Marquee — smaller icons, more logos visible --- */
    .tech-marquee {
        padding: 44px 0 36px; /* tighter vertical to show more of the track */
    }

    .marquee-label {
        top: 14px;
        font-size: 10px;
        letter-spacing: 3px;
        white-space: nowrap;
    }

    .marquee-item {
        padding: 0 22px;   /* narrower gaps between logos */
        height: 54px;
    }

    .marquee-item svg {
        width: 36px;
        height: 36px;
    }

    /* --- Performance: disable expensive blur filters on mobile --- */
    /* Blur compositing forces many GPU layers; opacity+transform alone is smooth */
    .why-col {
        filter: none;
        transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .process-row .split-content-block > * {
        filter: none;
        transition: opacity 0.5s cubic-bezier(0.2, 1, 0.3, 1),
                    transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    }

    .reveal-message {
        filter: none;
    }

    /* Why-title chars: skip blur, just fade+scale */
    .why-title .char {
        filter: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    .why-title .char.revealed {
        filter: none;
    }

    /* Process title chars: skip blur */
    .process-title .char {
        filter: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    .process-title .char.revealed {
        filter: none;
    }

    /* Disable the contour SVG entirely — not visible on phones,
       but it eats rasterisation budget every scroll event */
    .contour-container { display: none; }

    /* --- Why Us --- */
    #why-choose-us {
        padding-top: 60px;
        margin-top: 60px;
    }

    .reveal-message.centered h2.why-title {
        font-size: clamp(2rem, 9vw, 3.5rem);
    }

    .why-col h3 { font-size: 2rem; }
    .why-col p  { font-size: 1rem; }
    .why-col    { padding: 30px 24px; }

    /* --- Process section: desktop-identical 2-column layout, just scaled --- */
    .process-row {
        grid-template-columns: 1fr 3px 1fr; /* restore the divider column */
        min-height: 55vh; /* enough height so content sits at screen centre */
    }

    /* Re-enable the 3px accent bar between the two columns */
    .process-divider {
        display: block;
    }

    /* Re-enable the continuous growing line animation */
    .continuous-divider {
        display: block;
    }

    /* Place content just below centre: flex-start + padding pushes it
       to ~55% from the top of each row / the screen */
    .process-col {
        padding: 0 4%;
        justify-content: flex-start;
        padding-top: 28vh; /* shifts content just past the midpoint */
    }
    .process-col.left {
        text-align: right;
        align-items: flex-end;
        border-bottom: none;
    }
    .process-col.right {
        text-align: left;
        align-items: flex-start;
    }
    .process-col.left .split-content-block p { margin-left: auto; }

    /* Keep the staggered-offset rows — smaller on mobile */
    .process-row:nth-child(even) .process-col.left,
    .process-row:nth-child(odd)  .process-col.right {
        padding-top: 34vh; /* slightly lower for the offset columns */
    }

    .split-title    { font-size: 1.8rem; }
    .split-content-block p { font-size: 0.82rem; line-height: 1.5; }

    /* --- Process section --- */
    .process-title {
        font-size: clamp(2.5rem, 12vw, 6rem);
    }

    /* --- Contact --- */
    .contact {
        padding: 60px 0;
    }

    .contact-container {
        padding: 60px 24px 40px;
    }

    .contact-header {
        margin-bottom: 40px;
    }

    .contact-header h1 {
        font-size: clamp(2rem, 9vw, 3.5rem);
    }

    .glass-form {
        padding: 32px 20px;
        gap: 28px;
    }

    .info-link, .info-text {
        font-size: 1.1rem;
    }

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

/* ============================================================
   RESPONSIVE – SMALL PHONE  (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
    h1.font-condensed {
        font-size: clamp(2rem, 12vw, 3.5rem);
    }

    .hero { padding: 16px; }

    header { padding: 16px 18px; }

    .logo img {
        height: 28px;
    }

    /* Fit mobile menu inside the 6px frame */
    .mobile-menu {
        top: 6px;
        left: 6px;
        right: 6px;
        border-radius: 14px;
    }

    .blob-container {
        width: 260px;
        height: 260px;
    }

    .blob-1 { width: 200px; height: 200px; left: 30px; top: 30px; }
    .blob-2 { width: 160px; height: 160px; left: 50px; top: 50px; }
    .blob-3 { width: 120px; height: 120px; left: 70px; top: 70px; }
    .blob-4 { width:  90px; height:  90px; left: 85px; top: 85px; }

    .page-frame {
        top: 6px; left: 6px; right: 6px; bottom: 6px;
        border-radius: 14px;
        box-shadow: 0 0 0 12vmax #ffffff;
    }

    .scroll-reveal { padding: 50px 18px; }
    .glass-form    { padding: 24px 14px; }
    .contact-container { padding: 50px 18px 30px; }
}


@media (max-width: 768px) {
    .hero-bottom {
        padding-bottom: 40px; /* Push the contents slightly up on mobile */
    }
}

/* ============================================================
   PAGE TRANSITIONS & ABOUT PAGE
   ============================================================ */
.page-transition {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #0d0d0d;
    z-index: 9999;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1);
}

.page-transition.is-entering {
    transform: translateY(-100%);
}

.page-transition.is-active {
    transform: translateY(0);
    pointer-events: auto;
}

.founders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding-top: 20px;
}

.founder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 40px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.founder-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.founder-image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.founder-image-placeholder span {
    font-size: 3rem;
    color: var(--accent-color);
    opacity: 0.8;
}

.founder-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
