:root {
    --cream: #FDFBF7;
    --purple: #8B26FD;
    /* Logo Purple */
    --blue: #51abc5;
    /* Logo Blue */
    --white: #ffffff;
    --dynamic-blur: 20px;
    /* Restored: Start blurred on load */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--cream);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    color: white;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 60px;
    /* Reduced vertical padding slightly for better fit */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}

/* Blurred Top Bar Effect */
nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    /* Covers the nav area */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Fade out the blur at the bottom */
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    z-index: -1;
}

/* --- Solid Navbar for Subpages --- */
.solid-nav {
    background: rgba(81, 171, 197, 0.45) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Light background pages require dark link text fixes */
.dark-nav .nav-links a {
    color: #2e3231 !important;
}

.dark-nav .hamburger {
    color: #2e3231 !important;
}

.dark-nav .dropdown-content {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

.dark-nav .dropdown-content a {
    color: #2e3231 !important;
}

.dark-nav .dropdown-content a:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

/* --- Standardized Logo Sizing --- */
.main-logo {
    height: 42px !important; /* Increased 30% from 32px */
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
    pointer-events: auto;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.6;
    transition: 0.3s;
}

.nav-links a:hover {
    opacity: 1;
}

/* --- Navigation Dropdown --- */
.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    transform: translateY(-0.5px); /* Nudge up to match baseline (dropped 2px per request) */
}

.dropdown-content {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    min-width: 110px; /* Made narrower (from 140px) */
    box-shadow: 0px 8px 25px rgba(0,0,0,0.06);
    z-index: 1000;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 8px 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(12px);
}

.dropdown-content a {
    color: #2e3231 !important;
    padding: 10px 12px;
    text-decoration: none !important;
    display: flex !important;
    justify-content: center; /* Centered horizontally */
    align-items: center;
    gap: 6px;
    font-size: 0.8rem !important;
    text-transform: none !important;
    font-weight: 500 !important;
    opacity: 0.85 !important;
    transition: background 0.2s, opacity 0.2s;
    text-align: center; /* Centered text */
    border-bottom: none !important;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1 !important;
}

/* --- Reusable Aurora Gradient Text --- */
.aurora-glow-text {
    background: linear-gradient(45deg, #0099cc, #9900ff, #ffff00, #00ffff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: aurora-text 4s ease infinite alternate;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4), 0 0 18px rgba(0, 194, 255, 0.3);
}

@keyframes aurora-text {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes textGlowPulse {
    0%, 100% {
        opacity: 0.6;
        text-shadow: 0 0 4px rgba(255, 255, 255, 0);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 14px rgba(255, 255, 255, 0.4);
    }
}





.logo-container {
    pointer-events: auto;
    cursor: pointer;
}

.logo-container img {
    height: 58px; /* Increased 30% from 45px */
    width: auto;
    transition: opacity 0.4s ease-in-out;
}
.viewport {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.visual-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    background: var(--cream);
    z-index: 0;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.prairie-bg-blurred {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Same image but heavily blurred */
    background-image: url('assets/images/front-slides/kare-oklahoma-front-page-1.jpg');
    background-size: cover;
    background-position: center;
    /* Heavy Blur + Slight Scale to prevent edge bleeding */
    filter: brightness(0.5) blur(40px);
    transform: scale(1.1);
    opacity: 0;
    /* Hidden initially, fades in for section 2 */
}

.faq-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/envato-labs-image-edit-2.png');
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 0;
}

.cloud-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Cloud Image */
    background-image: url('assets/images/bg-clouds.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.65) contrast(1.1);
    opacity: 0;
    /* Hidden initially */
    z-index: 0;
}

.grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle Film Grain Noise Pattern */
    background-image: url('assets/images/noise-texture.png');
    background-size: 200px 200px;
    opacity: 0.25;
    /* Made 3x more pronounced */
    mix-blend-mode: overlay;
    z-index: 1;
    pointer-events: none;
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(var(--dynamic-blur));
    -webkit-backdrop-filter: blur(var(--dynamic-blur));
    /* Soft Selective Blur: Covers the text area and tapers off gently */
    mask-image: linear-gradient(to right, black 25%, transparent 85%);
    -webkit-mask-image: linear-gradient(to right, black 25%, transparent 85%);
    z-index: 2;
}

.mist {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.3;
}

.mist-purple {
    background: var(--purple);
    top: -10%;
    right: -10%;
}

.mist-blue {
    background: var(--blue);
    bottom: -10%;
    left: -5%;
}

.content-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.text-section {
    position: relative;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: auto;
}

.hero-text {
    pointer-events: auto;
    /* Hero is interactable on load */
}

.section-label {
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.5;
    margin-bottom: 20px;
    display: block;
}

h1,
h2 {
    font-family: 'Lora', serif;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-text h1 {
    font-size: clamp(1.1rem, 2.34vw, 1.98rem); /* Reduced 40% as requested */
}

.hero-text h1 a {
    color: #ffffff !important;
    text-decoration: none !important;
    text-shadow: 0 0 4px #ffffff, 0 0 12px rgba(255, 255, 255, 0.9), 0 0 25px rgba(255, 255, 255, 0.5);
    transition: all 0.33s ease;
}

.hero-text h1 a:hover {
    text-shadow: 0 0 6px #ffffff, 0 0 18px rgba(255, 255, 255, 1), 0 0 36px rgba(255, 255, 255, 0.7);
}

.who-we-are h2 {
    font-size: clamp(2.5rem, 6.5vw, 5.5rem);
}

.solitude-text {
    position: fixed; /* Floats continuously even when scrolling */
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%); /* Centered horizontally */
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 5vw, 4.5rem); /* Keeps title sized safely fitted on screen */
    font-weight: 300;
    text-transform: uppercase;
    color: white;
    opacity: 0.06 !important; /* Extremely low subtle opacity watermark look */
    pointer-events: none;
    z-index: 5;
    line-height: 1;
    letter-spacing: 12px; /* Reduced spacing to prevent clipping off screen right-edge bounds */
    max-width: calc(100% - 60px); 
    white-space: nowrap;
    text-align: center;
}

.description-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.6;
    font-weight: 400;
    max-width: 700px;
    margin: 30px auto 0;
    opacity: 1;
}

