/***********************************************************************
**  sophia.css 0.0.4
**  Copyright 2026 sophia.host
**  Copyright 2025-2026 Silvino Silva wiki.sophia.host/profiles/punk
**
***********************************************************************/
:root {

    /* — Backgrounds — dark warm series, each step slightly lighter  */
    --bg-void:          #0a0806;   /* deepest; used for topbar & mobile drawer */
    --bg-header:        #100e0b;   /* sticky main header bar                   */
    --bg-base:          #181410;   /* page body background                      */
    --bg-alt:           #1e1a15;   /* alternate section background              */
    --bg-card:          #252019;   /* card / raised surface                     */
    --bg-input:         #1a1612;   /* form inputs                               */
    --bg-input-focus:   #201c16;   /* form inputs on focus                      */

    /* — Text — warm off-whites and muted ambers                     */
    --text-main:        #ddd5c0;   /* body copy                                 */
    --text-muted:       #8a7f6e;   /* secondary / metadata text                 */
    --text-heading:     #e8c96a;   /* headings — warm amber-gold, fully opaque  */
    --text-nav-top:     #a89880;   /* topbar navigation links                   */
    --text-nav-bottom:  #d4b87a;   /* bottombar navigation links                */
    --text-on-accent:   #1a1200;   /* text placed on amber accent backgrounds   */

    /* — Amber / Phosphor Accent Scale —
    Inspired by P3 amber phosphor CRT screens.
    Five stops from deep amber to pale gold-white.           */
    --amber-deep:       #b87a10;   /* deep amber; borders, dividers             */
    --amber-mid:        #d4941e;   /* primary accent; buttons, active states    */
    --amber-warm:       #e8aa30;   /* header bottom border — the "gold wire"    */
    --amber-pale:       #f0c870;   /* hover states, card headings               */
    --amber-glow:       #f8dfa0;   /* subtlest highlight, placeholder text      */

    /* — Semantic aliases (use these in rules, not raw stops above) */
    --accent-primary:   var(--amber-mid);
    --accent-hover:     var(--amber-pale);
    --accent-border:    var(--amber-warm);
    --accent-deep:      var(--amber-deep);
    --accent-glow:      var(--amber-glow);

    /* — Borders                                                     */
    --border-subtle:    rgba(255, 220, 140, 0.06);  /* barely-there warm glow  */
    --border-card:      rgba(80,  60,  30,  0.55);  /* card edge               */
    --border-mobile:    rgba(255, 200, 100, 0.08);  /* mobile drawer dividers  */
    --border-input:     rgba(180, 140,  60, 0.25);  /* form field edge         */
    --border-input-focus: var(--accent-primary);    /* form field on focus     */

    /* — The two identity borders (header bottom / footer top)       */
    --border-header:    var(--amber-warm);           /* fine gold wire          */
    --border-footer:    var(--amber-deep);           /* darker, receding        */

    /* — Typography                                                   */
    --font-mono:    "Lucida Console", Monaco, monospace;
    --font-sans:    Verdana, Helvetica, Arial, sans-serif;
    --font-display: "Trebuchet MS", Arial, Helvetica, sans-serif;
}


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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -0.3px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-header);
    position: sticky;
    top: 0;
    z-index: 1000;
}
header h1 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: normal;
    color: var(--accent-primary);
    text-shadow: 0 0 18px rgba(232, 170, 48, 0.25);
    white-space: nowrap;
    line-height: 1.1;
}

header p {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-nav-top);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

main {
    flex: 1; /* This allows the main content to grow, pushing the footer down */
}

/* — Headings — */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-heading);
    font-weight: normal;
    margin-top: 1.4em;
    margin-bottom: 0.5em;
    line-height: 1.25;
}

h1 { font-size: 2.0em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.25em; }
h4 { font-size: 1.1em; }
h5 { font-size: 1.0em; font-weight: bold; }
h6 { font-size: 0.9em; font-weight: bold; color: var(--text-muted); }

/* — Paragraphs — */
p {
    margin-top: 0;
    margin-bottom: 1em;
    color: var(--text-main);
}

/* — Links — */
a {
    color: var(--accent-hover);
    text-decoration: none;
}

a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

a:visited {
    color: var(--amber-pale);
}

/* — Lists — default uses the » bullet for unordered lists         */
ul {
    list-style: none;
    padding-left: 1.4em;
    margin-top: 0;
    margin-bottom: 1em;
}

