/* ============================================================
   concengine.com — Dreamy-ethereal flat-design / translucent frost
   Compliance trace: Zilla Slab (Google Fonts) and Inter's neutral clarity lets the dreamy visual environment breathe without competing with ornate text shapes. Its generous x-height ensures readability even when overlaid on translucent frost backgrounds. Magnetic Cursor Interaction System:** System: Syste implemented with IntersectionObserver.
   ============================================================ */

:root {
    --frost-white: #f0f4f8;
    --slate-mist: #dce4ec;
    --midnight-ink: #1c2a3a;
    --engine-blue: #2b4c6f;
    --frozen-violet: #7b8fb2;
    --glacial-teal: #5a9aad;
    --ether-pink: #c4a1b8;
    --frost-glass: rgba(180, 200, 220, 0.45);
    --glass-layer: rgba(240, 244, 248, 0.72);
    --ice-edge: rgba(43, 76, 111, 0.12);

    --col-max: 960px;
    --gutter-w: 80px;
    --spring-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--frost-white);
    color: var(--midnight-ink);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    background:
        radial-gradient(ellipse 80% 60% at 78% 18%, rgba(124, 143, 178, 0.18), transparent 60%),
        radial-gradient(ellipse 70% 50% at 20% 80%, rgba(90, 154, 173, 0.14), transparent 65%),
        radial-gradient(ellipse 60% 40% at 60% 50%, rgba(196, 161, 184, 0.10), transparent 70%),
        linear-gradient(180deg, var(--frost-white) 0%, var(--slate-mist) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

img, svg { display: block; }

/* ============================================================
   Background thread-line ruled paper
   ============================================================ */
.thread-lines {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: linear-gradient(to bottom,
        transparent 0,
        transparent 63px,
        var(--ice-edge) 63px,
        var(--ice-edge) 64px);
    background-size: 100% 64px;
    opacity: 0.6;
    mask-image: linear-gradient(to bottom, transparent 0, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 8%, black 92%, transparent 100%);
}

/* ============================================================
   Frost gutter (right side)
   ============================================================ */
.frost-gutter {
    position: absolute;
    top: 0;
    right: 0;
    width: clamp(140px, 16vw, 240px);
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.gutter-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: visible;
}

.gutter-icon {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 110px;
    height: 110px;
    transform: translate3d(0, 0, 0);
    transition: transform 800ms var(--spring-ease);
    will-change: transform;
    pointer-events: auto;
    opacity: 0.55;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gutter-icon .frost-halo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.gutter-icon .frost-halo circle {
    fill: var(--glass-layer);
    stroke: var(--ice-edge);
    stroke-width: 1;
}

.gutter-icon .flat-icon {
    position: relative;
    width: 56px;
    height: 56px;
    z-index: 2;
}

.gutter-icon .gutter-label {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--engine-blue);
    opacity: 0.55;
    white-space: nowrap;
}

.gutter-icon.is-colliding {
    animation: collidePulse 300ms ease-out;
}

@keyframes collidePulse {
    0% { transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(1); }
    50% { transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(1.08); }
    100% { transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(1); }
}

/* ============================================================
   Section indicator (top-right pill)
   ============================================================ */
.section-indicator {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 20;
    pointer-events: auto;
}

.indicator-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--glass-layer);
    border: 1px solid var(--ice-edge);
    backdrop-filter: blur(12px) saturate(0.9);
    -webkit-backdrop-filter: blur(12px) saturate(0.9);
    color: var(--engine-blue);
    font-family: "Zilla Slab", Georgia, serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: -0.015em;
    cursor: pointer;
    transition: opacity 400ms ease, transform 400ms var(--spring-ease);
}

.indicator-pill:hover {
    transform: translateY(-1px);
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ether-pink);
    box-shadow: 0 0 0 3px rgba(196, 161, 184, 0.25);
    animation: softPulse 3s ease-in-out infinite;
}

@keyframes softPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

