/* reasoner.studio -- Frutiger Aero Reasoning Observatory */
:root {
    --ink-slate: #1A1F2E;
    --storm-gray: #3D4555;
    --silver-blue: #6B7A8D;
    --mist: #B4C5D4;
    --frost: #E8EDF3;
    --alpine: #F5F7FA;
    --reason-blue: #2C5F8A;
    --ice-glaze: #D4E3F0;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: var(--storm-gray);
    background: var(--alpine);
    overflow-x: hidden;
}

/* Dot grid background */
.dot-grid {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: radial-gradient(circle, var(--mist) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Pill navigation */
.pill-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 50;
    display: flex;
    gap: 8px;
    background: rgba(245, 247, 250, 0.72);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(180, 197, 212, 0.45);
    border-radius: 20px;
    padding: 8px 12px;
}
.pill-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--mist);
    cursor: pointer;
    transition: background 0.2s;
}
.pill-dot.active { background: var(--reason-blue); }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.mountain-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 30% 80%, rgba(180, 197, 212, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(212, 227, 240, 0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 100%, rgba(107, 122, 141, 0.15) 0%, transparent 60%),
        linear-gradient(180deg, var(--alpine) 0%, var(--frost) 100%);
    opacity: 0;
    transition: opacity 0.6s ease-in;
    z-index: 0;
}
.mountain-bg.visible { opacity: 1; }

/* Glass cards */
.glass-card {
    background: rgba(245, 247, 250, 0.72);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(180, 197, 212, 0.45);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(26, 31, 46, 0.06);
    transition: backdrop-filter 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.glass-card:hover {
    border-color: rgba(180, 197, 212, 0.70);
    box-shadow: 0 12px 40px rgba(26, 31, 46, 0.10);
}

/* Hero card */
.hero-card {
    position: relative;
    z-index: 2;
    max-width: 580px;
    padding: 48px 56px;
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--silver-blue);
    display: block;
    margin-bottom: 12px;
}

.hero-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 42px;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-slate);
    margin-bottom: 16px;
}

/* Glitch effect */
.hero-title.glitch {
    animation: glitch-split 0.2s steps(1) forwards;
}
@keyframes glitch-split {
    0% { clip-path: inset(0 0 66% 0); transform: translateX(3px); }
    33% { clip-path: inset(33% 0 33% 0); transform: translateX(-4px); }
    66% { clip-path: inset(66% 0 0 0); transform: translateX(2px); }
    100% { clip-path: none; transform: translateX(0); }
}

.hero-premise {
    font-size: 17px;
    color: var(--storm-gray);
    line-height: 1.75;
}

/* Flow / main */
.flow {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px 80px;
}

/* Node line */
.node-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 100%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}
.node-line svg { width: 20px; height: 100%; }
.connect-line {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s ease-out;
}
.connect-line.drawn { stroke-dashoffset: 0; }

/* Mountain divider */
.mountain-divider {
    max-width: 800px;
    margin: 34px auto;
    overflow: hidden;
}
.mountain-divider svg { width: 100%; height: 60px; }
.ridge-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 2s ease-in-out;
}
.ridge-path.drawn { stroke-dashoffset: 0; }

/* Panel groups */
.panel-group {
    padding: 0;
    position: relative;
    z-index: 2;
}

/* Content panels */
.panel-card {
    padding: 40px 48px;
    max-width: 620px;
    margin-bottom: 55px;
    position: relative;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease, backdrop-filter 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.panel-card.visible { opacity: 1; }

.offset-left {
    margin-right: auto;
    transform: translateX(-30px);
}
.offset-left.visible { transform: translateX(0); }

.offset-right {
    margin-left: auto;
    transform: translateX(30px);
}
.offset-right.visible { transform: translateX(0); }

.offset-center {
    margin: 0 auto 55px;
    transform: translateY(20px);
}
.offset-center.visible { transform: translateY(0); }

.tilt-cw { transform: rotate(1deg) translateX(-30px); }
.tilt-cw.visible { transform: rotate(1deg) translateX(0); }

.tilt-ccw { transform: rotate(-1deg) translateX(30px); }
.tilt-ccw.visible { transform: rotate(-1deg) translateX(0); }

/* Node dots */
.node-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 2px solid var(--reason-blue);
    background: transparent;
    position: absolute;
    top: 20px; left: -20px;
    transition: background 0.3s ease;
}
.node-dot.filled { background: var(--reason-blue); }

/* Card typography */
.card-heading {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: var(--ink-slate);
    margin-bottom: 16px;
}
.card-body {
    color: var(--storm-gray);
    margin-bottom: 16px;
}
.card-body:last-child { margin-bottom: 0; }

/* Closing / footer */
.closing {
    text-align: center;
    padding: 60px 24px 80px;
    position: relative;
    z-index: 1;
}
.footer-ridge { max-width: 600px; margin: 0 auto 40px; }
.closing-text {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--ink-slate);
    line-height: 1.4;
    margin-bottom: 16px;
}
.closing-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--silver-blue);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 28px; }
    .hero-card { padding: 32px 24px; max-width: 90vw; }
    .panel-card { padding: 28px 20px; max-width: 100%; }
    .offset-left, .offset-right { margin-left: 0; margin-right: 0; }
    .tilt-cw, .tilt-ccw { transform: rotate(0deg) translateX(0); }
    .tilt-cw.visible, .tilt-ccw.visible { transform: rotate(0deg) translateX(0); }
    .flow { padding: 0 16px 60px; }
    .card-heading { font-size: 24px; }
    .node-dot { display: none; }
    .node-line { display: none; }
}
