/* Kelo — site comercial. Os tokens seguem o app.css da aplicação (dash.kelohq.app). */

:root {
    color-scheme: light;
    --canvas: #ebe9e3;
    --surface: #fbfaf7;
    --surface-2: #f4f2ec;
    --line: #dbd7cc;
    --line-strong: #b8b3a5;
    --ink: #1a1916;
    --ink-soft: #47443c;
    --ink-faint: #6d695e;
    --accent: #b53a0a;
    --accent-hover: #922e07;
    --accent-ink: #ffffff;
    --accent-soft: #fce4d6;
    --signal: #ff5b14;
    --signal-ink: #1a1916;
    --success: #1d6b39;
    --grid-dot: rgba(26, 25, 22, 0.075);
    --dark: #11100e;
    --dark-ink: #eeece5;
    --dark-soft: #bab5a9;
    --radius: 3px;
    --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--signal);
    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Bahnschrift", "DIN Alternate", "DIN Next", "D-DIN", "Barlow", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
    --font-mono: "Cascadia Mono", "Cascadia Code", "JetBrains Mono", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
    --wrap: 72rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --canvas: #11100e;
        --surface: #1a1916;
        --surface-2: #151412;
        --line: #2f2d28;
        --line-strong: #47443c;
        --ink: #eeece5;
        --ink-soft: #bab5a9;
        --ink-faint: #928d81;
        --accent: #ff8a52;
        --accent-hover: #ffa376;
        --accent-ink: #1a1916;
        --accent-soft: #3a1c0d;
        --signal: #ff6a2b;
        --signal-ink: #11100e;
        --success: #72cf92;
        --grid-dot: rgba(255, 255, 255, 0.045);
        --dark: #0a0a09;
    }
}

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

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

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font: 1rem/1.6 var(--font);
    overflow-x: hidden;
}

img, svg { max-width: 100%; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius); }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

.skip {
    position: absolute; left: -999px; top: 0;
    background: var(--surface); padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; }

/* Topo */
.top {
    position: sticky; top: 0; z-index: 5;
    background: color-mix(in srgb, var(--canvas) 92%, transparent);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4rem; flex-wrap: wrap; }
.brand {
    display: inline-flex; align-items: center; gap: 0.6rem;
    color: var(--ink); text-decoration: none;
    font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 2rem; height: 2rem;
    background: var(--signal); color: var(--signal-ink);
    border-radius: var(--radius); font-size: 1.1rem;
}
.nav { display: flex; align-items: center; gap: 0.25rem 1.25rem; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.35em; text-decoration-thickness: 2px; }
@media (max-width: 40rem) {
    .top .wrap { padding-top: 0.6rem; padding-bottom: 0.6rem; }
    .nav { width: 100%; margin-left: 0; justify-content: space-between; }
    .nav .btn { display: none; }
}

/* Botões */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.7rem 1.2rem; min-height: 2.75rem;
    border: 1px solid transparent; border-radius: var(--radius);
    font: 600 0.95rem/1 var(--font); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.nav .btn { padding: 0.5rem 0.9rem; min-height: 2.25rem; color: var(--accent-ink); }
.nav .btn:hover { color: var(--accent-ink); }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Secções */
.section { padding: 4rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow {
    font: 600 0.78rem/1 var(--font-mono);
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--accent); margin-bottom: 1rem; display: block;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 40rem; }
.muted { color: var(--ink-faint); }

.hero {
    padding: 5rem 0 4rem;
    background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
    background-size: 18px 18px;
}
.hero h1 { max-width: 20ch; }
.hero .lead { margin-bottom: 2rem; }

.page-head { padding: 4rem 0 2rem; }
.page-head h1 { max-width: 22ch; }

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 44rem) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card .num {
    font: 600 0.8rem/1 var(--font-mono); color: var(--ink-faint);
    display: block; margin-bottom: 1rem;
}

.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 52rem) { .split { grid-template-columns: 5fr 7fr; gap: 3rem; } }

.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 0.55rem 0 0.55rem 1.6rem; position: relative; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li::before {
    content: ""; position: absolute; left: 0; top: 1.05rem;
    width: 0.6rem; height: 0.6rem; background: var(--signal); border-radius: 1px;
}

code, pre { font-family: var(--font-mono); font-size: 0.9em; }
pre {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem; overflow-x: auto; white-space: pre; margin: 0 0 1rem;
}

/* Mostra do ecrã (ilustrativa, feita em HTML) */
.shot {
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
    overflow: hidden; font-size: 0.85rem;
}
.shot-bar { display: flex; gap: 0.35rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.shot-bar i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--line-strong); }
.shot-body { padding: 1rem; display: grid; gap: 0.75rem; }
.shot-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: var(--radius); }
.shot-row b { font-weight: 600; }
.tag { font: 600 0.72rem/1 var(--font-mono); padding: 0.3rem 0.45rem; border-radius: 2px; white-space: nowrap; }
.tag-ok { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.tag-warn { background: var(--accent-soft); color: var(--accent); }
.tag-run { background: var(--signal); color: var(--signal-ink); }

/* Planos */
.plans { display: grid; gap: 1.25rem; }
@media (min-width: 56rem) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: var(--signal); box-shadow: inset 0 3px 0 var(--signal); }
.plan .price { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; line-height: 1; margin: 0.5rem 0 0.25rem; }
.plan .price small { font-size: 1rem; font-weight: 400; color: var(--ink-faint); font-family: var(--font); }
.plan .who { color: var(--ink-soft); min-height: 3.2em; }
.plan .list { margin: 1rem 0 1.5rem; flex: 1; }
.plan .btn { width: 100%; }
.badge { font: 600 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 34rem; }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-family: var(--font-display); font-size: 1.05rem; background: var(--surface-2); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 500; color: var(--ink-soft); }
td.yes::before { content: "✓ "; color: var(--success); font-weight: 700; }
td.no { color: var(--ink-faint); }

details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 0.75rem 0 0; color: var(--ink-soft); }

/* Formulário */
form { display: grid; gap: 1rem; }
label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
input, select, textarea {
    font: inherit; font-weight: 400; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: 0.65rem 0.75rem; width: 100%;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--focus); }
.form-note { font-size: 0.88rem; color: var(--ink-faint); }

/* Faixa final */
.band { background: var(--dark); color: var(--dark-ink); padding: 4rem 0; }
.band h2 { max-width: 24ch; }
.band p { color: var(--dark-soft); max-width: 40rem; }
.band .btn-ghost { color: var(--dark-ink); border-color: #47443c; }
.band .btn-ghost:hover { background: #1a1916; color: var(--dark-ink); }
.band .btn-primary { background: var(--signal); color: #11100e; }
.band .btn-primary:hover { background: #ff7a3d; color: #11100e; }

/* Rodapé */
.foot { padding: 2.5rem 0; font-size: 0.9rem; color: var(--ink-faint); border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.foot a { color: var(--ink-soft); }
