/* ==========================================================
   Hedgehog Security — Responsible Disclosure Stylesheet
   Page header, policy body, code blocks, callouts,
   scope table, timeline, PGP, rewards, FAQ.
   ========================================================== */

/* ── PAGE HEADER ───────────────────────────────────────── */
.page-header {
    padding: 10rem 0 5rem;
    background: var(--hero-gradient);
    position: relative;
    overflow: hidden;
}

.page-header-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 8s ease-in-out infinite;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-glow);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 0.45rem 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.page-title .accent {
    color: var(--accent-primary);
}

.page-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
    letter-spacing: 0.12em;
    margin-bottom: 1.5rem;
}
.page-subtitle .cursor-blink {
    animation: blink 1s step-end infinite;
}

.page-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 620px;
}

/* ── POLICY CONTENT STYLING ────────────────────────────── */
.policy-body {
    max-width: 820px;
}

.policy-body p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.policy-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Override section-title size for content pages */
.policy-body .section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

/* ── TERMINAL CODE/COMMAND BLOCKS ──────────────────────── */
.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin: 1.5rem 0;
    position: relative;
    overflow-x: auto;
    line-height: 1.8;
}
.code-block .prompt {
    color: var(--text-muted);
    user-select: none;
}
.code-block .cmd {
    color: var(--accent-primary);
}
.code-block .comment {
    color: var(--text-muted);
    font-style: italic;
}
.code-block .flag {
    color: var(--accent-amber);
}

.code-block-header {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--border-color);
    padding: 0.2rem 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 0 6px 0 6px;
}

/* ── SAFE HARBOUR CALLOUT ──────────────────────────────── */
.callout-safe-harbour {
    background: var(--safe-harbour-bg);
    border: 1px solid var(--safe-harbour-border);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 8px 8px 0;
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
    position: relative;
}
.callout-safe-harbour .callout-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--accent-glow);
}
.callout-safe-harbour h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--accent-primary);
}
.callout-safe-harbour p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
}
.callout-safe-harbour p:last-child {
    margin-bottom: 0;
}

/* ── WARNING CALLOUT ───────────────────────────────────── */
.callout-warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-left: 4px solid var(--accent-warn);
    border-radius: 0 8px 8px 0;
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
    position: relative;
}
.callout-warning .callout-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--warning-border);
}
.callout-warning h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--accent-warn);
}
.callout-warning p,
.callout-warning li {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* ── SCOPE TABLE ───────────────────────────────────────── */
.scope-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    font-size: 0.95rem;
}
.scope-table thead th {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-primary);
    background: var(--bg-tertiary);
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}
.scope-table thead th:first-child {
    border-radius: 8px 0 0 0;
}
.scope-table thead th:last-child {
    border-radius: 0 8px 0 0;
}
.scope-table tbody td {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: top;
}
.scope-table tbody tr:last-child td {
    border-bottom: none;
}
.scope-table tbody tr:hover td {
    background: var(--accent-glow);
}
.scope-table .in-scope {
    color: var(--accent-primary);
    font-weight: 600;
}
.scope-table .out-scope {
    color: var(--accent-warn);
    font-weight: 600;
}

/* ── TIMELINE ──────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 3rem;
    margin: 2.5rem 0;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 14px;
    width: 2px;
    background: var(--timeline-line);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}
.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.timeline-marker i {
    font-size: 0.65rem;
    color: var(--accent-primary);
}

.timeline-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* ── PGP KEY BLOCK ─────────────────────────────────────── */
.pgp-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
}
.pgp-header {
    background: var(--bg-tertiary);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}
.pgp-header-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.pgp-copy-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}
.pgp-copy-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
.pgp-body {
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}

/* ── REWARDS / HALL OF FAME ────────────────────────────── */
.reward-tier {
    background: var(--bg-card);
    border: var(--card-border);
    border-radius: 8px;
    padding: 1.75rem;
    text-align: center;
    transition: all 0.3s;
    height: 100%;
}
.reward-tier:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--glow-effect);
}
.reward-tier-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.reward-tier-name {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}
.reward-tier-severity {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.reward-tier-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── FAQ ACCORDION ─────────────────────────────────────── */
.faq-item {
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.3s;
}
.faq-item:hover {
    border-color: var(--border-color);
}
.faq-question {
    width: 100%;
    background: var(--bg-card);
    border: none;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    text-align: left;
}
.faq-question:hover {
    background: var(--bg-card-hover);
}
.faq-question span {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}
.faq-question i {
    color: var(--accent-primary);
    font-size: 0.8rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.faq-item.open .faq-question i {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.open .faq-answer {
    max-height: 500px;
}
.faq-answer-inner {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ── TERMINAL OVERRIDES (disclosure-specific elements) ─── */
[data-theme="terminal"] .reward-tier,
[data-theme="terminal"] .faq-item,
[data-theme="terminal"] .callout-safe-harbour,
[data-theme="terminal"] .callout-warning,
[data-theme="terminal"] .pgp-block,
[data-theme="terminal"] .code-block {
    border-radius: 0;
}
[data-theme="terminal"] .scope-table thead th:first-child,
[data-theme="terminal"] .scope-table thead th:last-child {
    border-radius: 0;
}

/* ── RESPONSIVE — DISCLOSURE ───────────────────────────── */
@media (max-width: 767px) {
    .section-hh {
        padding: 3.5rem 0;
    }
    .page-header {
        padding: 8rem 0 3.5rem;
    }
    .callout-safe-harbour,
    .callout-warning {
        padding: 1.5rem;
    }
    .callout-safe-harbour .callout-icon,
    .callout-warning .callout-icon {
        display: none;
    }
    .scope-table {
        font-size: 0.85rem;
    }
    .scope-table thead th,
    .scope-table tbody td {
        padding: 0.7rem 0.75rem;
    }
    .timeline {
        padding-left: 2.5rem;
    }
}
