/* Coyote Technology Group — shared styles
   Palette kept from the original single-page design; dim text lightened
   so every text color meets WCAG 2.1 AA (4.5:1) against the backgrounds. */

@font-face {
    font-family: 'JetBrains Mono';
    src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('/fonts/JetBrainsMono-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #242424;
    --bg-surface: #1a1a1a;
    --bg-raised: #2c2c2c;
    --text: #c3c8cb;        /* 9.0:1 on --bg */
    --text-dim: #9ca1a5;    /* 5.9:1 on --bg (was #6b7074 @ 3.1:1) */
    --accent: #ff7235;      /* 5.7:1 on --bg */
    --accent-dim: #cc5a2a;
    --white: #e7ece5;
    --status-green: #4ade80;
    --border: #3f3f3f;
    --border-dim: #2e2e2e;
    --max: 1040px;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }

html {
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    background-image: radial-gradient(circle, var(--border-dim) 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
    position: absolute;
    left: 8px;
    top: -100px;
    z-index: 100;
    padding: 8px 12px;
    background: var(--accent);
    color: var(--bg-surface);
    text-decoration: none;
    font-weight: 700;
}
.skip-link:focus { top: 8px; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------- Corner brackets (decorative) ---------- */
.corner {
    position: fixed;
    width: 20px;
    height: 20px;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    animation: fadeInCorner 0.8s ease-out 0.2s forwards;
}
.corner::before, .corner::after {
    content: '';
    position: absolute;
    background-color: var(--text-dim);
}
.corner::before { width: 100%; height: 1px; }
.corner::after  { width: 1px; height: 100%; }
.corner-tl { top: 16px; left: 16px; }
.corner-tl::before { top: 0; left: 0; }
.corner-tl::after  { top: 0; left: 0; }
.corner-tr { top: 16px; right: 16px; }
.corner-tr::before { top: 0; right: 0; }
.corner-tr::after  { top: 0; right: 0; }
.corner-bl { bottom: 16px; left: 16px; }
.corner-bl::before { bottom: 0; left: 0; }
.corner-bl::after  { bottom: 0; left: 0; }
.corner-br { bottom: 16px; right: 16px; }
.corner-br::before { bottom: 0; right: 0; }
.corner-br::after  { bottom: 0; right: 0; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInCorner { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---------- Header / nav ---------- */
.site-header {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 40px 24px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 32px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.2s forwards;
}
.brand {
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    font-size: 1.05em;
}
.brand:hover { color: var(--accent); }
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}
.site-nav a {
    color: var(--text-dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8em;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--white); }
.site-nav a[aria-current="page"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.header-rule {
    width: 100%;
    max-width: var(--max);
    margin: 14px auto 0;
    padding: 0 24px;
}
.header-rule::after {
    content: '';
    display: block;
    height: 3px;
    background: var(--text);
}

/* ---------- Layout ---------- */
main {
    flex: 1;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 8px 24px 48px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.4s forwards;
}
.section { padding: 40px 0; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: 0; }
.section-tight { padding: 24px 0; }

.eyebrow {
    font-size: 0.8em;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin: 0 0 12px;
}
.eyebrow .dot {
    display: inline-block;
    width: 7px; height: 7px;
    background-color: var(--status-green);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    animation: pulse 2.5s ease-in-out infinite;
}

h1, h2, h3, h4 {
    color: var(--white);
    line-height: 1.25;
    margin: 0 0 16px;
    text-wrap: balance;
}
h1 { font-size: 2.1em; letter-spacing: 0.02em; }
h2 { font-size: 1.35em; text-transform: uppercase; letter-spacing: 0.15em; }
h3 { font-size: 1.05em; text-transform: uppercase; letter-spacing: 0.1em; }
h4 { font-size: 0.95em; letter-spacing: 0.05em; }
.lede { font-size: 1.1em; color: var(--text); max-width: 70ch; }
p { margin: 0 0 1em; max-width: 75ch; }
a { color: var(--accent); }
a:hover { color: var(--white); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
small, .small { font-size: 0.85em; color: var(--text-dim); }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
strong { color: var(--white); font-weight: 700; }
code, pre { font-family: var(--mono); }

/* ---------- Components ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.btn {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85em;
    font-weight: 700;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.btn:hover, .btn:focus-visible { background: var(--accent); color: var(--bg-surface); }
.btn-primary { background: var(--accent); color: var(--bg-surface); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--white); border-color: var(--white); color: var(--bg-surface); }
.btn-quiet { border-color: var(--border); color: var(--text); }
.btn-quiet:hover, .btn-quiet:focus-visible { background: var(--bg-raised); color: var(--white); border-color: var(--text-dim); }

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 22px 22px 18px;
    position: relative;
}
.card h3 { margin-bottom: 10px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .num {
    position: absolute;
    top: 14px; right: 16px;
    font-size: 0.75em;
    color: var(--text-dim);
    letter-spacing: 0.15em;
}
a.card { text-decoration: none; color: inherit; display: block; transition: border-color 0.2s; }
a.card:hover, a.card:focus-visible { border-color: var(--accent); color: inherit; }
a.card:hover h3 { color: var(--accent); }
.card .more { color: var(--accent); font-size: 0.85em; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 12px; }

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 0;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
}
.trust-strip li { white-space: nowrap; }
.trust-strip li + li::before { content: '/'; margin: 0 12px; color: var(--border); }
.trust-strip strong { color: var(--white); font-weight: 400; }

.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
    margin: 0;
    padding: 3px 10px;
    border: 1px solid var(--border);
    font-size: 0.78em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    margin: 0 0 16px;
}
table.data th, table.data td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
table.data th {
    color: var(--text-dim);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8em;
    white-space: nowrap;
    width: 32%;
}
table.data td { color: var(--white); overflow-wrap: anywhere; }
table.data code { color: var(--accent); }
.table-wrap { overflow-x: auto; }

dl.spec { margin: 0; }
dl.spec dt { color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8em; margin-top: 12px; }
dl.spec dd { margin: 2px 0 0; color: var(--white); }

.callout {
    border-left: 3px solid var(--accent);
    background: var(--bg-surface);
    padding: 16px 20px;
    margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Placeholder for facts the site owner still needs to supply.
   Remove the class (or the whole element) once the real value is in place. */
.todo {
    color: var(--accent);
    border: 1px dashed var(--accent-dim);
    padding: 0 6px;
    background: rgba(255, 114, 53, 0.06);
}
.todo::before { content: '[TODO: '; }
.todo::after  { content: ']'; }

/* PGP key block */
.key-box {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    margin: 0;
    padding: 16px;
    max-height: 40vh;
    overflow: auto;
    font-size: 0.75em;
    line-height: 1.5;
    color: var(--text-dim);
    white-space: pre;
}
.key-tools { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; align-items: center; }
.key-tools .fingerprint { font-size: 0.8em; color: var(--text-dim); word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px 32px;
    font-size: 0.8em;
    color: var(--text-dim);
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.6s forwards;
}
.site-footer .rule { height: 1px; background: var(--border); margin-bottom: 18px; }
.site-footer .cols {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 32px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: var(--text-dim); text-decoration: none; text-transform: uppercase; letter-spacing: 0.1em; }
.site-footer a:hover { color: var(--white); }
.site-footer .legal { margin-top: 14px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Home hero ---------- */
.hero { padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 2.4em; max-width: 22ch; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
    body { font-size: 15px; }
    .site-header { padding-top: 28px; }
    .corner { display: none; }
    h1 { font-size: 1.7em; }
    .hero h1 { font-size: 1.85em; }
    .section { padding: 28px 0; }
    .trust-strip li { white-space: normal; }
    /* Stack data tables: each row becomes a label + value block */
    table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    table.data, table.data tbody, table.data tr, table.data th, table.data td { display: block; width: auto; }
    table.data tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
    table.data th, table.data td { border: 0; padding: 0; white-space: normal; }
    table.data th { margin-bottom: 2px; }
}

@media print {
    body { background: #fff; color: #111; }
    .corner, .site-nav, .skip-link { display: none; }
    .site-header, main, .site-footer { opacity: 1; animation: none; }
    a { color: #111; }
}
