@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Instrument+Serif:ital@0;1&display=swap");

:root {
    --base-100: #ebf5df;
    --base-200: #fec81d;
    --base-300: #0f0f0f;
}

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

html {
    background-color: #0f0f0f;
    overscroll-behavior-y: none;
    height: 100%;
}

body {
    background-color: #0f0f0f;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100%;
}

/* Premium Thin Yellow Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 15, 15, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #fec81d 0%, #d4a817 100%);
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffd84d 0%, #fec81d 100%);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #fec81d rgba(15, 15, 15, 0.3);
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1,
h2 {
    text-transform: uppercase;
    font-family: "Instrument Serif", sans-serif;
    font-weight: 500;
    line-height: 0.9;
}

h1 {
    font-size: clamp(4rem, 7.5vw, 10rem);
}

h2 {
    font-size: clamp(2.5rem, 4.5vw, 5rem);
}

p {
    font-family: "Instrument Sans", sans-serif;
    font-size: 1.125rem;
    font-weight: 400;
}

/* Transition Layers - Simple Logo Overlay */
.logo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0f0f0f;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    /* This ensures the page is BLACK immediately on load if we're transitioning */
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* State for when the page is actually "locked" during transition */
.logo-overlay.active,
html.is-transitioning .logo-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Force scroll lock when transitioning */
html.is-transitioning,
html.is-transitioning body {
    overflow: hidden !important;
    height: 100% !important;
}

.transition-lottie-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f0f0f;
}

#transition-lottie {
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

/* Main Navigation bar at top */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    /* Must be above everything else */
}

.nav-toggle-btn {
    width: 60px;
    height: 60px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10rem;
    cursor: pointer;
}

.nav-toggle-btn span {
    width: 100%;
    height: 1.25px;
    background-color: var(--base-100);
    will-change: transform;
}

.menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    /* Hidden by default */
    z-index: 90;
    overflow: hidden;
}

.menu.active {
    pointer-events: all;
}

.menu-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
}

.menu-bg-left,
.menu-bg-right {
    position: relative;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.menu-bg-left-inner,
.menu-bg-right-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #171717;
    will-change: transform;
}

/* Initial "Closed" states */
.menu-bg-left-inner {
    transform-origin: 100% 50%;
    transform: rotate(180deg) scale(2);
    left: 2px;
    /* Overlap by 1px to hide the seam */
}

.menu-bg-right-inner {
    transform-origin: 0% 50%;
    transform: rotate(-180deg) scale(2);
    right: 2px;
    /* Overlap by 1px to hide the seam */
}

.menu-items {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

.menu-items-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Makes links shrink to content width */
}

.menu-link {
    overflow: hidden;
    margin-bottom: 1rem;
}

.menu-link a {
    display: block;
    font-family: "Instrument Serif", serif;
    font-size: clamp(2rem, 4vw, 5rem);
    color: var(--base-100);
    text-decoration: none;
    transform: translateY(100%);
}

.hero {
    position: relative;
    /* Removed margin-top to fix white strip */
    width: 100%;
    height: 170dvh;
    color: var(--base-200);
    overflow: hidden;
    clip-path: inset(0);
    /* Ensure no background bleed */
    background-color: #0f0f0f;
}

.hero.dark-mode {
    background-color: #0f0f0f;
}

.hero-img {
    width: 100%;
    height: 100%;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    z-index: 2;
    pointer-events: none;
}

.hero-header {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    z-index: 1;
    /* Move behind hero-canvas (z-index: 2) */
    pointer-events: none;
    /* Let clicks pass through to flames/interaction beneath */
    opacity: 1;
    /* Explicitly full opacity on load */
    transition: opacity 0.5s ease;
}

.hero-header p {
    width: 75%;
}

.hero-tagline {
    font-family: "Instrument Serif", serif;
    font-size: clamp(0.55rem, 1.5vw, 1.9rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--base-200);
    margin-bottom: 0;
}

