/* simulai.tech - Evolved Minimal / Zen Contemplative */

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

:root {
    --bg: #F5F0FA;
    --surface: #EDE6F5;
    --text-primary: #4A3F5E;
    --text-body: #5E5470;
    --accent: #9B8FB8;
    --highlight: #F2D8C9;
    --blob-start: #D4EDE1;
    --blob-end: #F0D4E0;
    --ring: #E8E0F0;
    --blob-solid: #C4B8D8;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-body);
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.75;
    overflow-x: hidden;
}

/* Lens Flare Accents */
.lens-flare {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
    transition: opacity 1s ease;
}

.lens-flare--top-right {
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
}

.lens-flare--bottom-left {
    bottom: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-blob {
    position: absolute;
    opacity: 0;
    transition: opacity 2s ease, transform 2s ease;
}

.bg-blob--1 {
    width: 450px;
    height: 450px;
    top: -80px;
    left: -120px;
    animation: blobDrift1 20s ease-in-out infinite;
}

.bg-blob--2 {
    width: 380px;
    height: 380px;
    top: 30%;
    right: -100px;
    animation: blobDrift2 18s ease-in-out infinite;
}

.bg-blob--3 {
    width: 420px;
    height: 420px;
    bottom: -60px;
    left: 30%;
    animation: blobDrift3 22s ease-in-out infinite;
}

.bg-blob.visible {
    opacity: 0.08;
}

@keyframes blobDrift1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, 20px) rotate(5deg); }
    66% { transform: translate(-20px, 30px) rotate(-3deg); }
}

@keyframes blobDrift2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-25px, 15px) rotate(-4deg); }
    66% { transform: translate(15px, -20px) rotate(3deg); }
}

@keyframes blobDrift3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -25px) rotate(3deg); }
    66% { transform: translate(-15px, 20px) rotate(-5deg); }
}

/* Scroll Progress Pill */
.scroll-progress-pill {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    border-radius: 2px;
    background-color: rgba(196, 184, 216, 0.3);
    z-index: 100;
    overflow: hidden;
}

.scroll-progress-fill {
    width: 0%;
    height: 100%;
    background-color: var(--blob-solid);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* Sections */
.section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 120px;
    z-index: 1;
}

.section--init {
    min-height: 100vh;
    justify-content: center;
}

.section__inner {
    text-align: center;
}

/* Title - letter by letter animation */
.title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.title .letter.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tagline typewriter */
.tagline {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: 1.125rem;
    color: var(--accent);
    min-height: 1.75em;
}

.tagline .cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--accent);
    vertical-align: text-bottom;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Section Headings */
.section__heading {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

/* Concentric Rings */
.concentric-rings {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
    z-index: 0;
}

/* Breath Spacer */
.breath-spacer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 180px;
    position: relative;
    z-index: 1;
}

.breath-spacer--large {
    height: 240px;
}

.spacer-blob {
    width: 100px;
    height: 100px;
    animation: spacerPulse 8s ease-in-out infinite;
}

@keyframes spacerPulse {
    0%, 100% { transform: scale(1); opacity: 0.25; }
    50% { transform: scale(1.15); opacity: 0.4; }
}

.spacer-blob--morph {
    animation: spacerMorph 12s ease-in-out infinite;
}

@keyframes spacerMorph {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(0.95) rotate(-3deg); }
    75% { transform: scale(1.08) rotate(2deg); }
}