ul li {
    position: relative;
    padding-left: 1.2em;
    margin-bottom: 0.4em;
}

ul li::before {
    content: '»';
    color: var(--accent-border);
    position: absolute;
    left: 0;
    font-weight: bold;
    line-height: inherit;
}

ol {
    padding-left: 1.8em;
    margin-top: 0;
    margin-bottom: 1em;
}

ol li {
    margin-bottom: 0.4em;
}

/* — Inline code & preformatted blocks — */
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent-glow);
    background: var(--bg-card);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    border: 1px solid var(--border-card);
}

pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-left: 3px solid var(--accent-deep);
    border-radius: 4px;
    padding: 1em 1.2em;
    overflow-x: auto;
    margin-bottom: 1.2em;
    line-height: 1.5;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

/* — Blockquote — */
blockquote {
    margin: 1.2em 0 1.2em 0;
    padding: 0.8em 1.2em;
    border-left: 3px solid var(--accent-border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* — Horizontal rule — */
hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 2em 0;
}

/* — Tables — */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2em;
    font-size: 0.95em;
}

thead {
    background: var(--bg-card);
}

thead th {
    color: var(--text-heading);
    font-weight: bold;
    font-family: var(--font-sans);
    font-size: 0.85em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 12px;
    border-bottom: 1px solid var(--accent-deep);
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid var(--border-subtle);
}

tbody tr:nth-child(even) {
    background: var(--bg-alt);
}

tbody tr:hover {
    background: var(--bg-card);
}

td {
    padding: 8px 12px;
    vertical-align: top;
}

/* — Strong / em — */
strong {
    color: var(--accent-glow);
    font-weight: bold;
}

em {
    color: var(--text-muted);
    font-style: italic;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

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

section {
    padding: 60px 0;
}

.section-bg-alt {
    background-color: var(--bg-alt);
}

/* Section title with decorative underline */
h2.section-title {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

h2.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent-border);
    margin: 10px auto 0;
    opacity: 0.7;
}


/* The whole header block is sticky */
.header-main {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-header);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ── Topbar (bar 1: site-wide links) ── */
.header-topbar {
    background-color: var(--bg-void);
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-sans);
    font-size: 11px;
    line-height: 1;
}

.header-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 20px;
    padding: 5px 15px;
    color: var(--text-nav-top);
}

.header-topbar a {
    color: var(--text-nav-top);
    text-decoration: none;
}

.header-topbar a:hover {
    color: var(--accent-primary);
    text-decoration: none;
}

.header-topbar-left,
.header-topbar-right {
    display: flex;
    align-items: center;
    gap: 0 12px;
    flex-wrap: wrap;
}

.header-topbar-sep {
    color: rgba(255, 255, 255, 0.15);
}

/* ── Main bar (bar 2: logo + search) ── */
.header-container {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 5px 15px;
    gap: 0 8px;
    position: relative;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0 8px;
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
}

.header-brand:hover {
    text-decoration: none;
}

.header-logo {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}

.header-logo img {
    width: 40px;
    height: 40px;
    display: block;
}

.header-brand-text {
    min-width: 0;
    overflow: hidden;
}

.header-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: normal;
    color: var(--accent-primary);
    text-shadow: 0 0 18px rgba(232, 170, 48, 0.25);
    white-space: nowrap;
    line-height: 1.1;
}

.header-tagline {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-nav-top);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0 6px;
    flex: 0 0 auto;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0;
}

.header-search-input {
    background: rgba(255, 220, 140, 0.06);
    border: 1px solid rgba(255, 200, 100, 0.10);
    border-radius: 4px 0 0 4px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 13px;
    padding: 6px 8px;
    outline: none;
    width: 12em;
    height: 28px;
    box-sizing: border-box;
    line-height: 1.5;
}

.header-search-input:hover {
    background: rgba(255, 220, 140, 0.10);
    border-color: rgba(255, 200, 100, 0.18);
}

.header-search-input:focus {
    background: rgba(255, 220, 140, 0.13);
    border-color: var(--accent-primary);
    color: var(--text-main);
}

.header-search-input::placeholder {
    color: var(--text-muted);
}

.header-search-input:focus::placeholder {
    color: transparent;
}

