/* =====================================================================
   Hypogen v2 — shared design system (scoped to .hgv2)
   Hypogen brand (dark + orange) on the Academy Smart v2 layout system:
   normal scroll, rounded bands, kicker → H2 → lead heads, card grids.
   Used by page-home-v2.php (and later blog v2). Header/footer tweaks
   live in hgv2-chrome.css.
   ===================================================================== */

.hgv2 {
    --hg-bg: #0B0D0F;
    --hg-surface: #121518;
    --hg-surface-2: #181C20;
    --hg-surface-3: #20252A;
    --hg-line: rgba(247, 247, 247, .08);
    --hg-line-2: rgba(247, 247, 247, .14);
    --hg-text: #F7F7F7;
    --hg-muted: rgba(247, 247, 247, .64);
    --hg-muted-2: rgba(247, 247, 247, .46);
    --hg-accent: #FF9626;
    --hg-accent-2: #FFB35F;
    --hg-accent-soft: rgba(255, 150, 38, .12);
    --hg-accent-line: rgba(255, 150, 38, .32);
    --hg-radius: 20px;
    --hg-radius-sm: 14px;
    --hg-gutter: clamp(16px, 4vw, 40px);
    --hg-section: clamp(72px, 9vw, 128px);
    --hg-font: "SFUIDisplay", "SF UI Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --hg-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    background: var(--hg-bg);
    color: var(--hg-text);
    font-family: var(--hg-font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    padding-top: 96px; /* room for the fixed header pill */
}

.hgv2 *, .hgv2 *::before, .hgv2 *::after { box-sizing: border-box; }
.hgv2 :where(h1, h2, h3, h4, p, figure, blockquote, ul, ol) { margin: 0; padding: 0; }
.hgv2 :where(h1, h2, h3, h4) { font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; }
.hgv2 :where(ul, ol) { list-style: none; }
.hgv2 :where(button) { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; font: inherit; color: inherit; text-align: inherit; cursor: pointer; max-width: none; width: auto; }
.hgv2 img { max-width: 100%; height: auto; display: block; }
.hgv2 :where(a) { color: inherit; text-decoration: none; }
.hgv2 [hidden] { display: none !important; }

/* ---------- Layout ---------- */
.hgv2-wrap { max-width: 1360px; margin: 0 auto; padding-left: var(--hg-gutter); padding-right: var(--hg-gutter); }
.hgv2-wrap--flush { padding-left: 0; padding-right: 0; }
.hgv2-section { padding-top: var(--hg-section); }
.hgv2-section--bottom { padding-bottom: var(--hg-section); }
.hgv2-section > .hgv2-wrap,
.hgv2-band__inner > .hgv2-wrap { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 56px); }

.hgv2-band { padding: 0 clamp(8px, 1.4vw, 20px); }
.hgv2-band__inner { max-width: 1880px; margin: 0 auto; border-radius: 28px; padding: clamp(56px, 7vw, 104px) var(--hg-gutter); position: relative; overflow: hidden; }
.hgv2-band__inner--raised { background: var(--hg-surface); border: 1px solid var(--hg-line); }
.hgv2-band__inner--raised::before { content: ""; position: absolute; inset: -40% 30% auto; height: 70%; background: radial-gradient(closest-side, rgba(255, 150, 38, .10), transparent); pointer-events: none; }
.hgv2-band__inner > .hgv2-wrap { position: relative; max-width: 1280px; }

.hgv2-head { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.hgv2-head--narrow { max-width: 900px; }
.hgv2-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px 64px; align-items: end; }

