/* ============================================================
   paraligm.com — A study of paradigm shifts
   Dual-state visual language: Established <> Emergent
   ============================================================ */

:root {
    --parchment: #f5f0e8;       /* established background */
    --void: #0a0a1a;            /* emergent background */
    --academic-brown: #3b2f24;  /* established text */
    --quantum-lavender: #e8e0ff;/* emergent text */
    --revolution-red: #8b0000;  /* accent / disruption */
    --emergence-teal: #00ccaa;  /* emergent accent */
    --aged-gold: #d4c8b0;       /* established accent */
    --shift-purple: #4a0080;    /* blend zone */

    --font-est: "Playfair Display", "Source Serif 4", Georgia, serif;
    --font-emerg: "Space Grotesk", "Inter", "Helvetica Neue", sans-serif;
    --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
}

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

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

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--academic-brown);
    background: var(--parchment);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(245, 240, 232, 0.78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(59, 47, 36, 0.15);
    transition: background 0.6s ease, border-color 0.6s ease, color 0.6s ease;
}
.masthead.is-emergent {
    background: rgba(10, 10, 26, 0.72);
    border-bottom-color: rgba(232, 224, 255, 0.18);
    color: var(--quantum-lavender);
}
.masthead-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 40px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 36px;
}
.brand {
    font-family: var(--font-est);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: baseline;
}
.brand-est {
    font-family: var(--font-est);
    color: var(--academic-brown);
    transition: color 0.6s ease;
}
.brand-emerg {
    font-family: var(--font-emerg);
    font-weight: 500;
    color: var(--revolution-red);
    margin-left: 1px;
}
.is-emergent .brand-est { color: var(--quantum-lavender); }
.is-emergent .brand-emerg { color: var(--emergence-teal); }
.brand-dot {
    font-family: var(--font-emerg);
    font-size: 0.75rem;
    font-weight: 400;
    margin-left: 4px;
    opacity: 0.55;
}
.masthead-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    font-family: var(--font-emerg);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.masthead-nav a {
    color: inherit;
    text-decoration: none;
    opacity: 0.72;
    position: relative;
    padding: 4px 0;
    transition: opacity 0.3s ease;
}
.masthead-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    transition: right 0.4s cubic-bezier(.2,.7,.2,1);
}
.masthead-nav a:hover { opacity: 1; }
.masthead-nav a:hover::after { right: 0; }
.masthead-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-emerg);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.65;
}
.meta-line {
    width: 32px;
    height: 1px;
    background: currentColor;
    display: inline-block;
}

/* ============================================================
   HERO — parallax dual-reality
   ============================================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 720px;
    overflow: hidden;
    background: var(--parchment);
    perspective: 1px;
    perspective-origin: 0% 50%;
}
.parallax-stage {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}
.layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}
.layer-back {
    transform: translateZ(-1px) scale(2);
    transform-origin: 0 0;
    background:
        linear-gradient(180deg, rgba(245,240,232,0) 0%, rgba(212,200,176,0.35) 100%),
        var(--parchment);
    display: flex;
    align-items: center;
    justify-content: center;
}
.grid-wall {
    width: 70%;
    max-width: 760px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid rgba(59, 47, 36, 0.5);
    border-left: 1px solid rgba(59, 47, 36, 0.5);
    color: rgba(59, 47, 36, 0.78);
    font-family: var(--font-est);
}
.grid-cell {
    border-right: 1px solid rgba(59, 47, 36, 0.5);
    border-bottom: 1px solid rgba(59, 47, 36, 0.5);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    aspect-ratio: 5 / 4;
    justify-content: space-between;
}
.grid-num {
    font-family: var(--font-est);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    font-style: italic;
    color: var(--academic-brown);
}
.grid-word {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.established-tag {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-est);
    font-style: italic;
    font-size: 0.85rem;
    color: rgba(59, 47, 36, 0.55);
    letter-spacing: 0.08em;
}

.layer-front {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 8vw;
    transform: translateZ(0);
}
.hero-disruption {
    max-width: 720px;
    position: relative;
    z-index: 2;
    padding: 48px 44px;
    background: rgba(10, 10, 26, 0.92);
    color: var(--quantum-lavender);
    box-shadow: -14px -14px 40px rgba(0, 204, 170, 0.15),
                10px 10px 60px rgba(74, 0, 128, 0.35);
    transform: rotate(-1.2deg);
    border-left: 2px solid var(--emergence-teal);
}
.hero-pretitle {
    font-family: var(--font-emerg);
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--emergence-teal);
    margin-bottom: 22px;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.05;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.title-est {
    font-family: var(--font-est);
    color: var(--quantum-lavender);
    font-weight: 700;
    font-style: italic;
}
.title-emerg {
    font-family: var(--font-emerg);
    color: var(--emergence-teal);
    font-weight: 500;
    font-style: normal;
    text-decoration: line-through;
    text-decoration-color: var(--revolution-red);
    text-decoration-thickness: 2px;
}
.hero-sub {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(232, 224, 255, 0.82);
    max-width: 540px;
    margin-bottom: 28px;
}
.hero-glyph {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot.solid { background: var(--emergence-teal); }
.dot.outline {
    background: transparent;
    border: 1px solid var(--emergence-teal);
}
.phase-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, var(--quantum-lavender) 0%, var(--emergence-teal) 100%);
    display: inline-block;
}

.scroll-cue {
    position: absolute;
    bottom: 28px;
    right: 8vw;
    font-family: var(--font-emerg);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(59, 47, 36, 0.6);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 5;
}
.cue-arrow {
    display: inline-block;
    animation: cue-bob 2.4s ease-in-out infinite;
    color: var(--revolution-red);
    font-size: 1rem;
}
@keyframes cue-bob {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%      { transform: translateY(6px); opacity: 1; }
}

/* ============================================================
   BLEND ZONES — surreal transitions
   ============================================================ */
