/* ============================================
   Zera Process Renderer — Brand Stylesheet
   Font: OG (S3-hosted)
   Palette: Zera Education
   ============================================ */

/* --- Font Faces --- */
@font-face {
    font-family: 'OG';
    src: url('/brand/fonts/OG_Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'OG';
    src: url('/brand/fonts/OG_Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'OG';
    src: url('/brand/fonts/OG_Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'OG';
    src: url('/brand/fonts/OG_SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'OG';
    src: url('/brand/fonts/OG_Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'OG';
    src: url('/brand/fonts/OG_RegItal.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}
@font-face {
    font-family: 'OG';
    src: url('/brand/fonts/OG_BoldItal.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

/* --- Design Tokens --- */
:root {
    --edu: #0D4A34;
    --edu-light: #e8f0ec;
    --edu-mid: #b8d4c6;
    --bg: #F7F7F5;
    --white: #FFFFFF;
    --border: #E4E4E4;
    --text: #1A1A1A;
    --muted: #6B6B6B;
    --dark: #141414;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
    --max-width: 860px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'OG', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo {
    height: 52px;
    width: auto;
    margin: -10px -4px -18px -4px; /* bleed compensation for Hrz_ */
}

.header-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-team {
    background: var(--edu);
    color: var(--white);
}

.badge-reports {
    background: var(--edu-light);
    color: var(--edu);
}

/* --- Main Content --- */
.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.content h1 {
    font-weight: 700;
    font-size: 2rem;
    color: var(--edu);
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--edu);
}

.content h2 {
    font-weight: 600;
    font-size: 1.35rem;
    color: var(--edu);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.content h3 {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark);
    margin-top: 32px;
    margin-bottom: 12px;
}

.content h4 {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 24px;
    margin-bottom: 8px;
}

/* --- Paragraphs & Inline --- */
.content p {
    margin-bottom: 12px;
}

.content strong {
    font-weight: 600;
    color: var(--dark);
}

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

.content code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85em;
    background: var(--edu-light);
    color: var(--edu);
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- Callout (Obsidian > [!summary]) --- */
.content blockquote {
    background: var(--edu-light);
    border-left: 4px solid var(--edu);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 16px 20px;
    margin: 16px 0 24px;
    font-size: 0.95rem;
    color: var(--text);
}

.content blockquote p {
    margin-bottom: 0;
}

/* --- Lists --- */
.content ul,
.content ol {
    margin: 8px 0 16px 20px;
}

.content li {
    margin-bottom: 6px;
    padding-left: 4px;
}

.content li::marker {
    color: var(--edu);
    font-weight: 600;
}

/* --- Process Card (h3 sections) --- */
.content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 32px 0;
}

/* Process metadata block styling */
.content h3 + p {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.875rem;
    line-height: 1.8;
    box-shadow: var(--shadow);
}

/* --- Tables --- */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 0.9rem;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.content thead {
    background: var(--edu);
    color: var(--white);
}

.content th {
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
}

.content td {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
}

.content tbody tr:hover {
    background: var(--edu-light);
}

/* --- Checklist (task lists) --- */
.content li input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--edu);
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 6px;
    position: relative;
    top: -1px;
}

.content li input[type="checkbox"]:checked {
    background: var(--edu);
}

.content li input[type="checkbox"]:checked::after {
    content: '\2713';
    color: var(--white);
    font-size: 11px;
    position: absolute;
    top: -1px;
    left: 2px;
}

/* --- Footer --- */
.footer {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 32px 24px;
    font-size: 0.85rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-mark {
    height: 40px;
    width: auto;
    margin: -10px -15px -10px -15px; /* bleed compensation for Mark_ */
    opacity: 0.9;
    margin-bottom: 8px;
    filter: brightness(0) invert(1);
}

.footer-muted {
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* --- Index Page --- */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.role-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.role-card:hover {
    border-color: var(--edu);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.role-card .card-team {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 4px;
}

.role-card .card-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--edu);
    margin-bottom: 4px;
}

.role-card .card-reports {
    font-size: 0.8rem;
    color: var(--muted);
}

.role-card .card-status {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--muted);
    margin-top: 2px;
}

/* Disabled / greyed-out card for roles without a process file */
.role-card--disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
    background: var(--bg);
    border-style: dashed;
}

.role-card--disabled .card-title {
    color: var(--muted);
}

/* --- Team Section Headers on Index --- */
.team-section {
    margin-top: 40px;
}

.team-section h2 {
    font-weight: 600;
    font-size: 1.35rem;
    color: var(--edu);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

/* --- Print --- */
@media print {
    .header { position: static; box-shadow: none; }
    .content h1 { font-size: 1.5rem; }
    .content h2 { break-before: auto; }
    .content h3 { break-after: avoid; }
    .role-card { break-inside: avoid; }
    body { background: white; }
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-meta {
        justify-content: flex-start;
    }
    .content h1 {
        font-size: 1.5rem;
    }
    .role-grid {
        grid-template-columns: 1fr;
    }
}