.header-search-btn {
    background: rgba(255, 220, 140, 0.06);
    border: 1px solid rgba(255, 200, 100, 0.10);
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0;
    padding: 6px 8px;
    height: 28px;
    width: 32px;
    line-height: 1.5;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-btn::before {
    content: "⌕";
    font-size: 16px;
    color: var(--text-nav-top);
}

.header-search-btn:hover {
    background: rgba(255, 220, 140, 0.13);
}

.header-search-btn:hover::before {
    color: var(--accent-hover);
}

.header-search-btn:focus {
    border-color: rgba(255, 200, 100, 0.25);
    outline: none;
}

/* ── Bottombar (bar 3: app-specific nav) ── */
.header-bottombar {
    background-color: var(--bg-void);
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-sans);
    font-size: 11px;
    line-height: 1;
}

.header-bottombar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 20px;
    padding: 1px 15px;
    color: var(--text-nav-bottom);
    font-weight: bold;
}

.header-bottombar a {
    color: var(--text-nav-bottom);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.header-bottombar a:hover {
    color: var(--accent-primary);
    text-decoration: none;
}

.header-bottombar-left,
.header-bottombar-right {
    display: flex;
    align-items: center;
    gap: 0 12px;
    flex-wrap: wrap;
}

.header-bottombar-sep {
    color: rgba(255, 255, 255, 0.15);
}

/* Bottombar icon via data-icon attribute */
.header-bottombar a::before {
    content: attr(data-icon);
    font-size: 15px;
    line-height: 1;
    margin-right: 4px;
    color: var(--text-nav-bottom);
}

/* Strip emoji color rendering for the cart icon */
.header-bottombar a[data-icon="🛒"]::before {
    font-size: 14px;
    color: transparent;
    text-shadow: 0 0 0 var(--text-nav-bottom);
}

/* ── Mobile toggle buttons ── */
.header-nav-toggle,
.header-search-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-nav-bottom);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 6px;
    flex: 0 0 auto;
    z-index: 10;
    position: relative;
}

.header-nav-toggle:hover,
.header-search-toggle:hover {
    color: var(--accent-hover);
}

