/* Decreon 2027: Organic Intelligence (Stone & Air) */

:root {
    /* --- Palette: Stone & Air --- */
    --bg-stone: #F2F2F0;
    /* Mist Linen - Lightened for web */
    --bg-paper: #FFFFFF;

    /* Text */
    --text-carbon: #1A1A1A;
    /* Carbon Slate - Deep, soft black */
    --text-stone: #5F5F60;
    /* Muted Stone */
    --text-sand: #B8B8AC;
    /* Sandstone - Very light text */

    /* Accents (Organic) */
    --accent-clay: #E88D7A;
    /* Warm Coral - Muted */
    --accent-moss: #7CAE9F;
    /* Eucalyptus - Muted */
    --accent-ocean: #95ADBA;
    /* Harbor Blue - Muted */

    /* --- Typography --- */
    --font-sans: 'DM Sans', sans-serif;

    /* Scale - Massive Editorial */
    --text-display: clamp(3.8rem, 11vw, 9.5rem);
    --text-h1: clamp(3rem, 6vw, 5rem);
    --text-h2: clamp(2rem, 4vw, 3.5rem);
    --text-body: 1.125rem;
    --text-small: 0.875rem;

    /* --- Spacing --- */
    --spacing-page: 4vw;
    --spacing-section: 16vh;

    /* --- Animation --- */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s var(--ease-out-expo);
}

/* --- Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: var(--bg-stone);
}

body {
    background-color: var(--bg-stone);
    color: var(--text-carbon);
    font-family: var(--font-sans);
    line-height: 1.4;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0;
}

.display-text {
    font-size: var(--text-display);
    font-weight: 300;
    letter-spacing: -0.05em;
    line-height: 0.9;
    margin-bottom: 2rem;
}

.section-label {
    font-size: var(--text-small);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-stone);
    margin-bottom: 1rem;
    display: block;
}

p {
    font-size: var(--text-body);
    color: var(--text-stone);
    font-weight: 400;
    line-height: 1.6;
    max-width: 32em;
}

/* --- Layout Utilities --- */
.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 var(--spacing-page);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-page);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-page);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background: var(--text-carbon);
    color: var(--bg-stone);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: var(--text-small);
    border-radius: 100px;
    transition: all 0.4s var(--ease-out-expo);
    border: 1px solid transparent;
    margin-top: 2rem;
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-carbon);
    border-color: var(--text-carbon);
    transform: translateY(-2px);
}

/* --- Header (Minimal) --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem var(--spacing-page);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 100;
    background: transparent;
    transition: padding 0.3s ease, background 0.3s ease;
}

.header.scrolled {
    background: rgba(242, 242, 240, 0.9);
    /* Mist Linen with opacity */
    backdrop-filter: blur(10px);
    padding: 1rem var(--spacing-page);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo img {
    height: 28px;
    display: block;
    /* Ensure logo is dark for contrast against light background */
    filter: none;
}

.nav {
    display: flex;
    gap: 3rem;
}

.nav-link {
    font-size: var(--text-small);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    color: var(--text-carbon);
    font-weight: 500;
    position: relative;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-carbon);
    transition: width 0.3s var(--ease-out-expo);
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    padding: 20vh var(--spacing-page) 10vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 80vw;
    z-index: 2;
    width: 100%;
    /* Ensure it doesn't exceed parent */
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* --- Context Section --- */
.section-context {
    padding: var(--spacing-section) var(--spacing-page);
    background-color: var(--bg-stone);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.context-headline {
    font-size: var(--text-h2);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 2rem;
    max-width: 800px;
}

.context-subhead {
    font-size: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-stone);
    margin-bottom: 1rem;
    font-weight: 500;
    min-height: 3rem;
    /* Ensure alignment for multi-line titles */
    display: flex;
    align-items: flex-start;
    /* Align to top as requested */
}

.context-item p {
    font-size: 1.25rem;
    /* Slightly larger than body */
    color: var(--text-carbon);
    line-height: 1.5;
}

