/* ============================================
   sustaining.quest — flat-design meadow
   Palette (Neon-Electric):
     --sustain-green #00E0A0
     --quest-cyan   #00C4E8
     --solar-amber  #FFB830
     --alert-coral  #FF6B6B
     --clean-white  #FAFCFA
     --deep-forest  #0A2E1A
     --pale-meadow  #E8F5EC
   ============================================ */

:root {
    --sustain-green: #00E0A0;
    --quest-cyan: #00C4E8;
    --solar-amber: #FFB830;
    --alert-coral: #FF6B6B;
    --clean-white: #FAFCFA;
    --deep-forest: #0A2E1A;
    --pale-meadow: #E8F5EC;

    --diag-offset: 60px;
    --tilt: 5deg;

    --font-display: 'Albert Sans', 'Inter', sans-serif;
    --font-body: 'Outfit', 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.9rem, 1vw, 1.05rem);
    line-height: 1.75;
    color: var(--deep-forest);
    background: var(--clean-white);
    overflow-x: hidden;
}

/* ---------- Typography helpers ---------- */

.label {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--deep-forest);
    opacity: 0.7;
    margin-bottom: 1rem;
    display: inline-block;
}

.label-light {
    color: var(--clean-white);
    opacity: 0.85;
}

.heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    line-height: 1.15;
    color: var(--deep-forest);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.heading-light {
    color: var(--clean-white);
}

.body-text {
    max-width: 42rem;
    color: var(--deep-forest);
    margin-bottom: 1.5rem;
}

.body-light {
    color: var(--clean-white);
    opacity: 0.95;
}

/* ---------- Icon sizing ---------- */

.icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    color: currentColor;
    fill: currentColor;
    vertical-align: middle;
}

.icon-sm { width: 32px; height: 32px; }
.icon-md { width: 80px; height: 80px; }
.icon-hero { width: clamp(160px, 22vw, 260px); height: clamp(160px, 22vw, 260px); }
.icon-xl { width: clamp(110px, 15vw, 180px); height: clamp(110px, 15vw, 180px); }

/* ---------- Quest gateway hero ---------- */

.gateway {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.gateway-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00E0A0 0%, #00C4E8 100%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 1;
}

.gateway-white {
    position: absolute;
    inset: 0;
    background: var(--clean-white);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    z-index: 1;
}

.gateway-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.gateway-content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 2rem clamp(1rem, 4vw, 3rem);
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.gateway-label {
    color: var(--deep-forest);
    background: rgba(250, 252, 250, 0.75);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    opacity: 0.95;
}

.domain-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    position: relative;
    white-space: nowrap;
}

.domain-sustaining {
    color: var(--clean-white);
    text-shadow: 0 0 0 transparent;
}

.domain-dot {
    color: var(--solar-amber);
}

.domain-quest {
    color: var(--deep-forest);
}

.gateway-icon {
    margin-top: 0.25rem;
    animation: floatY 6s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.gateway-tag {
    max-width: 36rem;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    color: var(--deep-forest);
    background: rgba(250, 252, 250, 0.65);
    padding: 0.6rem 1rem;
    border-radius: 12px;
}

.scroll-hint {
    margin-top: 1rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--deep-forest);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.75;
}

.scroll-arrow {
    display: inline-block;
    font-size: 1.4rem;
    animation: bounceY 1.8s ease-in-out infinite;
}

@keyframes bounceY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ---------- Aurora strips ---------- */

.aurora-strip {
    position: relative;
    width: 100%;
    height: 24px;
    background: linear-gradient(90deg, #00E0A0, #00C4E8, #FFB830, #00E0A0);
    background-size: 200% 100%;
    animation: aurora 15s linear infinite;
    z-index: 20;
}

@keyframes aurora {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ---------- Diagonal content sections ---------- */

.dsect {
    position: relative;
    width: 100%;
    padding: clamp(6rem, 12vh, 10rem) clamp(1rem, 5vw, 4rem);
    margin-top: calc(var(--diag-offset) * -1);
    margin-bottom: calc(var(--diag-offset) * -1);
    overflow: hidden;
}

/* Section clip-paths alternate direction */
.dsect-1 { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 0 100%); z-index: 8; }
.dsect-2 { clip-path: polygon(0 60px, 100% 0, 100% 100%, 0 calc(100% - 60px)); z-index: 7; }
.dsect-3 { clip-path: polygon(0 0, 100% 60px, 100% calc(100% - 60px), 0 100%); z-index: 6; }
.dsect-4 { clip-path: polygon(0 60px, 100% 0, 100% 100%, 0 calc(100% - 60px)); z-index: 5; }
.dsect-5 { clip-path: polygon(0 0, 100% 60px, 100% 100%, 0 100%); z-index: 4; }

.bg-pale    { background: var(--pale-meadow); }
.bg-white   { background: var(--clean-white); }
.bg-sustain { background: var(--sustain-green); }
.bg-quest   { background: var(--quest-cyan); }

.dsect-inner {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    z-index: 2;
}

.col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.col-icon {
    align-items: center;
    justify-content: center;
    color: var(--sustain-green);
}

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

/* ---------- Section-specific content ---------- */

.pill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.pill-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--clean-white);
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--deep-forest);
    font-size: 0.95rem;
}

