/* AI-slöjd — 46elks × Swedish Craft theme
   Deep indigo (46elks) + warm wood/falu tones (slöjd)
   Inspired by hemslöjden.org, hemslöjd.se, sätergläntan.se */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&display=swap');

:root {
    /* Dark craft workshop palette */
    --bg: #0f0d0a;
    --bg-card: #1a1714;
    --bg-dark: #0a0908;
    --bg-hover: #252017;

    /* Warm parchment text */
    --text: #ede4d4;
    --text-dim: #958b79;

    /* 46elks indigo */
    --accent: #6366f1;
    --accent-dim: #3730a3;
    --accent-bright: #818cf8;

    /* Slöjd warmth */
    --warm: #d4a15e;
    --warm-dim: #8a6830;
    --warm-glow: rgba(212, 161, 94, 0.12);
    --falu: #b04a4a;
    --falu-dim: #7a3030;

    /* Natural tones */
    --green: #6a9f4d;
    --red: #d45656;
    --teal: #4a9a8a;

    /* Borders & structure */
    --border: #2a2520;
    --border-warm: #3d3228;
    --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Serif headings for craft character */
h1, h2, h3 {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

code, pre {
    font-family: 'JetBrains Mono', monospace;
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--warm); }

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ═══════ Nav ═══════ */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(15, 13, 10, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 0 1.5rem;
}
.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.logo {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo-dot { color: var(--falu); }
.nav-links { display: flex; gap: 1.5rem; font-size: .85rem; align-items: center; }
.nav-links a { color: var(--text-dim); text-decoration: none; transition: color .15s; }
.nav-links a:hover { color: var(--warm); text-decoration: none; }

/* ═══════ Hero ═══════ */
.hero {
    padding: 10rem 1.5rem 5rem;
    text-align: center;
    position: relative;
    background:
        radial-gradient(ellipse at 35% 20%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 65% 25%, rgba(176, 74, 74, 0.05) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 60%, rgba(212, 161, 94, 0.04) 0%, transparent 50%);
}
/* Subtle wood grain hint */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        87deg,
        transparent,
        transparent 80px,
        rgba(212, 161, 94, 0.02) 80px,
        rgba(212, 161, 94, 0.02) 81px
    );
    pointer-events: none;
}
.badge {
    display: inline-block;
    padding: .35rem 1rem;
    border: 1px dashed var(--warm-dim);
    border-radius: 100px;
    font-size: .8rem;
    color: var(--warm);
    margin-bottom: 1.5rem;
    letter-spacing: .03em;
    background: var(--warm-glow);
    font-family: 'Inter', sans-serif;
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}
.highlight {
    background: linear-gradient(135deg, var(--accent-bright) 20%, var(--warm) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 550px;
    margin: 0 auto 2rem;
    font-family: 'Inter', sans-serif;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ═══════ Buttons ═══════ */
.btn {
    display: inline-block;
    padding: .7rem 1.6rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all .2s;
    font-family: 'Inter', sans-serif;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.25);
}
.btn-primary:hover {
    background: var(--accent-bright);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-warm);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--warm-dim);
    color: var(--warm);
    background: rgba(212, 161, 94, 0.05);
}
.btn-full { width: 100%; text-align: center; }
.btn-sm { padding: .4rem 1rem; font-size: .8rem; }

/* ═══════ Sections ═══════ */
.section {
    padding: 5rem 1.5rem;
    position: relative;
}
.section-dark {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: .5rem;
    letter-spacing: -0.01em;
    color: var(--text);
}
.section-sub {
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 600px;
    font-family: 'Inter', sans-serif;
}

/* ═══════ Grid ═══════ */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* ═══════ Cards ═══════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: relative;
    transition: border-color .2s, box-shadow .2s;
}
.card:hover {
    border-color: var(--border-warm);
    box-shadow: 0 4px 24px rgba(212, 161, 94, 0.06);
}
.card-icon {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--warm);
    margin-bottom: .75rem;
}
.card h3 {
    font-size: 1.1rem;
    margin-bottom: .5rem;
}
.card p {
    font-size: .85rem;
    color: var(--text-dim);
    line-height: 1.55;
    margin-bottom: .75rem;
    font-family: 'Inter', sans-serif;
}
.card-install code {
    display: block;
    background: var(--bg);
    padding: .5rem .75rem;
    border-radius: 6px;
    font-size: .75rem;
    color: var(--green);
    overflow-x: auto;
    border: 1px solid var(--border);
}
.card-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--falu);
    background: rgba(176, 74, 74, 0.1);
    padding: .2rem .55rem;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
}