/* Cards */
.card {
    position: relative;
    background-color: var(--surface);
    border-radius: 24px;
    padding: 32px 32px 32px 56px;
    max-width: 680px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(180, 170, 200, 0.15);
    margin-bottom: 2rem;
    border: 1px solid transparent;
    animation: cardPulse 12s ease-in-out infinite;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card--offset-right {
    transform: translateX(16px) translateY(40px);
}

.card--offset-right.visible {
    transform: translateX(16px) translateY(0);
}

.card--offset-left {
    transform: translateX(-16px) translateY(40px);
}

.card--offset-left.visible {
    transform: translateX(-16px) translateY(0);
}

.card[data-index="0"] { animation-delay: 0s; }
.card[data-index="1"] { animation-delay: 2s; }
.card[data-index="2"] { animation-delay: 4s; }
.card[data-index="3"] { animation-delay: 6s; }

@keyframes cardPulse {
    0%, 100% { border-color: #D4EDE1; }
    33% { border-color: #F0D4E0; }
    66% { border-color: #E8E0F0; }
}

.card__blob {
    position: absolute;
    top: 20px;
    left: 16px;
    width: 24px;
    height: 24px;
}

.card__label {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

.card__title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.card__text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-body);
    margin-bottom: 1rem;
}

.card__counter {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.card__unit {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-left: 0.5rem;
}

/* Convergence Lines */
.convergence-line {
    width: 100px;
    height: 80px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.convergence-line.visible {
    opacity: 1;
}

.convergence-line path {
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2s ease;
}

.convergence-line.visible path {
    stroke-dashoffset: 0;
}

/* Emergence Section */
.section--emergence {
    padding-top: 40px;
    padding-bottom: 40px;
}

.emergence-block {
    background-color: var(--surface);
    border-radius: 24px;
    padding: 40px;
    max-width: 520px;
    width: 100%;
    margin: 0 auto 2rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.emergence-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.emergence-block--wide {
    max-width: 680px;
}

.emergence-block__text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-body);
}

/* Central Morph Blob */
.central-morph-blob {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.central-morph-blob svg {
    width: 200px;
    height: 200px;
    opacity: 0.35;
}

.morph-path {
    animation: morphBlob 20s ease-in-out infinite;
}

@keyframes morphBlob {
    0% { d: path("M150,30 C220,20 280,80 280,150 C280,220 220,280 150,280 C80,280 20,220 20,150 C20,80 80,20 150,30Z"); }
    20% { d: path("M150,40 C230,25 275,90 270,160 C265,230 210,275 145,275 C80,275 25,225 30,155 C35,85 90,45 150,40Z"); }
    40% { d: path("M160,35 C225,30 285,85 275,155 C265,225 215,280 150,275 C85,270 25,215 30,145 C35,75 95,35 160,35Z"); }
    60% { d: path("M145,38 C215,28 278,88 278,158 C278,228 218,278 148,278 C78,278 22,218 25,148 C28,78 85,38 145,38Z"); }
    80% { d: path("M155,32 C228,22 282,82 278,152 C274,222 222,282 152,278 C82,274 22,222 22,152 C22,82 82,32 155,32Z"); }
    100% { d: path("M150,30 C220,20 280,80 280,150 C280,220 220,280 150,280 C80,280 20,220 20,150 C20,80 80,20 150,30Z"); }
}

/* Convergence Section */
.section--convergence {
    padding-top: 40px;
    padding-bottom: 40px;
    min-height: 80vh;
    justify-content: center;
}

.convergence-statement {
    max-width: 680px;
    text-align: center;
    margin: 0 auto 3rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.convergence-statement.visible {
    opacity: 1;
    transform: translateY(0);
}

.convergence-statement__text {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.6;
}

/* Convergence Web */
.convergence-web {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 1s ease;
}

.convergence-web.visible {
    opacity: 1;
}

.web-line {
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 2s ease;
}

.convergence-web.visible .web-line {
    stroke-dashoffset: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 0 0 80px;
    position: relative;
    z-index: 1;
}

.footer__domain {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding-left: 24px;
        padding-right: 24px;
    }

    .card {
        max-width: 100%;
    }

    .card--offset-right,
    .card--offset-right.visible {
        transform: translateX(0) translateY(0);
    }

    .card--offset-left,
    .card--offset-left.visible {
        transform: translateX(0) translateY(0);
    }

    .emergence-block,
    .emergence-block--wide {
        max-width: 100%;
    }

    .bg-blob--1 { width: 250px; height: 250px; }
    .bg-blob--2 { width: 220px; height: 220px; }
    .bg-blob--3 { width: 240px; height: 240px; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.3s !important;
    }

    .bg-blob {
        opacity: 0.08;
    }

    .card,
    .emergence-block,
    .convergence-statement {
        opacity: 1;
        transform: none;
    }
}
