/* auto.relay70.dev - Switchboard palette. Deliberately cooler and flatter than
   the ember-toned relay70 surfaces so the automations subdomain reads as its
   own thing while staying in the family. */

:root {
    color-scheme: dark;
    --bg: #1c1c1e;
    --bg-elev: #2c2c2e;
    --bg-sunken: #161618;
    --border: rgba(255, 255, 255, 0.12);
    --border-soft: rgba(255, 255, 255, 0.06);
    --text-primary: #e0e0e0;
    --text-secondary: #9aa0a6;
    --text-ghost: #6b7076;
    --accent: #5686f7;
    --accent-soft: rgba(86, 134, 247, 0.14);
    --accent-ring: rgba(86, 134, 247, 0.32);
    --ok: #6fbf8b;
    --warn: #e3b564;
    --font-ui: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --radius: 10px;
    --shell: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-ring);
    border-radius: 6px;
}

::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.shell {
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 48px);
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-ghost);
    margin: 0 0 14px;
}

/* ---------- nav ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(28, 28, 30, 0.86);
    backdrop-filter: saturate(150%) blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 60px;
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-right: auto;
}

.wordmark .dim { color: var(--text-ghost); font-weight: 500; }

.mark {
    width: 20px;
    height: 20px;
    display: inline-grid;
    grid-template-columns: repeat(3, 4px);
    align-items: end;
    gap: 3px;
    flex: none;
}

.mark i { display: block; width: 4px; background: var(--accent); border-radius: 1px; }
.mark i:nth-child(1) { height: 8px; opacity: 0.5; }
.mark i:nth-child(2) { height: 16px; }
.mark i:nth-child(3) { height: 12px; opacity: 0.75; }

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 6px 2px;
    transition: color 0.15s ease;
}

.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text-primary); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elev);
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover { background: #343437; border-color: rgba(255, 255, 255, 0.2); }
.btn:active { transform: translateY(1px); }

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #0d1220;
    font-weight: 600;
}

.btn-accent:hover { background: #6b95f8; border-color: #6b95f8; }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }

/* ---------- hero ---------- */

.hero { padding: clamp(56px, 10vw, 104px) 0 clamp(40px, 6vw, 64px); }

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(34px, 5.4vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.025em;
    font-weight: 650;
    max-width: 16ch;
}

.hero h1 em { font-style: normal; color: var(--accent); }

.hero p {
    margin: 0;
    max-width: 60ch;
    font-size: clamp(16px, 1.6vw, 18px);
    color: var(--text-secondary);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.rule { border: 0; border-top: 1px solid var(--border-soft); margin: 0; }

/* ---------- sections ---------- */

.section { padding: clamp(44px, 7vw, 76px) 0; }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 28px;
}

.section-head h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.section-head p { margin: 0; color: var(--text-secondary); font-size: 14px; }

/* ---------- cards ---------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-lead { grid-column: 1 / -1; }

.card-top { display: flex; align-items: center; gap: 10px; }

.card h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
}

.card p { margin: 0; color: var(--text-secondary); font-size: 14px; }

.card-soon {
    background: transparent;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.1);
}

.card-soon h3, .card-soon p { color: var(--text-ghost); }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    white-space: nowrap;
}

.tag-live { color: var(--ok); border-color: rgba(111, 191, 139, 0.4); }
.tag-testing { color: var(--warn); border-color: rgba(227, 181, 100, 0.4); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.feature-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }

.feature-list li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--accent);
    opacity: 0.75;
}

/* ---------- terminal sample ---------- */

.terminal {
    background: var(--bg-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-soft);
}

.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.terminal-bar b { margin-left: 6px; font: 400 12px var(--font-mono); color: var(--text-ghost); }

.terminal pre {
    margin: 0;
    padding: 16px 18px 20px;
    overflow-x: auto;
    font: 13px/1.75 var(--font-mono);
    color: var(--text-secondary);
}

.terminal .p { color: var(--accent); }
.terminal .c { color: var(--text-primary); }
.terminal .g { color: var(--ok); }
.terminal .m { color: var(--text-ghost); }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 860px) {
    .split { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- form ---------- */

.form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 7px; }

.field label { font-size: 13px; font-weight: 500; }
.field .hint { font-size: 12px; color: var(--text-ghost); }

.field input, .field textarea, .field select {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.15s ease;
}

.field input:hover, .field textarea:hover, .field select:hover { border-color: rgba(255, 255, 255, 0.2); }
.field textarea { resize: vertical; min-height: 140px; }
.field select { appearance: none; cursor: pointer; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { margin: 0; font-size: 13px; color: var(--text-ghost); max-width: 560px; }

.status {
    margin: 0;
    font-size: 14px;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    display: none;
}

.status[data-state="ok"] { display: block; color: var(--ok); border-color: rgba(111, 191, 139, 0.4); }
.status[data-state="err"] { display: block; color: #e2685c; border-color: rgba(226, 104, 92, 0.4); }
.status[data-state="busy"] { display: block; color: var(--text-secondary); }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--border-soft); padding: 30px 0 44px; margin-top: 40px; }

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    font-size: 13px;
    color: var(--text-ghost);
}

.footer-inner a { color: var(--text-secondary); text-decoration: none; }
.footer-inner a:hover { color: var(--text-primary); }
.footer-inner .spacer { margin-left: auto; }