.motto {
    font-size: 12vw;
    font-family: 'Cormorant Garamond', serif;
    color: white;
    opacity: 0.05;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    font-style: italic;
}

/* FAQ STAGE 3 */
.faq-section {
    max-width: 700px;
    margin: 0 auto;
}

.faq-accordion-container {
    max-height: none; /* Expands to full list length */
    overflow-y: visible; 
    margin-top: 20px;
    padding: 5px 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.faq-accordion-container::-webkit-scrollbar {
    width: 5px;
}
.faq-accordion-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 20px;
    transition: background 0.3s ease;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-question {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.faq-arrow {
    font-size: 1.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, color 0.3s ease;
}

.faq-item.active .faq-arrow {
    transform: rotate(45deg);
    color: #ffffff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-top: 12px;
}

.faq-answer a {
    color: #ffffff !important;
    text-decoration: underline !important;
    opacity: 0.9;
}

.btn {
    margin: 40px auto 0;
    padding: 14px 40px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    display: inline-block;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.6);
    /* Slightly more visible border */
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    pointer-events: auto;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
}

.btn:hover {
    background: white;
    color: black;
    transform: translateY(-2px);
}

.who-we-are {
    opacity: 0;
    transform: translateY(40px);
}

/* Moving Lines Layer */
.lines-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    animation: slowDrift 22s infinite ease-in-out alternate;
}

@keyframes slowDrift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -10px) scale(1.03); }
    100% { transform: translate(-10px, 10px) scale(0.98); }
}

.moving-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 0.8px;
}

/* Text Blur Transition */
.blur-text {
    filter: blur(12px);
    opacity: 0;
}

.blur-text.active {
    filter: blur(0px);
    opacity: 1;
}

/* Light Particles */
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--moveX), var(--moveY)) scale(0.5);
        opacity: 0;
    }
}

/* Services Grid (Stage 5) */
.services-section {
    opacity: 0;
    transform: translateY(100vh);
    width: 100%;
    /* Full Screen Width */
    max-width: 100%;
    /* Override restriction for the background */
    padding: 200px 40px 40px;
    /* Increased top padding for softer fade */
    z-index: 20;
    margin: 0 auto;
    position: absolute;
    bottom: 0;
    /* Align to bottom for rising effect */

    /* much softer/longer top edge fade */
    /* much softer/longer top edge fade */
    /* background: #FDFBF7; removed for canvas */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 400px);
    mask-image: linear-gradient(to bottom, transparent 0%, black 400px);

    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    /* Ensure canvas stays inside */
}