.hgv2-grid { display: grid; gap: 16px; }
.hgv2-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.hgv2-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.hgv2-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.hgv2-grid--5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---------- Type ---------- */
.hgv2-kicker { font-family: var(--hg-mono); font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--hg-accent); }
.hgv2-kicker::before { content: "// "; opacity: .6; }
.hgv2-kicker--accent::before { content: none; }
.hgv2-h2 { font-size: clamp(32px, 4vw, 54px); line-height: 1.1; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.hgv2-h2--sm { font-size: clamp(28px, 3vw, 40px); }
.hgv2-h2 span, .hgv2-accent { color: var(--hg-accent); }
.hgv2-h3 { font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -.01em; }
.hgv2-h3--lg { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.02em; }
.hgv2-lead { font-size: 18px; line-height: 1.55; color: var(--hg-muted); text-wrap: pretty; max-width: 680px; }
.hgv2-text { font-size: 15px; line-height: 1.6; color: var(--hg-muted); text-wrap: pretty; }
.hgv2-label { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--hg-muted-2); }
.hgv2-note { font-size: 17px; line-height: 1.5; color: var(--hg-muted); padding: 20px 24px; border: 1px dashed var(--hg-accent-line); border-radius: var(--hg-radius-sm); background: var(--hg-accent-soft); }
.hgv2-note strong { color: var(--hg-text); font-weight: 500; }

/* ---------- Buttons ---------- */
.hgv2-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hgv2-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 54px; border: 1px solid transparent; padding: 6px 6px 6px 22px; border-radius: 999px; font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.hgv2-btn:hover { transform: translateY(-1px); }
.hgv2-btn__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; flex: none; transition: transform .2s; }
.hgv2-btn:hover .hgv2-btn__icon { transform: rotate(45deg); }
.hgv2-btn--primary { background: var(--hg-accent); color: #0B0D0F; }
.hgv2-btn--primary .hgv2-btn__icon { background: #0B0D0F; color: var(--hg-accent); }
.hgv2-btn--primary:hover { background: var(--hg-accent-2); }
.hgv2-btn--dark { background: #0B0D0F; color: var(--hg-text); }
.hgv2-btn--dark .hgv2-btn__icon { background: var(--hg-accent); color: #0B0D0F; }
.hgv2-btn--outline { background: transparent; color: var(--hg-text); border: 1px solid var(--hg-line-2); }
.hgv2-btn--outline .hgv2-btn__icon { background: var(--hg-surface-3); color: var(--hg-accent); }
.hgv2-btn--outline:hover { border-color: var(--hg-accent-line); }
.hgv2-btn--ghost { padding: 6px 22px; color: var(--hg-text); border: 1px solid var(--hg-line-2); }
.hgv2-btn--ghost:hover { border-color: var(--hg-text); }

/* ---------- Chips, pills, checks ---------- */
.hgv2-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--hg-line-2); border-radius: 999px; background: rgba(247, 247, 247, .03); font-size: 13px; color: var(--hg-muted); }
.hgv2-pill span:not(.hgv2-pill__stars) { color: var(--hg-text); font-weight: 500; }
.hgv2-pill__stars { color: var(--hg-accent); letter-spacing: 1px; font-size: 12px; }
.hgv2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hgv2-chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--hg-surface-3); border: 1px solid var(--hg-line); font-size: 13px; line-height: 18px; color: var(--hg-text); }
.hgv2-chip--accent { background: var(--hg-accent-soft); border-color: var(--hg-accent-line); color: var(--hg-accent-2); }
.hgv2-checks { display: flex; flex-direction: column; gap: 12px; }
.hgv2-checks li { display: grid; grid-template-columns: 16px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.5; color: var(--hg-text); }
.hgv2-checks--sm li { font-size: 14px; gap: 10px; color: var(--hg-muted); }
.hgv2-check { color: var(--hg-accent); margin-top: 3px; }
.hgv2-checks--accent li { color: var(--hg-text); }

