/* lunchbox.dev - Dopamine maximalism through a professional lens */
/* Bento box compartment metaphor with broken-grid layout */

:root {
    --midnight: #1a2744;
    --charcoal: #2d3748;
    --steel-blue: #4a6fa5;
    --deep-blue: #2d4a7a;
    --teal: #38d9a9;
    --yellow: #ffd43b;
    --cloud: #e2e8f0;
    --mist: #edf2f7;
    --snow: #f8faff;
    --light-blue: #f0f4ff;
    --lavender: #d0daf0;
    --coral: #ff6b6b;
    --font-display: 'Zilla Slab', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--snow);
    color: var(--charcoal);
    overflow-x: hidden;
    cursor: none;
}

/* ─── Cursor Follower ─── */
#cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

body:hover #cursor-follower {
    opacity: 1;
}

/* ─── Compartment (Section) Base ─── */
.compartment {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* ─── Animation Base ─── */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Hero Section ─── */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 2rem;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-icon {
    margin-bottom: 2rem;
    animation: floatBox 4s ease-in-out infinite;
}

@keyframes floatBox {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    color: var(--midnight);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.hero-title .highlight {
    color: var(--teal);
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: var(--steel-blue);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--teal);
    color: var(--midnight);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--teal);
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
    background: transparent;
    color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(56, 217, 169, 0.25);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    background: var(--midnight);
    color: var(--cloud);
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--midnight);
    transition: background 0.25s ease, transform 0.2s ease;
}

.btn-secondary code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: var(--charcoal);
    transform: translateY(-2px);
}

.btn-ghost {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: transparent;
    color: var(--steel-blue);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--cloud);
    transition: border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.btn-ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
    transform: translateY(-2px);
}

.hero-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    opacity: 0.5;
}

.hero-path path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 3s ease-in-out forwards;
    animation-delay: 0.5s;
}

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

/* ─── Bento Dividers ─── */
.bento-divider {
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0.6;
}

/* ─── Section Headings ─── */
.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--midnight);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--yellow);
    border-radius: 2px;
}

/* ─── Bento Grid (Features) ─── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    grid-auto-flow: dense;
}

.bento-cell {
    background: white;
    border: 1.5px solid var(--cloud);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--yellow));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bento-cell:hover {
    border-color: var(--teal);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(74, 111, 165, 0.12);
}

.bento-cell:hover::before {
    opacity: 1;
}

.bento-cell--large {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-cell--tall {
    grid-row: span 2;
}

.bento-cell--wide {
    grid-column: span 2;
}

.bento-cell-icon {
    margin-bottom: 1.25rem;
}

.bento-cell h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--midnight);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.bento-cell p {
    color: var(--steel-blue);
    line-height: 1.65;
    font-size: 0.95rem;
}

.snippet {
    display: block;
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--midnight);
    color: var(--teal);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border-radius: 8px;
    overflow-x: auto;
}

.size-bar {
    margin-top: 1.25rem;
    position: relative;
    height: 28px;
    background: var(--mist);
    border-radius: 14px;
    overflow: hidden;
}

.size-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--yellow));
    border-radius: 14px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.size-bar-fill.animated {
    width: 18%;
}

.size-bar-label {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--steel-blue);
    font-weight: 500;
}

/* ─── Code Preview ─── */
.code-bento {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.code-block {
    background: var(--midnight);
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid var(--deep-blue);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--deep-blue);
}

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

