/* reasr.one v2 — minimalist, single-font Commissioner system */

:root {
    --frost-white: #FAFAFA;
    --ice-mist: #F0F4F8;
    --whisper-gray: #B0B8C0;
    --graphite: #4A5568;
    --accent-blue: #5B8FB9;
    --ghost: rgba(91, 143, 185, 0.03);
    --period-black: #2D3748;
}

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

html, body {
    width: 100%;
    background: linear-gradient(180deg, var(--ice-mist) 0%, var(--frost-white) 30%, var(--frost-white) 70%, var(--ice-mist) 100%);
    color: var(--whisper-gray);
    font-family: "Commissioner", sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.9;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

/* HUD frame at perception threshold */
.hud-frame {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.hud {
    position: absolute;
    opacity: 0.03;
    transition: opacity 1.2s ease;
}

.hud-tl { top: 24px; left: 24px; }
.hud-tr { top: 24px; right: 24px; }
.hud-bl { bottom: 24px; left: 24px; }
.hud-br { bottom: 24px; right: 24px; }

body.hud-awake .hud {
    opacity: 0.08;
}

/* Progress index — minimalist navigation */
.progress-index {
    position: fixed;
    top: 50%;
    right: 32px;
    transform: translateY(-50%);
    z-index: 5;
    opacity: 0;
    transition: opacity 1.2s ease 1.5s;
}

body.loaded .progress-index {
    opacity: 1;
}

.progress-index ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.progress-index li {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--whisper-gray);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

.progress-index .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--whisper-gray);
    opacity: 0.4;
    transition: opacity 0.4s ease, background 0.4s ease, transform 0.4s ease;
}

.progress-index .label {
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.progress-index li:hover .label,
.progress-index li.active .label {
    opacity: 1;
    transform: translateX(0);
    color: var(--graphite);
}

.progress-index li:hover .dot,
.progress-index li.active .dot {
    opacity: 1;
    background: var(--accent-blue);
    transform: scale(1.4);
}

/* Generic section */
.section {
    position: relative;
    z-index: 2;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 200px 24px;
}

.section > * {
    max-width: 480px;
    margin: 0 auto;
}

/* VOID — hero */
.void {
    min-height: 100vh;
}

.void-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    position: relative;
}

.wordmark {
    font-family: "Commissioner", sans-serif;
    font-weight: 400;
    font-size: clamp(28px, 4vw, 56px);
    color: var(--graphite);
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.wordmark .dot-accent {
    color: var(--accent-blue);
    font-weight: 500;
}

.subtitle {
    position: relative;
    display: inline-block;
    color: var(--whisper-gray);
    font-weight: 300;
    font-size: clamp(14px, 1.4vw, 16px);
    letter-spacing: 0.04em;
    padding-bottom: 6px;
}

.subtitle-text {
    display: inline-block;
}

.subtitle-underline {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent-blue);
    transform: translateX(-50%);
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.subtitle.drawn .subtitle-underline {
    width: 100%;
}

.meta {
    color: var(--whisper-gray);
    opacity: 0.55;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    margin-top: 18px;
}

.corner-mark {
    position: absolute;
    bottom: 32px;
    right: 32px;
    opacity: 0.5;
}

/* Shape dividers */
.shape-divider {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 36px 0;
}

.shape-divider svg {
    transition: transform 0.6s ease;
}

.shape-divider[data-shape="triangle"] svg {
    transform-origin: center;
}

.shape-divider.in-view svg {
    transform: scale(1.1);
}

/* Thought sections */
.thought-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.thought-tag {
    color: var(--accent-blue);
    opacity: 0.6;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: lowercase;
}

.thought-heading {
    font-family: "Commissioner", sans-serif;
    font-weight: 500;
    font-size: clamp(20px, 2.5vw, 36px);
    color: var(--graphite);
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.thought-body {
    font-weight: 300;
    color: var(--whisper-gray);
    line-height: 1.9;
    font-size: clamp(15px, 1.4vw, 17px);
}

/* Underline-draw on links — drawn from center */
.link-underline {
    position: relative;
    color: var(--graphite);
    text-decoration: none;
    display: inline-block;
    padding-bottom: 1px;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--accent-blue);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.link-underline:hover {
    color: var(--accent-blue);
}

.link-underline:hover::after {
    width: 100%;
    left: 0;
}

/* Closing — a single period */
.closing {
    min-height: 80vh;
    padding: 200px 24px;
}

.closing-period {
    font-family: "Commissioner", sans-serif;
    font-weight: 500;
    font-size: clamp(48px, 8vw, 96px);
    color: var(--period-black);
    line-height: 1;
    display: inline-block;
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.closing-period.pulse {
    transform: translateY(-6px);
}

/* Reveal-on-scroll for thoughts */
.section.thought,
.section.closing {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1.0s ease, transform 1.0s ease;
}

.section.thought.visible,
.section.closing.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive: hide progress-index on small screens */
@media (max-width: 720px) {
    .progress-index {
        right: 12px;
    }
    .progress-index .label {
        display: none;
    }
    .hud {
        width: 100px;
        height: 100px;
    }
    .section {
        padding: 140px 20px;
    }
}

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