/* ═══════ Tip box ═══════ */
.tip-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--warm);
    border-radius: var(--radius);
    padding: 1.25rem;
    font-size: .9rem;
    color: var(--text-dim);
}
.tip-box strong { color: var(--warm); }
.tip-box code {
    background: var(--bg);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: .8rem;
    color: var(--green);
}

/* ═══════ Provision box ═══════ */
.provision-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 520px;
    margin: 0 auto 2.5rem;
    position: relative;
}
/* Craft-inspired top accent — chisel/wood line */
.provision-box::before {
    content: '';
    position: absolute;
    top: -1px; left: 2rem; right: 2rem;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--warm-dim) 15%,
        var(--warm) 30%,
        var(--accent) 50%,
        var(--warm) 70%,
        var(--warm-dim) 85%,
        transparent
    );
    border-radius: 0 0 3px 3px;
    opacity: 0.7;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: .4rem;
    color: var(--text);
    font-family: 'Inter', sans-serif;
}
.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .65rem .85rem;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: .85rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.form-group small {
    display: block;
    margin-top: .4rem;
    font-size: .75rem;
    color: var(--text-dim);
}
.form-group small code {
    background: var(--bg-dark);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: .7rem;
    color: var(--green);
}

.error-msg {
    margin-top: .75rem;
    padding: .6rem 1rem;
    background: rgba(212, 86, 86, 0.08);
    border: 1px solid rgba(212, 86, 86, 0.25);
    border-radius: 8px;
    color: var(--red);
    font-size: .85rem;
}

/* ═══════ Verify ═══════ */
.verify-info { text-align: center; margin-bottom: 1.5rem; }
.verify-info p { color: var(--text-dim); font-size: .9rem; margin-bottom: .75rem; }
.code-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--warm);
    letter-spacing: .3em;
    margin: 1rem 0;
    text-shadow: 0 0 30px rgba(212, 161, 94, 0.25);
}

/* ═══════ Status ═══════ */
.status-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 1rem 0;
    color: var(--text-dim);
    font-size: .9rem;
}
.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════ Progress steps ═══════ */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: 1.5rem;
}
.p-step {
    padding: .55rem 1rem;
    border-radius: 8px;
    font-size: .85rem;
    color: var(--text-dim);
    background: var(--bg);
    border-left: 3px solid var(--border);
    transition: all .3s;
}
.p-step.done {
    color: var(--green);
    border-left-color: var(--green);
}
.p-step.active {
    color: var(--accent-bright);
    border-left-color: var(--accent);
    background: rgba(99, 102, 241, 0.04);
}

/* ═══════ Ready ═══════ */
.ready-box { text-align: center; }
.ready-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(106, 159, 77, 0.12);
    color: var(--green);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.server-info {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.25rem 0;
    border: 1px solid var(--border);
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 0;
}
.info-row span { color: var(--text-dim); font-size: .85rem; }
.info-row code {
    color: var(--accent-bright);
    font-size: .85rem;
    user-select: all;
}

/* SSH command box */
.ssh-command-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg);
    border: 1px solid var(--accent-dim);
    border-radius: 8px;
    padding: .85rem 1.1rem;
    margin: 1rem 0;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.ssh-command-box:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.04);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.08);
}
.ssh-command-box code {
    color: var(--accent-bright);
    font-size: 1.05rem;
    font-weight: 600;
    user-select: all;
}
.ssh-copy-hint {
    font-size: .75rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dim);
    background: var(--bg-card);
    padding: .25rem .65rem;
    border-radius: 5px;
    border: 1px solid var(--border);
    transition: all .15s;
    flex-shrink: 0;
    margin-left: 1rem;
}
.ssh-command-box:hover .ssh-copy-hint {
    color: var(--accent-bright);
    border-color: var(--accent-dim);
}

.next-step { font-size: .9rem; color: var(--text-dim); margin-top: 1rem; }