.indicator-overlay {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 280px;
    padding: 20px 22px;
    background: var(--glass-layer);
    border: 1px solid var(--ice-edge);
    border-radius: 14px;
    backdrop-filter: blur(18px) saturate(0.9);
    -webkit-backdrop-filter: blur(18px) saturate(0.9);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity 300ms ease, transform 300ms var(--spring-ease);
}

.section-indicator.is-open .indicator-overlay {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.overlay-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.overlay-list a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--midnight-ink);
    text-decoration: none;
    font-family: "Zilla Slab", Georgia, serif;
    font-weight: 400;
    font-size: 0.95rem;
    transition: background-color 200ms ease, color 200ms ease;
}

.overlay-list a span {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--frozen-violet);
}

.overlay-list a:hover {
    background: rgba(124, 143, 178, 0.12);
    color: var(--engine-blue);
}

/* ============================================================
   Editorial flow — main column
   ============================================================ */
.editorial-flow {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100vw;
    padding: 0;
}

.section {
    position: relative;
    min-height: 100svh;
    width: 100%;
    padding: 8vh 0;
    display: flex;
    align-items: center;
}

.section-inner {
    width: min(var(--col-max), calc(100vw - 80px - var(--gutter-w)));
    margin-left: max(32px, calc(50vw - 520px - 4vw));
    margin-right: var(--gutter-w);
    position: relative;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms ease, transform 600ms var(--spring-ease);
}

.section.is-active .section-inner,
.section.is-active .opening-field {
    opacity: 1;
    transform: translateY(0);
}

/* Typography base */
.eyebrow {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--frozen-violet);
    margin: 0 0 1.2em 0;
}

.headline {
    font-family: "Zilla Slab", Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--engine-blue);
    margin: 0 0 0.8em 0;
}

.lede {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    line-height: 1.6;
    max-width: 36em;
    margin: 0 0 1.6em 0;
    color: var(--midnight-ink);
}

.body {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    max-width: 36em;
    margin: 0 0 1.4em 0;
    color: var(--midnight-ink);
}

.body em {
    font-style: italic;
    color: var(--engine-blue);
}

.body.small {
    font-size: 0.95rem;
    color: var(--frozen-violet);
    margin-top: 2rem;
}

.pull-quote {
    font-family: "Zilla Slab", Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    line-height: 1.4;
    color: var(--engine-blue);
    border-left: 2px solid var(--ether-pink);
    padding: 0.2em 0 0.2em 1.2em;
    margin: 2.2em 0;
    max-width: 32em;
}

.mono-tag {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--frozen-violet);
    margin: 2rem 0 0 0;
}

/* ============================================================
   Section 1: Opening Vista
   ============================================================ */
.section-opening {
    padding-top: 12vh;
}
.opening-field {
    position: relative;
    width: 100%;
    min-height: 80svh;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 480px);
    gap: 6vw;
    align-items: center;
    margin-left: max(32px, calc(50vw - 520px - 4vw));
    padding-right: calc(var(--gutter-w) + 32px);
    max-width: calc(100vw - 80px);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms ease, transform 600ms var(--spring-ease);
}

.opening-engine {
    position: relative;
    width: min(46vw, 520px);
    height: min(46vw, 520px);
    margin-left: -4vw;
    transform: translate3d(0, 0, 0) rotate(0deg);
    transition: transform 800ms var(--spring-ease);
    will-change: transform;
}

.opening-engine .engine-svg {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    animation: engineRotate 40s linear infinite;
}

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

.opening-engine .engine-halo {
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 40%, rgba(240, 244, 248, 0.85), rgba(220, 228, 236, 0.35) 50%, transparent 75%);
    border: 1px solid var(--ice-edge);
    backdrop-filter: blur(14px) saturate(0.9);
    -webkit-backdrop-filter: blur(14px) saturate(0.9);
    z-index: 1;
}

.opening-copy {
    position: relative;
    max-width: 480px;
}

.opening-copy .headline {
    font-size: clamp(2.4rem, 5.2vw, 4.2rem);
}