.code-dot--red { background: #ff6b6b; }
.code-dot--yellow { background: #ffbd2e; }
.code-dot--green { background: #28c840; }

.code-filename {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--lavender);
}

.code-content {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--cloud);
    overflow-x: auto;
}

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

.code-keyword { color: #c792ea; }
.code-string { color: #c3e88d; }
.code-func { color: #82aaff; }
.code-prop { color: #f78c6c; }
.code-comment { color: #546e7a; }

.code-result {
    background: white;
    border: 1.5px solid var(--cloud);
    border-radius: 16px;
    padding: 1.5rem;
}

.result-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--steel-blue);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 60px);
    gap: 8px;
}

.result-cell {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.result-cell:hover {
    transform: scale(1.05);
}

.result-cell--a {
    background: var(--teal);
    grid-column: span 2;
    opacity: 0.9;
}

.result-cell--b {
    background: var(--yellow);
    opacity: 0.85;
}

.result-cell--c {
    background: var(--steel-blue);
    opacity: 0.7;
}

.result-cell--d {
    background: var(--midnight);
    grid-column: span 2;
    opacity: 0.8;
}

.result-cell--e {
    background: var(--lavender);
    grid-column: span 2;
    opacity: 0.6;
}

.result-cell--f {
    background: var(--teal);
    opacity: 0.5;
}

/* ─── Recipe Steps ─── */
.recipe-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.recipe-step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    background: white;
    border: 1.5px solid var(--cloud);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-step:hover {
    border-color: var(--teal);
    transform: translateX(8px);
    box-shadow: -8px 8px 0 var(--yellow);
}

.step-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--cloud);
    line-height: 1;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.recipe-step:hover .step-number {
    color: var(--teal);
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--midnight);
    margin-bottom: 0.5rem;
}

.step-content code {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--midnight);
    color: var(--teal);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.step-content p {
    color: var(--steel-blue);
    line-height: 1.6;
    font-size: 0.95rem;
}

.step-icon {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.recipe-step:hover .step-icon {
    opacity: 1;
    transform: rotate(5deg) scale(1.1);
}

/* ─── Reviews ─── */
.review-bento {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}

.review-card {
    background: white;
    border: 1.5px solid var(--cloud);
    border-radius: 16px;
    padding: 2rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.review-card:hover {
    border-color: var(--yellow);
    transform: translateY(-4px);
}

.review-stars {
    color: var(--yellow);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.review-card > p {
    color: var(--charcoal);
    line-height: 1.65;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--light-blue);
    border-radius: 50%;
}

.author-name {
    font-weight: 600;
    color: var(--midnight);
    font-size: 0.9rem;
}

.author-role {
    font-size: 0.8rem;
    color: var(--steel-blue);
}

.review-card--accent {
    background: var(--midnight);
    border-color: var(--deep-blue);
}

.review-card--accent:hover {
    border-color: var(--teal);
}

.review-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    justify-content: center;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--teal);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--lavender);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── CTA Section ─── */
#get-started {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-box {
    text-align: center;
    background: var(--midnight);
    border-radius: 24px;
    padding: 4rem;
    max-width: 640px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(56, 217, 169, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 30%, rgba(255, 212, 59, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.cta-icon {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.cta-box h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.cta-box > p {
    color: var(--lavender);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.cta-install {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.install-command {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--deep-blue);
}

.install-command code {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--teal);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--lavender);
    cursor: none;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.copy-btn:hover {
    color: var(--yellow);
}

.copy-btn.copied {
    color: var(--teal);
}

.cta-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.cta-links .btn-primary {
    background: var(--teal);
    color: var(--midnight);
}

.cta-links .btn-primary:hover {
    background: white;
    color: var(--midnight);
    border-color: white;
}

.cta-links .btn-ghost {
    color: var(--lavender);
    border-color: var(--deep-blue);
}

.cta-links .btn-ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* ─── Footer ─── */
#footer {
    background: var(--midnight);
    padding: 3rem 2rem;
    border-top: 1px solid var(--deep-blue);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--lavender);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--teal);
}

.footer-copy p {
    color: var(--steel-blue);
    font-size: 0.85rem;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-cell--large {
        grid-column: span 2;
    }

    .bento-cell--tall {
        grid-row: span 1;
    }

    .code-bento {
        grid-template-columns: 1fr;
    }

    .review-bento {
        grid-template-columns: 1fr;
    }

    .recipe-step {
        grid-template-columns: auto 1fr;
    }

    .step-icon {
        display: none;
    }
}

@media (max-width: 600px) {
    .compartment {
        padding: 4rem 1.25rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-cell--large,
    .bento-cell--wide {
        grid-column: span 1;
    }

    .recipe-step {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .step-number {
        font-size: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-box {
        padding: 3rem 1.5rem;
    }

    #cursor-follower {
        display: none;
    }

    body {
        cursor: auto;
    }

    .copy-btn {
        cursor: pointer;
    }
}
