/* theme/templates/default/assets/css/home.css
   Home-page-only layout. The shared design system (palette, typography,
   buttons, layout primitives, generic block CSS) lives in
   _core_design.css and applies to any page that gets the .firefly-page
   body class. This file owns the bits that are unique to the landing
   page: the hero glow + triple-panel demo, the CLI terminal, and the
   per-section background tints that match the landing's narrative.

   All selectors scope under body.firefly-page.page-home so nothing
   leaks if these classes happen to appear on another page.
*/

/* ---------- HERO embellishments (home only) ----------
   Base hero pattern (padding, grid, headline sizing, hero-meta, hero-cta)
   lives in _core_design.css under .firefly-page .hero. This file owns
   only the things that make the LANDING hero distinctive: the amber
   glow, the slate + phosphor radial accents, and the lead width tweak. */

/* Low, centered amber glow painted via .hero::before */
body.firefly-page.page-home .hero::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    height: 60vw;
    max-width: 1100px;
    max-height: 700px;
    background: radial-gradient(ellipse at center, rgba(245, 181, 68, 0.14) 0%, transparent 60%);
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
}

/* Subtle slate + phosphor accents */
body.firefly-page.page-home .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 85% 85%, rgba(159, 232, 112, 0.06) 0%, transparent 45%),
        radial-gradient(ellipse at 12% 70%, rgba(42, 52, 64, 0.35) 0%, transparent 55%);
    pointer-events: none;
    z-index: -1;
}

/* Home hero is intentionally roomier than other pages — the triple-panel
   needs vertical space, and the landing benefits from extra breathing
   room. Override the shared hero-inner gap. */
body.firefly-page.page-home .hero-inner {
    gap: 4rem;
}

@media (min-width: 960px) {
    body.firefly-page.page-home .hero-inner {
        gap: 3rem;
    }
}

/* ---------- Triple-panel hero demo ---------- */

body.firefly-page.page-home .triple {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--ff-border);
    border-radius: var(--ff-radius-lg);
    background:
        linear-gradient(180deg, var(--ff-surface) 0%, rgba(20, 20, 22, 0.7) 100%);
    backdrop-filter: blur(10px);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    body.firefly-page.page-home .triple { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
}