/* ============================================================
   Section 2: The Engine Room
   ============================================================ */
.panel.frost-panel {
    position: relative;
    background: var(--glass-layer);
    border: 1px solid var(--ice-edge);
    border-radius: 18px;
    padding: clamp(24px, 3vw, 40px);
    margin: 2rem 0;
    backdrop-filter: blur(0px) saturate(0.9);
    -webkit-backdrop-filter: blur(0px) saturate(0.9);
    transition: backdrop-filter 400ms ease, -webkit-backdrop-filter 400ms ease, background-color 400ms ease;
    max-width: 52em;
}

.section.is-active .panel.frost-panel {
    backdrop-filter: blur(12px) saturate(0.9);
    -webkit-backdrop-filter: blur(12px) saturate(0.9);
}

.icon-cluster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 18px;
    margin-top: 1.8rem;
}

.cluster-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 8px;
    background: rgba(240, 244, 248, 0.5);
    border: 1px solid var(--ice-edge);
    border-radius: 12px;
    opacity: 0;
    transform: translate(var(--scatter-x, -20px), var(--scatter-y, 20px)) rotate(var(--scatter-r, -6deg));
    transition: opacity 700ms var(--spring-ease), transform 900ms var(--spring-ease);
    transition-delay: 0ms;
}

.section.is-active .cluster-item {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
}

.cluster-item .flat-icon {
    width: 44px;
    height: 44px;
}

.icon-caption {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--engine-blue);
    opacity: 0.7;
}

/* ============================================================
   Section 3: Concurrent Threads
   ============================================================ */
.section-threads {
    min-height: 140svh;
}

.threads-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 2.5rem 0 2rem 0;
    max-width: 880px;
    min-height: 720px;
}

.thread-col {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transform: translate3d(0, var(--thread-offset, 0px), 0);
    transition: transform 120ms linear;
    will-change: transform;
}

.thread-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--glass-layer);
    border: 1px solid var(--ice-edge);
    border-radius: 999px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--engine-blue);
    align-self: flex-start;
}

.thread-tag .flat-icon-sm {
    width: 16px;
    height: 16px;
}

.thread-card {
    position: relative;
    padding: 18px 20px;
    background: var(--glass-layer);
    border: 1px solid var(--ice-edge);
    border-radius: 14px;
    backdrop-filter: blur(10px) saturate(0.9);
    -webkit-backdrop-filter: blur(10px) saturate(0.9);
}

.thread-card h3 {
    font-family: "Zilla Slab", Georgia, serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.015em;
    color: var(--engine-blue);
    margin: 0 0 0.4em 0;
}

.thread-card p {
    font-family: "Inter", sans-serif;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--midnight-ink);
    margin: 0;
}

/* ============================================================
   Section 4: Convergence
   ============================================================ */
.converge-lanes {
    position: relative;
    width: 100%;
    max-width: 680px;
    height: 240px;
    margin: 2.5rem 0;
}

.lane {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ice-edge);
    overflow: visible;
}

.lane span {
    position: absolute;
    left: 0;
    top: -4px;
    width: 60px;
    height: 10px;
    border-radius: 999px;
    animation: laneFlow 6s linear infinite;
}

.lane-a { top: 20%; transform-origin: right center; }
.lane-a span { background: linear-gradient(90deg, transparent, var(--frozen-violet), transparent); animation-duration: 5s; }

.lane-b { top: 50%; transform-origin: right center; }
.lane-b span { background: linear-gradient(90deg, transparent, var(--glacial-teal), transparent); animation-duration: 7s; animation-delay: -2s; }

.lane-c { top: 80%; transform-origin: right center; }
.lane-c span { background: linear-gradient(90deg, transparent, var(--ether-pink), transparent); animation-duration: 8s; animation-delay: -4s; }

