/*
--------------------------------------------------------------------------------
HOMEPAGE — Stitch "Sparkle Tree Studio - Enchanted Learning & Creation Hub"
Builds on the tokens in css/theme.css. All classes are hp-* so nothing here
touches the rest of the site.
--------------------------------------------------------------------------------
*/

.hp { color: var(--st-text); }
.hp h1, .hp h2, .hp h3, .hp p { margin: 0; }

.hp-wrap {
    max-width: var(--st-wrap);
    margin: 0 auto;
    padding: 0 2rem;
}

.hp-section { padding: 5rem 0; }
.hp-section-violet { background: var(--st-bg); }
.hp-section-void { background: var(--st-void); }

/* Eyebrow badges */
.hp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(43, 24, 84, 0.9);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hp-eyebrow-gold { color: var(--st-gold); }
.hp-eyebrow-mint { color: var(--st-mint); background: rgba(52, 211, 153, 0.12); }
.hp-eyebrow-sky { color: var(--st-sky); background: rgba(56, 189, 248, 0.12); }
.hp-eyebrow-dark { background: rgba(12, 8, 23, 0.6); }

.hp-title {
    margin-top: 0.9rem !important;
    font-family: var(--st-heading);
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--st-text);
}

.hp-sub {
    margin-top: 0.75rem !important;
    max-width: 46rem;
    color: var(--st-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.hp-head { margin-bottom: 2.5rem; }

.hp-head-split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    flex-wrap: wrap;
}

.hp-head-split > div { flex: 1 1 28rem; }

.hp-head-center { text-align: center; }
.hp-head-center .hp-sub { margin-left: auto !important; margin-right: auto !important; }

/* Buttons */
.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.6rem;
    border: 0;
    border-radius: 999px;
    font-family: var(--st-body);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    white-space: nowrap;
}

.hp-btn:active { transform: scale(0.97); }
.hp-btn-lg { min-height: 60px; padding: 1rem 2rem; font-size: 1.15rem; }
.hp-btn-block { width: 100%; }

.hp-btn-gold { background: var(--st-gold); color: var(--st-night); }
.hp-btn-gold:hover { box-shadow: 0 0 24px rgba(251, 191, 36, 0.45); color: var(--st-night); }

