/* ============================================
   luminant.dev — Bento-Box Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --soft-cream: #FDF5ED;
    --burgundy-wine: #722F37;
    --burgundy-light: #FBF0F0;
    --rose-blush: #C4737A;
    --charcoal-warm: #2D2226;
    --ivory-white: #FFFCF8;
    --gold-thread: #D4A84B;
    --cream-border: #E8D8C8;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: var(--charcoal-warm);
    background-color: var(--soft-cream);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'Albert Sans', sans-serif;
    color: var(--charcoal-warm);
    line-height: 1.3;
}

h1 {
    font-weight: 700;
    font-size: clamp(26px, 3.5vw, 48px);
    margin-bottom: 0.5em;
}

h2 {
    font-weight: 700;
    font-size: clamp(22px, 3vw, 40px);
}

h3 {
    font-weight: 600;
    font-size: clamp(17px, 1.8vw, 24px);
    margin-bottom: 0.4em;
}

h4 {
    font-weight: 600;
    font-size: clamp(14px, 1.2vw, 17px);
    margin-bottom: 0.6em;
    color: var(--burgundy-wine);
}

p {
    margin-bottom: 0.75em;
}

a {
    color: var(--burgundy-wine);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--rose-blush);
}

.mono-text {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(13px, 1vw, 16px);
    letter-spacing: 0.02em;
    color: var(--charcoal-warm);
    opacity: 0.85;
}

/* --- Logotype --- */
.logotype {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2vw, 28px);
    color: var(--burgundy-wine);
    letter-spacing: -0.02em;
    margin-bottom: 2em;
}

.footer-logo {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2.2vw, 30px);
    color: var(--burgundy-wine);
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

/* --- Flowing Curves Background --- */
.flowing-curves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* --- Section Connectors --- */
.section-connector {
    display: block;
    width: 100%;
    height: 60px;
    pointer-events: none;
    margin: -1px 0;
}

/* --- Curve Path Animations --- */
.curve-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2.5s ease-in-out;
}

.curve-path.animate {
    stroke-dashoffset: 0;
}

/* --- Bento Tray (Section Container) --- */
.bento-tray {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 40px);
}

.bento-tray-inner {
    border: 2px solid rgba(114, 47, 55, 0.2);
    border-radius: 12px;
    overflow: hidden;
    background: var(--cream-border);
}

.section-heading {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(22px, 3vw, 40px);
    color: var(--burgundy-wine);
    margin-bottom: 0.75em;
    padding-left: 4px;
}

/* --- Compartments (Bento Cells) --- */
.compartment {
    background: var(--ivory-white);
    padding: clamp(16px, 2.5vw, 32px);
    overflow: hidden;
    transition: background-color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.compartment:hover {
    background-color: var(--burgundy-light);
    transform: translateY(-2px) scale(1.01);
    z-index: 2;
}

.compartment-content {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.compartment-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Isometric Icons --- */
.iso-icon {
    display: block;
    margin-bottom: 1em;
    flex-shrink: 0;
}

/* --- Typewriter Cursor --- */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background-color: var(--burgundy-wine);
    margin-left: 1px;
    vertical-align: text-bottom;
    animation: cursorBlink 530ms steps(1) infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- HERO SECTION --- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: clamp(24px, 5vw, 60px);
}

.hero-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-areas:
        "hero side1"
        "hero side2"
        "hero side3";
    gap: 1px;
    min-height: 70vh;
}

.compartment-hero {
    grid-area: hero;
    background: var(--soft-cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 4vw, 48px);
    position: relative;
}

.compartment-hero .iso-laptop {
    position: absolute;
    bottom: clamp(16px, 3vw, 32px);
    right: clamp(16px, 3vw, 32px);
    opacity: 0.7;
}

.hero-headline {
    max-width: 600px;
    margin-bottom: 0.6em;
}

.hero-sub {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(15px, 1.2vw, 19px);
    color: var(--charcoal-warm);
    opacity: 0.8;
    max-width: 520px;
    line-height: 1.7;
}

.compartment-side-1 {
    grid-area: side1;
    background: var(--ivory-white);
}

.compartment-side-2 {
    grid-area: side2;
    background: var(--burgundy-light);
}

.compartment-side-3 {
    grid-area: side3;
    background: var(--soft-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flowing-curves-deco {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.deco-curves {
    opacity: 0.6;
}

.deco-label {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(11px, 0.9vw, 14px);
    letter-spacing: 0.1em;
    color: var(--burgundy-wine);
    opacity: 0.5;
    text-transform: lowercase;
}

/* --- FEATURES SECTION --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas:
        "f1 f2 f3"
        "f4 f5 f5";
    gap: 1px;
}

.compartment-feat-1 {
    grid-area: f1;
    background: var(--ivory-white);
}

.compartment-feat-2 {
    grid-area: f2;
    background: var(--soft-cream);
}

.compartment-feat-3 {
    grid-area: f3;
    background: var(--burgundy-light);
}

.compartment-feat-4 {
    grid-area: f4;
    background: var(--burgundy-light);
}

.compartment-feat-5 {
    grid-area: f5;
    background: var(--ivory-white);
}

/* --- PHILOSOPHY SECTION --- */
.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "p1 p2"
        "p3 p4";
    gap: 1px;
}

.compartment-phil-1 {
    grid-area: p1;
    background: var(--ivory-white);
}

.compartment-phil-2 {
    grid-area: p2;
    background: var(--soft-cream);
}

.compartment-phil-3 {
    grid-area: p3;
    background: var(--burgundy-light);
}

.compartment-phil-4 {
    grid-area: p4;
    background: var(--ivory-white);
}

.phil-number {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 4vw, 56px);
    color: var(--burgundy-wine);
    opacity: 0.15;
    line-height: 1;
    display: block;
    margin-bottom: 0.3em;
}

/* --- SHOWCASE SECTION --- */
.showcase-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "code desc"
        "code stats";
    gap: 1px;
}

