/* -------------------------------------------------------
 *  Theme tokens
 * ------------------------------------------------------ */
:root {
    --accent:                #e8a020;
    --accent-hover:          #f0aa28;
    --accent-border:         rgba(232, 160, 32, 0.2);
    --accent-border-hover:   rgba(232, 160, 32, 0.6);
    --accent-bg-hover:       #1c1914;
    --accent-tint-soft:      rgba(232, 160, 32, 0.08);
    --accent-tint-mid:       rgba(232, 160, 32, 0.12);
    --accent-tint-bold:      rgba(232, 160, 32, 0.15);
    --accent-tint-dim:       rgba(232, 160, 32, 0.40);
    --overlay-bg:            rgba(0, 0, 0, 0.50);

    --color-status:          #22c55e;

    --bg-page:               #0f0f0d;
    --bg-card:               #1a1a17;

    --text-primary:          #f0ede6;
    --text-secondary:        #a8a49c;
    --text-muted:            #6a6660;

    --font-body:             'Inter', sans-serif;
    --font-display:          'Outfit', sans-serif;
    --font-mono:             'DM Mono', monospace;

    --radius-card:           10px;
    --radius-sm:             8px;
    --sidenav-width:         220px;
    --topbar-height:         52px;
    --banner-height:         0px;

    --border:                rgba(255,255,255,0.1);
    --border-strong:         rgba(255,255,255,0.22);
    --bg-input:              #242422;
    --blue-text:             #85b7eb;

    --green-bg:              #17340a;
    --green-border:          #639922;
    --green-text:            #97c459;
    --red-bg:                #301313;
    --red-border:            #a32d2d;
    --red-text:              #f09595;
    --amber-bg:              #2a1a06;
    --amber-border:          #ba7517;
    --amber-text:            #fac775;
}

/* -------------------------------------------------------
 *  Reset
 * ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none; }

body {
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }

/* -------------------------------------------------------
 *  Top bar
 * ------------------------------------------------------ */
.topbar {
    border-bottom: 0.5px solid var(--accent-border);
    padding: 14px 24px;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-page);
}

.poc-banner {
    position: sticky;
    top: var(--topbar-height);
    z-index: 90;
    background: #b37a00;
    color: #0d0d0b;
    text-align: center;
    padding: 9px 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo .accent { color: var(--accent); }

.nav-logo-mark {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    color: #000;
    flex-shrink: 0;
    font-family: var(--font-display);
    letter-spacing: 0;
}

.topbar-links { display: flex; gap: 20px; align-items: center; }

.topbar-links a {
    font-size: 12px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.topbar-links a:hover { color: var(--accent); }

/* -------------------------------------------------------
 *  Layout
 * ------------------------------------------------------ */
.layout { display: flex; flex: 1; max-width: 1200px; margin: 0 auto; width: 100%; }

/* -------------------------------------------------------
 *  Side nav
 * ------------------------------------------------------ */
.sidenav {
    width: var(--sidenav-width);
    flex-shrink: 0;
    border-right: 0.5px solid var(--accent-tint-mid);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-page);
    position: sticky;
    top: calc(var(--topbar-height) + var(--banner-height));
    max-height: calc(100vh - var(--topbar-height) - var(--banner-height));
    overflow-y: auto;
    align-self: flex-start;
}

.sidenav-section {
    padding: 0 12px;
    margin-bottom: 20px;
}
.sidenav-section:last-child { margin-bottom: 0; }

/* Section labels — plain text acts as header, link version is navigable */
.sidenav-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-mono);
    padding: 0 12px;
    margin-bottom: 4px;
}

/* When the section label is a link (Field Procedures → /jobs/) */
.sidenav-label-link {
    transition: color 0.15s;
    cursor: pointer;
}
.sidenav-label-link:hover { color: var(--accent-hover); }
.sidenav-label-link.active { color: var(--accent); }

/* All nav links share the same base style */
.sidenav-link {
    display: block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.15s, background 0.15s;
}
.sidenav-link:hover {
    color: var(--text-primary);
    background: var(--accent-tint-soft);
}
.sidenav-link.active {
    color: var(--text-primary);
    background: var(--accent-tint-bold);
    border-left: 2px solid var(--accent);
    padding-left: 10px;
}

/* Category rows inside accordions */
.sidenav-cat-row {
    display: flex;
    align-items: center;
    margin-top: 2px;
}
.sidenav-cat-row .sidenav-link {
    flex: 1;
    /* slightly dimmer than top-level links to imply hierarchy */
    font-size: 13px;
}
.sidenav-cat-toggle {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px 8px 6px 2px;
    transition: color 0.15s;
    line-height: 1;
}
.sidenav-cat-toggle:hover { color: var(--text-primary); }
.sidenav-cat-toggle.open { color: var(--accent); }

.sidenav-cat-arrow {
    font-size: 12px;
    display: inline-block;
    transition: transform 0.2s;
}
.sidenav-cat-toggle.open .sidenav-cat-arrow { transform: rotate(90deg); }