.element-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    max-width: 26rem;
}

.element-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--pale-meadow);
    border-radius: 18px;
    text-align: center;
}

.element-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--deep-forest);
    letter-spacing: 0.02em;
}

.loop-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

.loop-item {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--deep-forest);
    background: var(--clean-white);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.loop-sep {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--clean-white);
    font-size: 1.2rem;
}

.bearing-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.bearing-list li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    color: var(--deep-forest);
}

.bearing-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--solar-amber);
    color: var(--deep-forest);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0;
    flex-shrink: 0;
}

.finish-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: var(--clean-white);
    color: var(--deep-forest);
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 0.75rem;
}

.light-on-color {
    color: var(--clean-white);
}

/* ---------- Decorative shapes ---------- */

.shape {
    position: absolute;
    display: block;
    pointer-events: none;
    opacity: 0.12;
}

.shape-circle {
    border-radius: 50%;
}

.shape-triangle {
    width: 0;
    height: 0;
    background: transparent !important;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid var(--sustain-green);
    opacity: 0.14;
}

.shape-hex {
    width: 110px;
    height: 64px;
    background: var(--quest-cyan);
    position: absolute;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    opacity: 0.13;
}

/* Gateway shapes */
.shape-1 { width: 180px; height: 180px; background: var(--solar-amber); top: 8%; left: 6%; opacity: 0.18; }
.shape-2 { top: 70%; right: 8%; border-bottom-color: var(--alert-coral); opacity: 0.18; }
.shape-3 { top: 18%; right: 12%; background: var(--clean-white); opacity: 0.35; }
.shape-4 { width: 90px; height: 90px; background: var(--sustain-green); bottom: 10%; left: 14%; opacity: 0.22; }

/* Section shapes */
.deco-a { width: 240px; height: 240px; background: var(--sustain-green); top: -40px; right: -60px; opacity: 0.12; }
.deco-b { top: auto; bottom: 5%; left: 2%; border-bottom-color: var(--quest-cyan); }
.deco-c { top: 10%; left: -40px; }
.deco-d { width: 160px; height: 160px; background: var(--solar-amber); bottom: 8%; right: 4%; opacity: 0.14; }
.deco-e { top: 20%; right: 10%; border-bottom-color: var(--clean-white); opacity: 0.18; }
.deco-f { width: 200px; height: 200px; background: var(--quest-cyan); bottom: -60px; left: -50px; opacity: 0.22; }
.deco-g { width: 180px; height: 180px; background: var(--quest-cyan); top: 4%; left: 4%; opacity: 0.1; }
.deco-h { bottom: 12%; right: 6%; }
.deco-i { width: 240px; height: 240px; background: var(--sustain-green); top: -40px; left: -50px; opacity: 0.25; }
.deco-j { bottom: 10%; right: 8%; border-bottom-color: var(--solar-amber); opacity: 0.22; }

/* ---------- Scroll-triggered reveals ---------- */

.reveal {
    opacity: 0;
    transform: translateX(0) translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.dsect[data-direction="left"] .reveal {
    transform: translateX(-40px);
}

.dsect[data-direction="right"] .reveal {
    transform: translateX(40px);
}

.dsect .reveal.in-view {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

/* Stagger siblings via inline transition-delay set by JS */

/* ---------- Footer ---------- */

.footer {
    position: relative;
    padding: 6rem clamp(1rem, 5vw, 4rem) 3rem;
    background: var(--deep-forest);
    color: var(--clean-white);
    margin-top: calc(var(--diag-offset) * -1);
    z-index: 3;
    clip-path: polygon(0 60px, 100% 0, 100% 100%, 0 100%);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.footer-domain {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: -0.015em;
}

.footer-sustain { color: var(--sustain-green); }
.footer-dot { color: var(--solar-amber); }
.footer-quest { color: var(--clean-white); }

.footer-icons {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
}

.footer-note {
    color: var(--clean-white);
    opacity: 0.55;
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
    .dsect-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .col-text {
        align-items: center;
        text-align: center;
    }
    .col-text .body-text {
        text-align: center;
    }
    .col-icon { order: -1; }
    .dsect-2 .col-icon,
    .dsect-4 .col-icon { order: -1; }
    .bearing-list li {
        justify-content: flex-start;
    }
    .domain-name {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .dsect {
        padding: 5rem 1rem;
    }
    .element-grid {
        grid-template-columns: 1fr;
    }
    .gateway-tag {
        font-size: 1rem;
    }
}
