/* Copyright (C) 2026 Techdelight BV */

/* ============================================================
   Daedalus Landing Page — "The Craftsman's Workshop"
   Warm copper on deep charcoal. Serif display. Labyrinth motif.
   ============================================================ */

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

:root {
    /* — Palette — */
    --bg:          #0b0e13;
    --bg-surface:  #12161e;
    --bg-elevated: #1a1f2b;
    --bg-hover:    #1f2535;
    --border:      #252d3a;
    --border-subtle: #1c2330;

    /* — Text — */
    --text:        #d9d2c7;
    --text-bright: #f0ebe3;
    --text-muted:  #6b7280;
    --text-dim:    #454d5c;

    /* — Accents — */
    --copper:      #c9834e;
    --copper-light:#e8a96f;
    --copper-glow: rgba(201, 131, 78, 0.12);
    --copper-glow2:rgba(201, 131, 78, 0.06);
    --green:       #7ea866;
    --green-dim:   rgba(126, 168, 102, 0.15);
    --red:         #c45d5d;
    --red-dim:     rgba(196, 93, 93, 0.12);
    --blue-line:   #2a3a54;

    /* — Typography — */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body:    'Outfit', 'Helvetica Neue', sans-serif;
    --font-mono:    'JetBrains Mono', 'Menlo', 'Consolas', monospace;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
    position: relative;
}

/* --- Grain texture overlay --- */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
}

/* --- Selection --- */
::selection {
    background: var(--copper);
    color: var(--bg);
}

/* --- Links --- */
a {
    color: var(--copper);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--copper-light);
}

/* ============================================================
   Layout
   ============================================================ */

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 32px;
}

section {
    padding: 100px 0;
    position: relative;
}

/* --- Section headers --- */
.section-label {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--copper);
    display: block;
    margin-bottom: 12px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 600;
    color: var(--text-bright);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-desc {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 540px;
    line-height: 1.6;
}

/* ============================================================
   Navigation
   ============================================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(11, 14, 19, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 32px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-spacer {
    flex: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-bright);
}

.nav-github {
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
    padding: 160px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Labyrinth background */
.labyrinth {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 560px;
    height: 560px;
    opacity: 0;
    animation: labyrinthFadeIn 2s ease 0.5s forwards;
}

@keyframes labyrinthFadeIn {
    to { opacity: 1; }
}

.lab-ring {
    stroke: var(--blue-line);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawRing 3s ease forwards;
}

.lab-ring:nth-child(1) { animation-delay: 0.3s; }
.lab-ring:nth-child(2) { animation-delay: 0.5s; }
.lab-ring:nth-child(3) { animation-delay: 0.7s; }
.lab-ring:nth-child(4) { animation-delay: 0.9s; }
.lab-ring:nth-child(5) { animation-delay: 1.1s; }
.lab-ring:nth-child(6) { animation-delay: 1.3s; }

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

.lab-path {
    stroke: var(--copper);
    stroke-width: 1;
    opacity: 0;
    animation: labPathIn 0.6s ease forwards;
}

.lab-path:nth-child(7)  { animation-delay: 1.8s; }
.lab-path:nth-child(8)  { animation-delay: 2.0s; }
.lab-path:nth-child(9)  { animation-delay: 2.2s; }
.lab-path:nth-child(10) { animation-delay: 2.4s; }
.lab-path:nth-child(11) { animation-delay: 2.6s; }
.lab-path:nth-child(12) { animation-delay: 2.8s; }

@keyframes labPathIn {
    to { opacity: 0.5; }
}

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

