/* ==========================================================
   lurch.dev v2 — Brutalist-Classical Editorial Design
   Palette:
     #C0B8A8  Raw Concrete
     #F5E0D8  Cream Panel
     #722F37  Burgundy Deep
     #F0ECE8  Marble White
     #5A5A5A  Exposed Steel
     #4A4238  Dark Concrete
     #8B5A3A  Rebar Rust
     #E8E0D8  Marble vein mid
     #DDD8D0  Marble vein dark
   Fonts:
     Playfair Display, Work Sans, JetBrains Mono
   ========================================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #C0B8A8;
    color: #4A4238;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
    cursor: default;
}

::selection {
    background: #722F37;
    color: #F5E0D8;
}

/* --- SVG Filters (hidden) -------------------------------- */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Concrete Texture Overlay ---------------------------- */
.section-concrete {
    background-color: #C0B8A8;
    position: relative;
}

.section-concrete::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23n)' opacity='0.13'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
}

.section-concrete > * {
    position: relative;
    z-index: 1;
}

/* --- Typography ------------------------------------------ */
.logotype {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(56px, 11vw, 160px);
    color: #4A4238;
    letter-spacing: -0.025em;
    line-height: 0.95;
    opacity: 0;
    transform: translateX(-100%);
    will-change: transform, opacity;
    display: inline-block;
}

.logotype.animate-in {
    opacity: 1;
    transform: translateX(0);
    transition:
        opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.logotype-dot {
    color: #722F37;
    display: inline-block;
    transform: translateY(-0.05em);
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(28px, 4.4vw, 64px);
    color: #4A4238;
    margin: 0.5rem 0 1.5rem;
    line-height: 1.15;
    letter-spacing: -0.005em;
}

.body-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.75;
    color: #4A4238;
    margin-bottom: 1.25rem;
    max-width: 65ch;
}

.meta-caption {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    color: #5A5A5A;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.section-tag {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #5A5A5A;
    color: #5A5A5A;
    margin-bottom: 1rem;
    background-color: rgba(245, 224, 216, 0.35);
}

.section-cream .section-tag {
    background-color: rgba(192, 184, 168, 0.25);
}

.pull-quote {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(22px, 3.2vw, 40px);
    color: #4A4238;
    line-height: 1.35;
    border: none;
    padding: 0;
    margin: 0.5rem 0 1rem;
}

.quote-attribution {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    color: #5A5A5A;
    font-style: normal;
    display: block;
    margin-top: 0.75rem;
    letter-spacing: 0.08em;
}

.logotype-small {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(22px, 3vw, 36px);
    color: #4A4238;
    display: block;
    margin-bottom: 0.5rem;
}

/* --- Hero Section ---------------------------------------- */
#hero {
    min-height: 100vh;
    background-color: #C0B8A8;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    padding: 0 5%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    padding-left: clamp(20px, 12%, 200px);
    padding-right: 5%;
    max-width: 1100px;
    z-index: 2;
    position: relative;
}

.hero-eyebrow {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #5A5A5A;
    margin-bottom: 1.25rem;
    background-color: rgba(245, 224, 216, 0.45);
}

.hero-tagline {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(16px, 1.6vw, 22px);
    color: #4A4238;
    margin-top: 1.25rem;
    max-width: 560px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
}

.hero-tagline.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 700ms cubic-bezier(0.22, 1, 0.36, 1) 900ms,
        transform 700ms cubic-bezier(0.22, 1, 0.36, 1) 900ms;
}

.hero-accent-panel {
    position: absolute;
    top: 8%;
    right: 5%;
    width: clamp(220px, 28vw, 400px);
    background-color: #F5E0D8;
    padding: clamp(24px, 2.5vw, 40px);
    z-index: 2;
    opacity: 0;
    transform: translateX(60px);
    border-left: 3px solid #722F37;
    box-shadow: 8px 8px 0 rgba(74, 66, 56, 0.08);
}

.hero-accent-panel.animate-in {
    opacity: 1;
    transform: translateX(0);
    transition:
        opacity 700ms cubic-bezier(0.22, 1, 0.36, 1) 600ms,
        transform 700ms cubic-bezier(0.22, 1, 0.36, 1) 600ms;
}

.accent-caption {
    display: block;
    color: #722F37;
    margin-bottom: 0.75rem;
}

.manifesto-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 0.95vw, 15px);
    line-height: 1.75;
    color: #4A4238;
    margin-bottom: 1rem;
}

.hero-scroll-cue {
    position: absolute;
    bottom: 4vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
    opacity: 0;
}

.hero-scroll-cue.animate-in {
    opacity: 1;
    transition: opacity 700ms ease 1400ms;
}

.cue-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, #5A5A5A 0%, transparent 100%);
    animation: cue-pulse 2.4s ease-in-out infinite;
}

