/* Home page — featured stories showcase */
@import url("brand.d1a727f6935e.css");

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

/* ─── Header ──────────────────────────────────────────────── */

.home-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(var(--color-bg-rgb), 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.home-header__brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.home-header__nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.home-header__link {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.15s;
}

.home-header__link:hover {
    color: #fff;
}

.home-header__link--cta {
    padding: 0.45rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    color: #fff;
    transition: background 0.15s, border-color 0.15s;
}

.home-header__link--cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ─── Hero ────────────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__backdrop {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero-backdrop);
    z-index: 0;
}

.hero__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(var(--color-bg-rgb), 0.3) 0%,
        rgba(var(--color-bg-rgb), 0.1) 40%,
        rgba(var(--color-bg-rgb), 0.6) 80%,
        rgba(var(--color-bg-rgb), 1) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hero__backdrop--image {
    background: none;
}

.hero__backdrop-img {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    object-fit: cover;
}

.hero__backdrop--kb .hero__backdrop-img {
    animation: hero-kb 30s ease-in-out infinite alternate;
}

@keyframes hero-kb {
    0%   { transform: scale(1)    translate(0, 0); }
    100% { transform: scale(1.12) translate(-2%, -1.5%); }
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 680px;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero__tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.hero__scroll-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hero__scroll-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.hero__arrow {
    width: 18px;
    height: 18px;
    animation: hero-bounce 2s ease-in-out infinite;
}

@keyframes hero-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

.hero__btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--color-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 2rem;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.hero__btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

/* ─── Stories section ────────────────────────────────────── */

.stories {
    background: var(--color-bg);
    padding: 5rem 2rem 6rem;
}

.stories__container {
    max-width: 1200px;
    margin: 0 auto;
}

.stories__heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    text-align: center;
}

.stories__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* ─── Story card ─────────────────────────────────────────── */

.story-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.story-card__image-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.story-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-card:hover .story-card__image {
    transform: scale(1.05);
}

.story-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--gradient-card-placeholder);
}

.story-card__placeholder-icon {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.15);
}

.story-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.story-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.story-card__desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card__meta {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.story-card__author {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

/* ─── Footer ─────────────────────────────────────────────── */

.home-footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    background: var(--color-bg);
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
    .home-header {
        padding: 0.75rem 1.25rem;
    }

    .hero {
        min-height: 70vh;
    }

    .stories {
        padding: 3rem 1.25rem 4rem;
    }

    .stories__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }

    .stories__heading {
        font-size: 1.35rem;
    }
}

/* Share preview fallback (unpublished / private URL) */
.share-unavailable {
    max-width: 28rem;
    margin: 6rem auto 4rem;
    padding: 0 1.5rem;
    text-align: center;
}

.share-unavailable__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.share-unavailable__text {
    color: var(--color-text-muted, #5c6470);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.share-unavailable__cta a {
    color: var(--color-accent, #2b78b1);
    font-weight: 500;
    text-decoration: none;
}

.share-unavailable__cta a:hover {
    text-decoration: underline;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero__backdrop--kb .hero__backdrop-img {
        animation: none;
    }

    .hero__arrow {
        animation: none;
    }

    .story-card {
        transition: none;
    }

    .story-card__image {
        transition: none;
    }
}