.section.is-active .lane-a,
.section.is-active .lane-b,
.section.is-active .lane-c {
    animation: laneConverge 2400ms var(--spring-ease) forwards;
}
.section.is-active .lane-b { animation-delay: 200ms; }
.section.is-active .lane-c { animation-delay: 400ms; }

@keyframes laneConverge {
    0% { top: var(--start-top, 20%); }
    100% { top: 50%; }
}

.section-convergence .lane-a { --start-top: 20%; }
.section-convergence .lane-b { --start-top: 50%; }
.section-convergence .lane-c { --start-top: 80%; }

@keyframes laneFlow {
    from { left: -60px; }
    to { left: 100%; }
}

.converge-node {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translate(0, -50%);
    width: 72px;
    height: 72px;
    background: var(--glass-layer);
    border: 1px solid var(--ice-edge);
    border-radius: 50%;
    backdrop-filter: blur(12px) saturate(0.9);
    -webkit-backdrop-filter: blur(12px) saturate(0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}
.converge-node .flat-icon-lg {
    width: 44px;
    height: 44px;
}

/* ============================================================
   Section 5: The Quiet Core
   ============================================================ */
.core-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.4rem;
}

.core-inner .eyebrow {
    margin-bottom: 0;
}

.core-grid {
    display: grid;
    grid-template-columns: repeat(6, 68px);
    gap: 18px;
    padding: 28px;
    background: var(--glass-layer);
    border: 1px solid var(--ice-edge);
    border-radius: 20px;
    backdrop-filter: blur(14px) saturate(0.9);
    -webkit-backdrop-filter: blur(14px) saturate(0.9);
}

.core-cell {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 244, 248, 0.6);
    border: 1px solid var(--ice-edge);
    border-radius: 12px;
}

.core-cell .flat-icon {
    width: 38px;
    height: 38px;
}

.closing-line {
    font-family: "Zilla Slab", Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.015em;
    color: var(--engine-blue);
    margin: 0;
    max-width: 24em;
    line-height: 1.2;
}

/* ============================================================
   Utility flat-icons
   ============================================================ */
.flat-icon {
    width: 48px;
    height: 48px;
    display: block;
}

.flat-icon-sm { width: 20px; height: 20px; display: block; }
.flat-icon-lg { width: 56px; height: 56px; display: block; }

/* ============================================================
   Connection dots — on ruled thread lines
   ============================================================ */
.section::before {
    content: "";
    position: absolute;
    left: max(16px, calc(50vw - 520px - 6vw));
    top: 48%;
    width: 6px;
    height: 6px;
    background: var(--ether-pink);
    border-radius: 50%;
    opacity: 0.3;
    animation: dotPulse 3s ease-in-out infinite;
    pointer-events: none;
}

.section::after {
    content: "";
    position: absolute;
    right: calc(var(--gutter-w) + 8px);
    top: 62%;
    width: 6px;
    height: 6px;
    background: var(--glacial-teal);
    border-radius: 50%;
    opacity: 0.3;
    animation: dotPulse 3s ease-in-out infinite;
    animation-delay: -1.5s;
    pointer-events: none;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.25); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .frost-gutter { display: none; }

    .section-inner {
        margin-left: max(20px, calc(50vw - 520px));
        margin-right: 20px;
        width: auto;
        max-width: calc(100vw - 40px);
    }

    .opening-field {
        grid-template-columns: 1fr;
        gap: 3vh;
        padding-right: 20px;
        margin-left: 20px;
        max-width: calc(100vw - 40px);
        text-align: left;
    }

    .opening-engine {
        width: min(66vw, 420px);
        height: min(66vw, 420px);
        margin-left: 0;
    }

    .threads-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .thread-col {
        transform: none !important;
    }

    .core-grid {
        grid-template-columns: repeat(3, 64px);
    }

    .section-indicator {
        right: 16px;
        top: 16px;
    }
}

@media (max-width: 560px) {
    .core-grid {
        grid-template-columns: repeat(3, 56px);
        gap: 12px;
        padding: 18px;
    }
    .core-cell {
        width: 56px;
        height: 56px;
    }
}