.blend-zone {
    position: relative;
    height: 160px;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
}
.blend-1 {
    background: linear-gradient(180deg, var(--parchment) 0%, var(--shift-purple) 50%, var(--void) 100%);
}
.blend-2 {
    background: linear-gradient(180deg, var(--void) 0%, var(--shift-purple) 50%, var(--parchment) 100%);
}
.blend-3 {
    background: linear-gradient(180deg, var(--parchment) 0%, var(--shift-purple) 50%, var(--void) 100%);
}

.quantum-pair {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    mix-blend-mode: exclusion;
}
.blend-1 .quantum-pair:nth-child(1) { left: 18%; }
.blend-1 .quantum-pair:nth-child(2) { left: 64%; top: 40%; }
.blend-3 .quantum-pair:nth-child(1) { left: 14%; top: 35%; }
.blend-3 .quantum-pair:nth-child(2) { left: 48%; top: 60%; }
.blend-3 .quantum-pair:nth-child(3) { left: 78%; top: 45%; }

.qd {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    display: inline-block;
}
.qd.solid { background: var(--emergence-teal); }
.qd.outline {
    background: transparent;
    border: 1px solid var(--quantum-lavender);
}

.phase-rule {
    position: absolute;
    left: 8vw; right: 8vw;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    mix-blend-mode: exclusion;
}
.rule-solid {
    flex: 1 1 50%;
    height: 1px;
    background: var(--academic-brown);
}
.rule-dashed {
    flex: 1 1 50%;
    height: 0;
    border-top: 1px dashed var(--emergence-teal);
}

/* ============================================================
   SECTIONS — dual state
   ============================================================ */
.section {
    position: relative;
    padding: 120px 8vw 140px;
    overflow: hidden;
}

/* Established (parchment) */
.section-established {
    background: var(--parchment);
    color: var(--academic-brown);
    font-family: var(--font-est);
}
.section-established .section-title {
    font-family: var(--font-est);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--academic-brown);
    max-width: 18ch;
    margin-bottom: 28px;
    font-style: italic;
}
.section-established .section-lede {
    font-family: var(--font-body);
    max-width: 60ch;
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--academic-brown);
    margin-bottom: 64px;
}

/* Emergent (void) */
.section-emergent {
    background: var(--void);
    color: var(--quantum-lavender);
    font-family: var(--font-emerg);
}
.section-emergent .section-title {
    font-family: var(--font-emerg);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--quantum-lavender);
    max-width: 22ch;
    margin-bottom: 28px;
}
.section-emergent .section-lede {
    font-family: var(--font-body);
    max-width: 64ch;
    font-size: 1.1rem;
    line-height: 1.75;
    color: rgba(232, 224, 255, 0.78);
    margin-bottom: 64px;
}