/* Custom Gradient Background (User Request) */
.background--custom {
    background-color: #FFFFFF;
    width: 100%;
    height: 100%;
    position: absolute;
    overflow: hidden;
    z-index: -1;
    top: 0;
    left: 0;
}

canvas#canvas {
    z-index: -1;
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(0deg) scale(2) translateY(-10%);
    --gradient-color-1: #F1D7E7;
    --gradient-color-2: #A9DBF8;
    --gradient-color-3: #C0ABF5;
    --gradient-color-4: #FAF0D9;
    --gradient-speed: 0.000004;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 320px);
    /* Reduced height by 20% */
    gap: 15px;
    width: 100%;
    max-width: 1040px;
    /* Reduced width by 20% */
    margin-top: 50px;
    /* Ensure grid is centered */
    place-content: center;
}

.service-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease-out, opacity 0.6s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f0f5;
    /* Placeholder color before load */
    border-radius: 4px;
    filter: grayscale(0.1) brightness(0.9);
    opacity: 0.5;
    /* Dimmer before load */
}

.service-card.bg-loaded {
    opacity: 1;
}

/* Hover Expansion Effect */
.service-card:hover {
    transform: scale(1.05);
    z-index: 5;
    filter: grayscale(0) brightness(1.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Gradient Overlay for Text Readability */
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.service-card:hover::after {
    opacity: 1;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 2;
    color: white;
    text-align: center;
}

.card-title {
    font-family: 'Lora', serif;
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-desc {
    display: none;
    /* Hide descriptions as requested */
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.4;
    font-weight: 300;
    margin-bottom: 20px;
    max-width: 90%;
}

.read-more {
    display: none;
    /* Hide read more link */
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    /* display: flex; - disabled */
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.read-more::before {
    content: '•';
    font-size: 1.4rem;
    line-height: 0;
    transform: translateY(-1px);
}

/* Story Section (Stage 6) */
.story-section {
    position: absolute;
    /* Center using margins/absolute instead of transform translate to avoid conflict */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;

    width: 100%;
    max-width: 1200px;
    height: 80vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 10;

    /* Initial State: Hidden and Pushed Down */
    opacity: 0;
    transform: translateY(100vh);

    pointer-events: none;
}

/* When active */
.story-section.active {
    pointer-events: auto;
}

.story-content {
    flex: 1;
    max-width: 450px;
    padding-right: 50px;
    text-align: left;
}

.story-title {
    font-family: 'Lora', serif;
    font-size: 3.5rem;
    color: #2e3231;
    line-height: 1.1;
    margin-bottom: 30px;
    margin-top: 10px;
    font-weight: 400;
}

.story-desc {
    font-family: 'Inter', sans-serif;
    color: #2e3231;
    opacity: 0.7;
    line-height: 1.6;
    margin-bottom: 40px;
    font-weight: 300;
    font-size: 1rem;
}

.story-btn {
    background: #51abc5;
    /* KARE Blue */
    border: none;
    color: white;
    padding: 15px 40px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    letter-spacing: 2px;
    border-radius: 100px;
    /* Pill shape */
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.3s;
}

.story-btn span {
    font-size: 1.2rem;
    line-height: 0;
}

.story-btn:hover {
    background: #3d8fa6;
    transform: translateY(-2px);
    color: white;
}

.story-images {
    flex: 1;
    position: relative;
    height: 600px;
    /* Fixed height for image area */
}

.img-portrait {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 500px;
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    filter: sepia(0.2) contrast(0.9);
    z-index: 1;
}

.img-standing {
    position: absolute;
    bottom: 0;
    left: 20%;
    /* Overlap */
    width: 300px;
    height: 400px;
    background-size: cover;
    background-position: top;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 2;
    filter: sepia(0.1);
    transition: transform 0.5s ease;
}

/* Hover Effects for Story Images */
.story-images:hover .img-portrait {
    opacity: 1;
    filter: sepia(0) contrast(1);
    transition: all 0.5s ease;
}

.story-images:hover .img-standing {
    opacity: 1 !important;
    /* Force visibility */
    filter: none;
    /* Remove any filters */
    transform: scale(1.03) translateY(-5px);
    box-shadow: 20px 30px 80px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

/* --- RAINBOW BACKGROUND (PHILOSOPHY SECTION) --- */
.rainbow-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.rainbow {
    height: 100vh;
    width: 0;
    top: 0;
    position: absolute;
    transform: rotate(10deg);
    transform-origin: top right;
}

@keyframes rainbow-slide {
    from {
        right: -25vw;
    }

    to {
        right: 125vw;
    }
}

/* 25 Individual Rainbow Layers */
.rainbow:nth-child(1) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(244, 191, 252), 0 0 50px 25px rgb(179, 212, 253), 50px 0 50px 25px rgb(178, 245, 235), 130px 0 80px 40px white;
    animation: ripple-slide 105.8s linear infinite;
    animation-delay: -4.2s;
}

.rainbow:nth-child(2) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(244, 191, 252), 0 0 50px 25px rgb(178, 245, 235), 50px 0 50px 25px rgb(179, 212, 253), 130px 0 80px 40px white;
    animation: ripple-slide 103.6s linear infinite;
    animation-delay: -8.6s;
}

.rainbow:nth-child(3) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(178, 245, 235), 0 0 50px 25px rgb(244, 191, 252), 50px 0 50px 25px rgb(179, 212, 253), 130px 0 80px 40px white;
    animation: ripple-slide 101.4s linear infinite;
    animation-delay: -12.8s;
}

.rainbow:nth-child(4) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(178, 245, 235), 0 0 50px 25px rgb(179, 212, 253), 50px 0 50px 25px rgb(244, 191, 252), 130px 0 80px 40px white;
    animation: ripple-slide 99.2s linear infinite;
    animation-delay: -17.2s;
}

.rainbow:nth-child(5) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(179, 212, 253), 0 0 50px 25px rgb(178, 245, 235), 50px 0 50px 25px rgb(244, 191, 252), 130px 0 80px 40px white;
    animation: ripple-slide 97.2s linear infinite;
    animation-delay: -21.6s;
}

