/* desca.work - Scandinavian Functional Shop */
/* Palette: #fafaf7, #f0eee9, #1a1a1a, #2563eb, #16a34a, #e2dfd8, #6b7280 */
/* Fonts: Sora 600, Inter 400, Source Code Pro 400 */

:root {
    --bg: #fafaf7;
    --surface: #f0eee9;
    --text: #1a1a1a;
    --blue: #2563eb;
    --green: #16a34a;
    --border: #e2dfd8;
    --secondary: #6b7280;
    --radius: 8px;
    --gap: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

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

.brand {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--text);
    letter-spacing: -0.02em;
}

.descriptor {
    font-size: 1.05rem;
    color: var(--secondary);
    margin-top: 0.75rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.hero-rule {
    width: 80px;
    height: 1px;
    background: var(--border);
    margin: 2rem auto 0;
}

.hero-cta {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.cta-button {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    background: var(--blue);
    border-radius: 6px;
    padding: 0.65rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.cta-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.cta-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--blue);
    cursor: pointer;
    transition: color 0.2s ease;
}

.cta-link:hover {
    color: #1d4ed8;
}

/* Hero Tree Visual */
.hero-tree-visual {
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.tree-svg {
    width: 320px;
    height: 200px;
    opacity: 0.6;
}

.tree-edge {
    stroke: var(--border);
    transition: stroke 0.3s ease;
}

.tree-node {
    transition: fill 0.3s ease, r 0.3s ease;
}

.tree-node-root {
    fill: var(--blue);
}

.tree-node-child {
    fill: var(--secondary);
    opacity: 0.6;
}

.tree-node-leaf {
    fill: var(--border);
}

.tree-pulse {
    fill: none;
    stroke: var(--blue);
    stroke-width: 1.5;
    opacity: 0;
    animation: treePulse 3s ease-in-out infinite;
}

@keyframes treePulse {
    0% { opacity: 0.4; r: 10; }
    50% { opacity: 0; r: 22; }
    100% { opacity: 0; r: 22; }
}

/* ===== TOOLBAR ===== */
.toolbar {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.toolbar-inner {
    max-width: 840px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.toolbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.75rem;
    color: var(--secondary);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    min-width: 200px;
    cursor: text;
    transition: border-color 0.2s ease;
}

.toolbar-search:hover {
    border-color: var(--secondary);
}

.search-icon {
    flex-shrink: 0;
}

.search-text {
    white-space: nowrap;
}

.toolbar-pills {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.pill {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.7rem;
    color: var(--secondary);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pill:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.pill.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

/* ===== WORKSPACE ===== */
.workspace {
    padding: 3.5rem 1.5rem;
}

.workspace-inner {
    max-width: 840px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
}

.block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    border-color: rgba(37, 99, 235, 0.3);
}

.block.hidden {
    display: none;
}

.block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.block-icon {
    width: 40px;
    height: 40px;
    background: var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pill-tag {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.65rem;
    color: var(--blue);
    background: rgba(37, 99, 235, 0.08);
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
}

.block-title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.block-text {
    font-size: 0.85rem;
    color: var(--secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.block-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.65rem;
    color: var(--secondary);
}

.meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border);
}

/* ===== DOUBLE RULE ===== */
.double-rule {
    max-width: 840px;
    margin: 0 auto;
    height: 5px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* ===== DEEP WORK ===== */
.deep-work {
    padding: 4rem 1.5rem 4rem;
}

.deep-inner {
    max-width: 840px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.section-text {
    font-size: 0.92rem;
    color: var(--secondary);
    margin-bottom: 2.5rem;
    max-width: 640px;
    line-height: 1.8;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
}

.detail-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap);
    transition: border-color 0.25s ease;
}

.detail-block:hover {
    border-color: rgba(37, 99, 235, 0.25);
}

.detail-icon {
    margin-bottom: 1rem;
}

.detail-title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.detail-text {
    font-size: 0.85rem;
    color: var(--secondary);
    line-height: 1.65;
}

/* ===== WORKFLOW VISUALIZATION ===== */
.workflow-viz {
    padding: 2rem 1.5rem 4rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.workflow-inner {
    max-width: 840px;
    margin: 0 auto;
}

.workflow-steps {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.step-number {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--blue);
    opacity: 0.4;
    flex-shrink: 0;
    width: 40px;
    text-align: right;
    line-height: 1.3;
}

.step-content {
    flex: 1;
}

.step-title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.step-text {
    font-size: 0.85rem;
    color: var(--secondary);
    line-height: 1.65;
    max-width: 520px;
}

.workflow-connector {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin-left: 60px;
}

/* ===== STATS BAR ===== */
.stats-bar {
    padding: 3rem 1.5rem;
}

.stats-inner {
    max-width: 840px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.stat-value {
    display: block;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 2rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.stat-label {
    display: block;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.7rem;
    color: var(--secondary);
    margin-top: 0.25rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
    flex-shrink: 0;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 3.5rem 1.5rem 0;
}

.footer-inner {
    max-width: 840px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    padding-bottom: 3rem;
}

.footer-heading {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.footer-link {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--blue);
}

/* Footer Brand Column */
.footer-brand {
    display: flex;
    flex-direction: column;
}

.plant-icon {
    margin-bottom: 0.75rem;
}

.footer-tagline {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.75rem;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.footer-copyright {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.65rem;
    color: var(--border);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1rem 0;
}

.footer-bottom-inner {
    max-width: 840px;
    margin: 0 auto;
    text-align: center;
}

.footer-note {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.65rem;
    color: var(--secondary);
    opacity: 0.6;
}

/* ===== FADE IN ANIMATION ===== */
.fade-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger delays for grouped elements */
.workspace-inner .block:nth-child(1) { transition-delay: 0s; }
.workspace-inner .block:nth-child(2) { transition-delay: 0.1s; }
.workspace-inner .block:nth-child(3) { transition-delay: 0.2s; }
.workspace-inner .block:nth-child(4) { transition-delay: 0.3s; }

.detail-grid .detail-block:nth-child(1) { transition-delay: 0s; }
.detail-grid .detail-block:nth-child(2) { transition-delay: 0.12s; }

.workflow-steps .workflow-step:nth-child(1) { transition-delay: 0s; }
.workflow-steps .workflow-step:nth-child(3) { transition-delay: 0.12s; }
.workflow-steps .workflow-step:nth-child(5) { transition-delay: 0.24s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .workspace-inner,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .toolbar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .toolbar-pills {
        margin-left: 0;
    }

    .stats-inner {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 0 0 45%;
    }

    .hero-tree-visual {
        display: none;
    }

    .workflow-step {
        gap: 1rem;
    }

    .step-number {
        width: 30px;
        font-size: 1.2rem;
    }

    .workflow-connector {
        margin-left: 45px;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stats-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-item {
        flex: 1;
    }
}