.hero-banner {
    max-width: 100%;
    height: auto;
    margin-bottom: 28px;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(56px, 10vw, 96px);
    font-weight: 900;
    color: var(--text-bright);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    background: linear-gradient(
        135deg,
        var(--text-bright) 0%,
        var(--copper-light) 50%,
        var(--copper) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 19px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 100%;
    margin-bottom: 40px;
}

/* --- Install block --- */
.install-block {
    margin-bottom: 36px;
    display: flex;
    justify-content: center;
}

/* --- Terminal window --- */
.terminal-window {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    max-width: 680px;
    width: 100%;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

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

.terminal-dot:first-child { background: #c45d5d; }
.terminal-dot:nth-child(2) { background: #c9834e; }
.terminal-dot:nth-child(3) { background: #7ea866; }

.terminal-title {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-dim);
    margin-left: auto;
    margin-right: auto;
    padding-right: 30px;
}

.terminal-body {
    padding: 18px 20px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    cursor: pointer;
    user-select: all;
    position: relative;
    overflow-x: auto;
    transition: background 0.15s ease;
}

.terminal-body:hover {
    background: var(--bg-elevated);
}

.terminal-body.copied::after {
    content: 'Copied!';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--green);
    background: var(--bg-surface);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--green);
    animation: copiedPop 0.3s ease;
}

@keyframes copiedPop {
    from { opacity: 0; transform: translateY(-50%) scale(0.9); }
    to { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* ============================================================
   Demo Section
   ============================================================ */

.demos {
    border-top: 1px solid var(--border-subtle);
}

.demo-tabs {
    display: flex;
    gap: 4px;
    margin-top: 32px;
    margin-bottom: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
}

.demo-tab {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 7px;
    padding: 8px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-tab:hover {
    color: var(--text);
}

.demo-tab.active {
    background: var(--copper);
    color: var(--bg);
}

.demo-stage {
    position: relative;
}

.demo-panel {
    display: none;
}

.demo-panel.active {
    display: block;
    animation: demoPanelIn 0.3s ease;
}

@keyframes demoPanelIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.demo-video-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.demo-video-wrap video,
.demo-video-wrap img {
    display: block;
    width: 100%;
    height: auto;
}

.demo-caption {
    font-size: 14px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 16px;
    margin-bottom: 0;
    max-width: 100%;
}

.terminal-prompt,
.t-prompt {
    color: var(--copper);
    user-select: none;
    margin-right: 8px;
}

.t-cmd {
    color: var(--text);
}

.t-comment {
    color: var(--text-dim);
}

.terminal-sm pre {
    margin: 0;
    padding: 16px 18px;
    background: transparent;
    border: none;
    font-size: 13px;
    overflow-x: auto;
    line-height: 1.7;
}

/* --- CTA buttons --- */
.cta-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--copper);
    color: var(--bg);
    border-color: var(--copper);
}

.btn-primary:hover {
    background: var(--copper-light);
    border-color: var(--copper-light);
    color: var(--bg);
    box-shadow: 0 0 24px var(--copper-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--copper);
    color: var(--copper);
}

/* ============================================================
   Why Daedalus (Cards)
   ============================================================ */

.why {
    border-top: 1px solid var(--border-subtle);
}

.why-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.why-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.why-card:hover {
    border-color: rgba(201, 131, 78, 0.3);
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.why-card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--copper-glow2);
    border: 1px solid rgba(201, 131, 78, 0.1);
    color: var(--copper);
    margin-bottom: 20px;
}

.why-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 12px;
}

.why-card-problem {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 20px;
    flex: 1;
}

.why-card-solution {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.why-card-solution svg {
    color: var(--green);
    flex-shrink: 0;
    margin-top: 1px;
}

.why-card-solution span {
    font-size: 14px;
    color: var(--green);
    line-height: 1.55;
}

/* ============================================================
   Features
   ============================================================ */

.features {
    border-top: 1px solid var(--border-subtle);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.25s ease;
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--copper), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.feature-card:hover {
    border-color: rgba(201, 131, 78, 0.3);
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--copper-glow2);
    border: 1px solid rgba(201, 131, 78, 0.1);
    color: var(--copper);
    margin-bottom: 18px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================================================
   Architecture
   ============================================================ */

.arch {
    border-top: 1px solid var(--border-subtle);
}

.arch-diagram {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.arch-layer {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
    position: relative;
}

.arch-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    position: absolute;
    top: 12px;
    right: 16px;
}

.arch-flow {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.arch-node {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 18px;
}

.arch-node code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
}

.arch-arrow {
    color: var(--text-dim);
    flex-shrink: 0;
}

.arch-container {
    border-color: rgba(201, 131, 78, 0.2);
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(201, 131, 78, 0.03) 100%);
}

.arch-inside {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.arch-node-highlight {
    border-color: rgba(201, 131, 78, 0.3);
    background: var(--copper-glow);
    text-align: center;
}

.arch-node-highlight small {
    font-size: 11px;
    color: var(--copper);
    display: block;
    margin-top: 4px;
}

.arch-mounts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.arch-mount {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

.arch-mount code {
    font-family: var(--font-mono);
    color: var(--copper);
}

.arch-mount-arrow {
    color: var(--text-dim);
    margin: 0 6px;
}

.arch-security {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.arch-security span {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--green);
    background: var(--green-dim);
    padding: 3px 10px;
    border-radius: 4px;
}

/* ============================================================
   Quick Start (Steps)
   ============================================================ */

.quickstart {
    border-top: 1px solid var(--border-subtle);
}

.steps {
    margin-top: 48px;
}

.step {
    display: flex;
    gap: 28px;
    margin-bottom: 0;
    padding-bottom: 40px;
}

.step:last-child {
    padding-bottom: 0;
}

.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
}

.step-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--bg);
    background: var(--copper);
    flex-shrink: 0;
}

.step-line {
    width: 1px;
    flex: 1;
    background: linear-gradient(to bottom, var(--copper) 0%, var(--border-subtle) 100%);
    margin-top: 8px;
    border-radius: 1px;
}

.step-content {
    flex: 1;
    padding-top: 4px;
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 6px;
}

.step-content > p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 16px;
    max-width: 480px;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

.footer-logo-icon {
    color: var(--copper);
}

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-nav a {
    font-size: 13px;
    color: var(--text-dim);
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--copper);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 0;
}

/* ============================================================
   Scroll Reveal
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
    .why-cards {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    section {
        padding: 64px 0;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: clamp(40px, 12vw, 64px);
    }

    .hero-tagline {
        font-size: 16px;
    }

    .labyrinth {
        width: 360px;
        height: 360px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    /* Why cards stack */
    .why-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Features stacks */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Architecture stacks */
    .arch-flow {
        flex-direction: column;
        align-items: flex-start;
    }

    .arch-arrow {
        transform: rotate(90deg);
        align-self: center;
    }

    .arch-inside {
        flex-direction: column;
    }

    /* Steps */
    .step {
        gap: 16px;
    }

    /* Footer */
    .footer-top {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .nav-links a:not(.nav-github) {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .terminal-body {
        font-size: 12px;
        padding: 14px 14px;
    }

    .terminal-sm pre {
        font-size: 12px;
        padding: 12px 14px;
    }

    .cta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .why-card {
        padding: 22px;
    }

    .feature-card {
        padding: 22px;
    }
}
