/* ═══════════════════════════════════════
   Hero — headline + desktop composition mockup
   ═══════════════════════════════════════ */
.hero {
    padding: calc(var(--nav-height) + 76px) 0 0;
    text-align: center;
    position: relative;
    /* Clip the decorative glow so it can't widen the layout viewport on
       phones (it's purely cosmetic). `clip` avoids a scroll container. */
    overflow-x: clip;
}

/* Amber radial glow behind the hero */
.hero-glow {
    position: absolute;
    top: var(--nav-height);
    left: 50%;
    transform: translateX(-50%);
    /* Never exceed the viewport width — prevents horizontal overflow. */
    width: min(680px, 100%);
    height: 680px;
    max-height: 100vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container { position: relative; }

.hero h1 {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    line-height: var(--leading-display);
    letter-spacing: var(--tracking-display);
    font-weight: 400;
    max-width: 760px;
    margin: 0 auto 22px;
}

.hero h1 .accent {
    color: var(--accent);
    font-style: italic;
}

.cursor-blink {
    display: inline-block;
    width: 4px;
    height: 0.72em;
    background: var(--accent);
    margin-left: 6px;
    border-radius: 2px;
    vertical-align: baseline;
    animation: as-blink 1s step-end infinite;
}
@keyframes as-blink { 50% { opacity: 0; } }

.hero-sub {
    font-size: var(--text-lead);
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-note {
    margin-top: 22px;
    font-size: var(--text-caption);
    color: var(--text-tertiary);
}
.hero-note code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: var(--surface-subtle);
    padding: 2px 8px;
    border-radius: 5px;
}

/* ── Desktop composition ── */
.hero-desktop {
    margin: 64px auto 0;
    max-width: 880px;
    position: relative;
}
.hero-desktop-inner {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: var(--shadow-window);
    background: linear-gradient(155deg, #F0E2C0 0%, #E0C58F 55%, #CBA967 100%);
}
.hero-desktop-stage {
    padding: 44px 56px 0;
}
.hero-desktop .window-frame {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 18px 50px rgba(60, 44, 8, 0.3);
}
/* inner highlight ring */
.hero-desktop-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

@media (max-width: 720px) {
    .hero-desktop-stage { padding: 24px 18px 0; }
}

/* ── Phones: keep the hero comfortable and overflow-free ── */
@media (max-width: 560px) {
    .hero {
        padding-top: calc(var(--nav-height) + 40px);
    }
    .hero h1 {
        /* break to its own balance; min clamp already keeps it in-bounds */
        margin-top: 0;
    }
    .hero-sub { margin-bottom: 28px; }
    .hero-desktop { margin-top: 44px; }
    .hero-desktop-stage { padding: 16px 12px 0; }
    /* Tighten the editor demo type so the Notes window fits the viewport. */
    .hero-demo { padding: 18px 16px 22px; min-height: 0; }
}

@media (max-width: 400px) {
    .hero-desktop-stage { padding: 12px 9px 0; }
    .hero-demo { padding: 14px 12px 18px; }
}
