/* lowball.dev v2 — muji / f-pattern / midnight-blue / glassmorphic-cards
   ---------------------------------------------------------------------- */

:root {
    --bg-base: #0d1626;
    --bg-elevated: #131e33;
    --wash-tone: #1a2a4a;
    --glass-fill: rgba(232, 236, 242, 0.06);
    --glass-fill-hover: rgba(232, 236, 242, 0.10);
    --glass-fill-defocus: rgba(232, 236, 242, 0.035);
    --glass-border: rgba(232, 236, 242, 0.12);
    --glass-border-active: #4a7ec8;
    --text-primary: #e8ecf2;
    --text-secondary: #b8c2d4;
    --text-tertiary: #7a8499;
    --accent-blue: #4a7ec8;
    --accent-blue-glow: #7fa8d8;
    --hairline: rgba(232, 236, 242, 0.18);
    --soft-wash: rgba(74, 126, 200, 0.18);

    --pad-x: clamp(32px, 4vw, 80px);
    --rhythm: 96px;
}

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

html, body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    position: relative;
}

/* Soft radial wash drifting from upper-right
   --------------------------------------------- */
.soft-wash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(1200px 900px at 85% 8%, var(--soft-wash) 0%, transparent 60%),
        radial-gradient(900px 700px at 12% 92%, rgba(26, 42, 74, 0.35) 0%, transparent 65%);
    animation: wash-drift 30s ease-in-out infinite alternate;
}

@keyframes wash-drift {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-60px, 30px, 0); }
}

.page {
    position: relative;
    z-index: 1;
    padding: clamp(28px, 3.5vw, 56px) var(--pad-x) clamp(56px, 6vw, 96px);
    max-width: 1480px;
    margin: 0 auto;
}

/* ===== HERO (F's top bar) ===================================== */
.hero {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    grid-template-areas: "left card";
    gap: clamp(32px, 5vw, 80px);
    align-items: end;
    min-height: 90vh;
    padding-bottom: var(--rhythm);
}

.hero-left {
    grid-area: left;
}

.caption {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: clamp(28px, 4vw, 56px);
    opacity: 0;
    animation: fade-in 800ms ease-out 220ms forwards;
}

.caption::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--text-tertiary);
    vertical-align: middle;
    margin-right: 12px;
}

.wordmark {
    font-family: 'Manrope', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(80px, 12vw, 180px);
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    animation: fade-up 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 80ms forwards;
}

.hero-subline {
    margin-top: clamp(18px, 2.4vw, 28px);
    max-width: 32em;
    font-size: clamp(15px, 1.2vw, 17px);
    line-height: 1.7;
    color: var(--text-secondary);
    opacity: 0;
    animation: fade-in 800ms ease-out 460ms forwards;
}

/* Hero card */
.hero-card {
    grid-area: card;
    width: 100%;
    max-width: 360px;
    justify-self: end;
    opacity: 0;
    transform: translateY(24px);
    animation: fade-up 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 320ms forwards;
}

/* ===== Glass card (motif) ===================================== */
.glass-card {
    position: relative;
    padding: 28px;
    background: var(--glass-fill);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    transition:
        background 280ms ease,
        backdrop-filter 280ms ease,
        -webkit-backdrop-filter 280ms ease,
        border-color 280ms ease,
        opacity 280ms ease,
        transform 280ms ease;
}

.glass-card .card-dot {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: background 280ms ease, box-shadow 280ms ease;
}

.glass-card.is-active .card-dot,
.glass-card:hover .card-dot {
    background: var(--accent-blue-glow);
    box-shadow: 0 0 8px var(--accent-blue-glow);
}

.glass-card.is-active,
.card-canvas:hover .glass-card:hover {
    background: var(--glass-fill-hover);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    border-color: var(--glass-border-active);
}

.card-canvas:hover .glass-card:not(:hover) {
    background: var(--glass-fill-defocus);
    backdrop-filter: blur(32px) saturate(110%);
    -webkit-backdrop-filter: blur(32px) saturate(110%);
    opacity: 0.7;
}