body.firefly-page.page-home .panel {
    position: relative;
    border: 1px solid var(--ff-border);
    border-radius: var(--ff-radius);
    background: var(--ff-surface-2);
    overflow: hidden;
    min-height: 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

body.firefly-page.page-home .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--ff-border);
    background: rgba(0, 0, 0, 0.2);
    font-family: var(--ff-font-mono);
    font-size: 0.6875rem;
    color: var(--ff-fg-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.firefly-page.page-home .panel-head .dots {
    display: flex;
    gap: 5px;
}

body.firefly-page.page-home .panel-head .dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

body.firefly-page.page-home .panel-body {
    padding: 0.875rem;
    font-family: var(--ff-font-mono);
    font-size: 0.75rem;
    line-height: 1.65;
    color: var(--ff-fg-muted);
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

body.firefly-page.page-home .panel-body .line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.firefly-page.page-home .panel-body .tag-k { color: var(--ff-amber); }
body.firefly-page.page-home .panel-body .tag-s { color: var(--ff-green); }
body.firefly-page.page-home .panel-body .tag-c { color: var(--ff-fg-muted); font-style: italic; }
body.firefly-page.page-home .panel-body .tag-d { color: #ff7a7a; }
body.firefly-page.page-home .panel-body .tag-a { color: var(--ff-green); }

body.firefly-page.page-home .panel-cta {
    border-top: 1px solid var(--ff-border);
    padding: 0.5rem 0.875rem;
    font-family: var(--ff-font-mono);
    font-size: 0.6875rem;
    color: var(--ff-fg-dim);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.firefly-page.page-home .panel-cta .live {
    color: var(--ff-green);
    font-weight: 500;
}

body.firefly-page.page-home .panel-cta .live::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ff-green);
    box-shadow: 0 0 6px var(--ff-green);
    margin-right: 6px;
    vertical-align: middle;
    animation: ff-pulse 2s ease-in-out infinite;
}

/* Shared "deployed preview" below panels */
body.firefly-page.page-home .triple-output {
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px dashed var(--ff-amber-ring);
    border-radius: var(--ff-radius);
    background: linear-gradient(90deg, rgba(245, 181, 68, 0.04), rgba(159, 232, 112, 0.04));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: var(--ff-font-mono);
    font-size: 0.75rem;
}

body.firefly-page.page-home .triple-output .status {
    color: var(--ff-green);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

body.firefly-page.page-home .triple-output .url {
    color: var(--ff-amber);
}

/* ---------- Section background tints (home narrative ordering) ---------- */

body.firefly-page.page-home .three-contrib {
    background: linear-gradient(180deg, var(--ff-bg) 0%, var(--ff-surface) 50%, var(--ff-bg) 100%);
    position: relative;
}

body.firefly-page.page-home .three-contrib .grid,
body.firefly-page.page-home .three-contrib .wp-block-group.grid {
    margin-top: 3rem;
}

body.firefly-page.page-home .pillars {
    background: var(--ff-bg);
}

body.firefly-page.page-home .proof {
    background: var(--ff-bg);
}

body.firefly-page.page-home .templates {
    background: linear-gradient(180deg, var(--ff-bg) 0%, var(--ff-surface) 100%);
}

body.firefly-page.page-home .pricing {
    background: var(--ff-bg);
}

/* ---------- CLI demo ---------- */

body.firefly-page.page-home .cli {
    background: linear-gradient(180deg, var(--ff-surface) 0%, var(--ff-bg) 100%);
    position: relative;
}

body.firefly-page.page-home .cli-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    margin-top: 3rem;
}

@media (min-width: 960px) {
    body.firefly-page.page-home .cli-inner { grid-template-columns: 1.1fr 1fr; }
}

body.firefly-page.page-home .cli-copy { max-width: 40ch; }
body.firefly-page.page-home .cli-copy h2 { margin-bottom: 1rem; }

body.firefly-page.page-home .cli-box {
    border: 1px solid var(--ff-border);
    background: #0f0f10;
    border-radius: var(--ff-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(245, 181, 68, 0.08);
}

body.firefly-page.page-home .cli-head {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--ff-border);
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--ff-font-mono);
    font-size: 0.6875rem;
    color: var(--ff-fg-muted);
}

body.firefly-page.page-home .cli-head .dots {
    display: flex; gap: 5px;
}

body.firefly-page.page-home .cli-head .dots span {
    width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.12);
}

body.firefly-page.page-home .cli-head .dots span:nth-child(1) { background: #ff605c; }
body.firefly-page.page-home .cli-head .dots span:nth-child(2) { background: #ffbd44; }
body.firefly-page.page-home .cli-head .dots span:nth-child(3) { background: #00ca4e; }

body.firefly-page.page-home .cli-body {
    padding: 1.25rem 1.5rem;
    font-family: var(--ff-font-mono);
    font-size: 0.8125rem;
    line-height: 1.8;
    color: var(--ff-fg);
    min-height: 260px;
}

body.firefly-page.page-home .cli-body .prompt { color: var(--ff-amber); }
body.firefly-page.page-home .cli-body .cmd { color: var(--ff-fg); }
body.firefly-page.page-home .cli-body .ok { color: var(--ff-green); }
body.firefly-page.page-home .cli-body .dim { color: var(--ff-fg-dim); }
body.firefly-page.page-home .cli-body .cursor {
    display: inline-block;
    width: 7px; height: 1em;
    background: var(--ff-amber);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: ff-blink 1s steps(1) infinite;
}

@keyframes ff-blink {
    50% { opacity: 0; }
}

/* ---------- Substrate band (centered tagline + logo grid) ---------- */

body.firefly-page.page-home .substrate {
    background: var(--ff-bg);
    border-top: 1px solid var(--ff-border);
    border-bottom: 1px solid var(--ff-border);
    padding-block: 3.5rem;
}

body.firefly-page.page-home .substrate-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

body.firefly-page.page-home .substrate p {
    max-width: 52ch;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ff-fg);
    opacity: 0.84;
}

/* ---------- Mobile tweaks (home-specific layout pieces) ---------- */

@media (max-width: 640px) {
    body.firefly-page.page-home .hero { padding-top: 6rem; }
    body.firefly-page.page-home .panel { min-height: 180px; }
}
