/* ==========================================================================
   Home
   ========================================================================== */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: var(--space-7);
    padding-top: var(--space-4);
}

.hero-copy {
    display: grid;
    justify-items: start;
    gap: var(--space-5);
}

/* The ILLIT logo is the headline. Its shape (illit-logo.svg) masks a colour or gradient, so the
   colour theme can recolour it (--illit-logo); the glow sits on the heading, outside the mask. */
.hero-title {
    width: min(100%, 400px);
    filter: drop-shadow(0 10px 26px var(--brand-glow));
}

.hero-logo {
    display: block;
    aspect-ratio: 881 / 335;
    background: var(--illit-logo);
    -webkit-mask: url("../img/illit-logo.svg") center / contain no-repeat;
    mask: url("../img/illit-logo.svg") center / contain no-repeat;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

/* Live chart badge, filled in from /api/charts */
.hero-chart {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 440px;
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.hero-chart:hover {
    transform: translateY(-1px);
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
}

.hero-chart-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--brand-gradient-strong);
    color: var(--on-brand);
    flex: none;
}

.hero-chart-text {
    display: grid;
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

.hero-chart-title {
    font-weight: 600;
}

.hero-chart-title strong {
    color: var(--brand-text);
    font-size: 1.1em;
}

.hero-chart-sub {
    font-size: var(--text-sm);
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-chart-arrow {
    color: var(--text-faint);
    transition: transform var(--fast) var(--ease), color var(--fast) var(--ease);
}

.hero-chart:hover .hero-chart-arrow {
    color: var(--brand-text);
    transform: translateX(3px);
}

/* --- Featured video -------------------------------------------------------- */

.player {
    position: relative;
}

.player::before {
    content: "";
    position: absolute;
    inset: 8% -4% -6% 6%;
    z-index: -1;
    border-radius: var(--radius-xl);
    background: var(--brand-gradient);
    filter: blur(36px);
    opacity: 0.7;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    padding: 10px;
    border-radius: var(--radius-xl);
    background: var(--surface-glass);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
}

.player-frame iframe,
.video-facade {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: calc(var(--radius-xl) - 10px);
    background: #111;
}

.video-facade {
    position: relative;
    display: block;
    padding: 0;
    overflow: hidden;
}

.video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--ease);
}

.video-facade-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(20, 5, 15, 0.45));
}

.video-facade-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-strong);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(255, 255, 255, 0.22);
    transform: translate(-50%, -50%);
    transition: transform var(--normal) var(--ease), box-shadow var(--normal) var(--ease);
}

.video-facade-play .icon {
    width: 34px;
    height: 34px;
    margin-left: 4px;
}

.icon-fill {
    fill: currentColor;
    stroke: none;
}

.video-facade:hover img {
    transform: scale(1.03);
}

.video-facade:hover .video-facade-play {
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35), 0 0 0 14px rgba(255, 255, 255, 0.25);
}

.player-caption {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-4) 0 0 var(--space-2);
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 600;
    min-width: 0;
}

.player-caption .eyebrow {
    flex: none;
}

.player-caption-text {
    min-width: 0;
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-caption-text:hover {
    color: var(--brand-text);
    text-decoration: underline;
}

/* --- Explore cards ------------------------------------------------------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
}

.feature-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: var(--space-3);
    padding: var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--normal) var(--ease), box-shadow var(--normal) var(--ease), border-color var(--normal) var(--ease);
}

.feature-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--brand-gradient-strong);
    opacity: 0;
    transition: opacity var(--normal) var(--ease);
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-2);
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.feature-card p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-2);
    color: var(--brand-text);
    font-size: var(--text-sm);
    font-weight: 650;
}

.feature-link .icon {
    transition: transform var(--fast) var(--ease);
}

.feature-card:hover .feature-link .icon {
    transform: translateX(3px);
}

/* --- Community band --------------------------------------------------------- */

.community-band {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    padding: var(--space-6) var(--space-7);
    border-radius: var(--radius-xl);
    background: var(--brand-gradient);
    color: var(--on-gradient);
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 18px 40px var(--brand-glow);
}

.community-band::before {
    content: "";
    position: absolute;
    inset: -40% auto auto 60%;
    z-index: -1;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent 65%);
}

.community-band-copy {
    display: grid;
    gap: var(--space-2);
}

.community-band .eyebrow {
    color: color-mix(in srgb, var(--on-gradient) 75%, transparent);
}

.community-band h2 {
    color: var(--on-gradient);
}

.community-band p {
    color: color-mix(in srgb, var(--on-gradient) 78%, transparent);
}

.community-band-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.btn-on-brand {
    color: var(--on-gradient);
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--on-gradient) 15%, transparent);
}

.btn-on-brand:hover {
    background: #fff;
}

.btn-on-brand img {
    width: 20px;
    height: 20px;
    border-radius: 6px;
}

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

@media (max-width: 1180px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    /* minmax(0, ...) so the long, unwrapped MV title can't widen the column past the screen. */
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-6);
    }

    .hero-media {
        order: -1;
    }
}

@media (max-width: 560px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .community-band {
        padding: var(--space-5);
    }

    .hero-title {
        width: min(72%, 300px);
    }

    .video-facade-play {
        width: 60px;
        height: 60px;
    }
}

/* --- Wide screens ------------------------------------------------------------------------ */

/* The video grows with the screen, so the logo and intro grow with it. */
@media (min-width: 2100px) {
    .hero-title {
        width: min(100%, 520px);
    }

    .hero .lead {
        max-width: 34em;
        font-size: var(--text-lg);
    }
}