.card-label {
    margin-top: 4px;
    margin-left: 14px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.card-metric {
    margin-top: 14px;
    font-family: 'Manrope', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.metric-prefix {
    font-size: 0.55em;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-right: 2px;
}

.metric-suffix {
    font-size: 0.5em;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-left: 2px;
}

.card-foot {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    color: var(--accent-blue-glow);
}

.card-meta {
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 10px;
}

.card-meta-value {
    color: var(--accent-blue-glow);
    font-weight: 500;
}

.card-list {
    margin-top: 16px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-list li {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.card-list li > span:first-child {
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
    align-self: center;
}

.card-note {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.card-spark {
    margin-top: 18px;
    height: 36px;
    color: var(--accent-blue);
}

.card-spark svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: spark-draw 1600ms ease-out 700ms forwards;
}

@keyframes spark-draw {
    to { stroke-dashoffset: 0; }
}

.card-bars {
    margin-top: 18px;
    height: 56px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.card-bars span {
    flex: 1;
    height: calc(var(--h) * 100%);
    background: linear-gradient(180deg, var(--accent-blue-glow) 0%, var(--accent-blue) 100%);
    opacity: 0.75;
    border-radius: 2px 2px 0 0;
    transform-origin: bottom;
    transform: scaleY(0);
    animation: bar-grow 800ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.card-bars span:nth-child(1)  { animation-delay: 800ms; }
.card-bars span:nth-child(2)  { animation-delay: 850ms; }
.card-bars span:nth-child(3)  { animation-delay: 900ms; }
.card-bars span:nth-child(4)  { animation-delay: 950ms; }
.card-bars span:nth-child(5)  { animation-delay: 1000ms; }
.card-bars span:nth-child(6)  { animation-delay: 1050ms; }
.card-bars span:nth-child(7)  { animation-delay: 1100ms; }
.card-bars span:nth-child(8)  { animation-delay: 1150ms; }
.card-bars span:nth-child(9)  { animation-delay: 1200ms; }
.card-bars span:nth-child(10) { animation-delay: 1250ms; }
.card-bars span:nth-child(11) { animation-delay: 1300ms; }
.card-bars span:nth-child(12) { animation-delay: 1350ms; }

@keyframes bar-grow {
    to { transform: scaleY(1); }
}

/* ===== ATELIER (F-pattern body) ============================== */
.atelier {
    display: grid;
    grid-template-columns: minmax(320px, 28em) 1fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
    padding-bottom: var(--rhythm);
}

.prose-rail {
    position: sticky;
    top: clamp(28px, 4vh, 56px);
    align-self: start;
}

.rail-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-blue-glow);
    margin-bottom: 18px;
}

.rail-title {
    font-family: 'Manrope', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.rail-para {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.rail-para em {
    color: var(--text-primary);
    font-style: normal;
    font-weight: 600;
}

.rail-subhead {
    font-family: 'Manrope', system-ui, sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--text-primary);
    margin-top: 36px;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.rail-quote {
    margin: 28px 0;
    padding: 18px 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    font-size: 18px;
    line-height: 1.55;
    color: var(--text-primary);
    font-style: italic;
}

/* Card canvas (right column) */
.card-canvas {
    display: grid;
    gap: 24px;
}

.card-canvas .glass-card {
    width: 100%;
}

/* Reveal animation for each card on scroll */
.glass-card.reveal-init {
    opacity: 0;
    transform: translateY(18px);
}

.glass-card.is-revealed {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 540ms ease-out,
        transform 540ms cubic-bezier(0.2, 0.7, 0.2, 1),
        background 280ms ease,
        backdrop-filter 280ms ease,
        -webkit-backdrop-filter 280ms ease,
        border-color 280ms ease;
}

/* Reveal for prose paragraphs */
.rail-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 420ms ease-out, transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rail-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== METRIC STRIP ========================================== */
.metric-strip {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: clamp(20px, 3vw, 56px);
    padding: clamp(40px, 5vw, 72px) 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    margin-bottom: var(--rhythm);
}

.metric-cell {
    text-align: left;
}

.metric-cell:nth-child(3) {
    text-align: center;
}

.metric-cell:nth-child(5) {
    text-align: right;
}

.metric-num {
    font-family: 'Manrope', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(48px, 7vw, 96px);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.metric-unit {
    font-size: 0.5em;
    font-weight: 500;
    color: var(--accent-blue-glow);
    margin-left: 4px;
    letter-spacing: 0;
}

.metric-cap {
    margin-top: 14px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.metric-rule {
    width: 1px;
    height: 56px;
    background: var(--hairline);
    justify-self: center;
}

/* ===== CLOSING ============================================== */
.closing {
    text-align: center;
    padding: clamp(40px, 6vw, 96px) 0 24px;
    max-width: 36em;
    margin: 0 auto;
}

.circuit-ornament {
    color: var(--accent-blue);
    margin: 0 auto 32px;
    width: clamp(180px, 24vw, 240px);
    height: auto;
    opacity: 0.85;
}

.circuit-ornament svg {
    width: 100%;
    height: auto;
    display: block;
}

.circuit-path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

.circuit-path.is-drawn {
    animation: circuit-draw 1400ms ease-out forwards;
}

.circuit-path.circuit-path-b.is-drawn {
    animation-delay: 200ms;
}

@keyframes circuit-draw {
    to { stroke-dashoffset: 0; }
}

.closing-maxim {
    font-family: 'Manrope', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.closing-credit {
    margin-top: 24px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* ===== Animations ============================================ */
@keyframes fade-in {
    to { opacity: 1; }
}

@keyframes fade-up {
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ============================================ */
@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "left"
            "card";
        align-items: start;
        min-height: auto;
        padding-top: 12px;
    }

    .hero-card {
        max-width: 100%;
        justify-self: stretch;
    }

    .atelier {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .prose-rail {
        position: static;
    }

    .metric-strip {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .metric-cell,
    .metric-cell:nth-child(3),
    .metric-cell:nth-child(5) {
        text-align: left;
    }

    .metric-rule {
        display: none;
    }
}

@media (max-width: 540px) {
    .wordmark {
        font-size: clamp(64px, 18vw, 96px);
    }

    .glass-card {
        padding: 22px;
    }

    .card-metric {
        font-size: clamp(32px, 8vw, 44px);
    }
}