/* ═══════ Error ═══════ */
.error-box { text-align: center; }
.error-box h3 { color: var(--red); margin-bottom: .75rem; }
.error-box p { color: var(--text-dim); font-size: .9rem; margin-bottom: 1rem; }

/* ═══════ Server specs ═══════ */
.server-specs {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 520px;
    margin: 0 auto;
}
.server-specs h4 {
    font-size: .9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}
.specs-grid div {
    font-size: .8rem;
    color: var(--text-dim);
    padding: .4rem .6rem;
    background: var(--bg);
    border-radius: 6px;
    border: 1px solid var(--border);
}
.specs-grid div strong {
    color: var(--warm);
}

/* ═══════ Steps ═══════ */
.steps { display: flex; flex-direction: column; gap: 1.5rem; }
.step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.step-num {
    flex-shrink: 0;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--falu-dim);
    font-weight: 700;
    font-size: .85rem;
    color: var(--falu);
    font-family: 'Source Serif 4', Georgia, serif;
}
.step-content { flex: 1; min-width: 0; }
.step-content h4 {
    font-size: .95rem;
    margin-bottom: .5rem;
    font-family: 'Source Serif 4', Georgia, serif;
}
.step-content p {
    font-size: .85rem;
    color: var(--text-dim);
    margin-top: .5rem;
}
.step-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    font-size: .8rem;
    line-height: 1.5;
    color: var(--green);
}
.step-content pre code {
    color: inherit;
}

/* ═══════ Prompt cards ═══════ */
.prompt-list { display: flex; flex-direction: column; gap: 1.25rem; }
.prompt-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color .2s;
}
.prompt-card:hover {
    border-color: var(--border-warm);
}
.prompt-card h4 {
    font-size: .95rem;
    margin-bottom: .75rem;
    color: var(--warm);
    font-family: 'Source Serif 4', Georgia, serif;
}
.prompt-text {
    position: relative;
    cursor: pointer;
}
.prompt-text pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    font-size: .8rem;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
    transition: border-color .2s;
}
.prompt-text:hover pre { border-color: var(--border-warm); }
.copy-hint {
    position: absolute;
    top: .5rem;
    right: .75rem;
    font-size: .7rem;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    opacity: .5;
    transition: opacity .2s, color .2s;
}
.prompt-text:hover .copy-hint { opacity: 1; color: var(--warm); }

/* ═══════ LLM block ═══════ */
.llm-block {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.llm-block .btn-sm {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
}
.llm-block pre {
    font-size: .78rem;
    color: var(--text-dim);
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ═══════ FAQ ═══════ */
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s;
}
.faq-item:hover { border-color: var(--border-warm); }
.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Source Serif 4', Georgia, serif;
    transition: color .15s;
}
.faq-item summary:hover { color: var(--warm); }
.faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    transition: transform .2s, color .2s;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
    color: var(--falu);
}
.faq-item p {
    padding: 0 1.25rem 1rem;
    font-size: .85rem;
    color: var(--text-dim);
    line-height: 1.65;
}
.faq-item code {
    background: var(--bg);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: .8rem;
    color: var(--green);
}

/* ═══════ Footer ═══════ */
.footer {
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: .85rem;
    color: var(--text-dim);
    background: var(--bg-dark);
    position: relative;
}
/* Decorative dashed line above footer (hemslöjd-inspired) */
.footer::before {
    content: '';
    position: absolute;
    top: -1px; left: 15%; right: 15%;
    border-top: 1px dashed var(--warm-dim);
    opacity: 0.4;
}
.footer a { color: var(--warm); }
.footer a:hover { color: #e8b870; text-decoration: underline; }

/* ═══════ Scroll reveal ═══════ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════ Mobile ═══════ */
@media (max-width: 640px) {
    .nav-links { display: none; }
    .hero { padding: 7rem 1rem 3rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero-sub { font-size: .95rem; }
    .section { padding: 3rem 1rem; }
    .section h2 { font-size: 1.4rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .step { flex-direction: column; gap: .75rem; }
    .provision-box { padding: 1.25rem; }
    .code-display { font-size: 2rem; }
    .specs-grid { grid-template-columns: 1fr; }
    .llm-block pre { font-size: .7rem; }
}
