/* chloengine.com - Warm-Earthy Corporate Engine */

/* CSS Custom Properties */
:root {
    --kiln-cream: #f5ede3;
    --fired-clay: #3b2316;
    --terracotta: #c65d3e;
    --amber: #d4943a;
    --sandstone: #e3cdb0;
    --sage: #5a7a64;
    --sienna: #e8734a;
    --umber: #2a1a0e;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.2rem);
    line-height: 1.7;
    color: var(--fired-clay);
    background-color: var(--kiln-cream);
    overflow-x: hidden;
}

/* Engine Sections - Full Viewport */
.engine-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* Section Numerals - Giant Background */
.section-numeral {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    font-family: 'Saira', sans-serif;
    font-weight: 800;
    font-size: clamp(8rem, 20vw, 18rem);
    color: rgba(198, 93, 62, 0.06);
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

/* Section Content */
.section-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(4rem, 8vh, 8rem) clamp(2rem, 4vw, 4rem);
}

/* ========================================
   SECTION 1: IGNITION
   ======================================== */
#ignition {
    background: linear-gradient(135deg, #f5ede3 0%, #e3cdb0 40%, #d4943a 100%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.ignition-content {
    padding-left: clamp(2rem, 8vw, 10rem);
}

/* Background Triangles */
.bg-triangle {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.tri-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 15%;
    background: rgba(198, 93, 62, 0.04);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation: slowSpin1 15s linear infinite;
}

.tri-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: 30%;
    background: rgba(198, 93, 62, 0.04);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation: slowSpin2 22s linear infinite;
}

.tri-3 {
    width: 250px;
    height: 250px;
    top: 40%;
    right: 5%;
    background: rgba(198, 93, 62, 0.04);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation: slowSpin3 30s linear infinite;
}

@keyframes slowSpin1 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slowSpin2 {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes slowSpin3 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Kinetic Title */
.kinetic-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: var(--terracotta);
    line-height: 1.1;
    display: flex;
    flex-wrap: wrap;
}

.kinetic-title .letter {
    display: inline-block;
    opacity: 0;
    transform: rotate(var(--angle)) translateY(-40px);
    animation: letterAssemble 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--i) * 60ms);
}

@keyframes letterAssemble {
    0% {
        opacity: 0;
        transform: rotate(var(--angle)) translateY(-40px);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) translateY(0);
    }
}

/* Title Underline */
.title-underline {
    height: 3px;
    background: var(--terracotta);
    margin-top: 1rem;
    width: 0;
    animation: drawLine 600ms ease-out 700ms forwards;
}

@keyframes drawLine {
    from { width: 0; }
    to { width: clamp(200px, 40vw, 500px); }
}

/* Subtitle */
.subtitle {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    color: var(--fired-clay);
    margin-top: 1.5rem;
    letter-spacing: -0.02em;
}

/* ========================================
   FADE REVEAL - Base Animation
   ======================================== */
.fade-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

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

/* ========================================
   ANGLED TOP DIVIDER
   ======================================== */
.angled-top-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4rem;
    background: inherit;
    z-index: 2;
}

/* ========================================
   SECTION 2: COMBUSTION
   ======================================== */
#combustion {
    background-color: var(--kiln-cream);
    clip-path: polygon(0 4rem, 100% 0, 100% 100%, 0 100%);
    padding-top: 4rem;
}

.combustion-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
    min-height: 60vh;
}