.compartment-code {
    grid-area: code;
    background: var(--charcoal-warm);
    padding: 0;
}

.compartment-code .compartment-content {
    height: 100%;
}

.compartment-code:hover {
    background-color: #352a2e;
}

.compartment-desc {
    grid-area: desc;
    background: var(--ivory-white);
}

.compartment-stats {
    grid-area: stats;
    background: var(--soft-cream);
}

/* --- Code Block Styling --- */
.code-block {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: var(--rose-blush); }
.dot-yellow { background: var(--gold-thread); }
.dot-green { background: var(--cream-border); }

.code-filename {
    font-family: 'Courier Prime', monospace;
    font-size: 12px;
    color: var(--cream-border);
    margin-left: 8px;
    opacity: 0.7;
}

.code-body {
    flex: 1;
    padding: clamp(16px, 2vw, 24px);
    font-family: 'Courier Prime', monospace;
    font-size: clamp(13px, 1vw, 15px);
    line-height: 1.8;
    color: var(--soft-cream);
    overflow-x: auto;
    white-space: pre;
    tab-size: 2;
}

.code-body code {
    font-family: inherit;
}

.code-kw { color: var(--rose-blush); }
.code-str { color: var(--gold-thread); }
.code-fn { color: #e8b88a; }
.code-num { color: var(--gold-thread); }

/* --- Tags --- */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1em;
}

.tag {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(11px, 0.8vw, 13px);
    letter-spacing: 0.03em;
    padding: 4px 12px;
    border: 1px solid var(--cream-border);
    border-radius: 100px;
    color: var(--burgundy-wine);
    background: var(--soft-cream);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.tag:hover {
    background: var(--burgundy-light);
    border-color: var(--rose-blush);
}

/* --- Stats --- */
.compartment-stats .compartment-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(22px, 2.5vw, 36px);
    color: var(--burgundy-wine);
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(11px, 0.8vw, 13px);
    letter-spacing: 0.05em;
    color: var(--charcoal-warm);
    opacity: 0.6;
    text-transform: lowercase;
}

/* --- FOOTER SECTION --- */
#footer {
    margin-top: 0;
    padding-bottom: clamp(24px, 4vw, 60px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    grid-template-areas: "fmain flinks fconnect fcopy";
    gap: 1px;
}

.compartment-footer-main {
    grid-area: fmain;
    background: var(--ivory-white);
}

.compartment-footer-links {
    grid-area: flinks;
    background: var(--soft-cream);
}

.compartment-footer-connect {
    grid-area: fconnect;
    background: var(--burgundy-light);
}

.compartment-footer-copy {
    grid-area: fcopy;
    background: var(--ivory-white);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    text-align: right;
}

.footer-tagline {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(13px, 1vw, 16px);
    color: var(--charcoal-warm);
    opacity: 0.6;
    letter-spacing: 0.02em;
}

#footer ul {
    list-style: none;
}

#footer ul li {
    margin-bottom: 0.4em;
}

#footer ul li a {
    font-size: clamp(13px, 1vw, 15px);
    color: var(--charcoal-warm);
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
}

#footer ul li a:hover {
    opacity: 1;
    color: var(--burgundy-wine);
}

.copyright {
    font-size: clamp(12px, 0.9vw, 14px);
    color: var(--charcoal-warm);
    opacity: 0.5;
    margin-bottom: 0.3em;
}

.footer-note {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(11px, 0.8vw, 13px);
    color: var(--charcoal-warm);
    opacity: 0.4;
    letter-spacing: 0.02em;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "hero"
            "side1"
            "side2"
            "side3";
        min-height: auto;
    }

    .compartment-hero {
        min-height: 50vh;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "f1 f2"
            "f3 f4"
            "f5 f5";
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "p1"
            "p2"
            "p3"
            "p4";
    }

    .showcase-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "code"
            "desc"
            "stats";
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "fmain fmain"
            "flinks fconnect"
            "fcopy fcopy";
    }

    .compartment-footer-copy {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .features-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "f1"
            "f2"
            "f3"
            "f4"
            "f5";
    }

    .footer-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "fmain"
            "flinks"
            "fconnect"
            "fcopy";
    }

    .compartment-stats .compartment-content {
        flex-direction: column;
        gap: 1.5em;
    }
}
