/* =====================================================
   simidiot.net — a museum of beautiful errors
   palette: #0f1a2e #1a2a44 #8a9ab4 #4ac4b8 #b8aaa0 #e4e8f0 #1a4a44
   fonts: Nunito (headlines), Mulish (body), IBM Plex Mono (labels)
   ===================================================== */

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

:root {
    --navy-deep: #0f1a2e;
    --navy-mid: #1a2a44;
    --silver: #8a9ab4;
    --teal: #4ac4b8;
    --silver-warm: #b8aaa0;
    --ice: #e4e8f0;
    --teal-deep: #1a4a44;
    --scroll: 0;
    --hero-progress: 0;
}

html {
    scroll-behavior: smooth;
    background: var(--navy-deep);
}

body {
    font-family: 'Mulish', system-ui, sans-serif;
    background: var(--navy-deep);
    color: var(--silver);
    line-height: 1.8;
    overflow-x: hidden;
    min-height: 100vh;
    font-size: clamp(15px, 1.5vw, 18px);
    font-weight: 400;
    letter-spacing: 0.005em;
    position: relative;
}

/* ------- isometric background grid (whole page) ------- */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(30deg, rgba(138,154,180,0.04) 1px, transparent 1px),
        linear-gradient(150deg, rgba(138,154,180,0.04) 1px, transparent 1px);
    background-size: 64px 64px, 64px 64px;
    mix-blend-mode: screen;
    opacity: 0.85;
}

/* ------- parallax background layers ------- */
.parallax-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-layer {
    position: absolute;
    inset: -10% -10% -10% -10%;
    transform: translateY(calc(var(--scroll) * -1px));
    will-change: transform;
}

.layer-far {
    background:
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(74,196,184,0.08), transparent 60%),
        radial-gradient(ellipse 70% 50% at 80% 70%, rgba(138,154,180,0.06), transparent 65%),
        radial-gradient(ellipse 50% 30% at 50% 50%, rgba(26,74,68,0.18), transparent 70%);
}

.layer-mid {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(184,170,160,0.08) 1px, transparent 2px),
        radial-gradient(circle at 30% 60%, rgba(138,154,180,0.10) 1px, transparent 2px),
        radial-gradient(circle at 70% 30%, rgba(74,196,184,0.10) 1px, transparent 2px),
        radial-gradient(circle at 85% 80%, rgba(228,232,240,0.07) 1px, transparent 2px),
        radial-gradient(circle at 50% 50%, rgba(138,154,180,0.06) 1px, transparent 2px);
    background-size: 240px 240px, 320px 320px, 280px 280px, 360px 360px, 200px 200px;
}

