/* ==========================================================
   SCIENCEGASM HOMEPAGE — ONE SHARED DESIGN SOURCE
   This same CSS is loaded on the published homepage and in
   the WordPress visual editor. Edit blocks visually; do not
   duplicate homepage styling in editor-style.css or Additional CSS.
   ========================================================== */

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) {
    --sg-home-bg: #050a14;
    --sg-home-panel: #171d33;
    --sg-home-panel-dark: #0a1628;
    --sg-home-border: #35405f;
    --sg-home-blue: #00bfff;
    --sg-home-blue-2: #00e5ff;
    --sg-home-orange: #f2623a;
    --sg-home-orange-2: #f29422;
    --sg-home-text: #e2e8f0;
    --sg-home-muted: #b0bec5;
}

/* Front-end canvas only. The editor supplies its own canvas wrapper. */
.home-page-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px 60px;
    background: var(--sg-home-bg);
}

/* HERO */
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-hero {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 44px;
    padding: 80px 40px;
    text-align: center;
    background: linear-gradient(135deg, #050a14 0%, #0a1628 50%, #0d1f3c 100%);
    border: 1px solid var(--sg-home-border);
    border-radius: 16px;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-hero h1 {
    margin: 26px 0 20px;
    padding: 0;
    color: var(--sg-home-text);
    font-size: clamp(2.25rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    background: none;
    -webkit-text-fill-color: currentColor;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-hero h1::before,
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-hero h1::after {
    content: none;
    display: none;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-hero p:not(.sg-kicker) {
    max-width: 760px;
    margin: 0 auto 24px;
    color: var(--sg-home-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-kicker {
    display: inline-block;
    margin: 0 auto;
    padding: 8px 14px;
    color: var(--sg-home-orange);
    background: rgba(0, 191, 255, 0.06);
    border: 1px solid rgba(0, 191, 255, 0.55);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-hero .wp-block-buttons {
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

/* BUTTON DEFAULTS — Gutenberg inline color settings can override these. */
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-btn-primary .wp-block-button__link {
    padding: 14px 32px;
    color: #fff;
    background: linear-gradient(135deg, var(--sg-home-blue), #0099cc);
    border: 1px solid var(--sg-home-blue);
    border-radius: 8px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-btn-secondary .wp-block-button__link {
    padding: 14px 32px;
    color: var(--sg-home-orange);
    background: transparent;
    border: 2px solid var(--sg-home-orange);
    border-radius: 8px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

/* SECTIONS */
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section {
    width: 100%;
    max-width: 840px;
    margin: 44px auto;
    padding: 60px 28px;
    background: var(--sg-home-panel);
    border: 1px solid var(--sg-home-border);
    border-radius: 16px;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section .wp-block-columns {
    display: flex;
    align-items: stretch;
    gap: 24px;
    margin: 0;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section .wp-block-column {
    min-width: 0;
    color: var(--sg-home-text);
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transform: none;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section .wp-block-column[style*="60%"] {
    flex: 0 0 calc(60% - 12px);
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section .wp-block-column[style*="40%"] {
    flex: 0 0 calc(40% - 12px);
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section .wp-block-column:not([style*="60%"]):not([style*="40%"]) {
    flex: 1 1 0;
}

/* Orange headings with cyan rules. Inline Gutenberg text colors remain editable. */
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section h2.wp-block-heading {
    position: relative;
    margin: 0 0 28px;
    padding: 24px 0;
    color: var(--sg-home-orange);
    background: transparent;
    border: 0;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section h2.wp-block-heading::before,
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section h2.wp-block-heading::after {
    content: "";
    position: absolute;
    left: 0;
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0CB1F2, #00C2FD, #86DAFD);
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section h2.wp-block-heading::before {
    top: 0;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section h2.wp-block-heading::after {
    bottom: 0;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section p,
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section li {
    color: var(--sg-home-muted);
    line-height: 1.8;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section ul {
    padding-left: 24px;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section li::marker {
    color: var(--sg-home-blue);
}

/* FAST FACTS */
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-stat-card {
    height: 100%;
    padding: 32px 24px;
    text-align: center;
    background: rgba(255, 106, 0, 0.08);
    border: 1px solid rgba(255, 106, 0, 0.20);
    border-radius: 12px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 106, 0, 0.58);
    background: rgba(255, 106, 0, 0.11);
    box-shadow: 0 0 0 1px rgba(255, 106, 0, 0.10), 0 12px 34px rgba(255, 106, 0, 0.18);
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-stat-card h3 {
    margin: 0 0 20px;
    color: var(--sg-home-blue);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-stat-card p {
    color: var(--sg-home-muted);
    font-size: 0.95rem;
    line-height: 1.9;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-highlight {
    color: var(--sg-home-orange-2);
}

/* EXPLORE CARDS */
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-feature-card {
    width: 100%;
    height: 100%;
    padding: 32px 24px;
    text-align: center;
    background: rgba(0, 191, 255, 0.05);
    border: 1px solid rgba(0, 191, 255, 0.15);
    border-radius: 12px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 191, 255, 0.55);
    background: rgba(0, 191, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(0, 191, 255, 0.10), 0 12px 34px rgba(0, 191, 255, 0.18);
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-feature-card h3,
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-feature-card h3 a {
    color: var(--sg-home-blue);
    font-size: 1.05rem;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: normal;
}

:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-feature-card p {
    color: var(--sg-home-muted);
    font-size: 0.93rem;
    line-height: 1.75;
    word-break: normal;
    overflow-wrap: normal;
}

/* QUOTE */
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) > .wp-block-quote {
    width: 100%;
    max-width: 840px;
    margin: 44px auto;
    padding: 18px 24px;
    color: var(--sg-home-muted);
    background: rgba(0, 191, 255, 0.04);
    border: 1px solid #2d5970;
    border-left: 4px solid var(--sg-home-blue);
    border-radius: 6px;
}

/* Prevent vertical letter-by-letter wrapping. */
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-feature-card h3,
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-feature-card h3 a,
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-feature-card p,
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-stat-card h3,
:where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-stat-card p {
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
    writing-mode: horizontal-tb;
}

@media (max-width: 900px) {
    .home-page-content {
        padding: 12px 16px 50px;
    }

    :where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-hero {
        padding: 60px 24px;
    }

    :where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section {
        padding: 48px 24px;
    }

    :where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section .wp-block-columns {
        flex-direction: column;
    }

    :where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section .wp-block-column,
    :where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section .wp-block-column[style*="60%"],
    :where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section .wp-block-column[style*="40%"] {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (max-width: 640px) {
    :where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-hero {
        padding: 48px 20px;
    }

    :where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-hero h1 {
        font-size: 2rem;
    }

    :where(.home-page-content, body.sg-editor-front-page .editor-styles-wrapper) .sg-home-section {
        padding: 36px 20px;
    }
}