.hp-btn-mint { background: var(--st-mint-deep); color: #03261a; }
.hp-btn-mint:hover { box-shadow: 0 0 24px rgba(52, 211, 153, 0.45); color: #03261a; }

.hp-btn-violet { background: var(--st-surface); color: var(--st-text); }
.hp-btn-violet:hover { background: var(--st-card); color: var(--st-text); }
.hp-card .hp-btn-violet { background: var(--st-card); }
.hp-card .hp-btn-violet:hover { background: #4a3770; }

.hp-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--st-gold);
    font-weight: 700;
    text-decoration: none;
}

.hp-text-link:hover { text-decoration: underline; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hp-hero {
    padding: 4.5rem 0 5rem;
    background:
        radial-gradient(ellipse at 15% 90%, rgba(16, 64, 74, 0.35), transparent 50%),
        radial-gradient(ellipse at 80% 40%, rgba(43, 24, 84, 0.8), transparent 60%),
        var(--st-void);
    overflow: hidden;
}

.hp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 3rem;
}

.hp-hero-title {
    margin-top: 1.5rem !important;
    font-family: var(--st-heading);
    font-size: clamp(2.5rem, 5.4vw, 4.4rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--st-text);
}

.hp-rainbow {
    display: inline-block;
    background: linear-gradient(90deg, #fbbf24 0%, #fb923c 22%, #f472b6 52%, #c4b5fd 74%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hp-hero-lede {
    margin-top: 1.5rem !important;
    max-width: 38rem;
    color: var(--st-muted);
    font-size: 1.2rem;
    line-height: 1.75;
}

.hp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.hp-trust {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hp-trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(30, 16, 53, 0.8);
    font-size: 0.9rem;
    font-weight: 700;
}

.hp-trust li .st-i { color: var(--st-mint); }
.hp-trust li:last-child .st-i { color: var(--st-gold); }

/* Orbit visual */
.hp-orbit {
    position: relative;
    width: min(100%, 540px);
    aspect-ratio: 1;
    margin: 0 auto;
}

.hp-orbit-ring {
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    background: radial-gradient(circle, #2b1854 0%, #1e1035 70%);
}

.hp-orbit-ring::after {
    content: "";
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    border: 2px dashed rgba(251, 191, 36, 0.3);
    animation: hp-spin 60s linear infinite;
}

.hp-orbit-hero {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56%;
    transform: translate(-50%, -50%);
}

.hp-orbit-hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 10px rgba(30, 16, 53, 0.8), 0 20px 50px rgba(0, 0, 0, 0.5);
}

.hp-orbit-tag {
    position: absolute;
    right: -2%;
    bottom: 2%;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: var(--st-gold);
    color: var(--st-night);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.hp-orbit-sticker {
    position: absolute;
    width: 26%;
    height: auto;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 6px rgba(30, 16, 53, 0.9), 0 12px 30px rgba(0, 0, 0, 0.45);
    animation: hp-float 6s ease-in-out infinite;
}

.hp-orbit-car { left: -4%; top: -6%; }
.hp-orbit-cake { right: -2%; bottom: -6%; animation-delay: -3s; }

.hp-orbit-tile {
    position: absolute;
    display: grid;
    place-items: center;
    width: 17%;
    aspect-ratio: 1;
    border-radius: 1.25rem;
    background: var(--st-night);
    box-shadow: var(--st-lift);
    animation: hp-float 7s ease-in-out infinite;
}

.hp-orbit-tile img { width: 82%; height: auto; }
.hp-orbit-shroom { right: 0; top: -4%; animation-delay: -1.5s; }
.hp-orbit-planet { left: -4%; bottom: 4%; animation-delay: -4.5s; }

@keyframes hp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes hp-spin { to { transform: rotate(360deg); } }

/* ── Cards ────────────────────────────────────────────────────────────── */
.hp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.hp-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 2.25rem;
    border-radius: 1.5rem;
    background: var(--st-night);
    border: 1px solid rgba(78, 59, 116, 0.35);
    box-shadow: var(--st-lift);
    transition: transform 0.2s, border-color 0.2s;
}

.hp-section-violet .hp-card { background: #2a1752; }

.hp-card:hover { transform: translateY(-4px); border-color: rgba(251, 191, 36, 0.5); }

.hp-card h3 {
    font-family: var(--st-heading);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--st-text);
}

.hp-card > p {
    color: var(--st-muted);
    font-size: 1.05rem;
    line-height: 1.65;
    flex: 1;
}

.hp-icon-tile {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background: rgba(12, 8, 23, 0.55);
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.hp-card-foot {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.hp-card-foot img {
    width: 72px;
    height: 72px;
    border-radius: 0.9rem;
    background: #fff;
    object-fit: cover;
    border: 4px solid var(--st-void);
}

.hp-card-foot img.hp-thumb-dark { background: var(--st-void); padding: 6px; object-fit: contain; }

.hp-card-foot p {
    color: var(--st-muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

.hp-card-foot strong {
    display: block;
    color: var(--st-text);
    font-size: 0.95rem;
}

/* Creation Kit toolbar strip */
.hp-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    margin-bottom: 2.5rem;
    border-radius: 1.25rem;
    background: rgba(12, 8, 23, 0.55);
}

.hp-toolbar-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hp-tool {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--st-night);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.hp-tool-gold { color: var(--st-gold); }
.hp-tool-mint { color: var(--st-mint); }
.hp-tool-pink { color: var(--st-pink); }

.hp-tool-note {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.hp-prompt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: rgba(59, 42, 89, 0.7);
    font-size: 1.05rem;
}

.hp-prompt-tag {
    flex: none;
    padding: 0.15rem 0.6rem;
    border-radius: 6px;
    background: var(--st-gold);
    color: var(--st-night);
    font-size: 0.85rem;
}

/* Guides */
.hp-guide-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.hp-pill {
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    background: rgba(43, 24, 84, 0.9);
    font-size: 0.85rem;
    font-weight: 700;
}

.hp-pill-sky { color: var(--st-sky); }
.hp-pill-mint { color: var(--st-mint); }
.hp-pill-pink { color: var(--st-pink); }
.hp-pill-gold { color: var(--st-gold); }

.hp-guide[hidden] { display: none; }

.hp-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.3rem;
    border-radius: 999px;
    background: var(--st-night);
}

.hp-filter-btn {
    min-height: 44px;
    padding: 0.4rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--st-text);
    font-family: var(--st-body);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

.hp-filter-btn[aria-pressed="true"] {
    background: var(--st-gold);
    color: var(--st-night);
}

/* Resources */
.hp-res-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hp-res-kind {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hp-res-icon { width: 30px; height: 30px; }
.hp-res-pink { color: var(--st-pink); }
.hp-res-gold { color: var(--st-gold); }
.hp-res-sky { color: var(--st-sky); }

.hp-res .hp-btn { margin-top: 1rem; }

/* Latest posts */
.hp-post time {
    color: var(--st-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.hp-post h3 a {
    color: inherit;
    text-decoration: none;
}

/* Whole card is clickable through the heading link. */
.hp-post { position: relative; }
.hp-post h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.hp-post h3 a:focus-visible { outline: none; }
.hp-post:focus-within { outline: 3px solid var(--st-gold); outline-offset: 2px; }

.hp-post-more {
    color: var(--st-mint);
    font-weight: 700;
    font-size: 0.95rem;
}

/* Press + newsletter */
.hp-press {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 3rem;
    border-radius: 1.75rem;
    background: linear-gradient(110deg, #2e1a5c 0%, #241542 50%, #2c1a5a 100%);
}

.hp-press > div { flex: 1 1 32rem; }

.hp-news {
    max-width: 58rem;
    margin: 3rem auto 0;
    padding: 3.5rem 3rem;
    border-radius: 1.75rem;
    background: #14062b;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.hp-news-art {
    display: inline-grid;
    place-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--st-night);
    font-size: 2.5rem;
}

.hp-news .hp-sub { margin-left: auto !important; margin-right: auto !important; }

.hp-news-form {
    display: flex;
    gap: 0.75rem;
    max-width: 38rem;
    margin: 2rem auto 0;
}

.hp-news-form input {
    flex: 1;
    min-width: 0;
    min-height: 56px;
    padding: 0 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--st-surface);
    color: var(--st-text);
    font-family: var(--st-body);
    font-size: 1.05rem;
}

.hp-news-form input::placeholder { color: var(--st-muted); }
.hp-news-form input:focus { outline: none; border-color: var(--st-gold); }

.hp-news-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem !important;
    font-size: 0.9rem;
    font-weight: 700;
}

.hp-news-note .st-i { color: var(--st-mint); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .hp-hero-grid { grid-template-columns: 1fr; }
    .hp-orbit { width: min(100%, 460px); }
    .hp-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
    .hp-toolbar { flex-direction: column; align-items: stretch; }
    .hp-prompt { border-radius: 1rem; }
}

@media (max-width: 700px) {
    .hp-wrap { padding: 0 1rem; }
    .hp-section { padding: 3.5rem 0; }
    .hp-hero { padding: 3rem 0 3.5rem; }
    .hp-orbit { width: 84%; }
    .hp-hero-actions .hp-btn { width: 100%; }
    .hp-grid-3 { grid-template-columns: 1fr; }
    .hp-card { padding: 1.5rem; }
    .hp-card h3 { font-size: 1.35rem; }
    .hp-press { padding: 1.75rem; }
    .hp-press .hp-btn { width: 100%; white-space: normal; }
    .hp-news { padding: 2.5rem 1.25rem; }
    .hp-news-form { flex-direction: column; }
    .hp-prompt { flex-direction: column; align-items: flex-start; font-size: 0.95rem; }
    .hp-filter { width: 100%; }
    .hp-filter-btn { flex: 1 1 auto; font-size: 0.85rem; padding: 0.4rem 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hp-orbit-sticker, .hp-orbit-tile, .hp-orbit-ring::after { animation: none; }
    .hp-card, .hp-btn { transition: none; }
}
