/* ============================================================================
 * theme-subnet.css — git.sub-net.at forge skin
 * ----------------------------------------------------------------------------
 * Sub-Net corporate palette (see sub-net root AGENTS.md "Brand Colors"):
 * charcoal #2C3E50 (primary surfaces), green #27AE60 (accent/links/logo dash),
 * page background #151C24, card background #1E2A36.
 *
 * Mechanism: Forgejo loads exactly ONE theme CSS for the selected theme. We
 * @import the stock forgejo-dark theme (served same-origin) so every semantic
 * token keeps resolving, then override only the two ladders that drive the
 * whole UI — `--steel-*` (all backgrounds/greys) and `--color-primary-*`
 * (accent/links/buttons) — plus the green family (success → brand green) and
 * type. Re-tint those and body, boxes, header, footer, nav, inputs all follow.
 *
 * Registered via app.ini [ui] THEMES/DEFAULT_THEME = subnet.
 * ========================================================================== */

@import url("/assets/css/theme-forgejo-dark.css");

/* ============ FONTS ============ */
@font-face {
    font-family: 'Inter';
    src: url('https://i.sub-net.at/fonts/inter-variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ---- Sub-Net ladder (cool blue-grey text over charcoal near-black) ----
     * Light text up top easing into the brand background ramp
     * (page #151C24, panel #1E2A36, elevated charcoal #2C3E50).
     * Low numbers = light text, high = dark bg. */
    --steel-100: #e8edf2;   /* fg primary */
    --steel-150: #d4dce4;
    --steel-200: #bdc8d3;
    --steel-250: #a5b3c1;
    --steel-300: #8e9dab;   /* fg muted */
    --steel-350: #788898;
    --steel-400: #647484;   /* fg faint */
    --steel-450: #52606f;
    --steel-500: #434f5d;
    --steel-550: #38434f;
    --steel-600: #2e3945;
    --steel-650: #2c3e50;   /* brand charcoal — elevated */
    --steel-700: #1e2a36;   /* brand card bg — cards / secondary */
    --steel-750: #1a2330;   /* panel — box body */
    --steel-800: #151c24;   /* brand page bg — page body */
    --steel-850: #11171e;   /* header wrapper — just under page */
    --steel-900: #0c1117;   /* footer / nav — darkest */

    /* ---- Sub-Net green (replaces orange primary) ---- */
    --color-primary:          #27ae60;
    --color-primary-contrast: #08130c;
    --color-primary-hover:    #3cc676;
    --color-primary-active:   #3cc676;
    --color-primary-light-1:  #3cc676;
    --color-primary-light-2:  #27ae60;
    --color-primary-light-3:  #1e9451;
    --color-primary-light-4:  #177a42;
    --color-primary-light-5:  #177a42;
    --color-primary-light-6:  #0f4d2b;
    --color-primary-light-7:  #0f4d2b;
    --color-primary-dark-1:   #3cc676;
    --color-primary-dark-2:   #5cd28b;
    --color-primary-dark-3:   #7fdda4;
    --color-primary-dark-4:   #a3e6bd;
    --color-primary-dark-5:   #c6efd6;
    --color-primary-dark-6:   #c6efd6;
    --color-primary-dark-7:   #e6f8ec;
    --color-primary-alpha-10: #27ae6019;
    --color-primary-alpha-20: #27ae6033;
    --color-primary-alpha-30: #27ae604b;
    --color-primary-alpha-40: #27ae6066;
    --color-primary-alpha-50: #27ae6080;
    --color-primary-alpha-60: #27ae6099;
    --color-primary-alpha-70: #27ae60b3;
    --color-primary-alpha-80: #27ae60cc;
    --color-primary-alpha-90: #27ae60e1;

    /* ---- Green family: success → brand green ---- */
    --color-green:        #1e9451;
    --color-green-dark-1: #177a42;
    --color-green-light:  #3cc676;

    /* ---- Borders: cool charcoal rims over neutral panels ---- */
    --color-secondary:      #2c3e50;   /* charcoal divider/btn */
    --color-input-border:   #38434f;
    --color-input-border-hover: #177a42;

    /* ---- Custom tokens used by the rules below ---- */
    --sn-green:        #27ae60;
    --sn-green-bright: #3cc676;
    --sn-charcoal:     #2c3e50;
}

/* ============ TYPE ============
 * Inter everywhere — corporate, no display serif. Code/diff legibility stays
 * mono via the stock --fonts-monospace. */
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ============ BRAND MARK ============
 * The stock Forgejo logo ships neon-orange; shift it into the brand green so
 * the navbar mark stops fighting the palette. The navbar/hero logo is a
 * class-less <img src="/assets/img/logo.svg">, so we also match by src/alt
 * (not just .logo). */
img.logo, .logo img, #navbar .logo, .home .logo,
img[src$="/img/logo.svg"], img[src$="/img/logo.png"], img[alt="Logo"] {
    filter: sepia(0.6) saturate(2.2) hue-rotate(88deg) brightness(0.95);
}

/* ============ ACCENT POLISH ============ */
/* Active top-nav item gets a green underline instead of the stock bar */
.ui.secondary.menu .active.item {
    box-shadow: inset 0 -2px 0 0 var(--sn-green);
}
/* Primary buttons: green with a thin bright-green rim */
.ui.primary.button,
.ui.primary.buttons .button {
    border: 1px solid var(--sn-green-bright);
}