.rainbow:nth-child(6) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(179, 212, 253), 0 0 50px 25px rgb(244, 191, 252), 50px 0 50px 25px rgb(178, 245, 235), 130px 0 80px 40px white;
    animation: ripple-slide 95.0s linear infinite;
    animation-delay: -25.8s;
}

.rainbow:nth-child(7) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(244, 191, 252), 0 0 50px 25px rgb(179, 212, 253), 50px 0 50px 25px rgb(178, 245, 235), 130px 0 80px 40px white;
    animation: ripple-slide 92.8s linear infinite;
    animation-delay: -30.2s;
}

.rainbow:nth-child(8) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(244, 191, 252), 0 0 50px 25px rgb(178, 245, 235), 50px 0 50px 25px rgb(179, 212, 253), 130px 0 80px 40px white;
    animation: ripple-slide 90.6s linear infinite;
    animation-delay: -34.4s;
}

.rainbow:nth-child(9) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(178, 245, 235), 0 0 50px 25px rgb(244, 191, 252), 50px 0 50px 25px rgb(179, 212, 253), 130px 0 80px 40px white;
    animation: ripple-slide 88.4s linear infinite;
    animation-delay: -38.8s;
}

.rainbow:nth-child(10) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(178, 245, 235), 0 0 50px 25px rgb(179, 212, 253), 50px 0 50px 25px rgb(244, 191, 252), 130px 0 80px 40px white;
    animation: ripple-slide 86.4s linear infinite;
    animation-delay: -43.2s;
}

.rainbow:nth-child(11) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(179, 212, 253), 0 0 50px 25px rgb(178, 245, 235), 50px 0 50px 25px rgb(244, 191, 252), 130px 0 80px 40px white;
    animation: ripple-slide 84.2s linear infinite;
    animation-delay: -47.4s;
}

.rainbow:nth-child(12) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(179, 212, 253), 0 0 50px 25px rgb(244, 191, 252), 50px 0 50px 25px rgb(178, 245, 235), 130px 0 80px 40px white;
    animation: ripple-slide 82.0s linear infinite;
    animation-delay: -51.8s;
}