/* --- Scale Section (Carbon & Silence) --- */
.section-scale {
    background-color: var(--text-carbon);
    color: var(--bg-paper);
    padding: var(--spacing-section) var(--spacing-page);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 60vh;
    position: relative;
}

.scale-headline {
    font-size: var(--text-display);
    font-weight: 300;
    line-height: 0.9;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
}

.scale-subhead {
    font-size: var(--text-h2);
    color: var(--text-stone);
    font-weight: 400;
    max-width: 800px;
    line-height: 1.3;
}

.strikethrough {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--text-stone);
    opacity: 0.6;
}

/* --- Democratization Section (The New Standard) --- */
.section-democratization {
    background-color: var(--bg-stone);
    color: var(--text-carbon);
    padding: 8vh var(--spacing-page);
    /* Smaller, airy padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.democratization-headline {
    font-size: var(--text-h1);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.democratization-subhead {
    font-size: var(--text-h2);
    color: var(--text-stone);
    font-weight: 400;
    max-width: 800px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .hero {
        padding: 140px var(--spacing-page) 80px;
        /* Luxurious top padding */
        min-height: 100dvh;
        justify-content: flex-start;
        /* Top-aligned for structure */
        gap: 4rem;
        text-align: center;
        position: relative;

        /* Architectural Paper Texture */
        background-color: var(--bg-stone);
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E"),
            radial-gradient(circle at 50% 30%, #FFFFFF 0%, transparent 60%);
        background-size: 100px 100px, cover;
        animation: none;
    }

    .hero-content {
        max-width: 100%;
        width: 100%;
        margin-bottom: 0;
        z-index: 2;

        /* Structural Frame */
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding: 3rem 0;
    }

    .display-text {
        /* Ultra-Light Architectural Type */
        font-family: var(--font-sans);
        font-weight: 300;
        /* Razor thin */
        font-size: clamp(2.5rem, 11vw, 3.5rem);
        line-height: 1.15;
        letter-spacing: -0.03em;
        color: var(--text-carbon);
        margin-bottom: 0;
        /* Tight to border */
    }

    .section-label {
        /* Structural Label */
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.2em;
        margin-bottom: 2rem;
        display: block;
        opacity: 0.6;
        position: relative;
        display: inline-block;
    }

    .hero-footer {
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
        margin-top: auto;
        /* Push to bottom */
    }

    .hero-footer>div:first-child {
        width: 100%;
        text-align: center;
    }

    .hero-footer p {
        margin-bottom: 2.5rem;
        font-size: 1rem;
        color: var(--text-stone);
        line-height: 1.7;
        max-width: 85%;
        margin-left: auto;
        margin-right: auto;
        font-weight: 400;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
        padding: 1.2rem 2rem;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.15em;
        background: transparent;
        color: var(--text-carbon);
        border: 1px solid var(--text-carbon);
        box-shadow: none;
        border-radius: 0;
        /* Architectural square/sharp */
    }

    #decisionGrid {
        display: none;
    }

    /* Ensure no element exceeds viewport width */
    .hero * {
        max-width: 100%;
    }
}

/* --- Lifecycle (Horizontal Scroll) --- */
.section-lifecycle {
    padding: 10vh 0 var(--spacing-section);
    /* Reduced top padding */
    overflow: hidden;
}