.combustion-text p {
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.combustion-text .fade-reveal:nth-child(2) {
    transition-delay: 200ms;
}

.combustion-text .fade-reveal:nth-child(3) {
    transition-delay: 400ms;
}

/* Geometric Shapes - Combustion */
.combustion-shapes {
    position: relative;
    height: 400px;
    width: 100%;
}

.geo-shape {
    position: absolute;
    opacity: 0;
    transition: opacity 600ms ease-out, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.geo-shape.is-visible {
    opacity: 1;
}

.shape-parallelogram {
    background: linear-gradient(45deg, #c65d3e 0%, #e8734a 100%);
    clip-path: polygon(20% 0%, 100% 0%, 80% 100%, 0% 100%);
    box-shadow: 8px 12px 24px rgba(42, 26, 14, 0.15);
}

.shape-triangle {
    background: linear-gradient(45deg, #d4943a, #e8734a);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    box-shadow: 8px 12px 24px rgba(42, 26, 14, 0.15);
}

.shape-rhombus {
    background: linear-gradient(45deg, #5a7a64, #d4943a);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    box-shadow: 8px 12px 24px rgba(42, 26, 14, 0.15);
}

.shape-1 {
    width: 180px;
    height: 120px;
    top: 10%;
    right: 10%;
    transform: translateX(100px) rotate(15deg);
}

.shape-1.is-visible {
    transform: translateX(0) rotate(0deg);
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 35%;
    right: 35%;
    transform: translateX(80px) rotate(-20deg);
    transition-delay: 150ms;
}

.shape-2.is-visible {
    transform: translateX(0) rotate(5deg);
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    right: 15%;
    transform: translateX(120px) rotate(30deg);
    transition-delay: 300ms;
}

.shape-3.is-visible {
    transform: translateX(0) rotate(0deg);
}

.shape-4 {
    width: 140px;
    height: 90px;
    bottom: 15%;
    right: 25%;
    transform: translateX(100px) rotate(-10deg);
    transition-delay: 450ms;
}

.shape-4.is-visible {
    transform: translateX(0) rotate(3deg);
}

.shape-5 {
    width: 80px;
    height: 80px;
    bottom: 30%;
    right: 5%;
    transform: translateX(60px) rotate(25deg);
    transition-delay: 600ms;
}

.shape-5.is-visible {
    transform: translateX(0) rotate(-5deg);
}

/* ========================================
   SECTION 3: TRANSMISSION
   ======================================== */
#transmission {
    background-color: var(--kiln-cream);
    clip-path: polygon(0 4rem, 100% 0, 100% 100%, 0 100%);
    padding-top: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.transmission-bands {
    width: 100%;
    position: relative;
    z-index: 1;
}

.transmission-band {
    width: 100%;
    height: 30vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 clamp(2rem, 8vw, 10rem);
}

.band-1 {
    background-color: var(--kiln-cream);
}

.band-2 {
    background-color: var(--sandstone);
}

.band-3 {
    background-color: var(--kiln-cream);
}

.band-divider {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #c65d3e, #d4943a);
    clip-path: polygon(0 0, 100% 0, 98% 100%, 2% 100%);
}

.band-content {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 4vw, 4rem);
    width: 100%;
    max-width: 1200px;
}

.band-numeral {
    font-family: 'Saira', sans-serif;
    font-weight: 800;
    font-size: clamp(4rem, 12vw, 10rem);
    color: var(--terracotta);
    line-height: 1;
    min-width: 200px;
}

.band-phrase {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--fired-clay);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.band-icon {
    flex-shrink: 0;
    margin-left: auto;
}

/* ========================================
   SECTION 4: OUTPUT
   ======================================== */
#output {
    background-color: var(--sandstone);
    clip-path: polygon(0 4rem, 100% 0, 100% 100%, 0 100%);
    padding-top: 4rem;
}

.decorative-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.output-content {
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.output-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.output-card {
    position: relative;
    padding: clamp(2rem, 3vw, 3rem);
    background-color: var(--kiln-cream);
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    overflow: hidden;
    transform: translateY(30px) skewX(-5deg);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 8px 12px 24px rgba(42, 26, 14, 0.15);
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms ease;
}

.output-card.is-visible {
    opacity: 1;
    transform: translateY(0) skewX(-3deg);
}

.output-card:hover {
    transform: skewX(0deg) scale(1.02);
    box-shadow: 12px 16px 32px rgba(42, 26, 14, 0.25);
}

.card-1.fade-reveal { transition-delay: 0ms; }
.card-2.fade-reveal { transition-delay: 150ms; }
.card-3.fade-reveal { transition-delay: 300ms; }
.card-4.fade-reveal { transition-delay: 450ms; }

.card-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(45deg, rgba(198, 93, 62, 0.05), rgba(232, 115, 74, 0.08));
    clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 0;
    pointer-events: none;
}

.card-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--terracotta);
    text-transform: uppercase;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
    padding-left: 1.5rem;
}

.card-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    color: var(--fired-clay);
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
    padding-left: 1.5rem;
}

/* ========================================
   SECTION 5: COOL-DOWN
   ======================================== */
#cooldown {
    background-color: var(--kiln-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cooldown-content {
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cooldown-statement {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--terracotta);
    text-transform: uppercase;
    letter-spacing: -0.03em;
}

/* Dispersing Shapes */
.dispersing-shapes {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    pointer-events: none;
}

.disperse-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
}