.rainbow:nth-child(13) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(244, 191, 252), 0 0 50px 25px rgb(179, 212, 253), 50px 0 50px 25px rgb(178, 245, 235), 130px 0 80px 40px white;
    animation: ripple-slide 79.8s linear infinite;
    animation-delay: -56.0s;
}

.rainbow:nth-child(14) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(244, 191, 252), 0 0 50px 25px rgb(178, 245, 235), 50px 0 50px 25px rgb(179, 212, 253), 130px 0 80px 40px white;
    animation: ripple-slide 77.6s linear infinite;
    animation-delay: -60.4s;
}

.rainbow:nth-child(15) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(178, 245, 235), 0 0 50px 25px rgb(244, 191, 252), 50px 0 50px 25px rgb(179, 212, 253), 130px 0 80px 40px white;
    animation: ripple-slide 75.6s linear infinite;
    animation-delay: -64.8s;
}

.rainbow:nth-child(16) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(178, 245, 235), 0 0 50px 25px rgb(179, 212, 253), 50px 0 50px 25px rgb(244, 191, 252), 130px 0 80px 40px white;
    animation: ripple-slide 73.4s linear infinite;
    animation-delay: -69.0s;
}

.rainbow:nth-child(17) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(179, 212, 253), 0 0 50px 25px rgb(178, 245, 235), 50px 0 50px 25px rgb(244, 191, 252), 130px 0 80px 40px white;
    animation: ripple-slide 71.2s linear infinite;
    animation-delay: -73.4s;
}

.rainbow:nth-child(18) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(179, 212, 253), 0 0 50px 25px rgb(244, 191, 252), 50px 0 50px 25px rgb(178, 245, 235), 130px 0 80px 40px white;
    animation: ripple-slide 69.0s linear infinite;
    animation-delay: -77.6s;
}

.rainbow:nth-child(19) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(244, 191, 252), 0 0 50px 25px rgb(179, 212, 253), 50px 0 50px 25px rgb(178, 245, 235), 130px 0 80px 40px white;
    animation: ripple-slide 66.8s linear infinite;
    animation-delay: -82.0s;
}

.rainbow:nth-child(20) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(244, 191, 252), 0 0 50px 25px rgb(178, 245, 235), 50px 0 50px 25px rgb(179, 212, 253), 130px 0 80px 40px white;
    animation: ripple-slide 64.8s linear infinite;
    animation-delay: -86.4s;
}

.rainbow:nth-child(21) {
    box-shadow: -130px 0 80px 40px white, -130px 0 80px 40px white, -50px 0 50px 25px rgb(178, 245, 235), 0 0 50px 25px rgb(244, 191, 252), 50px 0 50px 25px rgb(179, 212, 253), 130px 0 80px 40px white;
    animation: ripple-slide 62.6s linear infinite;
    animation-delay: -90.6s;
}

.rainbow:nth-child(22) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(178, 245, 235), 0 0 50px 25px rgb(179, 212, 253), 50px 0 50px 25px rgb(244, 191, 252), 130px 0 80px 40px white;
    animation: ripple-slide 60.4s linear infinite;
    animation-delay: -95.0s;
}

.rainbow:nth-child(23) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(179, 212, 253), 0 0 50px 25px rgb(178, 245, 235), 50px 0 50px 25px rgb(244, 191, 252), 130px 0 80px 40px white;
    animation: ripple-slide 58.2s linear infinite;
    animation-delay: -99.2s;
}

.rainbow:nth-child(24) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(179, 212, 253), 0 0 50px 25px rgb(244, 191, 252), 50px 0 50px 25px rgb(178, 245, 235), 130px 0 80px 40px white;
    animation: ripple-slide 56.0s linear infinite;
    animation-delay: -103.6s;
}

.rainbow:nth-child(25) {
    box-shadow: -130px 0 80px 40px white, -50px 0 50px 25px rgb(244, 191, 252), 0 0 50px 25px rgb(179, 212, 253), 50px 0 50px 25px rgb(178, 245, 235), 130px 0 80px 40px white;
    animation: ripple-slide 54.0s linear infinite;
    animation-delay: -108.0s;
}

@keyframes ripple-slide {
    from {
        right: -25vw;
    }

    to {
        right: 125vw;
    }
}

.h {
    box-shadow: 0 0 50vh 40vh white;
    width: 100vw;
    height: 0;
    bottom: 0;
    left: 0;
    position: absolute;
    z-index: 1;
}

