/* ============================================================================
   TechTethr.com — Signal theme, refreshed
   The app's default palette (bright blue on slate, oklch from index.css /
   themes.css) in a clean, modern marketing layout: Inter, generous spacing,
   soft layered shadows, a subtle hero glow, line icons.
   ============================================================================ */

:root {
    /* Signal palette (light) */
    --paper:      oklch(0.985 0.002 260);
    --paper-2:    oklch(0.965 0.004 260);
    --card:       oklch(1 0 0);
    --ink:        oklch(0.22 0.02 260);
    --ink-soft:   oklch(0.52 0.015 260);
    --brand-300:  oklch(0.81 0.10 252);
    --brand-400:  oklch(0.71 0.145 254);
    --brand:      oklch(0.62 0.19 259);
    --brand-600:  oklch(0.55 0.22 263);
    --brand-700:  oklch(0.49 0.21 264);
    --hair:       oklch(0.91 0.006 260);
    --ok:         #16a34a;
    --warn:       #e8590c;

    --brand-grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 14px -4px rgba(15, 23, 42, 0.10), 0 2px 6px -3px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 48px -20px rgba(15, 23, 42, 0.32), 0 10px 24px -14px rgba(15, 23, 42, 0.18);
    --brand-glow: 0 10px 28px -10px color-mix(in oklab, var(--brand) 55%, transparent);

    --radius-lg: 18px;
    --radius: 12px;
    --radius-sm: 9px;

    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", "Consolas", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper:      oklch(0.19 0.018 260);
        --paper-2:    oklch(0.165 0.016 260);
        --card:       oklch(0.225 0.02 260);
        --ink:        oklch(0.96 0.005 260);
        --ink-soft:   oklch(0.68 0.015 260);
        --brand-300:  oklch(0.81 0.10 252);
        --brand-400:  oklch(0.71 0.145 254);
        --brand:      oklch(0.66 0.19 259);
        --brand-600:  oklch(0.58 0.22 263);
        --brand-700:  oklch(0.52 0.21 264);
        --hair:       oklch(0.30 0.02 260);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 4px 14px -4px rgba(0, 0, 0, 0.5), 0 2px 6px -3px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, 0.7), 0 10px 24px -14px rgba(0, 0, 0, 0.5);
    }
    .wordmark .accent { color: var(--brand-400); }
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: -0.005em;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in oklab, var(--brand) 25%, transparent); }
img { max-width: 100%; }

/* ---- Typography ------------------------------------------------------------ */