/* ------- floating isometric icons (parallax midground) ------- */
.floating-icons {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.float-icon {
    position: absolute;
    opacity: 0;
    transform: translateY(calc(var(--scroll) * -0.6px));
    will-change: transform, opacity;
    animation: float-slow var(--float-duration, 8s) ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

.float-icon.is-visible {
    opacity: var(--target-opacity, 0.18);
    transition: opacity 1.6s ease-out;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(calc(var(--scroll) * -0.6px)); }
    50% { transform: translateY(calc((var(--scroll) * -0.6px) - 12px)); }
}

/* ------- header ------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px clamp(20px, 4vw, 56px);
    background: linear-gradient(180deg, rgba(15,26,46,0.85) 0%, rgba(15,26,46,0) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 400ms ease, transform 400ms ease;
}

.site-header.is-condensed {
    background: linear-gradient(180deg, rgba(15,26,46,0.95) 0%, rgba(15,26,46,0.7) 100%);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ice);
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand-glyph {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 0 6px rgba(74,196,184,0.45));
    animation: brand-pulse 5s ease-in-out infinite;
}

@keyframes brand-pulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(74,196,184,0.45)); }
    50% { filter: drop-shadow(0 0 12px rgba(74,196,184,0.65)); }
}

.brand-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: var(--ice);
}

.nav-links {
    display: flex;
    gap: clamp(14px, 2vw, 26px);
}

.nav-link {
    position: relative;
    color: var(--silver);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 6px 2px;
    background-image: linear-gradient(90deg, var(--teal), var(--silver));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1.5px;
    transition: background-size 420ms ease-out, color 320ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--ice);
    background-size: 100% 1.5px;
}

/* ------- common section frame ------- */
.section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    padding: clamp(80px, 12vh, 160px) clamp(20px, 6vw, 96px);
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 2;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.bg-hero {
    background: linear-gradient(180deg, #060d1c 0%, var(--navy-deep) 35%, var(--navy-mid) 100%);
}

.bg-origin {
    background: linear-gradient(180deg, var(--navy-mid) 0%, var(--navy-deep) 60%, #0c1727 100%);
}

.bg-archive {
    background: linear-gradient(180deg, #0c1727 0%, var(--navy-deep) 50%, var(--navy-mid) 100%);
}

.bg-errors {
    background: linear-gradient(180deg, var(--navy-mid) 0%, #14233f 50%, #0d1c34 100%);
}

.bg-philosophy {
    background: linear-gradient(180deg, #0d1c34 0%, #112540 50%, var(--teal-deep) 200%);
}

.bg-colophon {
    background: linear-gradient(180deg, #0d1c34 0%, var(--navy-deep) 50%, #060d1c 100%);
}

.section-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(30deg, rgba(138,154,180,0.05) 1px, transparent 1px),
        linear-gradient(150deg, rgba(138,154,180,0.05) 1px, transparent 1px);
    background-size: 96px 96px, 96px 96px;
    opacity: 0.6;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9), rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9), rgba(0,0,0,0) 80%);
}

.section-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.section.is-revealed .section-label {
    opacity: 1;
    transform: translateY(0);
}

.label-bar {
    display: inline-block;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, var(--teal), transparent);
}

.label-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--silver-warm);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.section-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4.2vw, 52px);
    line-height: 1.18;
    color: var(--ice);
    letter-spacing: -0.005em;
    margin-bottom: 28px;
    max-width: 22ch;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 900ms ease-out 120ms, transform 900ms ease-out 120ms;
}

.section.is-revealed .section-title {
    opacity: 1;
    transform: translateY(0);
}

.section-lede {
    color: var(--silver);
    font-size: clamp(16px, 1.4vw, 19px);
    max-width: 60ch;
    margin-bottom: 56px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 900ms ease-out 220ms, transform 900ms ease-out 220ms;
}

.section.is-revealed .section-lede {
    opacity: 1;
    transform: translateY(0);
}

/* ------- HERO ------- */
.section-hero {
    min-height: 100vh;
    padding-top: clamp(120px, 18vh, 200px);
    text-align: center;
    align-items: center;
    justify-content: center;
}

.iso-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(30deg, rgba(74,196,184,0.045) 1px, transparent 1px),
        linear-gradient(150deg, rgba(74,196,184,0.045) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1), rgba(0,0,0,0) 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1), rgba(0,0,0,0) 70%);
    opacity: 0.7;
}

.hero-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.orbit-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 14px rgba(74,196,184,0.7), 0 0 32px rgba(74,196,184,0.3);
}

.dot-a { top: 26%; left: 18%; animation: drift-a 14s ease-in-out infinite; }
.dot-b { top: 64%; left: 78%; animation: drift-b 18s ease-in-out infinite; }
.dot-c { top: 80%; left: 22%; animation: drift-c 22s ease-in-out infinite; opacity: 0.7; }

@keyframes drift-a {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -14px); }
}

@keyframes drift-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-22px, 18px); }
}

@keyframes drift-c {
    0%, 100% { transform: translate(0, 0); opacity: 0.4; }
    50% { transform: translate(14px, -18px); opacity: 0.85; }
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 880px;
    margin: 0 auto;
    width: 100%;
    transform: translateY(calc(var(--hero-progress) * -40px));
    opacity: calc(1 - (var(--hero-progress) * 0.6));
    will-change: transform, opacity;
}

.eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--silver-warm);
    letter-spacing: 0.32em;
    margin-bottom: 36px;
    opacity: 0;
    transform: translateY(8px);
    animation: fade-down 900ms ease-out 200ms forwards;
}

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

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(56px, 11vw, 168px);
    line-height: 1;
    color: var(--ice);
    letter-spacing: -0.015em;
    margin-bottom: 28px;
    display: inline-block;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    text-shadow: 0 0 0 rgba(74,196,184,0);
    transition: text-shadow 900ms ease-out;
}

