/* simulai.org - sci-fi command center, timeline-vertical */

:root {
    --command-dark: #0e1420;
    --system-blue: #3a7ae8;
    --allied-teal: #38b8a8;
    --signal-green: #4ade80;
    --briefing-gray: #8a94a4;
    --display-white: #e8ecf4;
    --glow-blue: #5a9af8;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--command-dark);
    color: var(--display-white);
    font-family: "Roboto", system-ui, sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.mono {
    font-family: "Fira Mono", ui-monospace, monospace;
    font-size: clamp(12px, 1vw, 14px);
    letter-spacing: 0.04em;
}

/* ============== BUBBLE FIELD ============== */

.bubbles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bubble {
    position: absolute;
    bottom: -12vh;
    left: var(--left);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(58, 122, 232, 0.18) 0%,
        rgba(56, 184, 168, 0.08) 50%,
        transparent 75%);
    box-shadow: inset 0 0 12px rgba(58, 122, 232, 0.25);
    animation: rise var(--dur) linear infinite;
    animation-delay: var(--delay);
    will-change: transform;
}

@keyframes rise {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-120vh) translateX(40px); opacity: 0; }
}

/* ============== HERO ============== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 6vw;
    text-align: center;
    z-index: 2;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(58, 122, 232, 0.12), transparent 60%),
        radial-gradient(ellipse at 30% 80%, rgba(56, 184, 168, 0.08), transparent 60%);
}

.hero__content { max-width: 1100px; position: relative; }

.hero__sub {
    color: var(--system-blue);
    margin-bottom: 32px;
    opacity: 0;
    animation: fade-in 600ms ease-out 200ms forwards;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 12px;
}

.hero__title {
    font-family: "Oswald", sans-serif;
    font-weight: 700;
    font-size: clamp(56px, 12vw, 168px);
    line-height: 0.92;
    letter-spacing: -0.01em;
    color: var(--display-white);
    text-transform: uppercase;
    margin-bottom: 32px;
    opacity: 0;
    transform: scale(1.1);
    animation: scale-in 800ms ease-out 400ms forwards;
}

.hero__title-dot { color: var(--system-blue); }

@keyframes scale-in {
    0%   { opacity: 0; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.hero__lede {
    max-width: 580px;
    margin: 0 auto 32px;
    color: var(--display-white);
    opacity: 0;
    animation: fade-in 800ms ease-out 1000ms forwards;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--allied-teal);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    opacity: 0;
    animation: fade-in 800ms ease-out 1300ms forwards;
}

.hero__meta .dot { color: var(--system-blue); opacity: 0.6; }

.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--briefing-gray);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
    opacity: 0;
    animation: fade-in 800ms ease-out 1700ms forwards;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--system-blue), transparent);
    animation: scroll-pulse 2.4s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { transform: scaleY(1); opacity: 0.4; }
    50%      { transform: scaleY(1.4); opacity: 1; }
}

@keyframes fade-in {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

/* ============== TIMELINE SPINE ============== */

.timeline {
    position: relative;
    z-index: 2;
    padding: 80px 0 120px;
    max-width: 1280px;
    margin: 0 auto;
}

.timeline__spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15%;
    width: 2px;
    background: rgba(58, 122, 232, 0.15);
    overflow: hidden;
}

.timeline__spine-fill {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--system-blue), var(--allied-teal));
    box-shadow: 0 0 8px rgba(58, 122, 232, 0.6);
    transition: height 200ms linear;
}

@media (max-width: 700px) {
    .timeline__spine { left: 28px; }
}

/* ============== TIMELINE ENTRIES ============== */

.entry {
    position: relative;
    padding: 60px 6vw 60px calc(15% + 2rem);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.entry.is-in { opacity: 1; transform: translateX(0); }

@media (max-width: 700px) {
    .entry { padding: 40px 6vw 40px calc(28px + 2rem); }
}

.entry__node {
    position: absolute;
    top: 76px;
    left: calc(15% - 7px);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--command-dark);
    border: 2px solid var(--system-blue);
    box-shadow: 0 0 0 0 rgba(58, 122, 232, 0);
    z-index: 3;
}

.entry.is-in .entry__node {
    animation: node-pulse 1.4s ease-out;
    background: var(--system-blue);
}

@keyframes node-pulse {
    0%   { box-shadow: 0 0 4px rgba(58, 122, 232, 0.8); }
    50%  { box-shadow: 0 0 24px rgba(58, 122, 232, 0.7), 0 0 44px rgba(58, 122, 232, 0.3); }
    100% { box-shadow: 0 0 8px rgba(58, 122, 232, 0.5); }
}

.entry--final .entry__node--final {
    border-color: var(--allied-teal);
}

.entry.is-in .entry__node--final {
    background: var(--allied-teal);
    animation-name: node-pulse-teal;
}

