/* concengine.net - Generative Art Canvas */

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

:root {
    --canvas-dark: #0A0A12;
    --indigo: #6366F1;
    --rose: #EC4899;
    --teal: #14B8A6;
    --amber: #F59E0B;
    --white: #FFFFFF;
    --white-70: rgba(255, 255, 255, 0.7);
    --white-40: rgba(255, 255, 255, 0.4);
    --card-bg: rgba(10, 10, 18, 0.75);
}

body {
    background-color: var(--canvas-dark);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ============================
   HERO: GENESIS FLOW FIELD
   ============================ */

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--canvas-dark);
}

.gen-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.gen-layer.visible {
    opacity: 1;
}

.gen-layer-1 {
    background: conic-gradient(from 0deg at 30% 40%, rgba(99, 102, 241, 0.3) 0deg, transparent 120deg);
    animation: rotateLayer 60s linear infinite;
}

.gen-layer-2 {
    background: radial-gradient(ellipse at 70% 60%, rgba(236, 72, 153, 0.25) 0%, transparent 60%);
    animation: driftLayer2 30s ease-in-out infinite alternate;
}

.gen-layer-3 {
    background: conic-gradient(from 180deg at 60% 70%, rgba(20, 184, 166, 0.25) 0deg, transparent 90deg);
    animation: rotateLayerReverse 45s linear infinite;
}

.gen-layer-4 {
    background: radial-gradient(circle at 40% 30%, rgba(245, 158, 11, 0.2) 0%, transparent 40%);
    animation: pulseLayer4 20s ease-in-out infinite alternate;
}

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

@keyframes driftLayer2 {
    from { transform: translate(-5%, -3%); }
    to { transform: translate(5%, 3%); }
}

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

@keyframes pulseLayer4 {
    from { transform: scale(0.9); opacity: 0.6; }
    to { transform: scale(1.3); opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

#hero-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.03em;
    color: var(--white);
    mix-blend-mode: difference;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#hero-title.visible {
    opacity: 1;
}

.hero-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: var(--white-40);
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-sub.visible {
    opacity: 1;
}

/* ============================
   GENERATIVE SECTIONS
   ============================ */

.gen-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.gen-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Section 1: Concentric circles */
.circles-bg {
    background: radial-gradient(circle at center, transparent 0%, transparent 20%, rgba(99, 102, 241, 0.15) 20.5%, transparent 21%, transparent 40%, rgba(99, 102, 241, 0.1) 40.5%, transparent 41%, transparent 60%, rgba(99, 102, 241, 0.08) 60.5%, transparent 61%);
    animation: expandCircles 4s ease-out infinite;
}

@keyframes expandCircles {
    0% { background-size: 50% 50%; opacity: 0.3; }
    100% { background-size: 200% 200%; opacity: 0; }
}

/* Section 2: Diagonal flowing lines */
.lines-bg {
    background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(236, 72, 153, 0.12) 8px, rgba(236, 72, 153, 0.12) 9px);
    background-size: 200% 200%;
    animation: flowLines 8s linear infinite;
    filter: hue-rotate(0deg);
    animation: flowLines 8s linear infinite, hueShift 30s linear infinite;
}

@keyframes flowLines {
    from { background-position: 0% 0%; }
    to { background-position: 100% 100%; }
}

@keyframes hueShift {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}

/* Section 3: Pulsing dot matrix */
.dots-bg {
    background-image: radial-gradient(circle, rgba(20, 184, 166, 0.3) 2px, transparent 2px);
    background-size: 16px 16px;
    animation: pulseDots 3s ease-in-out infinite alternate;
}

@keyframes pulseDots {
    from { background-size: 14px 14px; }
    to { background-size: 18px 18px; }
}

/* ============================
   TEXT CARDS
   ============================ */

.text-card {
    position: relative;
    z-index: 1;
    max-width: 40ch;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 24px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.card-left {
    margin-left: 10%;
}

.card-right {
    margin-left: auto;
    margin-right: 10%;
}

.card-center {
    margin: 0 auto;
}

.process-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--white-40);
    display: block;
    margin-bottom: 12px;
}

.text-card h2 {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    color: var(--white);
    margin-bottom: 8px;
}

.text-card p {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: var(--white-70);
    line-height: 1.7;
}

/* ============================
   PARTICLE SECTION
   ============================ */

#particle-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--canvas-dark);
}

#particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
}

/* ============================
   MERGE FOOTER
   ============================ */

#merge-footer {
    position: relative;
    padding: 60px 20px;
    text-align: center;
    overflow: hidden;
}

.merge-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(236, 72, 153, 0.05) 6px, rgba(236, 72, 153, 0.05) 7px),
        radial-gradient(circle, rgba(20, 184, 166, 0.08) 1px, transparent 1px);
    background-size: 100% 100%, 200% 200%, 12px 12px;
    mix-blend-mode: screen;
    z-index: 0;
}

.footer-text {
    position: relative;
    z-index: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--white-70);
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 768px) {
    .card-left,
    .card-right {
        margin-left: 20px;
        margin-right: 20px;
    }
}