.hero-title .letter.is-lit {
    opacity: 1;
    transform: translateY(0);
    text-shadow:
        0 0 14px rgba(74,196,184,0.55),
        0 0 32px rgba(74,196,184,0.25),
        0 0 60px rgba(74,196,184,0.15);
    transition: opacity 700ms ease-out, transform 700ms ease-out, text-shadow 1400ms ease-out;
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(13px, 1.2vw, 16px);
    color: var(--silver-warm);
    letter-spacing: 0.18em;
    margin: 0 auto 40px;
    display: inline-block;
    position: relative;
    opacity: 0;
    transition: opacity 900ms ease-out;
}

.hero-subtitle.is-shown { opacity: 1; }

.subtitle-text { display: inline-block; padding-bottom: 8px; }

.subtitle-underline {
    display: block;
    height: 1.5px;
    width: 0;
    background: linear-gradient(90deg, var(--teal), var(--silver));
    margin: 0 auto;
    transition: width 1400ms ease-out 400ms;
}

.hero-subtitle.is-shown .subtitle-underline { width: 100%; }

.hero-description {
    color: var(--silver);
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
    max-width: 56ch;
    margin: 0 auto 48px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1100ms ease-out 600ms, transform 1100ms ease-out 600ms;
}

.hero-description.is-shown {
    opacity: 1;
    transform: translateY(0);
}

.hero-description em {
    color: var(--ice);
    font-style: italic;
    font-weight: 600;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--silver);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    padding: 10px 4px;
    background-image: linear-gradient(90deg, var(--teal), var(--silver));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1.5px;
    transition: background-size 480ms ease-out, color 320ms ease;
    opacity: 0;
    transform: translateY(8px);
}

.hero-link.is-shown { opacity: 1; transform: translateY(0); transition: opacity 900ms ease-out 1000ms, transform 900ms ease-out 1000ms, background-size 480ms ease-out, color 320ms ease; }

.hero-link:hover {
    color: var(--ice);
    background-size: 100% 1.5px;
}

.hero-link-arrow {
    display: inline-block;
    color: var(--teal);
    font-size: 16px;
    animation: arrow-bob 2.4s ease-in-out infinite;
}

@keyframes arrow-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* ------- ORIGIN ------- */
.prose-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(40px, 5vw, 96px);
    align-items: center;
}

.prose-col p {
    color: var(--silver);
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.85;
    margin-bottom: 22px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 900ms ease-out 320ms, transform 900ms ease-out 320ms;
}

.section.is-revealed .prose-col p {
    opacity: 1;
    transform: translateY(0);
}

.prose-col p + p {
    transition-delay: 460ms;
}

.prose-col em {
    color: var(--ice);
    font-style: italic;
    font-weight: 600;
}

.iso-figure {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px;
    border: 1px solid rgba(138,154,180,0.18);
    background: linear-gradient(180deg, rgba(26,42,68,0.5), rgba(15,26,46,0.3));
    border-radius: 4px;
    box-shadow:
        inset 0 0 60px rgba(74,196,184,0.05),
        0 24px 64px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 900ms ease-out 320ms, transform 900ms ease-out 320ms;
}

.section.is-revealed .iso-figure {
    opacity: 1;
    transform: translateY(0);
}

.iso-illustration {
    width: clamp(200px, 28vw, 320px);
    height: auto;
    animation: gentle-float 9s ease-in-out infinite;
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.iso-caption {
    margin-top: 20px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--silver-warm);
    letter-spacing: 0.06em;
    text-align: center;
    line-height: 1.6;
    max-width: 28ch;
}

/* ------- ARCHIVE ------- */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(24px, 3vw, 40px);
    margin-top: 16px;
}

.specimen {
    position: relative;
    padding: 28px;
    border: 1px solid rgba(138,154,180,0.16);
    background: linear-gradient(180deg, rgba(26,42,68,0.45), rgba(15,26,46,0.6));
    transition: transform 600ms ease, border-color 600ms ease, box-shadow 600ms ease, background 600ms ease;
    opacity: 0;
    transform: translateY(28px);
    cursor: default;
}

