/* ── Reset & Base ────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bp-bg: #0a1628;
    --bp-grid: rgba(80, 140, 220, 0.07);
    --bp-grid-major: rgba(80, 140, 220, 0.12);
    --bp-line: rgba(180, 210, 255, 0.5);
    --bp-line-dim: rgba(180, 210, 255, 0.2);
    --bp-text: rgba(200, 220, 255, 0.85);
    --bp-text-dim: rgba(160, 190, 240, 0.4);
    --bp-accent: rgba(255, 255, 255, 0.9);
    --bp-cyan: rgba(100, 200, 255, 0.7);
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --font-hand: 'Neucha', cursive;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-mono);
    background: var(--bp-bg);
    color: var(--bp-text);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* ── Blueprint Grid Paper Background ─────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        /* Minor grid */
        linear-gradient(var(--bp-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px),
        /* Major grid */
        linear-gradient(var(--bp-grid-major) 1px, transparent 1px),
        linear-gradient(90deg, var(--bp-grid-major) 1px, transparent 1px);
    background-size:
        20px 20px,
        20px 20px,
        100px 100px,
        100px 100px;
    pointer-events: none;
}

/* Subtle blue radial vignette */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(5, 10, 20, 0.5) 100%);
    pointer-events: none;
}

#grid-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ── Blueprint Frame ─────────────────────────────── */
.blueprint-frame {
    position: fixed;
    inset: 20px;
    z-index: 2;
    pointer-events: none;
}

.frame-edge {
    position: absolute;
    background: var(--bp-line-dim);
}

.frame-top {
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
}

.frame-bottom {
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
}

.frame-left {
    left: 0;
    top: 24px;
    bottom: 24px;
    width: 1px;
}

.frame-right {
    right: 0;
    top: 24px;
    bottom: 24px;
    width: 1px;
}

.frame-corner {
    position: absolute;
    width: 24px;
    height: 24px;
}

.frame-corner::before,
.frame-corner::after {
    content: '';
    position: absolute;
    background: var(--bp-line);
}

.frame-tl {
    top: 0;
    left: 0;
}

.frame-tl::before {
    top: 0;
    left: 0;
    width: 24px;
    height: 1px;
}

.frame-tl::after {
    top: 0;
    left: 0;
    width: 1px;
    height: 24px;
}

.frame-tr {
    top: 0;
    right: 0;
}

.frame-tr::before {
    top: 0;
    right: 0;
    width: 24px;
    height: 1px;
}

.frame-tr::after {
    top: 0;
    right: 0;
    width: 1px;
    height: 24px;
}

.frame-bl {
    bottom: 0;
    left: 0;
}

.frame-bl::before {
    bottom: 0;
    left: 0;
    width: 24px;
    height: 1px;
}

.frame-bl::after {
    bottom: 0;
    left: 0;
    width: 1px;
    height: 24px;
}

.frame-br {
    bottom: 0;
    right: 0;
}

.frame-br::before {
    bottom: 0;
    right: 0;
    width: 24px;
    height: 1px;
}

.frame-br::after {
    bottom: 0;
    right: 0;
    width: 1px;
    height: 24px;
}

/* ── Annotations ─────────────────────────────────── */
.annotation {
    position: fixed;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--bp-text-dim);
    pointer-events: none;
}

.annotation-tl {
    top: 32px;
    left: 36px;
}

.annotation-tr {
    top: 32px;
    right: 36px;
}

.annotation-scale {
    bottom: 32px;
    left: 36px;
}

/* ── Main Content ────────────────────────────────── */
main {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
    max-width: 680px;
}

.hero {
    text-align: center;
}

/* ── Dimension Line ──────────────────────────────── */
.dimension-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.dim-tick {
    width: 40px;
    height: 1px;
    background: var(--bp-line-dim);
    position: relative;
}

.dim-tick::before,
.dim-tick::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 8px;
    background: var(--bp-line-dim);
}

.dim-tick::before {
    left: 0;
    top: -3.5px;
}

.dim-tick::after {
    right: 0;
    top: -3.5px;
}

.dim-label {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--bp-text-dim);
}

/* ── Name & Tagline ──────────────────────────────── */
.name-group {
    margin-bottom: 2.5rem;
}

.name {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--bp-accent);
    line-height: 1.1;
    margin-bottom: 0.75rem;
    min-height: 1.1em;
}

.tagline {
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 1.8vw, 0.8rem);
    font-weight: 400;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--bp-cyan);
}

/* ── Divider ─────────────────────────────────────── */
.divider {
    width: 80px;
    height: 1px;
    margin: 0 auto 2.5rem;
    position: relative;
    background: var(--bp-line-dim);
}

.divider::before {
    content: '◇';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.5rem;
    color: var(--bp-line);
    background: var(--bp-bg);
    padding: 0 6px;
}

/* ── Quote ───────────────────────────────────────── */
.quote {
    max-width: 480px;
    margin: 0 auto;
}

.quote p {
    font-family: var(--font-hand);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 400;
    font-style: normal;
    line-height: 1.8;
    color: var(--bp-text);
    margin-bottom: 1.25rem;
}

.quote cite {
    font-family: var(--font-hand);
    font-style: normal;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: none;
    color: var(--bp-text-dim);
}

/* ── Title Block ─────────────────────────────────── */
.title-block {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 3;
    border: 1px solid var(--bp-line-dim);
    font-family: var(--font-mono);
    min-width: 180px;
}

.tb-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 10px;
    border-bottom: 1px solid rgba(180, 210, 255, 0.08);
    font-size: 0.55rem;
    letter-spacing: 0.1em;
}

.tb-row:last-child {
    border-bottom: none;
}

.tb-header {
    background: rgba(80, 140, 220, 0.08);
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--bp-cyan);
    padding: 6px 10px;
}

.tb-label {
    color: var(--bp-text-dim);
}

.tb-value {
    color: var(--bp-text);
}

/* ── Footer ──────────────────────────────────────── */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    text-align: center;
    padding: 1.5rem;
}

footer p {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--bp-text-dim);
    text-transform: uppercase;
}

/* ── Intro Animation Utilities ───────────────────── */
.hidden {
    opacity: 0;
}

.reveal {
    opacity: 1;
    transition: opacity 1.6s ease;
}

.word-span {
    display: inline;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.word-span.visible {
    opacity: 1;
}

.scramble-char {
    display: inline-block;
    min-width: 0.1em;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
    .blueprint-frame {
        inset: 12px;
    }

    .annotation {
        font-size: 0.5rem;
    }

    .annotation-tl {
        top: 20px;
        left: 20px;
    }

    .annotation-tr {
        top: 20px;
        right: 20px;
    }

    .annotation-scale {
        bottom: 20px;
        left: 20px;
    }

    .title-block {
        bottom: 16px;
        right: 16px;
        min-width: 150px;
    }

    main {
        padding: 1.5rem;
    }

    .name-group {
        margin-bottom: 2rem;
    }

    .divider {
        margin-bottom: 2rem;
    }

    .quote p {
        line-height: 1.9;
    }
}

@media (max-width: 480px) {
    .title-block {
        display: none;
    }

    .annotation-tr {
        display: none;
    }
}