.hero-title {
    font-family: "Instrument Serif", serif;
    font-size: clamp(4rem, 7vw, 12rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--base-200);
    margin: 0;
}

.hero-subtitle {
    font-family: "Instrument Serif", serif;
    font-size: clamp(0.55rem, 1.5vw, 1.9rem);
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--base-200);
    margin-top: 0.5rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.scroll-indicator p {
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: capitalize;
    color: var(--base-200);
    margin: 0;
}

.scroll-line {
    width: 1.5px;
    height: 50px;
    background: linear-gradient(to bottom, var(--base-200), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

.projects {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #6e6e6e;
    /* Match dark theme */
    z-index: 10;
    /* Ensures it sits above if we add sticky later, but good to have */
    padding: 10vh 2rem;
    overflow: hidden;
    margin-top: 0;
}

/* GSAP Pin Spacer Reset */
.pin-spacer {
    margin: 0 !important;
    padding: 0 !important;
    background-color: #0f0f0f !important;
}

.projects-container {
    text-align: center;
    font-family: "Instrument Serif", serif;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 1;
        transform: translateY(0);
    }

    50% {
        opacity: 0.5;
        transform: translateY(10px);
    }
}

/* Griflan-style Section */
/* Griflan-style Section */
.projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Start from top */
    /* Maintain existing props */
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #0f0f0f;
    /* Match theme */
    z-index: 10;
    padding: 15vh 2rem 10vh 2rem;
    /* More top padding */
    overflow: hidden;
    margin-top: 0;
}

.griflan-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 3rem;
    position: relative;
}

.magnetic-wrap {
    display: block;
    position: relative;
    will-change: transform;
}

.griflan-title {
    font-family: "Instrument Serif", serif;
    /* Massive desktop size, scaling down for mobile */
    font-size: clamp(3.5rem, 6vw, 16rem);
    line-height: 0.9;
    color: #ffffff;
    text-transform: none;
    /* Griflan uses sentence case */
    margin: 0;
    max-width: 3000px;
}