.specimen.is-revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 900ms ease-out, transform 900ms ease-out, border-color 600ms ease, box-shadow 600ms ease, background 600ms ease;
}

.specimen:nth-child(1).is-revealed { transition-delay: 0ms; }
.specimen:nth-child(2).is-revealed { transition-delay: 100ms; }
.specimen:nth-child(3).is-revealed { transition-delay: 200ms; }
.specimen:nth-child(4).is-revealed { transition-delay: 300ms; }
.specimen:nth-child(5).is-revealed { transition-delay: 400ms; }
.specimen:nth-child(6).is-revealed { transition-delay: 500ms; }

.specimen::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, var(--teal) 0%, var(--silver) 60%, transparent 100%) top left/0 1.5px no-repeat,
        linear-gradient(0deg, var(--teal) 0%, var(--silver) 60%, transparent 100%) bottom right/1.5px 0 no-repeat;
    transition: background-size 600ms ease-out;
}

.specimen:hover {
    transform: translateY(-6px);
    border-color: rgba(74,196,184,0.32);
    box-shadow:
        inset 0 0 40px rgba(74,196,184,0.06),
        0 24px 56px rgba(0,0,0,0.4),
        0 0 0 1px rgba(74,196,184,0.18);
    background: linear-gradient(180deg, rgba(26,42,68,0.65), rgba(15,26,46,0.5));
}

.specimen:hover::before {
    background:
        linear-gradient(90deg, var(--teal) 0%, var(--silver) 60%, transparent 100%) top left/100% 1.5px no-repeat,
        linear-gradient(0deg, var(--teal) 0%, var(--silver) 60%, transparent 100%) bottom right/1.5px 100% no-repeat;
}

.specimen-frame {
    aspect-ratio: 1 / 1;
    background: linear-gradient(180deg, rgba(15,26,46,0.6), rgba(15,26,46,0.2));
    border: 1px solid rgba(138,154,180,0.14);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.specimen-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(30deg, rgba(138,154,180,0.06) 1px, transparent 1px),
        linear-gradient(150deg, rgba(138,154,180,0.06) 1px, transparent 1px);
    background-size: 24px 24px, 24px 24px;
    opacity: 0.6;
    pointer-events: none;
}

.specimen-svg {
    width: 70%;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 16px rgba(74,196,184,0.18));
    transition: transform 700ms ease, filter 700ms ease;
}

.specimen:hover .specimen-svg {
    transform: rotate(-2deg) scale(1.04);
    filter: drop-shadow(0 0 24px rgba(74,196,184,0.32));
}

.specimen-id {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--teal);
    letter-spacing: 0.28em;
    margin-bottom: 10px;
}

.specimen-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 1.6vw, 22px);
    color: var(--ice);
    line-height: 1.25;
    margin-bottom: 12px;
}

.specimen-text {
    color: var(--silver);
    font-size: 14.5px;
    line-height: 1.7;
    margin-bottom: 14px;
}

.specimen-text em { color: var(--ice); font-weight: 600; font-style: italic; }

.specimen-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--silver-warm);
    letter-spacing: 0.1em;
    padding-top: 12px;
    border-top: 1px solid rgba(138,154,180,0.14);
}

/* ------- ERRORS timeline ------- */
.error-timeline {
    list-style: none;
    margin-top: 8px;
    padding: 0;
    position: relative;
    counter-reset: error-entry;
}

.error-entry {
    position: relative;
    display: grid;
    grid-template-columns: 110px 1px 1fr;
    gap: clamp(20px, 3vw, 48px);
    padding: clamp(28px, 4vw, 44px) 0;
    align-items: start;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.error-entry.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.error-year {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: var(--teal);
    letter-spacing: 0.18em;
    padding-top: 6px;
    text-shadow: 0 0 12px rgba(74,196,184,0.35);
}

.error-rail {
    position: relative;
    width: 1px;
    height: 100%;
    min-height: 80px;
    background: linear-gradient(180deg, transparent, rgba(138,154,180,0.4), transparent);
}

.error-rail::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--navy-deep);
    border: 1.5px solid var(--teal);
    box-shadow: 0 0 0 4px rgba(74,196,184,0.12), 0 0 14px rgba(74,196,184,0.5);
}

