/* PulseCore home page — standalone.
   Deliberately NOT public/style.css, which locks body to 100vh/overflow:hidden
   for the canvas app and would prevent this page from scrolling. */

:root {
    --bg:        #0a0b0d;
    --bg-raise:  #111318;
    --bg-card:   #14161c;
    --line:      #23262e;
    --text:      #e8eaef;
    --text-dim:  #9aa1ad;
    --text-mute: #6b7280;

    /* Phase palette, mirroring the simulation: red = inactive, cyan = active */
    --phase-0:   #ff3366;
    --phase-mid: #b05cc4;
    --phase-1:   #35e8e0;

    --maxw: 1120px;
    --gutter: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.home {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* `hidden` makes the body a scroll container, which is a known way to
       break position:sticky for descendants — the editor header depends on
       it. `clip` prevents the same sideways overflow without creating one.
       The first line is the fallback for browsers that lack `clip`. */
    overflow-x: hidden;
    overflow-x: clip;
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px var(--gutter);
    background: rgba(10, 11, 13, 0.72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
    width: 24px; height: 24px;
    flex: 0 0 auto;                 /* a flex row must not squeeze it narrow */
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--phase-1), var(--phase-0));
    /* The glow grew with the mark: at 14px a 14px blur read as a halo, at
       32px the same blur is a thin rim. */
    box-shadow: 0 0 26px rgba(53, 232, 224, 0.5);
    animation: pulse-mark 2.6s ease-in-out infinite;
}

@keyframes pulse-mark {
    0%, 100% { transform: scale(1);    opacity: 1;   }
    50%      { transform: scale(1.28); opacity: 0.7; }
}

.brand-text { font-size: 1.05rem; letter-spacing: 0.02em; font-weight: 400; }
.brand-text strong { font-weight: 700; }

.site-nav nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.site-nav nav a {
    padding: 8px 12px;
    font-size: 0.92rem;
    color: var(--text-dim);
    border-radius: 7px;
    transition: color .15s ease, background .15s ease;
}

.site-nav nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }

.nav-cta {
    border: 1px solid var(--line);
    color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--phase-1); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: min(88vh, 760px);
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

#heroField {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-veil {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(10,11,13,.45) 0%, rgba(10,11,13,.86) 55%, var(--bg) 100%),
        linear-gradient(to bottom, rgba(10,11,13,.5), rgba(10,11,13,.2) 40%, var(--bg));
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 96px var(--gutter);
    width: 100%;
}

.eyebrow {
    margin: 0 0 18px;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--phase-1);
}

.hero h1 {
    margin: 0 0 26px;
    font-size: clamp(2.5rem, 7vw, 4.6rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.zero-one {
    background: linear-gradient(100deg, var(--phase-0), var(--phase-mid) 45%, var(--phase-1));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.lede {
    margin: 0 0 16px;
    max-width: 60ch;
    font-size: clamp(1.02rem, 2vw, 1.19rem);
    color: var(--text-dim);
}
.lede em { color: var(--text); font-style: italic; }
.lede.sub { color: var(--text-mute); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Used on both <a> and <button>. A button carries the browser's own
   background, font and cursor unless they are explicitly cleared, which is
   why an unstyled .btn button appears grey while the same class on a link
   looks correct. */
.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.97rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(53, 232, 224, 0.35);
}

.btn-primary {
    background: linear-gradient(100deg, var(--phase-0), var(--phase-mid) 60%, var(--phase-1));
    color: #07080a;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(53, 232, 224, 0.22);
}

.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--phase-1); background: rgba(53,232,224,.06); }

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 2;
    width: 22px; height: 36px;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.scroll-hint span {
    position: absolute;
    left: 50%; top: 8px;
    width: 3px; height: 7px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--phase-1);
    animation: scroll-dot 1.9s ease-in-out infinite;
}
@keyframes scroll-dot {
    0%, 100% { opacity: 0; transform: translateY(0); }
    35%      { opacity: 1; }
    75%      { opacity: 0; transform: translateY(13px); }
}

/* ---------- Premise ---------- */

.premise { padding: 92px 0; }

.premise h2, .pillars h2, .cta h2 {
    margin: 0 0 46px;
    font-size: clamp(1.7rem, 3.6vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.015em;
}

.premise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
    gap: 26px;
}

.premise-item {
    padding: 28px 26px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 13px;
    position: relative;
    overflow: hidden;
}
.premise-item::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--phase-0), var(--phase-1));
    opacity: .75;
}

.premise-item .num {
    display: block;
    margin-bottom: 12px;
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    color: var(--phase-1);
}
.premise-item h3 { margin: 0 0 10px; font-size: 1.14rem; font-weight: 600; }
.premise-item p  { margin: 0; color: var(--text-dim); font-size: 0.96rem; }
.premise-item strong { color: var(--phase-0); font-weight: 600; }

.premise-close {
    margin: 46px auto 0;
    max-width: 72ch;
    text-align: center;
    font-size: clamp(1.02rem, 2vw, 1.16rem);
    color: var(--text-dim);
}
.premise-close em { color: var(--text); }

/* ---------- Pillars ---------- */

.pillars { padding: 0 0 92px; }

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(262px, 1fr));
    gap: 20px;
}

.pillar {
    display: flex;
    flex-direction: column;
    padding: 30px 28px;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 13px;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.pillar:hover {
    transform: translateY(-3px);
    border-color: rgba(53,232,224,.42);
    background: var(--bg-card);
}

.pillar.feature {
    grid-column: span 2;
    background: linear-gradient(140deg, var(--bg-card), var(--bg-raise));
    border-color: rgba(53,232,224,.24);
}

.pillar h3 { margin: 0 0 12px; font-size: 1.28rem; font-weight: 650; }
.pillar p  { margin: 0 0 22px; color: var(--text-dim); font-size: 0.96rem; flex: 1; }

.pillar-go { font-size: 0.9rem; font-weight: 600; color: var(--phase-1); }

/* ---------- CTA ---------- */

.cta {
    padding: 78px 0 92px;
    border-top: 1px solid var(--line);
    text-align: center;
}
.cta h2 { margin-bottom: 14px; }
.cta p  { margin: 0 auto; max-width: 56ch; color: var(--text-dim); }
.cta .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
    padding: 44px 0 30px;
    border-top: 1px solid var(--line);
    background: var(--bg-raise);
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: space-between;
    align-items: flex-start;
}
.muted { margin: 6px 0 0; color: var(--text-mute); font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; }
.footer-links a:hover { color: var(--phase-1); }
.copyright {
    max-width: var(--maxw);
    margin: 30px auto 0;
    padding: 0 var(--gutter);
    color: var(--text-mute);
    font-size: 0.82rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 780px) {
    .pillar.feature { grid-column: span 1; }
    .hero-inner { padding: 72px var(--gutter); }
    .premise, .pillars { padding-bottom: 68px; }
    .premise { padding-top: 68px; }
    .site-nav nav a { padding: 7px 9px; font-size: 0.87rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
