/* ====================================================================
 * MindAttic.UiUx -- Themes/Hardware/theme.css
 * Clean light/dark documentation aesthetic for hardware / maker landing
 * pages. Used by Claudia, ChiMesh, and any future hardware-themed
 * landing page declaring theme: "Hardware" in MindAttic.Deploy.
 *
 * Composes with OutfitFont + AtticFont + BackHomeM. Does NOT load the
 * Cyberspace effects engine -- this is the calm, non-animated counterpart
 * to Themes/Cyberspace.
 *
 * Color scheme follows prefers-color-scheme; no JS toggle in landing pages.
 * ==================================================================== */

:root {
    color-scheme: light dark;
    --bg:           #fff;
    --bg2:          #f8f9fb;
    --bg3:          #f0f2f5;
    --fg:           #1a1a2e;
    --muted:        #4a5568;
    --muted2:       #718096;
    --border:       #e2e6ea;
    --accent:       #1b4f8c;
    --accent2:      #2563b0;
    --accent-fg:    #fff;
    --rule:         #2c5f8a;
    --code-bg:      #f4f6f8;
    --code-fg:      #1a1a2e;
    --pre-bg:       #0f1419;
    --pre-fg:       #e8eaf0;
    --shadow:       0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.06);
    --max-width:    920px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #0b0d12;
        --bg2:       #13161b;
        --bg3:       #1a1e25;
        --fg:        #e8eaf0;
        --muted:     #9aa0b0;
        --muted2:    #5c6275;
        --border:    #2a2f3a;
        --accent:    #6ba3e8;
        --accent2:   #90bbf0;
        --accent-fg: #0b0d12;
        --rule:      #3d6fa3;
        --code-bg:   #1a1e25;
        --code-fg:   #e8eaf0;
        --shadow:    0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.5);
    }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page { position: relative; z-index: 1; }

/* Hero */
.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 88px 24px 32px;
    text-align: center;
}
.project-name {
    margin: 0 0 14px;
    font-family: 'Attic', serif;
    font-size: clamp(2.6rem, 7vw, 4.4rem);
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--fg);
    font-weight: 700;
}
.tagline {
    margin: 0 auto 32px;
    max-width: 720px;
    font-size: clamp(1rem, 1.55vw, 1.18rem);
    color: var(--muted);
    font-weight: 400;
}

/* Buttons */
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; min-width: 160px; padding: 13px 24px;
    border-radius: 6px;
    font-family: inherit; font-size: 1rem; font-weight: 500; letter-spacing: 0.02em;
    text-decoration: none; cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); box-shadow: 0 8px 22px rgba(27, 79, 140, 0.22); }
.btn-secondary { background: var(--bg2); color: var(--fg); }
.btn-secondary:hover { background: var(--bg3); border-color: var(--accent); }
.btn svg { width: 18px; height: 18px; }

/* Readme panel */
.readme {
    max-width: var(--max-width);
    margin: 24px auto 96px;
    padding: 36px 44px 48px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.readme h1, .readme h2, .readme h3, .readme h4 {
    color: var(--fg);
    font-weight: 700;
    line-height: 1.25;
    margin: 1.75em 0 0.55em;
    letter-spacing: -0.01em;
}
.readme h1 { font-size: 2.15em; margin-top: 0; border-bottom: 2px solid var(--rule); padding-bottom: 0.35em; }
.readme h2 { font-size: 1.55em; border-bottom: 1px solid var(--border); padding-bottom: 0.25em; }
.readme h3 { font-size: 1.22em; }
.readme h4 { font-size: 1.05em; color: var(--muted); }
.readme h5, .readme h6 { color: var(--fg); font-weight: 600; margin: 1.6em 0 0.5em; }

.readme .heading-anchor {
    margin-left: 0.4em;
    color: var(--muted2);
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.15s;
    text-decoration: none;
    border-bottom: none;
}
.readme h2:hover .heading-anchor,
.readme h3:hover .heading-anchor,
.readme h4:hover .heading-anchor { opacity: 1; }

.readme p { margin: 0 0 1em; }
.readme strong { color: var(--fg); }
.readme em { color: var(--muted); }
.readme ul, .readme ol { padding-left: 1.6em; margin: 0 0 1.2em; }
.readme li { margin: 0.25em 0; }
.readme li + li { margin-top: 0.25em; }

.readme a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 120ms, border-color 120ms;
}
.readme a:hover { color: var(--accent2); border-bottom-color: var(--accent2); }
.readme a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.readme blockquote {
    margin: 1em 0;
    padding: 0.5em 1.1em;
    border-left: 4px solid var(--accent);
    background: var(--bg2);
    color: var(--muted);
    border-radius: 0 4px 4px 0;
}
.readme blockquote p:last-child { margin-bottom: 0; }

.readme code, .readme kbd, .readme pre, .readme samp {
    font-family: ui-monospace, 'JetBrains Mono', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 0.92em;
}
.readme :not(pre) > code {
    background: var(--code-bg);
    color: var(--code-fg);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    border: 1px solid var(--border);
    white-space: nowrap;
}
.readme pre {
    background: var(--pre-bg);
    color: var(--pre-fg);
    padding: 16px 18px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    line-height: 1.55;
    overflow-x: auto;
}
.readme pre code { background: transparent; padding: 0; border: 0; white-space: pre; color: inherit; }

.readme .hljs { color: #e8eaf0; }
.readme .hljs-comment, .readme .hljs-quote { color: #7d8590; font-style: italic; }
.readme .hljs-keyword, .readme .hljs-selector-tag, .readme .hljs-built_in, .readme .hljs-name, .readme .hljs-tag { color: #ff7b72; }
.readme .hljs-string, .readme .hljs-title, .readme .hljs-section, .readme .hljs-attribute, .readme .hljs-literal, .readme .hljs-template-tag, .readme .hljs-template-variable, .readme .hljs-type, .readme .hljs-addition { color: #a5d6ff; }
.readme .hljs-number, .readme .hljs-symbol, .readme .hljs-bullet, .readme .hljs-meta, .readme .hljs-link { color: #79c0ff; }
.readme .hljs-variable, .readme .hljs-class .hljs-title, .readme .hljs-title.class_, .readme .hljs-attr { color: #ffa657; }
.readme .hljs-function .hljs-title, .readme .hljs-title.function_ { color: #d2a8ff; }

.readme table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 0.95em;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.readme th, .readme td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.readme th { background: var(--bg2); font-weight: 600; color: var(--fg); border-bottom: 2px solid var(--rule); }
.readme tr:last-child td { border-bottom: none; }
.readme tr:hover td { background: var(--bg2); }

.readme img { max-width: 100%; height: auto; border-radius: 6px; }
.readme hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

@media (max-width: 640px) {
    .hero { padding-top: 64px; }
    .readme { margin: 16px 14px 64px; padding: 22px 18px 30px; }
    .btn { min-width: 132px; padding: 11px 18px; font-size: 0.95rem; }
}