.error-body {
    max-width: 64ch;
}

.error-quote {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.45;
    color: var(--ice);
    margin-bottom: 14px;
    letter-spacing: -0.005em;
}

.error-context {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
    color: var(--silver-warm);
    letter-spacing: 0.06em;
    line-height: 1.7;
}

.error-context em { color: var(--silver); font-style: italic; }

/* ------- PHILOSOPHY ------- */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(28px, 3.5vw, 56px);
    margin-top: 24px;
}

.tenet {
    position: relative;
    padding: 32px 32px 32px 28px;
    border-left: 1px solid rgba(138,154,180,0.22);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 900ms ease-out, transform 900ms ease-out, border-color 600ms ease;
}

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

.tenet:nth-child(2) { transition-delay: 120ms; }
.tenet:nth-child(3) { transition-delay: 240ms; }
.tenet:nth-child(4) { transition-delay: 360ms; }

.tenet::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    width: 1px;
    height: 0;
    background: linear-gradient(180deg, var(--teal), var(--silver));
    transition: height 900ms ease-out 300ms;
}

.tenet.is-revealed::before {
    height: 60%;
}

.tenet-mark {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--teal);
    letter-spacing: 0.24em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.tenet-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(19px, 1.8vw, 24px);
    color: var(--ice);
    line-height: 1.3;
    margin-bottom: 14px;
}

.tenet-text {
    color: var(--silver);
    font-size: 15.5px;
    line-height: 1.8;
}

/* ------- COLOPHON ------- */
.colophon-content {
    max-width: 1100px;
}

.colophon-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 5vw, 80px);
    margin-top: 16px;
    align-items: start;
}

.colophon-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 14px 28px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    border-top: 1px solid rgba(138,154,180,0.18);
    padding-top: 24px;
}

.colophon-list dt {
    color: var(--silver-warm);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.colophon-list dd {
    color: var(--ice);
    margin: 0;
    letter-spacing: 0.04em;
}

.colophon-letter {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(17px, 1.6vw, 21px);
    line-height: 1.7;
    color: var(--silver);
    border-left: 1px solid rgba(74,196,184,0.35);
    padding: 8px 0 8px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.letter-line:first-child { color: var(--ice); font-weight: 600; }
.letter-sign {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: var(--silver-warm);
    letter-spacing: 0.16em;
    margin-top: 12px;
}

.site-footer {
    margin-top: clamp(80px, 12vh, 160px);
    padding-top: 32px;
    border-top: 1px solid rgba(138,154,180,0.14);
}

.footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--silver-warm);
    letter-spacing: 0.14em;
    text-align: center;
}

/* ------- scroll back button ------- */
.scroll-back {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(138,154,180,0.32);
    background: rgba(15,26,46,0.7);
    color: var(--silver);
    font-size: 16px;
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 400ms ease, transform 400ms ease, color 320ms ease, border-color 320ms ease, box-shadow 320ms ease;
}

.scroll-back.is-shown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-back:hover {
    color: var(--ice);
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(74,196,184,0.15), 0 0 18px rgba(74,196,184,0.35);
}

.scroll-back-arrow {
    display: inline-block;
    transition: transform 300ms ease;
}

.scroll-back:hover .scroll-back-arrow {
    transform: translateY(-2px);
}

/* ------- responsive ------- */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .prose-row,
    .colophon-grid {
        grid-template-columns: 1fr;
    }
    .iso-figure { padding: 24px; }
    .error-entry {
        grid-template-columns: 80px 1px 1fr;
        gap: 18px;
    }
    .colophon-letter {
        padding-left: 20px;
    }
}

@media (max-width: 560px) {
    .section { padding: 100px 18px 80px; }
    .hero-title { font-size: clamp(48px, 18vw, 96px); }
    .specimen { padding: 22px; }
    .colophon-list { grid-template-columns: 1fr; gap: 4px 0; }
    .colophon-list dd { margin-bottom: 12px; }
    .error-entry {
        grid-template-columns: 64px 1px 1fr;
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
}
