/* ============================================================
   luminant.dev — v2
   Bento-box developer studio
   Palette: cream + burgundy + rose + gold
   ============================================================ */

:root {
    --c-cream: #FDF5ED;
    --c-burgundy: #722F37;
    --c-burgundy-light: #FBF0F0;
    --c-rose: #C4737A;
    --c-charcoal: #2D2226;
    --c-ivory: #FFFCF8;
    --c-gold: #D4A84B;
    --c-border: #E8D8C8;

    --font-head: 'Albert Sans', 'Inter', system-ui, sans-serif;
    --font-body: 'Work Sans', system-ui, sans-serif;
    --font-mono: 'Courier Prime', 'Courier New', monospace;

    --tray-radius: 14px;
    --cell-radius: 10px;
    --tray-pad: clamp(14px, 1.6vw, 22px);
    --cell-pad: clamp(14px, 1.8vw, 26px);

    --shadow-tray: 0 1px 0 rgba(114, 47, 55, 0.06), 0 24px 60px -32px rgba(114, 47, 55, 0.18);
    --divider: rgba(114, 47, 55, 0.20);
}

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

html, body {
    background: var(--c-cream);
    color: var(--c-charcoal);
    font-family: var(--font-body);
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: clamp(16px, 2.4vw, 36px);
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 3vw, 48px);
}

/* === Ambient SVG curves layer === */
.ambient-curves {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}
.ambient-path {
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    animation: drawCurve 4.2s ease-out forwards;
}
.ambient-path-2 { animation-delay: 0.3s; }
.ambient-path-3 { animation-delay: 0.6s; }
.ambient-path-4 { animation-delay: 0.9s; }

@keyframes drawCurve {
    to { stroke-dashoffset: 0; }
}

/* === Tray (bento outer container) === */
.tray {
    position: relative;
    z-index: 1;
    border: 2px solid rgba(114, 47, 55, 0.20);
    border-radius: var(--tray-radius);
    background: var(--c-cream);
    box-shadow: var(--shadow-tray);
    padding: var(--tray-pad);
}

.tray-frame {
    display: grid;
    gap: 1px; /* gap = divider */
    background: var(--c-border);
    border-radius: calc(var(--cell-radius) + 2px);
    overflow: hidden;
}

/* === Cell (bento compartment) === */
.cell {
    background: var(--c-ivory);
    padding: var(--cell-pad);
    position: relative;
    overflow: hidden;
    transition: transform 220ms cubic-bezier(.2,.8,.2,1), background 220ms ease;
    opacity: 0;
    transform: translateY(8px);
    will-change: transform, opacity;
}
.cell.is-in {
    opacity: 1;
    transform: translateY(0);
}
.cell:hover {
    transform: translateY(-2px) scale(1.01);
    background: var(--c-cream);
}

.cell-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-burgundy);
    opacity: 0.62;
    margin-bottom: 12px;
}

.cell-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-rose);
    margin-bottom: 14px;
}

/* Alternating cell tints */
.tray-frame > .cell:nth-child(3n+1) { background: var(--c-ivory); }
.tray-frame > .cell:nth-child(3n+2) { background: var(--c-cream); }
.tray-frame > .cell:nth-child(3n) { background: var(--c-burgundy-light); }

/* === Tray header (per-section) === */
.tray-header {
    margin-bottom: clamp(14px, 1.6vw, 22px);
    padding: 6px 4px 4px;
    display: grid;
    gap: 6px;
}
.tray-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-burgundy);
    opacity: 0.68;
}
.tray-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(22px, 3vw, 40px);
    line-height: 1.15;
    color: var(--c-charcoal);
}
.tray-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--c-charcoal);
    opacity: 0.78;
    max-width: 60ch;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-tray {
    padding: var(--tray-pad);
}

.hero-grid {
    grid-template-columns: 1.1fr 1fr 1fr;
    grid-template-rows: auto 1fr 1fr 1fr;
    grid-template-areas:
        "brand    brand   meta"
        "head     head    icon1"
        "head     head    feature"
        "head     head    curve";
    min-height: clamp(560px, 88vh, 820px);
}

.cell-brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: clamp(10px, 1.4vw, 18px);
    padding-bottom: clamp(10px, 1.4vw, 18px);
}
.brand-mark {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(20px, 2.2vw, 28px);
    color: var(--c-burgundy);
    letter-spacing: -0.01em;
}
.brand-glyph {
    color: var(--c-gold);
    font-size: 0.86em;
    transform: translateY(-1px);
}
.brand-tld {
    color: var(--c-charcoal);
    opacity: 0.55;
    font-weight: 500;
}
.brand-mark-foot {
    font-size: clamp(18px, 1.8vw, 22px);
}

.hero-nav {
    display: inline-flex;
    gap: clamp(14px, 1.6vw, 26px);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
}
.hero-nav a {
    color: var(--c-charcoal);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    padding-bottom: 2px;
    transition: color 180ms ease, border-color 180ms ease;
}
.hero-nav a:hover {
    color: var(--c-burgundy);
    border-bottom-color: var(--c-rose);
}