@keyframes cue-pulse {
    0%, 100% { opacity: 0.35; transform: scaleY(1); }
    50%      { opacity: 0.85; transform: scaleY(1.2); }
}

/* --- Editorial Grid -------------------------------------- */
.editorial-section {
    padding: clamp(72px, 9vw, 140px) 5%;
    position: relative;
}

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.editorial-full .grid-left-panel {
    grid-column: 1 / 9;
}

.editorial-full .grid-right-caption {
    grid-column: 10 / -1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.editorial-full .grid-center-narrow {
    grid-column: 3 / 11;
}

.editorial-full .grid-right-wide {
    grid-column: 4 / -1;
}

.grid-content-wide {
    grid-column: 1 / -1;
}

.caption-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
    border-right: 2px solid #5A5A5A;
    padding-right: 1rem;
}

.rebar-mark {
    color: #8B5A3A;
}

/* Section width variants */
.editorial-left,
.left-panel {
    width: 65%;
    margin-left: 0;
    margin-right: auto;
}

.editorial-right,
.right-panel {
    width: 65%;
    margin-left: auto;
    margin-right: 0;
}

.narrow-center {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

/* --- Section backgrounds --------------------------------- */
.section-cream {
    background-color: #F5E0D8;
    position: relative;
}

.section-cream::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='cn'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23cn)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
}

.section-cream > * {
    position: relative;
    z-index: 1;
}

/* --- Marble Panels --------------------------------------- */
.marble-panel {
    background:
        linear-gradient(115deg,
            rgba(255,255,255,0.4) 0%,
            transparent 30%,
            rgba(0,0,0,0.04) 70%,
            transparent 100%),
        linear-gradient(135deg,
            #F0ECE8 0%,
            #E8E0D8 25%,
            #F0ECE8 50%,
            #DDD8D0 70%,
            #F0ECE8 100%);
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.06),
        0 2px 18px rgba(74, 66, 56, 0.08);
    padding: clamp(48px, 6vw, 96px) clamp(36px, 5vw, 72px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin-top: clamp(40px, 6vw, 80px);
    margin-bottom: clamp(40px, 6vw, 80px);
}

.marble-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(108deg,
            transparent 0,
            transparent 90px,
            rgba(90, 90, 90, 0.04) 91px,
            transparent 92px,
            transparent 180px,
            rgba(139, 90, 58, 0.03) 181px,
            transparent 183px);
    pointer-events: none;
    z-index: 0;
}

.marble-panel > * {
    position: relative;
    z-index: 1;
}

.marble-tag {
    display: block;
    color: #722F37;
    margin-bottom: 1.25rem;
    letter-spacing: 0.18em;
}

.marble-panel .ripple-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid #722F37;
    opacity: 0.45;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-expand 700ms ease-out forwards;
    z-index: 2;
}

@keyframes ripple-expand {
    0%   { transform: translate(-50%, -50%) scale(0);   opacity: 0.45; }
    60%  {                                              opacity: 0.25; }
    100% { transform: translate(-50%, -50%) scale(1);   opacity: 0;    }
}

.marble-stat-panel {
    text-align: left;
}

.marble-stat {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(56px, 9vw, 120px);
    color: #4A4238;
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.marble-unit {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(14px, 1.2vw, 18px);
    color: #722F37;
    display: block;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.marble-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    color: #5A5A5A;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    max-width: 460px;
}

/* Triplet (FORM / MASS / VOID) */
.marble-triplet {
    text-align: center;
}

.triplet-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 48px);
    margin: 1.5rem 0 2rem;
}

.triplet-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: clamp(20px, 3vw, 36px) 0;
    border-top: 1px solid rgba(74, 66, 56, 0.25);
    border-bottom: 1px solid rgba(74, 66, 56, 0.25);
    transition: transform 320ms ease, color 320ms ease;
}

.triplet-cell:hover {
    transform: translateY(-3px);
}

.triplet-numeral {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(48px, 7vw, 84px);
    color: #4A4238;
    line-height: 1;
}

.triplet-label {
    color: #722F37;
    letter-spacing: 0.25em;
}