.griflan-desc {
    font-family: "Instrument Serif", serif;
    font-size: clamp(2rem, 3.5vw, 4rem);
    /* Much larger body text too */
    line-height: 1.1;
    color: #ffffff;
    /* Match title color initially or use off-white */
    opacity: 0.9;
    max-width: 3000px;
    /* Wider container */
    text-transform: none;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.hero-content {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    /* Ensures elements stack vertically */
    justify-content: flex-end;
    /* Centers vertically */
    padding-bottom: 22dvh;
    align-items: center;
    /* Centers horizontally */
    text-align: center;
    z-index: 5;
    overflow: hidden;
}

.hero-content h2 {
    width: 75%;
    margin: 0 auto;
    /* Extra insurance for centering */
    color: #666666;
    display: block;
    /* Ensures it respects text-align */
}

/* Decorative Elements */

/* Position decorative elements to be visible in the content area */
/* Updated Decorative Elements in styles.css */
.decorative-elements {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 150px;
    /* Base height for centering */
    display: none;
    /* Keep it completely removed initially */
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.laurel-wreath {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(100px, 8vw, 150px);
    height: auto;
    object-fit: contain;
    opacity: 0.7;
    filter: drop-shadow(0 0 15px rgba(254, 200, 29, 0.2));
    z-index: 1;
}

.flame-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    /* High z-index to stay above text */
    z-index: 100 !important;
    /* Ensure it's above the h2 text */
    pointer-events: auto;
    /* Changed to auto to allow dragging */
    cursor: grab;
    /* Indicate draggable */

    /* Stronger spotlight glow */
    filter: drop-shadow(0 0 30px rgba(255, 102, 0, 0.8));
    will-change: transform;

    /* Stronger, more realistic fire light */

    /* Screen blending makes the light "add" to the text colors */
    mix-blend-mode: screen;

    /* Disable touch actions to prevent scrolling while dragging */
    touch-action: none;
}

.mobile-instruction {
    position: absolute;
    top: -40px;
    /* Position above the elements */
    left: 50%;
    transform: translateX(-50%);
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
    /* Hidden by default */
}

/* Show instruction only on touch devices/small screens */
@media (pointer: coarse) {
    .mobile-instruction {
        display: block;
        opacity: 0.7;
    }
}

/* Background and Text Transition */
.hero-content {
    transition: background-color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-content.dark-mode {
    background-color: #0f0f0f;
    /* Light black / Charcoal */
}

.hero-content h2 {
    transition: color 1s ease;
}

.hero-content.dark-mode h2 {
    /* Ensure default text is quite dark so the spotlight pops */
    color: #444444;
    transition: none;
    /* Let GSAP handle the transition for smoothness */
}

/* Enhanced Realistic Fire Glow */
.flame-animation {
    /* Multiple layered shadows to simulate real fire:
           - Intense orange-red core (innermost)
           - Bright orange middle layer
           - Warm yellow outer glow
           - Subtle amber spread */
    filter:
        drop-shadow(0 0 15px rgba(255, 80, 0, 1))
        /* Intense orange core */
        drop-shadow(0 0 30px rgba(255, 120, 0, 0.9))
        /* Bright orange */
        drop-shadow(0 0 50px rgba(255, 180, 30, 0.7))
        /* Warm yellow */
        drop-shadow(0 0 70px rgba(255, 200, 50, 0.4));
    /* Amber spread */
    will-change: transform;
    pointer-events: none;
    /* Mouse passes through to the container */
}

/* Hide laurel wreath on mobile */
@media (max-width: 768px) {
    .laurel-wreath {
        display: none !important;
    }

    /* Resize hamburger menu for mobile */
    .nav-toggle-btn {
        width: 40px;
        height: 40px;
        padding: 12px;
        gap: 4px;
    }

    /* Mobile Menu Customization: Single Panel Wipe & Center Align */
    .menu-bg-left {
        width: 100%;
        /* Take full width */
    }

    .menu-bg-right {
        display: none;
        /* Hide right panel */
    }

    .menu-items {
        flex-direction: column;
        gap: 2rem;
        padding-top: 4rem;
        /* Add some top padding if needed */
    }

    .menu-items-col {
        align-items: center;
        /* Center align text */
        text-align: center;
    }

    .menu-link a {
        font-size: 2rem;
        /* Slightly smaller font for mobile if needed */
    }
}

/* Prevent text selection and zoom on touch devices */
.hero-content {
    user-select: none;
    -webkit-user-select: none;
}

/* Ensure the flame is the only thing receiving touch events for dragging */
.flame-animation {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.about p {
    width: 40%;
    text-align: center;
}

@media (max-width: 1000px) {

    .hero-content h2,
    .about p {
        width: calc(100% - 4rem);
    }
}

/* Project Cards Grid */
/* Project Cards Grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin-top: 6rem;
    /* More space */
    padding: 0 2rem;
}

.work-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */
    border-radius: 24px;
    /* Softer */
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    cursor: pointer;
    overflow: hidden;
    /* For inner glow effects */
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.4s ease,
        background 0.4s ease,
        box-shadow 0.4s ease;
}

.work-card:hover {
    transform: translateY(-12px);
    border-color: rgba(254, 200, 29, 0.4);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.work-card-img {
    width: 100%;
    aspect-ratio: 16/10;
    /* cinematice aspect ratio */
    background-color: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

/* Gradient overlay for depth */
.work-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.work-card:hover .work-card-img::after {
    opacity: 0.3;
    /* Reveal image more on hover */
}

/* Placeholder gradient - subtle animation */
.work-card-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #222, #333, #222);
    background-size: 200% 200%;
    animation: shine 8s ease infinite;
}

@keyframes shine {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.work-card-info {
    text-align: left;
    padding: 0 0.5rem 0.5rem 0.5rem;
}

.work-card h3 {
    font-family: "Instrument Serif", serif;
    font-size: 2.2rem;
    /* Larger */
    color: #ffffff;
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.work-card p {
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 1000px) {
    .work-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 3rem;
        /* More gap on mobile */
    }
}

/* View More Button Container */
.view-more-container {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: 10;
    position: relative;
    padding-bottom: 2rem;
}

/* Neomorphism / Glassmorphism Button */
.view-more-btn {
    position: relative;
    padding: 1.25rem 3.5rem;
    font-family: "Instrument Sans", sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    /* Pill shape */
    border: 1px solid rgba(255, 255, 255, 0.1);

    /* Neomorphism Shadows */
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 4px 10px rgba(0, 0, 0, 0.2);

    backdrop-filter: blur(5px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);

    display: inline-flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

/* Inner Shine Effect */
.view-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.view-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(254, 200, 29, 0.6);
    /* Yellow glow */
    color: #fec81d;
    box-shadow:
        0 0 20px rgba(254, 200, 29, 0.2),
        inset 0 0 15px rgba(254, 200, 29, 0.1);
    transform: translateY(-3px) scale(1.02);
}

.view-more-btn:hover::before {
    left: 100%;
    /* Shine passes through */
}

@media (max-width: 768px) {
    .view-more-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
        width: auto;
        white-space: nowrap;
    }
}

/* Capabilities Section */
.capabilities-section {
    width: 100%;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.geo-title {
    font-family: "Instrument Serif", serif;
    font-size: clamp(3rem, 7vw, 9rem);
    line-height: 0.95;
    color: #fec81d;
    /* Or white to match screenshot */
    margin: 0;
    text-transform: none;
}

.capability-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cap-item {
    font-family: "Instrument Serif", serif;
    font-size: clamp(4rem, 8vw, 10rem);
    line-height: 0.9;
    color: #fec5c5;
    /* Approx matching reddish-orange */
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: -0.02em;
    cursor: default;

    /* Make the text color closely match the screenshot's reddish/salmon tone */
    color: #ff5e3a;

    /* Optional: Stroke or Glow for style */
    text-shadow: 0 0 50px rgba(255, 94, 58, 0.2);

    transition: transform 0.3s ease,
        color 0.3s ease;
}

.cap-item:hover {
    transform: scale(1.05) skewX(-5deg);
    color: #ff3300;
    /* Burn effect */
}

/* Footer (Xeroz Style - Grid Box) */
.site-footer {
    width: 100%;
    background-color: #0f0f0f;
    color: #ffffff;
    padding: 0;
    position: relative;
    z-index: 10;
    margin-top: 10rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    user-select: none;
    /* Disable text selection */
    -webkit-user-select: none;
}

.footer-top {
    display: grid;
    grid-template-columns: 2.5fr 1.3fr;
    /* Equal split or adjust as needed */
    width: 100%;
    min-height: 420px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 50;
    padding-right: 10rem;
    /* ADD THIS: */
    pointer-events: none;
}


.footer-vertical-text {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo svg {
    width: 250px;
    /* Bigger logo for the bigger footer */
    height: auto;
    opacity: 0.9;
}

/* Right Nav Block: Stacked links on the right */
.footer-nav {
    display: flex;

    flex-direction: column;
    /* Pushes links to the right */
    align-items: flex-end;
    /* Centers block vertically in the row */
    justify-content: flex-start;

    height: 100%;
    /* Reset offsets */
    padding-top: 5rem;
    padding-right: 15rem;
    pointer-events: none;
    /* Container doesn't block events */
}

.footer-nav a {
    pointer-events: auto;
    /* Links still clickable */
}

.footer-nav a {
    display: inline-block;
    width: auto;
    align-self: flex-end;
    /* Increased size */
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-family: "Instrument Serif", serif;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    /* Consistent gap */
    padding: 0.8rem 0;
    text-align: right;
    transition: all 0.4s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: auto;
    /* Ensure links are clickable */
}

.footer-nav a:last-child {
    border-bottom: none;
}

.footer-nav a:hover {
    color: #fec81d;
    transform: translateX(-10px) scale(1.05);
    /* Slide left on hover */
}

/* Ensure Logo box stays clean on the left */
.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 100;
    /* ADD THIS: */
    pointer-events: auto;
}

/* Bottom Section: Increased padding for more height */
.footer-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    min-height: 180px;
    position: relative;
    z-index: 10;
    /* Lower than footer-top */
}

#footer-rive-canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    z-index: 1;
    /* Keep it below the nav links but inside the auto-pointer container */
}

.footer-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Center vertically in column */
    align-items: center;
    /* Center horizontally */
    text-align: center;
    /* Center text */
    gap: 1.2rem;
    /* Reduced from 1.5rem */
    padding: 2rem 1.5rem;
    /* Reduced from 3rem 2rem */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col:last-child {
    border-right: none;
}

.footer-col h4 {
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.footer-col a,
.copyright {
    font-family: "Instrument Sans", sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #fec81d;
}

/* Subscribe Form */
.subscribe-form {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

.subscribe-form input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: "Instrument Sans", sans-serif;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.subscribe-form button {
    background: transparent;
    border: none;
    color: #fec81d;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.subscribe-form button:hover {
    transform: translateX(5px);
}

/* --- Mobile Footer Strategy (Separate DOM) --- */

/* 1. Hide Mobile Footer by Default (Desktop) */
.mobile-site-footer {
    display: none;
}

@media (max-width: 900px) {

    /* 1. Hide desktop version */
    .site-footer {
        display: none !important;
    }

    /* 2. Force the mobile footer to be a standard block element */
    .mobile-site-footer {
        display: flex !important;
        flex-direction: column;
        width: 100% !important;
        background-color: #0f0f0f !important;
        /* Top border for the whole footer */
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        height: auto !important;
        position: relative !important;
    }

    /* 3. The Nav Grid - Now purely a layout element, not a sticky one */
    .mobile-footer-nav {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        width: 100% !important;
        height: auto !important;
        position: relative !important;
        /* Reset inherited nav padding */
        padding: 0 !important;
        margin: 0 !important;
        top: auto !important;
        left: auto !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .mobile-footer-nav a {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 2rem 1rem !important;
        font-family: "Instrument Serif", serif !important;
        font-size: 1.4rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
        /* Remove any desktop hover transforms that pull it out of place */
        transform: none !important;
    }



    .mobile-footer-nav a:nth-child(3),
    .mobile-footer-nav a:nth-child(4) {
        border-bottom: none !important;
    }

    /* 4. Contact, Connect, Others Blocks */
    .mobile-footer-contact,
    .mobile-footer-connect,
    .mobile-footer-others {
        display: block !important;
        padding: 2rem 2rem !important;
        /* Reduced vertical padding slightly */
        text-align: center !important;
        height: auto !important;
        position: relative !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .mobile-footer-others {
        border-bottom: none !important;
    }

    .mobile-footer-contact h4,
    .mobile-footer-connect h4,
    .mobile-footer-others h4 {
        margin-bottom: 1rem !important;
        color: rgba(255, 255, 255, 0.4) !important;
        font-size: 0.8rem !important;
        text-transform: uppercase !important;
    }

    .mobile-footer-contact a,
    .mobile-footer-connect a,
    .mobile-footer-others a,
    .mobile-footer-others span {
        font-size: 1.2rem !important;
        color: #ffffff !important;
        text-decoration: none !important;
        display: block !important;
        margin-bottom: 0.5rem !important;
    }

    .mobile-footer-others span.copyright {
        font-size: 0.9rem !important;
        color: rgba(255, 255, 255, 0.5) !important;
        margin-top: 1rem !important;
    }
}

/* Rive Canvas Styling */
#footer-rive-canvas {
    width: 100%;
    height: 100%;
    display: block;
    /* object-fit: cover; REMOVED to fix Rive hit testing */
}