.lifecycle-track {
    display: flex;
    gap: 4vw;
    padding: 0 var(--spacing-page);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 4rem;
    /* Space for scrollbar if visible */
    /* Scroll Hint: Fade out the right edge */
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.lifecycle-track::-webkit-scrollbar {
    display: none;
}

.lifecycle-card {
    flex: 0 0 35vw;
    scroll-snap-align: start;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 2rem;
}

.lifecycle-number {
    font-size: var(--text-h2);
    color: var(--accent-ocean);
    margin-bottom: 1rem;
    font-weight: 300;
}

/* --- Challenge (Minimal Data) --- */
.section-challenge {
    padding: var(--spacing-section) var(--spacing-page) 10vh;
    /* Reduced bottom padding */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: var(--text-display);
    line-height: 0.8;
    font-weight: 200;
    letter-spacing: -0.05em;
}

.stat-label {
    font-size: var(--text-body);
    text-align: right;
    max-width: 200px;
}

/* --- Approach (Editorial) --- */
.section-approach {
    padding: var(--spacing-section) var(--spacing-page);
}

.approach-item {
    margin-bottom: 8rem;
}

.approach-item:last-child {
    margin-bottom: 0;
}

.approach-header {
    font-size: var(--text-h2);
    margin-bottom: 2rem;
    max-width: 20em;
}

/* --- Partner & Audience --- */
.section-partner {
    padding: var(--spacing-section) var(--spacing-page);
    background: white;
}

.partner-step {
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed from space-between for alignment */
    min-height: 500px;
    transition: transform 0.4s var(--ease-out-expo);
}

.partner-title {
    margin-bottom: 1rem;
    min-height: 3rem;
    /* Space for 2 lines */
    display: flex;
    align-items: flex-end;
    /* Align text to bottom of this space if single line? Or top? User said top aligned. Let's use default (top) but fixed height ensures next element starts at same spot. */
    align-items: flex-start;
}

.partner-subtitle {
    margin-bottom: 2rem;
    min-height: 5.5rem;
    /* Increased for better alignment */
}

.partner-step:hover {
    transform: translateY(-10px);
    background: var(--bg-stone);
    border-color: transparent;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    /* Soft shadow for depth */
}

/* --- Ethos Section --- */
.section-ethos {
    padding: var(--spacing-section) var(--spacing-page);
    background-color: var(--bg-stone);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.ethos-headline {
    font-size: var(--text-display);
    font-weight: 300;
    line-height: 0.9;
    margin-bottom: 2.5rem;
    /* Increased for more space */
    letter-spacing: -0.04em;
    color: var(--text-carbon);
}

.ethos-subhead {
    font-size: calc(var(--text-h2) - 4px);
    /* Reduced by 4px total */
    font-weight: 400;
    line-height: 1.2;
    /* Reduced from 1.3 */
    font-style: italic;
    color: var(--text-carbon);
    max-width: 90%;
}

.ethos-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    padding-top: 1rem;
}

.ethos-content p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-stone);
    max-width: 36em;
}

/* --- Footer --- */
.footer {
    padding: var(--spacing-section) var(--spacing-page) 4rem;
    background: var(--text-carbon);
    color: var(--bg-stone);
}

.footer-link {
    font-size: var(--text-h1);
    display: block;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    transition: padding-left 0.3s var(--ease-out-expo);
}

.footer-link:hover {
    padding-left: 2rem;
    color: var(--accent-ocean);
}

/* --- Animations --- */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-out-expo);
}

.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .lifecycle-card {
        flex: 0 0 80vw;
    }

    .stat-row {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-label {
        text-align: left;
    }
}

/* --- Splash Screen --- */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-stone);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#logoAnimationCanvas {
    width: 100%;
    height: 100%;
    max-width: 600px;
    max-height: 400px;
}

/* --- Organic Partner Visualizations (Premium) --- */

/* Base styles */
.partner-viz {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: visible;
}

.partner-step:hover .partner-viz {
    transform: translateY(-5px) scale(1.02);
}

/* ==== 1. AI Workforce: The Living Network ==== */