.triplet-caption {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(13px, 0.95vw, 15px);
    color: #5A5A5A;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Material Ledger ------------------------------------- */
.material-ledger {
    margin-top: clamp(40px, 6vw, 80px);
    grid-column: 1 / -1;
    border-top: 1px solid rgba(74, 66, 56, 0.3);
    border-bottom: 1px solid rgba(74, 66, 56, 0.3);
    background-color: rgba(245, 224, 216, 0.18);
}

.ledger-row {
    display: grid;
    grid-template-columns: 80px 1.4fr 2.5fr 60px;
    align-items: center;
    gap: 1rem;
    padding: clamp(14px, 1.5vw, 22px) clamp(14px, 1.5vw, 22px);
    border-bottom: 1px solid rgba(74, 66, 56, 0.18);
    transition: background-color 280ms ease, transform 320ms ease;
}

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

.ledger-row:hover {
    background-color: rgba(245, 224, 216, 0.45);
    transform: translateX(4px);
}

.ledger-index {
    color: #8B5A3A;
}

.ledger-name {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(15px, 1.2vw, 19px);
    color: #4A4238;
}

.ledger-spec {
    color: #5A5A5A;
}

.ledger-swatch {
    width: 40px;
    height: 40px;
    border: 1px solid #5A5A5A;
    justify-self: end;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
}

/* --- Organic Blobs --------------------------------------- */
.blob {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    will-change: transform;
}

.blob svg {
    width: 100%;
    height: 100%;
    display: block;
}

.blob-1 { width: 520px; height: 520px; top:  60vh; left: -120px; }
.blob-2 { width: 460px; height: 460px; top: 180vh; right: -90px; }
.blob-3 { width: 580px; height: 580px; top: 320vh; left:  -80px; }
.blob-4 { width: 420px; height: 420px; top: 460vh; right: -60px; }
.blob-5 { width: 540px; height: 540px; top: 600vh; left: -100px; }
.blob-6 { width: 480px; height: 480px; top: 740vh; right: -70px; }

.blob-transition {
    position: relative;
    width: 100%;
    overflow: visible;
    margin: -50px 0;
    z-index: 1;
    pointer-events: none;
    line-height: 0;
}

.blob-transition svg {
    width: 100%;
    height: clamp(120px, 18vw, 240px);
    display: block;
}

.blob-transition-flip svg {
    transform: scaleY(-1);
}

/* --- Exposed Structural Lines ---------------------------- */
.structural-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #5A5A5A;
    opacity: 0.28;
    z-index: 0;
    pointer-events: none;
}

.line-1 { top: 112vh; }
.line-2 { top: 218vh; }
.line-3 { top: 332vh; opacity: 0.18; background-color: #8B5A3A; }
.line-4 { top: 448vh; }
.line-5 { top: 568vh; opacity: 0.18; background-color: #8B5A3A; }
.line-6 { top: 690vh; }
.line-7 { top: 800vh; }

/* --- Fade-in Sections (scroll reveal) -------------------- */
.fade-section {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 600ms ease,
        transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Closing Section ------------------------------------- */
.closing-heading {
    margin-bottom: 2rem;
}

.closing-mark {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #5A5A5A;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* --- Cursor Fleck (subtle marble particle follower) ------ */
.cursor-fleck {
    position: fixed;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 30% 30%, #F0ECE8 0%, #E8E0D8 60%, #DDD8D0 100%);
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(114, 47, 55, 0.25),
        0 0 12px rgba(74, 66, 56, 0.18);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9999;
    mix-blend-mode: multiply;
}

.cursor-fleck.active {
    transform: translate(-50%, -50%) scale(1);
}

/* --- Responsive Adjustments ------------------------------ */
@media (max-width: 900px) {
    .hero-content {
        padding-left: 5%;
    }

    .hero-accent-panel {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin: 2rem 0 0;
    }

    #hero {
        flex-direction: column;
        justify-content: center;
        padding: 12vh 5% 8vh;
    }

    .editorial-left,
    .editorial-right,
    .left-panel,
    .right-panel,
    .narrow-center {
        width: 92%;
        margin-left: auto;
        margin-right: auto;
    }

    .editorial-full .grid-left-panel,
    .editorial-full .grid-right-caption,
    .editorial-full .grid-center-narrow,
    .editorial-full .grid-right-wide,
    .grid-content-wide {
        grid-column: 1 / -1;
    }

    .caption-stack {
        text-align: left;
        border-right: none;
        border-left: 2px solid #5A5A5A;
        padding-right: 0;
        padding-left: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .blob {
        opacity: 0.6;
    }

    .ledger-row {
        grid-template-columns: 60px 1fr 50px;
        grid-template-areas:
            "idx name swatch"
            "spec spec spec";
    }

    .ledger-index { grid-area: idx; }
    .ledger-name  { grid-area: name; }
    .ledger-swatch { grid-area: swatch; }
    .ledger-spec  { grid-area: spec; padding-top: 4px; }

    .triplet-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .triplet-cell {
        border-bottom: 1px solid rgba(74, 66, 56, 0.25);
    }

    .triplet-cell:not(:first-child) {
        border-top: none;
    }
}

@media (max-width: 480px) {
    .logotype {
        font-size: clamp(44px, 14vw, 84px);
    }

    .section-heading {
        font-size: clamp(22px, 7vw, 38px);
    }

    .editorial-section {
        padding: 56px 5%;
    }

    .marble-panel {
        padding: clamp(28px, 5vw, 40px) clamp(20px, 5vw, 32px);
    }

    .cursor-fleck {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logotype,
    .hero-tagline,
    .hero-accent-panel,
    .hero-scroll-cue,
    .fade-section {
        transition-duration: 0.001ms !important;
        animation: none !important;
    }
}