h1, h2, h3 { color: var(--ink); margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.03; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
/* Blazor's FocusOnNavigate focuses the h1 programmatically — don't show a ring for that. */
h1:focus, h1:focus-visible { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 3px; }

p { margin: 0 0 1rem; }

.grad {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

a { color: var(--brand-700); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    background: var(--paper-2);
    border: 1px solid var(--hair);
    border-radius: 6px;
    padding: 0.08em 0.4em;
    color: var(--brand-700);
}

.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---- Boot / loading screen ------------------------------------------------- */

.boot {
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 20px; background: var(--paper);
}
.boot-logo {
    width: 72px; height: 72px;
    display: grid; place-items: center;
    filter: drop-shadow(0 14px 26px color-mix(in oklab, var(--brand) 45%, transparent));
    animation: pulse 1.5s ease-in-out infinite;
}
.boot-logo svg { width: 100%; height: 100%; }
.boot-text { color: var(--ink-soft); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.01em; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.72; transform: scale(0.96); } }

/* ---- Layout ---------------------------------------------------------------- */

.page { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
.wrap { width: min(1120px, 92vw); margin: 0 auto; }

section { padding: 88px 0; }
section[id] { scroll-margin-top: 84px; }
section:nth-of-type(even) { background: color-mix(in oklab, var(--paper-2) 55%, var(--paper)); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p { font-size: 1.1rem; color: var(--ink-soft); margin: 0; }

/* ---- Logo / wordmark ------------------------------------------------------- */

.tt-logo { display: block; flex: 0 0 auto; }
.tt-logo rect, .boot-logo rect { fill: var(--brand-600); }
.brand .tt-logo { width: 30px; height: 30px; }
.wordmark { letter-spacing: -0.02em; }
.wordmark .accent { color: var(--brand-600); }

/* ---- Eyebrow pill ---------------------------------------------------------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--brand-700);
    background: color-mix(in oklab, var(--brand) 9%, var(--card));
    border: 1px solid color-mix(in oklab, var(--brand) 22%, transparent);
    border-radius: var(--radius-pill, 9999px);
    padding: 6px 14px;
    margin-bottom: 20px;
}
.eyebrow::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand); flex: 0 0 auto;
}

/* ---- Top navigation -------------------------------------------------------- */

.nav {
    position: sticky; top: 0; z-index: 8000;
    background: color-mix(in oklab, var(--paper) 82%, transparent);
    backdrop-filter: saturate(1.6) blur(12px);
    border-bottom: 1px solid var(--hair);
}
.nav-inner {
    width: min(1120px, 92vw); margin: 0 auto;
    display: flex; align-items: center; gap: 16px; height: 66px;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.nav-links { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.nav-links a {
    font-size: 0.92rem; font-weight: 550; padding: 8px 14px;
    border-radius: var(--radius-sm); color: var(--ink-soft);
}
.nav-links a:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.nav-links a.cta { color: #fff; background: var(--brand-600); }
.nav-links a.cta:hover { background: var(--brand-700); color: #fff; }
.nav-toggle { display: none; }

/* ---- Buttons --------------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: inherit; font-size: 0.98rem; font-weight: 600;
    padding: 0.8rem 1.35rem;
    color: var(--ink); background: var(--card);
    border: 1px solid var(--hair); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-primary { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: var(--brand-glow); }
.btn-primary:hover { color: #fff; box-shadow: 0 14px 32px -10px color-mix(in oklab, var(--brand) 65%, transparent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---- Hero ------------------------------------------------------------------ */

.hero { position: relative; padding: 104px 0 96px; overflow: hidden; }
.hero::before {
    content: "";
    position: absolute; inset: -20% 0 auto 0; height: 620px; z-index: 0;
    background: radial-gradient(60% 60% at 70% 0%, color-mix(in oklab, var(--brand) 22%, transparent), transparent 70%);
    pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero .lede { font-size: 1.3rem; line-height: 1.5; max-width: 44ch; color: var(--ink-soft); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.chip {
    font-size: 0.8rem; font-weight: 550; color: var(--ink-soft);
    background: var(--card); border: 1px solid var(--hair);
    border-radius: var(--radius-pill, 9999px); padding: 6px 13px;
}

/* Hero terminal visual */
.terminal {
    background: #0f172a; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.08); overflow: hidden;
}
.term-head {
    display: flex; gap: 8px; align-items: center;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-dot.r { background: #ff5f56; } .term-dot.y { background: #ffbd2e; } .term-dot.g { background: #27c93f; }
.term-title { margin-left: 8px; font-family: var(--font-mono); font-size: 0.72rem; color: #64748b; }
.term-body {
    padding: 20px 22px; font-family: var(--font-mono);
    font-size: 0.84rem; line-height: 1.85; color: #e2e8f0;
    overflow-x: auto;
}
.term-body > div { white-space: nowrap; }
.term-body .p  { color: #93b4ff; }
.term-body .ok { color: #4ade80; }
.term-body .u  { color: #93c5fd; }
.term-body .dim { color: #64748b; }

/* ---- Cards / grids --------------------------------------------------------- */

.card {
    background: var(--card);
    border: 1px solid var(--hair);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 30px;
}
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.feature { transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in oklab, var(--brand) 30%, var(--hair)); }
.feature h3 { display: flex; align-items: center; gap: 13px; margin-bottom: 10px; }
.feature .ico {
    display: inline-grid; place-items: center;
    width: 46px; height: 46px; flex: 0 0 auto;
    color: var(--brand-600);
    background: color-mix(in oklab, var(--brand) 11%, var(--card));
    border: 1px solid color-mix(in oklab, var(--brand) 18%, transparent);
    border-radius: 13px;
}
.feature .ico svg {
    width: 23px; height: 23px;
    fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---- Steps (install) ------------------------------------------------------- */

.step { display: flex; gap: 20px; margin-bottom: 30px; align-items: flex-start; }
.step .num {
    flex: 0 0 auto; font-weight: 700; font-size: 1.05rem; color: #fff;
    background: var(--brand-grad); border-radius: 50%;
    width: 42px; height: 42px; display: grid; place-items: center;
    box-shadow: var(--brand-glow);
}
.step .body { flex: 1; min-width: 0; }
.step .body h3 { margin-bottom: 8px; }

/* ---- Code blocks ----------------------------------------------------------- */

.code {
    position: relative; background: #0f172a; color: #e2e8f0;
    border-radius: var(--radius); box-shadow: var(--shadow-md);
    overflow: hidden; margin: 14px 0 24px;
}
.code-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono); font-size: 0.74rem; color: #93b4ff; letter-spacing: 0.02em;
}
.code pre {
    margin: 0; padding: 18px 20px; overflow-x: auto;
    font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.75; white-space: pre;
}
.copy-btn {
    font-family: inherit; font-size: 0.72rem; font-weight: 600; color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px; padding: 5px 11px; cursor: pointer; transition: background 0.12s ease;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.18); }

/* ---- Tables ---------------------------------------------------------------- */

.tbl-wrap {
    overflow-x: auto; border: 1px solid var(--hair);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 8px 0;
}
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--hair); }
th {
    font-size: 0.76rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--ink-soft); background: color-mix(in oklab, var(--paper-2) 60%, var(--card));
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: color-mix(in oklab, var(--paper-2) 50%, transparent); }
td code { background: var(--paper-2); }

.pill {
    display: inline-block; font-family: var(--font-mono); font-size: 0.82rem;
    padding: 2px 11px; border-radius: var(--radius-pill, 9999px);
    background: var(--paper-2); color: var(--ink);
}
.pill.admin { background: color-mix(in oklab, var(--brand) 20%, var(--card)); color: var(--brand-700); }
.pill.tech  { background: color-mix(in oklab, var(--brand) 10%, var(--card)); }
.pill.ro    { background: var(--paper-2); }

/* ---- Callout --------------------------------------------------------------- */

.note {
    border: 1px solid var(--hair); border-left: 4px solid var(--brand);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    background: var(--card); padding: 18px 22px; margin: 22px 0;
}
.note.warn { border-left-color: var(--warn); }
.note.info { border-left-color: var(--brand-600); }
.note strong { font-weight: 700; letter-spacing: 0.02em; font-size: 0.82rem; text-transform: uppercase; color: var(--ink-soft); }

/* ---- Footer ---------------------------------------------------------------- */

footer {
    background: color-mix(in oklab, var(--paper-2) 70%, var(--card));
    border-top: 1px solid var(--hair);
    padding: 40px 0; margin-top: 24px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
footer .tt-logo { width: 28px; height: 28px; }

/* ---- Blazor error UI ------------------------------------------------------- */

#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 10000;
    padding: 14px 20px; background: var(--warn); color: #fff; font-weight: 600;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }
#blazor-error-ui a { color: #fff; }

/* ---- Responsive ------------------------------------------------------------ */

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding: 72px 0 64px; }
    .hero .lede { max-width: none; }
}
@media (max-width: 820px) {
    section { padding: 64px 0; }
    .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
    .nav-links {
        display: none; position: absolute; top: 66px; left: 0; right: 0;
        flex-direction: column; gap: 0; padding: 8px;
        background: var(--paper); border-bottom: 1px solid var(--hair); box-shadow: var(--shadow-md);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 14px; }
    .nav-toggle {
        display: inline-flex; align-items: center; margin-left: auto;
        font-family: inherit; font-size: 0.9rem; font-weight: 600;
        background: var(--card); color: var(--ink);
        border: 1px solid var(--hair); border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm); padding: 8px 14px; cursor: pointer;
    }
}