/* Child links under an accordion category */
.sidenav-child {
    padding-left: 22px;
    font-size: 12px;
    color: var(--text-muted);
}
.sidenav-child:hover { color: var(--text-primary); }
.sidenav-child.active {
    color: var(--text-primary);
}

.sidenav-cat-body { overflow: hidden; }
.sidenav-cat-body.collapsed { display: none; }

/* -------------------------------------------------------
 *  Main content
 * ------------------------------------------------------ */
.main { flex: 1; padding: 40px 48px; max-width: 760px; }

.page-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.page-title .accent { color: var(--accent); }

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
    max-width: 520px;
}

/* -------------------------------------------------------
 *  Sections
 * ------------------------------------------------------ */
.section { margin-bottom: 32px; }

.section-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-mono);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 0.5px;
    background: var(--accent-border);
}

/* -------------------------------------------------------
 *  Service cards
 * ------------------------------------------------------ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.card-grid.col-2 { grid-template-columns: repeat(2, 1fr); }

.service-card {
    background: var(--bg-card);
    border: 0.5px solid var(--accent-border);
    border-radius: var(--radius-card);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.15s, background 0.15s;
}

.service-card:hover {
    background: var(--accent-bg-hover);
    border-color: var(--accent-border-hover);
}

.card-icon { font-size: 16px; color: var(--accent); margin-bottom: 4px; }

.card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

.card-cta {
    font-size: 11px;
    color: var(--accent);
    opacity: 0.5;
    margin-top: auto;
    padding-top: 6px;
    transition: opacity 0.15s;
}

.service-card:hover .card-cta { opacity: 1; }

/* -------------------------------------------------------
 *  Wide cards
 * ------------------------------------------------------ */
.wide-card-list { display: flex; flex-direction: column; gap: 10px; }

.wide-card {
    background: var(--bg-card);
    border: 0.5px solid var(--accent-border);
    border-radius: var(--radius-card);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.15s, background 0.15s;
}

.wide-card:hover {
    background: var(--accent-bg-hover);
    border-color: var(--accent-border-hover);
}

.wide-card-left { display: flex; align-items: center; gap: 14px; }
.wide-card-icon { font-size: 18px; color: var(--accent); }
.wide-card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.wide-card-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.wide-card-arrow {
    font-size: 13px;
    color: var(--accent);
    opacity: 0.5;
    transition: opacity 0.15s;
}

.wide-card:hover .wide-card-arrow { opacity: 1; }

/* -------------------------------------------------------
 *  Info block
 * ------------------------------------------------------ */
.info-block {
    background: var(--bg-card);
    border: 0.5px solid var(--accent-border);
    border-radius: var(--radius-card);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }

.info-label {
    color: var(--text-muted);
    min-width: 80px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.info-value { color: var(--text-primary); }
.info-link { color: var(--accent); transition: color 0.15s; }
.info-link:hover { color: var(--accent-hover); }

/* -------------------------------------------------------
 *  Note block
 * ------------------------------------------------------ */
.note {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 10px 14px;
    background: var(--bg-card);
    border-left: 2px solid var(--accent-tint-dim);
    border-radius: 0 6px 6px 0;
    line-height: 1.6;
}

/* -------------------------------------------------------
 *  Footer
 * ------------------------------------------------------ */
footer {
    border-top: 0.5px solid var(--accent-border);
    padding: 16px 24px;
    background: var(--bg-page);
    flex-shrink: 0;
}

.footer-text {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* -------------------------------------------------------
 *  Hero (homepage only)
 * ------------------------------------------------------ */
.hero { padding: 48px 0 36px; }

.status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-status);
    flex-shrink: 0;
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.status-label { font-size: 12px; color: var(--text-secondary); font-family: var(--font-mono); }

.hero-title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 14px;
}

.hero-title .accent { color: var(--accent); }

.hero-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 420px;
    margin-bottom: 32px;
}

/* -------------------------------------------------------
 *  Hamburger button (mobile only)
 * ------------------------------------------------------ */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: background 0.15s;
}

.hamburger:hover span { background: var(--accent); }

/* Mobile nav overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 40;
}

.mobile-nav-overlay.open { display: block; }

/* Mobile sidenav drawer */
.sidenav.mobile-open {
    display: flex;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    height: calc(100vh - var(--topbar-height));
    z-index: 95;
    background: var(--bg-page);
    border-right: 0.5px solid var(--accent-border);
    padding-top: 24px;
    overflow-y: auto;
}

/* -------------------------------------------------------
 *  Responsive
 * ------------------------------------------------------ */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .sidenav { display: none; }
    .main { padding: 24px 20px; }
    .card-grid { grid-template-columns: 1fr; }
    .card-grid.col-2 { grid-template-columns: 1fr; }
    .hero-title { font-size: 32px; }
}