/* ── Mobile navigation drawer ── */
.header-mobile-menu {
    display: none;
    background: var(--bg-void);
    border-top: 1px solid var(--border-mobile);
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.header-mobile-menu.active {
    display: block;
}

.header-mobile-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Override the naked ul li::before — no » bullet in nav lists */
.header-mobile-list li {
    padding-left: 0;
    margin-bottom: 0;
}

.header-mobile-list li::before {
    content: none;
}

.header-mobile-list li a {
    display: block;
    padding: 15px 20px;
    color: var(--text-nav-bottom);
    text-decoration: none;
    border-bottom: 1px solid var(--border-mobile);
    font-family: var(--font-sans);
}

.header-mobile-list li a:hover {
    background: rgba(255, 200, 100, 0.05);
    color: var(--accent-hover);
    text-decoration: none;
}

.hero {
    /* Warm dark overlay — picks up the amber undertone of --bg-base */
    background: linear-gradient(
    rgba(18, 14, 10, 0.93),
    rgba(18, 14, 10, 0.93)
    );
    min-height: 100vh;
    padding: 80px 20px;
    color: var(--text-main);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero .container {
    padding: 0;
    margin-top: -70px;
}

.hero h2 {
    font-size: 2.8em;
    margin-bottom: 0.5em;
    font-weight: normal;
    color: var(--text-heading);
    text-shadow: 0 0 20px rgba(232, 170, 48, 0.20);
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 1.5em;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-main);
}

.manifesto-content {
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
}

/* manifesto-content and platform-content sit inside sections
that already carry .section-bg-alt; no redundant bg needed  */

    .manifesto-content h3 {
        font-size: 1.6em;
        color: var(--accent-hover);
        margin-top: 40px;
        margin-bottom: 15px;
    }

    .manifesto-content p {
        color: var(--text-main);
        font-size: 1em;
        line-height: 1.75;
    }

    .platform-content ul {
        /* Use the themed naked ul style; override only layout */
        max-width: 800px;
        margin: 20px auto;
    }

    .card {
        background-color: var(--bg-card);
        border-radius: 6px;
        padding: 30px;
        border: 1px solid var(--border-card);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
    }

    .card h3 {
        color: var(--accent-hover);
        margin-top: 0;
        font-size: 1.4em;
        font-weight: bold;
    }

    .card .tech-badge {
        font-family: var(--font-mono);
        font-size: 0.88em;
        font-weight: bold;
        color: var(--accent-border);
        margin: 8px 0 14px;
    }

    /* Cards use the naked ul style (» bullets) — no override needed  */
    .card ul {
        padding-left: 0.8em;
        margin-bottom: 25px;
    }

    .card .cta-button {
        margin-top: auto;
        text-align: center;
    }

    /* Scope to .sophia-form if you need to avoid fighting app CSS;
    for the reference page bare form selectors are fine.          */
    form {
        display: flex;
        flex-direction: column;
        gap: 14px;
        max-width: 600px;
        margin: 0 auto;
    }

    form label {
        font-weight: bold;
        color: var(--accent-hover);
        margin-bottom: -6px;
    }

    form input,
    form textarea,
    form select {
        padding: 10px 12px;
        border-radius: 5px;
        border: 1px solid var(--border-input);
        background: var(--bg-input);
        color: var(--text-main);
        font-family: var(--font-mono);
        font-size: 1em;
        outline: none;
        transition: border-color 0.2s ease, background 0.2s ease;
    }

    form input:hover,
    form textarea:hover,
    form select:hover {
        border-color: rgba(212, 148, 30, 0.40);
        background: var(--bg-input-focus);
    }

    form input:focus,
    form textarea:focus,
    form select:focus {
        border-color: var(--border-input-focus);
        background: var(--bg-input-focus);
    }

    form textarea {
        resize: vertical;
        min-height: 120px;
    }

    form button,
    form input[type="submit"] {
        background-color: var(--accent-primary);
        color: var(--text-on-accent);
        font-family: var(--font-mono);
        font-weight: bold;
        font-size: 1em;
        cursor: pointer;
        border: 1px solid var(--accent-border);
        border-radius: 5px;
        padding: 12px;
        transition: background-color 0.25s ease;
        display: inline-block;
    }

    form button:hover,
    form input[type="submit"]:hover {
        background-color: var(--accent-hover);
        color: var(--text-on-accent);
    }

    footer {
        background-color: var(--bg-void);
        color: var(--text-muted);
        text-align: center;
        padding: 20px 0;
        margin-top: auto;
        font-size: 13.5px;
        border-top: 1px solid var(--border-footer);
    }

    footer p {
        margin: 5px 0;
        color: var(--text-muted);
    }

    footer a {
        color: var(--accent-hover);
        text-decoration: none;
    }

    footer a:hover {
        color: var(--accent-primary);
    }

    /* Call-to-action button — used as <a> or <button> */
    .cta-button {
        display: inline-block;
        background-color: var(--accent-primary);
        color: var(--text-on-accent);
        padding: 12px 25px;
        border-radius: 6px;
        border: 1px solid var(--accent-border);
        font-weight: bold;
        text-decoration: none;
        transition: background-color 0.25s ease, transform 0.2s ease;
        cursor: pointer;
    }

    .cta-button:hover {
        background-color: var(--accent-hover);
        color: var(--text-on-accent);
        transform: translateY(-2px);
        text-decoration: none;
    }

    /* Inline amber highlight */
    .highlight {
        color: var(--accent-primary);
        font-weight: bold;
    }

    /* Text alignment helpers */
    .text-center { text-align: center; }
    .text-muted   { color: var(--text-muted); }

    @media (max-width: 768px) {

        /* Topbar */
        .header-topbar-left {
            font-size: 10px;
        }

        /* Show mobile toggle buttons, hide desktop search */
        .header-nav-toggle,
        .header-search-toggle {
            display: block;
        }

        .header-search {
            display: none;
        }

        .header-title {
            font-size: 19px;
        }

        /* Mobile search overlay */
        .header-container.search-open .header-search {
            display: flex;
            position: absolute;
            left: 0;
            right: 40px;
            top: 0;
            bottom: 0;
            padding: 11px 15px;
            background-color: var(--bg-void);
            z-index: 20;
            gap: 0;
        }

        .header-container.search-open .header-search .header-search-input {
            flex: 1 1 auto;
            min-width: 0;
            width: auto;
        }

        .header-container.search-open .header-search .header-search-btn {
            flex: 0 0 auto;
        }

        /* Bottombar: icon-only on mobile */
        .header-bottombar a {
            font-size: 0;
        }

        .header-bottombar a::before {
            font-size: 18px;
            margin-right: 0;
        }

        /* Hero */
        .hero .container {
            margin-top: -250px;
        }

        .hero h2 { font-size: 1.9em; }
        .hero p  { font-size: 1em; }
    }