.v {
    box-shadow: 0 0 35vw 25vw white;
    width: 0;
    height: 100vh;
    bottom: 0;
    left: 0;
    position: absolute;
    z-index: 1;
}

/* --- FLOATING LOGO (CONTACT SECTION) --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-22px);
    }
}

.contact-float-logo {
    position: absolute;
    bottom: 40px;
    right: 60px;
    width: 559px;
    opacity: 0.30;
    animation: float 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* --- STAGE 7: CONTACT SECTION --- */
.contact-section {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    color: #2e3231;
}

.contact-container {
    max-width: 1100px;
    width: 100%;
    display: flex;
    gap: 80px;
    padding: 100px 60px;
    text-align: left;
}

.contact-left {
    flex: 1;
}

.contact-right {
    flex: 1.2;
}

.contact-title {
    font-family: 'Lora', serif;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 30px;
    color: #2e3231;
}

.contact-title .accent-text {
    color: #51abc5;
    font-style: italic;
    font-weight: 400;
}

.contact-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 50px;
}

/* Direct Contact Info */
.direct-contact {
    margin-top: 60px;
}

.contact-method-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    opacity: 0.6;
    font-weight: 600;
}

.direct-link {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    color: #2e3231;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    display: inline-block;
}

.direct-link:hover {
    color: #51abc5;
    transform: translateX(5px);
}

/* Form Styles */
.form-header {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 30px;
    color: #2e3231;
}