@keyframes node-pulse-teal {
    0%   { box-shadow: 0 0 4px rgba(56, 184, 168, 0.8); }
    50%  { box-shadow: 0 0 24px rgba(56, 184, 168, 0.7), 0 0 44px rgba(56, 184, 168, 0.3); }
    100% { box-shadow: 0 0 8px rgba(56, 184, 168, 0.5); }
}

@media (max-width: 700px) {
    .entry__node { left: 21px; }
}

.entry__connector {
    position: absolute;
    top: 82px;
    left: 15%;
    height: 1px;
    background: var(--system-blue);
    width: 0;
    transition: width 700ms ease 200ms;
    box-shadow: 0 0 6px rgba(58, 122, 232, 0.6);
}

.entry.is-in .entry__connector { width: calc(2rem - 4px); }

@media (max-width: 700px) {
    .entry__connector { left: 28px; }
}

.entry__panel {
    background: rgba(14, 20, 32, 0.85);
    border: 1px solid rgba(58, 122, 232, 0.25);
    padding: 28px 32px;
    max-width: 760px;
    backdrop-filter: blur(6px);
    border-radius: 4px;
    position: relative;
}

.entry__panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 24px;
    height: 1px;
    background: var(--system-blue);
}
.entry__panel::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 1px;
    height: 24px;
    background: var(--system-blue);
}

.entry__date {
    color: var(--allied-teal);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 13px;
    margin-bottom: 14px;
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid rgba(56, 184, 168, 0.4);
    border-radius: 2px;
}

.entry__title {
    font-family: "Oswald", sans-serif;
    font-weight: 500;
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: var(--display-white);
    margin-bottom: 18px;
}

.entry__body {
    color: var(--display-white);
    opacity: 0.85;
    margin-bottom: 16px;
    max-width: 60ch;
}

.entry__tag {
    color: var(--briefing-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
}

/* ============== METRICS ============== */

.entry__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(58, 122, 232, 0.2);
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric__label {
    color: var(--briefing-gray);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
}

.metric__value {
    font-family: "Oswald", sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 3vw, 40px);
    color: var(--signal-green);
    text-shadow: 0 0 18px rgba(74, 222, 128, 0.35);
}

/* ============== SCHEMATIC SVG ============== */

.schematic {
    width: 100%;
    height: auto;
    margin-top: 20px;
    background: rgba(58, 122, 232, 0.04);
    border: 1px solid rgba(58, 122, 232, 0.18);
    border-radius: 4px;
    padding: 16px;
}

.schematic .dline {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

.entry.is-in .schematic .dline {
    animation: draw-stroke 1.6s ease-out forwards;
}

.entry.is-in .schematic .dline:nth-of-type(1) { animation-delay: 100ms; }
.entry.is-in .schematic .dline:nth-of-type(2) { animation-delay: 250ms; }
.entry.is-in .schematic .dline:nth-of-type(3) { animation-delay: 400ms; }
.entry.is-in .schematic .dline:nth-of-type(4) { animation-delay: 550ms; }
.entry.is-in .schematic .dline:nth-of-type(5) { animation-delay: 700ms; }
.entry.is-in .schematic .dline:nth-of-type(6) { animation-delay: 850ms; }
.entry.is-in .schematic .dline:nth-of-type(7) { animation-delay: 1000ms; }
.entry.is-in .schematic .dline:nth-of-type(8) { animation-delay: 1150ms; }
.entry.is-in .schematic .dline:nth-of-type(9) { animation-delay: 1300ms; }

@keyframes draw-stroke {
    0%   { stroke-dashoffset: 1200; }
    100% { stroke-dashoffset: 0; }
}

/* ============== FINAL ENTRY ============== */

.entry__panel--final {
    background: linear-gradient(135deg, rgba(58, 122, 232, 0.1), rgba(56, 184, 168, 0.06));
    border-color: rgba(56, 184, 168, 0.4);
}

.entry__panel--final .entry__date {
    color: var(--signal-green);
    border-color: rgba(74, 222, 128, 0.5);
}

.entry__cta {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(56, 184, 168, 0.3);
}

.entry__cta-line {
    color: var(--allied-teal);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 13px;
}

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

.footer {
    background: var(--command-dark);
    border-top: 1px solid rgba(58, 122, 232, 0.2);
    padding: 40px 6vw;
    position: relative;
    z-index: 2;
}

.footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer__name {
    font-family: "Oswald", sans-serif;
    font-weight: 700;
    font-size: 24px;
    text-transform: uppercase;
    color: var(--display-white);
}

.footer__dot { color: var(--system-blue); }

.footer__line {
    color: var(--briefing-gray);
    font-size: 11px;
    letter-spacing: 0.06em;
}