.cell-meta {
    grid-area: meta;
    display: grid;
    align-content: center;
    gap: 8px;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 6px;
}
.meta-row:last-child { border-bottom: none; }
.meta-key {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-burgundy);
    opacity: 0.7;
}
.meta-val {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--c-charcoal);
}

.cell-headline {
    grid-area: head;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(14px, 1.4vw, 22px);
    background: var(--c-cream) !important;
    padding: clamp(20px, 3vw, 44px);
}
.headline {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(34px, 5.6vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--c-charcoal);
    max-width: 14ch;
}
.headline::after {
    /* nothing here — typewriter cursor injected by JS */
}
.lede {
    font-family: var(--font-body);
    font-size: clamp(15px, 1.2vw, 20px);
    line-height: 1.55;
    color: var(--c-charcoal);
    opacity: 0.84;
    max-width: 56ch;
}
.headline-foot {
    margin-top: clamp(8px, 1vw, 16px);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--c-burgundy);
}
.kbd {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border: 1.5px solid var(--c-burgundy);
    border-radius: 6px;
    background: var(--c-ivory);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-burgundy);
    box-shadow: 0 2px 0 var(--c-burgundy);
}
.foot-text { color: var(--c-charcoal); opacity: 0.7; }

.cell-icon-1 { grid-area: icon1; display: grid; place-items: stretch; }
.cell-icon-1 .iso-icon { display: block; margin: auto; max-width: 140px; height: auto; }

.cell-feature {
    grid-area: feature;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.feature-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--c-charcoal);
}
.feature-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-burgundy);
    flex-shrink: 0;
}
.feature-dot.dot-gold { background: var(--c-gold); }
.feature-dot.dot-rose { background: var(--c-rose); }
.mono { font-family: var(--font-mono); }

.cell-curve {
    grid-area: curve;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mini-curves {
    flex: 1;
    width: 100%;
    height: auto;
    min-height: 80px;
}
.mini-curve {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawCurve 3.2s ease-out forwards;
    animation-delay: 1.4s;
}

/* ============================================================
   TOOLS TRAY
   ============================================================ */
.tools-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, minmax(220px, auto));
    grid-template-areas:
        "tA tA tA tB tB tC"
        "tA tA tA tD tE tF";
}
.tools-grid > .cell-tool:nth-child(1) { grid-area: tA; }
.tools-grid > .cell-tool:nth-child(2) { grid-area: tB; }
.tools-grid > .cell-tool:nth-child(3) { grid-area: tC; }
.tools-grid > .cell-tool:nth-child(4) { grid-area: tD; }
.tools-grid > .cell-tool:nth-child(5) { grid-area: tE; }
.tools-grid > .cell-tool:nth-child(6) { grid-area: tF; }

.cell-tool {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cell-tool .iso-icon {
    margin-bottom: 4px;
}
.tool-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(20px, 1.8vw, 26px);
    color: var(--c-burgundy);
    letter-spacing: -0.01em;
}
.tool-large .tool-name {
    font-size: clamp(28px, 2.6vw, 40px);
}
.tool-desc {
    color: var(--c-charcoal);
    opacity: 0.84;
    max-width: 48ch;
    flex: 1;
}
.tool-large .tool-desc {
    font-size: clamp(15px, 1.1vw, 18px);
    max-width: 36ch;
}
.tool-meta {
    display: flex;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-burgundy);
    opacity: 0.78;
    border-top: 1px dashed var(--c-border);
    padding-top: 10px;
    margin-top: auto;
}

.tool-large {
    background: var(--c-burgundy-light) !important;
}
.tool-large .iso-icon { width: 96px; height: 96px; }

/* ============================================================
   FRAMEWORKS TRAY
   ============================================================ */
.frameworks-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "fa fb"
        "fp fp";
}
.framework-a { grid-area: fa; }
.framework-b { grid-area: fb; }
.cell-pair-note { grid-area: fp; }

.cell-framework {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(20px, 2.4vw, 36px);
}
.framework-a { background: var(--c-ivory) !important; }
.framework-b { background: var(--c-burgundy-light) !important; }

.framework-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(28px, 3vw, 44px);
    color: var(--c-burgundy);
    letter-spacing: -0.02em;
}
.framework-line {
    font-size: clamp(15px, 1.1vw, 18px);
    color: var(--c-charcoal);
    opacity: 0.86;
    max-width: 44ch;
}
.framework-features {
    list-style: none;
    display: grid;
    gap: 8px;
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--c-charcoal);
}
.framework-features li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bullet {
    width: 6px;
    height: 6px;
    background: var(--c-burgundy);
    flex-shrink: 0;
}
.bullet.bullet-gold { background: var(--c-gold); }
.bullet.bullet-rose { background: var(--c-rose); }

.code-block {
    margin-top: auto;
    background: var(--c-charcoal);
    color: var(--c-cream);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: var(--font-mono);
    font-size: 13px;
    border: 1px solid var(--c-burgundy);
    overflow: hidden;
}
.code-block code { color: var(--c-cream); }