/* Core Pulse - Soft, organic heartbeat */
@keyframes organic-pulse {

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

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.core-pulse {
    transform-origin: 50px 50px;
    animation: organic-pulse 4s ease-in-out infinite;
}

/* Signal Flow - Data transmission effect */
@keyframes signal-flow {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    80% {
        opacity: 0;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

.flow-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: signal-flow 3s ease-out infinite;
}

.flow-line:nth-child(1) {
    animation-delay: 0s;
}

.flow-line:nth-child(2) {
    animation-delay: 1.5s;
}

.flow-line:nth-child(3) {
    animation-delay: 0.8s;
}

.flow-line:nth-child(4) {
    animation-delay: 2.2s;
}

/* Pulse Rings - Expanding ripples */
@keyframes ripple-expand {
    0% {
        transform: scale(0.8);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.pulse-ring {
    transform-origin: 50px 50px;
    animation: ripple-expand 4s ease-out infinite;
}

.pulse-ring-delayed {
    transform-origin: 50px 50px;
    animation: ripple-expand 4s ease-out infinite 2s;
}

/* Satellite Nodes - Gentle breathing */
@keyframes node-float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(0, -2px);
    }
}

.satellite-node {
    animation: node-float 6s ease-in-out infinite;
}

/* ==== 2. Vertical Customization: Adaptive Layers ==== */

/* Layer Float - Isometric separation */
@keyframes layer-float {

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

    50% {
        transform: translateY(-4px);
    }
}

.layer-plate {
    transition: all 0.5s ease;
}

.layer-1 {
    animation: layer-float 6s ease-in-out infinite;
}

.layer-2 {
    animation: layer-float 6s ease-in-out infinite 0.5s;
}

.layer-3 {
    animation: layer-float 6s ease-in-out infinite 1s;
}

.partner-step:hover .layer-1 {
    transform: translateY(-8px);
}

.partner-step:hover .layer-2 {
    transform: translateY(-4px);
}

.partner-step:hover .layer-3 {
    transform: translateY(0);
}

/* Connection Beam - Scanning effect */
@keyframes beam-scan {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

.connect-beam {
    animation: beam-scan 4s ease-in-out infinite;
}

/* ==== 3. Cross-Selling Network: Synaptic Constellation (SOTA) ==== */

/* 3D Parallax Rotation */
@keyframes rotate-3d-slow {
    0% {
        transform: rotate3d(1, 1, 1, 0deg);
    }

    100% {
        transform: rotate3d(1, 1, 1, 360deg);
    }
}

@keyframes rotate-3d-fast {
    0% {
        transform: rotate3d(-1, 1, 0, 0deg);
    }

    100% {
        transform: rotate3d(-1, 1, 0, 360deg);
    }
}

.network-layer {
    transform-origin: 50px 50px;
}

.layer-back {
    animation: rotate-3d-slow 30s linear infinite;
}

.layer-front {
    animation: rotate-3d-fast 20s linear infinite;
}

/* Data Packet Flow - Simulating transmission */
@keyframes packet-flow-1 {
    0% {
        transform: translate(20px, 42px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(80px, 58px);
        opacity: 0;
    }
}

@keyframes packet-flow-2 {
    0% {
        transform: translate(50px, 15px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(50px, 85px);
        opacity: 0;
    }
}

.data-packet {
    opacity: 0;
}

.p1 {
    animation: packet-flow-1 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.p2 {
    animation: packet-flow-2 4s cubic-bezier(0.4, 0, 0.2, 1) infinite 1.5s;
}

/* Core Breathing */
@keyframes synaptic-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
        filter: brightness(1);
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        filter: brightness(1.2);
    }
}

.synaptic-core {
    transform-origin: 50px 50px;
    animation: synaptic-pulse 4s ease-in-out infinite;
}

/* Node Activation */
@keyframes node-flash {

    0%,
    100% {
        fill: var(--text-stone);
        r: 1.5;
    }

    5% {
        fill: var(--text-carbon);
        r: 2.5;
    }

    10% {
        fill: var(--text-stone);
        r: 1.5;
    }
}

.synaptic-node {
    transition: all 0.3s ease;
}

.n1 {
    animation: node-flash 5s ease-in-out infinite;
}

.n2 {
    animation: node-flash 7s ease-in-out infinite 2s;
}

.n3 {
    animation: node-flash 6s ease-in-out infinite 1s;
}

.n4 {
    animation: node-flash 8s ease-in-out infinite 3s;
}

/* Hover Effect - System Overdrive */
.partner-step:hover .layer-back {
    animation-duration: 15s;
}

.partner-step:hover .layer-front {
    animation-duration: 10s;
}

.partner-step:hover .p1 {
    animation-duration: 1.5s;
}

.partner-step:hover .p2 {
    animation-duration: 2s;
}

.partner-step:hover .synaptic-core {
    animation-duration: 1s;
    filter: brightness(1.5);
}