/* ---------- Cards & icons ---------- */
.hgv2-card { background: var(--hg-surface); border: 1px solid var(--hg-line); border-radius: var(--hg-radius); padding: clamp(22px, 2.4vw, 32px); transition: border-color .25s, background-color .25s; }
.hgv2-band__inner--raised .hgv2-card { background: var(--hg-surface-2); }
.hgv2-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--hg-accent-soft); border: 1px solid var(--hg-accent-line); }
.hgv2-icon img { width: 26px; height: 26px; object-fit: contain; }
.hgv2-icon--framed { background: none; border: 0; overflow: hidden; }
.hgv2-icon--framed img { width: 100%; height: 100%; }
.hgv2-icon--sm { width: 40px; height: 40px; border-radius: 12px; }
.hgv2-icon--sm img { width: 20px; height: 20px; }

/* ---------- Tabs ---------- */
.hgv2-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--hg-surface); border: 1px solid var(--hg-line); margin-bottom: 16px; }
.hgv2-seg__btn { padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--hg-muted); transition: background-color .2s, color .2s; }
.hgv2-seg__btn:hover { color: var(--hg-text); }
.hgv2-seg__btn.is-active { background: var(--hg-accent); color: #0B0D0F; }
.hgv2-tabs__panel { animation: hgv2-fade .35s ease both; }
@keyframes hgv2-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Accordion (<details>) ---------- */
.hgv2-acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.hgv2-acc summary::-webkit-details-marker { display: none; }
.hgv2-acc__icon { position: relative; width: 28px; height: 28px; flex: none; border-radius: 999px; border: 1px solid var(--hg-line-2); transition: transform .25s, background-color .25s, border-color .25s; }
.hgv2-acc__icon::before, .hgv2-acc__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.hgv2-acc__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity .2s; }
.hgv2-acc[open] .hgv2-acc__icon { background: var(--hg-accent); border-color: var(--hg-accent); color: #0B0D0F; }
.hgv2-acc[open] .hgv2-acc__icon::after { opacity: 0; }
.hgv2-acc--card { background: var(--hg-surface); border: 1px solid var(--hg-line); border-radius: var(--hg-radius-sm); padding: 20px 24px; transition: border-color .25s; }
.hgv2-acc--card[open] { border-color: var(--hg-accent-line); }
.hgv2-acc--card summary { font-size: 18px; font-weight: 500; line-height: 1.35; }
.hgv2-acc--card > :not(summary) { margin-top: 14px; }
.hgv2-acc--sm { border-top: 1px solid var(--hg-line); padding: 14px 0; }
.hgv2-acc--sm summary { font-size: 15px; font-weight: 500; }
.hgv2-acc--sm .hgv2-acc__icon { width: 22px; height: 22px; }
.hgv2-acc--sm .hgv2-acc__icon::before, .hgv2-acc--sm .hgv2-acc__icon::after { width: 8px; }
.hgv2-acc--sm > ul { margin-top: 12px; }
.hgv2-rich { color: var(--hg-muted); font-size: 16px; line-height: 1.6; }
.hgv2-rich p + p, .hgv2-rich p + ul, .hgv2-rich ul + p { margin-top: 12px; }
.hgv2-rich ul { display: flex; flex-direction: column; gap: 8px; }
.hgv2-rich li { position: relative; padding-left: 18px; }
.hgv2-rich li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 2px; background: var(--hg-accent); }
.hgv2-rich b, .hgv2-rich strong { color: var(--hg-text); font-weight: 500; }
.hgv2-rich span[style] { font-weight: inherit !important; }

/* ---------- Inline CTA strip ---------- */
.hgv2-inline-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding: clamp(22px, 2.6vw, 32px); border-radius: var(--hg-radius); border: 1px solid var(--hg-line); background: var(--hg-surface-2); }
.hgv2-inline-cta > div { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.hgv2-inline-cta--accent { background: linear-gradient(120deg, rgba(255, 150, 38, .16), rgba(255, 150, 38, .04) 60%); border-color: var(--hg-accent-line); }

@media (prefers-reduced-motion: reduce) {
    .hgv2 *, .hgv2 *::before, .hgv2 *::after { animation: none !important; transition: none !important; }
}