.cell-pair-note {
    background: var(--c-cream) !important;
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    gap: clamp(16px, 2vw, 32px);
}
.pair-text {
    font-family: var(--font-body);
    color: var(--c-charcoal);
    max-width: 64ch;
}
.pair-text em {
    font-style: normal;
    color: var(--c-burgundy);
    font-weight: 600;
}
.pair-curve {
    width: 100%;
    height: 60px;
}
.pair-curve .mini-curve {
    stroke-dasharray: 700;
    stroke-dashoffset: 700;
}

/* ============================================================
   STUDIO TRAY
   ============================================================ */
.studio-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "bio s1 s2 s3"
        "quote quote quote desk";
}
.studio-bio { grid-area: bio; }
.studio-grid > .cell-studio:nth-child(2) { grid-area: s1; }
.studio-grid > .cell-studio:nth-child(3) { grid-area: s2; }
.studio-grid > .cell-studio:nth-child(4) { grid-area: s3; }
.studio-quote { grid-area: quote; }
.studio-icon { grid-area: desk; }

.studio-bio { background: var(--c-cream) !important; }

.studio-paragraph {
    font-size: clamp(15px, 1.05vw, 17px);
    color: var(--c-charcoal);
    opacity: 0.88;
    margin-bottom: 12px;
    max-width: 60ch;
}
.studio-paragraph:last-child { margin-bottom: 0; }

.studio-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
}
.stat-number {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(36px, 4.4vw, 64px);
    line-height: 1;
    color: var(--c-burgundy);
    letter-spacing: -0.02em;
}
.stat-caption {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-charcoal);
    opacity: 0.66;
}

.studio-quote {
    background: var(--c-burgundy-light) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}
.studio-blockquote p {
    font-family: var(--font-mono);
    font-size: clamp(16px, 1.6vw, 22px);
    line-height: 1.6;
    color: var(--c-charcoal);
    max-width: 64ch;
}
.quote-attrib {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-burgundy);
    opacity: 0.75;
}

.studio-icon {
    display: grid;
    place-items: stretch;
}
.studio-icon .iso-icon { display: block; margin: auto; max-width: 160px; }

/* ============================================================
   RELEASE TRAY
   ============================================================ */
.release-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
}

.cell-release {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: clamp(16px, 1.8vw, 24px);
}
.release-date {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.10em;
    color: var(--c-burgundy);
    opacity: 0.78;
}
.release-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(18px, 1.6vw, 24px);
    color: var(--c-charcoal);
}
.release-tag {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-cream);
    background: var(--c-burgundy);
    padding: 3px 9px;
    border-radius: 999px;
}
.release-tag.tag-gold { background: var(--c-gold); color: var(--c-charcoal); }
.release-tag.tag-rose { background: var(--c-rose); color: var(--c-cream); }
.release-note {
    color: var(--c-charcoal);
    opacity: 0.84;
    font-size: clamp(13px, 0.95vw, 15px);
    max-width: 44ch;
}

/* ============================================================
   FOOTER TRAY
   ============================================================ */
.footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
}
.cell-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.foot-paragraph {
    color: var(--c-charcoal);
    opacity: 0.8;
    max-width: 38ch;
    font-size: 14px;
}
.foot-paragraph.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    opacity: 0.7;
}
.foot-list {
    list-style: none;
    display: grid;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 13px;
}
.foot-list a {
    color: var(--c-charcoal);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 180ms ease, border-color 180ms ease;
}
.foot-list a:hover {
    color: var(--c-burgundy);
    border-bottom-color: var(--c-rose);
}
.foot-stamp {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--c-burgundy);
    opacity: 0.66;
    letter-spacing: 0.08em;
}

/* ============================================================
   Typewriter cursor
   ============================================================ */
.tw-cursor {
    display: inline-block;
    width: 0.55em;
    height: 1em;
    background: var(--c-burgundy);
    vertical-align: -0.15em;
    margin-left: 2px;
    animation: blink 0.53s steps(1, end) infinite;
}
.tw-cursor.is-done {
    animation: blink 1.06s steps(1, end) infinite;
    opacity: 0.6;
}
@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "brand brand"
            "head  head"
            "meta  icon1"
            "feature curve";
        min-height: auto;
    }
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "tA tA tA"
            "tB tC tD"
            "tE tF tF";
    }
    .frameworks-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "fa"
            "fb"
            "fp";
    }
    .studio-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "bio bio"
            "s1 s2"
            "s3 desk"
            "quote quote";
    }
    .release-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .headline { font-size: clamp(30px, 7vw, 56px); }
}

@media (max-width: 640px) {
    body { padding: 12px; gap: 22px; }
    .cell-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "head"
            "meta"
            "icon1"
            "feature"
            "curve";
    }
    .tools-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "tA tA"
            "tB tC"
            "tD tE"
            "tF tF";
    }
    .studio-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "bio"
            "s1"
            "s2"
            "s3"
            "quote"
            "desk";
    }
    .release-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .cell-pair-note {
        grid-template-columns: 1fr;
    }
    .headline { font-size: clamp(28px, 8vw, 42px); }
}