/* Section markers */
.section-marker {
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: var(--font-emerg);
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 56px;
    color: var(--emergence-teal);
}
.section-marker.established {
    color: var(--revolution-red);
    font-family: var(--font-est);
    font-style: italic;
    letter-spacing: 0.16em;
    text-transform: none;
    font-size: 0.95rem;
}
.marker-num {
    font-weight: 700;
}
.marker-label {
    position: relative;
    padding-left: 18px;
}
.marker-label::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 10px; height: 1px;
    background: currentColor;
}

/* Body alignments */
.left-established {
    max-width: 1080px;
    margin-left: 0;
    margin-right: auto;
}
.offset-emergent {
    max-width: 1080px;
    margin-left: auto;
    margin-right: 0;
    padding-left: 4vw;
}

/* ANOMALIES grid */
.anomaly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 48px 56px;
    margin-top: 24px;
}
.anomaly {
    position: relative;
    padding: 28px 28px 28px 0;
    border-top: 1px solid rgba(232, 224, 255, 0.18);
    box-shadow: -8px -8px 24px rgba(0, 204, 170, 0.07);
    transition: box-shadow 0.5s ease, transform 0.5s ease;
}
.anomaly:hover {
    box-shadow: -14px -14px 40px rgba(0, 204, 170, 0.18);
    transform: translate(2px, -2px);
}
.anom-index {
    font-family: var(--font-emerg);
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--emergence-teal);
    display: block;
    margin-bottom: 14px;
}
.anomaly h3 {
    font-family: var(--font-emerg);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--quantum-lavender);
    margin-bottom: 14px;
    line-height: 1.25;
}
.anomaly p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(232, 224, 255, 0.74);
}

/* CRISIS columns */
.crisis-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
    margin-bottom: 80px;
    border-top: 1px solid rgba(59, 47, 36, 0.4);
    padding-top: 36px;
}
.crisis-col {
    position: relative;
    padding-top: 8px;
}
.crisis-col p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--academic-brown);
}
.col-marker {
    display: block;
    font-family: var(--font-est);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--revolution-red);
    margin-bottom: 14px;
}

.established-quote {
    margin-top: 36px;
    padding: 36px 44px;
    border-left: 3px solid var(--revolution-red);
    background: rgba(212, 200, 176, 0.32);
    max-width: 70ch;
    position: relative;
}
.quote-mark {
    position: absolute;
    top: 4px; left: 18px;
    font-family: var(--font-est);
    font-size: 4rem;
    line-height: 1;
    color: var(--revolution-red);
    opacity: 0.5;
}
.established-quote p {
    font-family: var(--font-est);
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--academic-brown);
    margin-bottom: 14px;
    padding-left: 56px;
}
.established-quote cite {
    font-family: var(--font-emerg);
    font-style: normal;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(59, 47, 36, 0.7);
    padding-left: 56px;
    display: block;
}

/* REVOLUTION stack */
.revolution-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    max-width: 880px;
}
.rev-card {
    padding: 32px 36px 32px 0;
    position: relative;
    border-top: 1px solid rgba(232, 224, 255, 0.18);
    transition: transform 0.5s cubic-bezier(.2,.7,.2,1), border-color 0.5s ease;
}
.rev-card:nth-child(1) { margin-left: 0; }
.rev-card:nth-child(2) { margin-left: 8%; }
.rev-card:nth-child(3) { margin-left: 16%; }
.rev-card:hover {
    transform: translateX(-6px);
    border-top-color: var(--emergence-teal);
}
.rev-meta {
    display: flex;
    gap: 18px;
    align-items: baseline;
    margin-bottom: 14px;
}
.rev-num {
    font-family: var(--font-emerg);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    color: var(--emergence-teal);
}
.rev-label {
    font-family: var(--font-est);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--quantum-lavender);
    opacity: 0.75;
}
.rev-card p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(232, 224, 255, 0.82);
    max-width: 60ch;
}

.impossible-shadow-block {
    margin-top: 80px;
    padding: 40px 44px;
    background: var(--void);
    border: 1px solid rgba(232, 224, 255, 0.16);
    box-shadow: -10px -10px 30px rgba(0, 204, 170, 0.18),
                -2px -2px 0 var(--revolution-red);
    transform: rotate(-0.4deg);
    max-width: 60ch;
    margin-left: auto;
}
.impossible-shadow-block p {
    font-family: var(--font-est);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--quantum-lavender);
}