.form-group {
    margin-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #2e3231;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group textarea {
    height: 60px;
    resize: none;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7f7f9;
    padding: 12px 20px;
    border-radius: 100px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.checkbox-item:hover {
    background: #eeeef2;
}

.checkbox-item input {
    margin: 0;
    cursor: pointer;
}

.contact-submit {
    margin-top: 50px;
    background: #2e3231;
    color: white;
    width: 100%;
    padding: 18px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.contact-submit:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* --- FORM SUCCESS STATE --- */
.form-success {
    display: none;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.form-success.visible {
    display: flex;
}

.form-success-inner {
    text-align: center;
    max-width: 380px;
    padding: 20px;
}

.form-success-inner svg {
    margin-bottom: 24px;
}

.form-success-inner h3 {
    font-family: 'Lora', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #2e3231;
    margin-bottom: 16px;
}

.form-success-inner p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

@media (max-width: 968px) {
    .contact-container {
        flex-direction: column;
        gap: 40px;
        padding: 60px 20px;
    }

    .contact-form {
        padding: 40px 25px;
    }
}

/* --- MOBILE OPTIMIZATION --- */

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    pointer-events: auto;
    z-index: 1100;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {

    /* Dramatically increase scroll height on mobile to slow down the GSAP Scrub timeframe, keeping text on screen longer */
    .viewport {
        height: 250vh;
    }

    nav {
        padding: 20px 30px;
    }

    /* --- iOS SAFARI CRASH PREVENTION --- */
    /* Mobile GPUs cannot handle animating backdrop-filter and mask-image at the same time across massive viewports.
       We replace the heavy blur overlay with a lightweight pseudo-gradient that maintains the text readability. */
    .blur-overlay {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        mask-image: none !important;
        -webkit-mask-image: none !important;
        background: linear-gradient(to right, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    }

    /* Disable animating text blurs. opacity and 'y' movement will still occur via GSAP. */
    .blur-text,
    .mission-text,
    .description-text,
    .cloud-text,
    h2#philosophy-header,
    p.blur-text {
        filter: none !important;
        -webkit-filter: none !important;
    }

    /* Stop heavy image scaling/blurring that leaks memory */
    .prairie-bg-blurred {
        filter: brightness(0.6) !important;
        transform: none !important;
    }

    .nav-links {
        display: none;
        /* Hide desktop links */
    }

    .hamburger {
        display: flex;
        /* Show hamburger */
    }

    /* Mobile Nav Overlay */
    .nav-links.mobile-active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        background: rgba(253, 251, 247, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        z-index: 1050;
        padding: 0;
    }

    .nav-links.mobile-active a {
        font-size: 2rem;
        color: #2e3231 !important;
        /* Always readable on mobile overlay */
        opacity: 0.8;
    }

    /* Typography Scaling */
    .hero-text h1,
    .who-we-are h2 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .philosophy-section h2 {
        font-size: clamp(1.5rem, 7vw, 2rem) !important;
    }

    .solitude-text {
        font-size: clamp(2rem, 12vw, 4rem);
        letter-spacing: 10px;
        bottom: 30px;
        left: 20px;
    }

    .description-text {
        font-size: 1rem;
        margin-top: 20px;
    }

    /* Spacing */
    .text-section {
        padding: 0 25px;
    }

    .logo-container img {
        height: 45px; /* Increased 30% from 35px */
    }

    /* Grid Adjustments */
    .services-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 20px;
    }

    .service-card {
        padding: 40px 25px;
        height: auto;
        aspect-ratio: 16/9;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Story Section Mobile */
    .story-section .content-wrapper {
        flex-direction: column-reverse;
        /* Images below text for better flow */
        padding: 40px 25px;
    }

    .story-content {
        padding-right: 0;
        text-align: center;
    }

    .story-images {
        display: none;
        /* Hide images on mobile per request */
    }

    /* Speed up Rainbow Animation by 20% on Mobile */
    .rainbow:nth-child(1) {
        animation-duration: 84.64s !important;
        animation-delay: -3.36s !important;
    }

    .rainbow:nth-child(2) {
        animation-duration: 82.88s !important;
        animation-delay: -6.88s !important;
    }

    .rainbow:nth-child(3) {
        animation-duration: 81.12s !important;
        animation-delay: -10.4s !important;
    }

    .rainbow:nth-child(4) {
        animation-duration: 79.36s !important;
        animation-delay: -13.92s !important;
    }

    .rainbow:nth-child(5) {
        animation-duration: 77.6s !important;
        animation-delay: -17.44s !important;
    }

    .rainbow:nth-child(6) {
        animation-duration: 75.84s !important;
        animation-delay: -20.96s !important;
    }

    .rainbow:nth-child(7) {
        animation-duration: 74.08s !important;
        animation-delay: -24.48s !important;
    }

    .rainbow:nth-child(8) {
        animation-duration: 72.32s !important;
        animation-delay: -28.0s !important;
    }

    .rainbow:nth-child(9) {
        animation-duration: 70.56s !important;
        animation-delay: -31.52s !important;
    }

    .rainbow:nth-child(10) {
        animation-duration: 68.8s !important;
        animation-delay: -35.04s !important;
    }

    .rainbow:nth-child(11) {
        animation-duration: 67.04s !important;
        animation-delay: -38.56s !important;
    }

    .rainbow:nth-child(12) {
        animation-duration: 65.28s !important;
        animation-delay: -42.08s !important;
    }

    .rainbow:nth-child(13) {
        animation-duration: 63.52s !important;
        animation-delay: -45.6s !important;
    }

    .rainbow:nth-child(14) {
        animation-duration: 61.76s !important;
        animation-delay: -49.12s !important;
    }

    .rainbow:nth-child(15) {
        animation-duration: 60.0s !important;
        animation-delay: -52.64s !important;
    }

    .rainbow:nth-child(16) {
        animation-duration: 58.24s !important;
        animation-delay: -56.16s !important;
    }

    .rainbow:nth-child(17) {
        animation-duration: 56.48s !important;
        animation-delay: -59.68s !important;
    }

    .rainbow:nth-child(18) {
        animation-duration: 54.72s !important;
        animation-delay: -63.2s !important;
    }

    .rainbow:nth-child(19) {
        animation-duration: 52.96s !important;
        animation-delay: -66.72s !important;
    }

    .rainbow:nth-child(20) {
        animation-duration: 51.2s !important;
        animation-delay: -70.24s !important;
    }

    .rainbow:nth-child(21) {
        animation-duration: 49.44s !important;
        animation-delay: -73.76s !important;
    }

    .rainbow:nth-child(22) {
        animation-duration: 47.68s !important;
        animation-delay: -77.28s !important;
    }

    .rainbow:nth-child(23) {
        animation-duration: 45.92s !important;
        animation-delay: -80.8s !important;
    }

    .rainbow:nth-child(24) {
        animation-duration: 44.16s !important;
        animation-delay: -84.32s !important;
    }

    .rainbow:nth-child(25) {
        animation-duration: 42.4s !important;
        animation-delay: -87.84s !important;
    }
}