.d-tri {
    width: 40px;
    height: 40px;
    background: var(--terracotta);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation: disperse1 8s ease-out forwards, pulse 3s ease-in-out infinite 8s;
}

.d-para {
    width: 50px;
    height: 30px;
    background: var(--amber);
    clip-path: polygon(20% 0%, 100% 0%, 80% 100%, 0% 100%);
    animation: disperse2 8s ease-out forwards, pulse 3s ease-in-out 0.5s infinite 8s;
}

.d-rhombus {
    width: 35px;
    height: 35px;
    background: var(--sage);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: disperse3 8s ease-out forwards, pulse 3s ease-in-out 1s infinite 8s;
}

.d-trap {
    width: 45px;
    height: 30px;
    background: var(--sienna);
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    animation: disperse4 8s ease-out forwards, pulse 3s ease-in-out 1.5s infinite 8s;
}

.d-tri-2 {
    width: 30px;
    height: 30px;
    background: var(--terracotta);
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
    animation: disperse5 8s ease-out forwards, pulse 3s ease-in-out 2s infinite 8s;
}

.dispersing-shapes.is-animating .d-tri { animation: disperse1 8s ease-out forwards; }
.dispersing-shapes.is-animating .d-para { animation: disperse2 8s ease-out forwards; }
.dispersing-shapes.is-animating .d-rhombus { animation: disperse3 8s ease-out forwards; }
.dispersing-shapes.is-animating .d-trap { animation: disperse4 8s ease-out forwards; }
.dispersing-shapes.is-animating .d-tri-2 { animation: disperse5 8s ease-out forwards; }

@keyframes disperse1 {
    0% { transform: translate(-50%, -50%); opacity: 0; }
    10% { opacity: 0.5; }
    100% { transform: translate(-250px, -200px); opacity: 0.3; }
}

@keyframes disperse2 {
    0% { transform: translate(-50%, -50%); opacity: 0; }
    10% { opacity: 0.5; }
    100% { transform: translate(200px, -180px); opacity: 0.4; }
}

@keyframes disperse3 {
    0% { transform: translate(-50%, -50%); opacity: 0; }
    10% { opacity: 0.5; }
    100% { transform: translate(250px, 150px); opacity: 0.35; }
}

@keyframes disperse4 {
    0% { transform: translate(-50%, -50%); opacity: 0; }
    10% { opacity: 0.5; }
    100% { transform: translate(-220px, 180px); opacity: 0.3; }
}

@keyframes disperse5 {
    0% { transform: translate(-50%, -50%); opacity: 0; }
    10% { opacity: 0.5; }
    100% { transform: translate(50px, 250px); opacity: 0.45; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* ========================================
   F-PATTERN VISIBLE MOTIF
   ======================================== */
/* Terracotta horizontal bands - the F bars */
#ignition::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 85%;
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta), var(--amber));
    opacity: 0.4;
}

#combustion::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--terracotta), transparent);
    opacity: 0.25;
}

/* Left-margin vertical stroke of the F */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: clamp(1rem, 4vw, 4rem);
    width: 2px;
    height: 100vh;
    background: linear-gradient(180deg, transparent, var(--terracotta) 20%, var(--terracotta) 80%, transparent);
    opacity: 0.12;
    z-index: 100;
    pointer-events: none;
}

/* ========================================
   CORNER MARKS
   ======================================== */
.combustion-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: var(--terracotta);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.combustion-text {
    position: relative;
    padding-top: 1rem;
}

/* ========================================
   ROTATING HEXAGONAL GEARS (SVG background)
   ======================================== */
#combustion::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 5%;
    width: 120px;
    height: 120px;
    background: var(--amber);
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    opacity: 0.08;
    animation: slowSpin1 20s linear infinite;
    z-index: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .combustion-grid {
        grid-template-columns: 1fr;
    }

    .combustion-shapes {
        height: 250px;
    }

    .output-cards {
        grid-template-columns: 1fr;
    }

    .band-numeral {
        min-width: 100px;
        font-size: clamp(3rem, 10vw, 6rem);
    }

    .band-content {
        gap: 1.5rem;
    }

    .output-card {
        clip-path: polygon(5% 0, 100% 0, 95% 100%, 0% 100%);
    }

    .section-numeral {
        font-size: clamp(5rem, 15vw, 10rem);
    }
}

@media (max-width: 480px) {
    .band-icon {
        display: none;
    }

    .ignition-content {
        padding-left: 1.5rem;
    }
}