/* ============================================================
   CONVERGENCE — hybrid footer
   ============================================================ */
.convergence {
    position: relative;
    background: linear-gradient(180deg, var(--void) 0%, var(--shift-purple) 35%, var(--parchment) 100%);
    color: var(--academic-brown);
    padding: 160px 8vw 80px;
    isolation: isolate;
}
.convergence::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 18%, rgba(0, 204, 170, 0.22), transparent 38%),
        radial-gradient(circle at 80% 12%, rgba(139, 0, 0, 0.18), transparent 40%);
    pointer-events: none;
    z-index: -1;
}
.convergence-inner {
    max-width: 1080px;
    margin: 0 auto;
}
.conv-mark {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}
.conv-mark .dot.solid { background: var(--emergence-teal); }
.conv-mark .dot.outline {
    background: transparent;
    border: 1px solid var(--academic-brown);
}
.conv-rule {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, var(--emergence-teal), var(--revolution-red));
}

.conv-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 28px;
}
.conv-est {
    font-family: var(--font-est);
    font-style: italic;
    font-weight: 700;
    color: var(--quantum-lavender);
    mix-blend-mode: difference;
}
.conv-emerg {
    font-family: var(--font-emerg);
    font-weight: 500;
    color: var(--revolution-red);
}
.conv-lede {
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.75;
    max-width: 60ch;
    color: var(--academic-brown);
    margin-bottom: 80px;
}

.conv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    padding: 48px 0;
    border-top: 1px solid rgba(59, 47, 36, 0.4);
    border-bottom: 1px solid rgba(59, 47, 36, 0.4);
    margin-bottom: 56px;
    position: relative;
}
.conv-grid::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 0;
    border-left: 1px dashed rgba(74, 0, 128, 0.5);
}
.conv-col {
    padding: 8px 4px;
}
.col-eyebrow {
    font-family: var(--font-emerg);
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 22px;
    color: var(--revolution-red);
}
.conv-col-est .col-eyebrow {
    font-family: var(--font-est);
    font-style: italic;
    text-transform: none;
    letter-spacing: 0.06em;
    font-size: 1rem;
    color: var(--academic-brown);
}
.conv-col ul { list-style: none; }
.conv-col li {
    padding: 12px 0;
    border-top: 1px solid rgba(59, 47, 36, 0.18);
}
.conv-col-est li {
    font-family: var(--font-est);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--academic-brown);
}
.conv-col-emerg li {
    font-family: var(--font-emerg);
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: var(--academic-brown);
}

.site-foot {
    padding-top: 32px;
    border-top: 1px solid rgba(59, 47, 36, 0.3);
}
.foot-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--font-emerg);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--academic-brown);
    margin-bottom: 12px;
}
.foot-row.foot-meta {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.65;
}
.foot-brand {
    font-family: var(--font-est);
    font-weight: 700;
    font-size: 1.05rem;
}
.foot-sep { opacity: 0.4; }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .masthead-inner {
        grid-template-columns: 1fr auto;
        gap: 16px;
        padding: 14px 24px;
    }
    .masthead-nav { display: none; }
    .grid-wall { width: 86%; grid-template-columns: repeat(3, 1fr); }
    .crisis-columns { grid-template-columns: 1fr; gap: 32px; }
    .conv-grid { grid-template-columns: 1fr; }
    .conv-grid::before { display: none; }
    .rev-card:nth-child(2),
    .rev-card:nth-child(3) { margin-left: 0; }
    .section { padding: 90px 6vw 100px; }
    .convergence { padding: 120px 6vw 60px; }
    .hero-disruption { padding: 32px 28px; }
}
@media (max-width: 640px) {
    .grid-wall { grid-template-columns: repeat(2, 1fr); }
    .scroll-cue { right: 6vw; bottom: 18px; font-size: 0.66rem; }
    .established-quote p { padding-left: 0; font-size: 1.15rem; }
    .established-quote cite { padding-left: 0; }
    .quote-mark { display: none; }
    .anomaly-grid { gap: 28px; }
    .hero { min-height: 620px; }
}
