/* ==========================================================================
   HERO / VIEWPORT CONTAINER
   ========================================================================== */
.hero-showcase {
    flex: 1;
    position: relative;
    border-radius: var(--border-radius-main);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    background-color: #0a0a0c;
}

body.home-page .hero-showcase {
    background-color: #000;
    box-shadow: none;
    border-radius: 12px;
    border: none;
}

/* Background image with high-quality styling */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    transition: transform 10s ease-out;
}

.hero-bg-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: none;
    background:
        radial-gradient(ellipse 120% 90% at 20% 20%, rgba(237, 87, 47, 0.14), transparent 55%),
        radial-gradient(ellipse 90% 70% at 85% 75%, rgba(255, 255, 255, 0.05), transparent 50%),
        linear-gradient(160deg, #0b0b0d 0%, #121214 45%, #0a0a0c 100%);
    z-index: 1;
    display: none;
    transition: transform 10s ease-out;
}

@media (max-width: 992px), (prefers-reduced-motion: reduce) {
    .hero-bg {
        display: none;
    }

    .hero-bg-fallback {
        display: block;
    }
}

/* Home ≤992px: video as stage; fallback always under video as base paint */
@media (max-width: 992px) {
    body.home-page .hero-bg-fallback {
        display: block;
        z-index: 1;
    }

    body.home-page .hero-bg {
        display: block;
        z-index: 1;
    }
}

@media (max-width: 992px) and (prefers-reduced-motion: reduce) {
    body.home-page .hero-bg {
        display: none;
    }

    body.home-page .hero-bg-fallback {
        display: block;
    }
}

.hero-showcase:hover .hero-bg,
.hero-showcase:hover .hero-bg-fallback {
    transform: scale(1.03); /* Subtle continuous movement look */
}

/* Vignette overlay for text legibility */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg,
            rgba(0, 0, 0, 0.72) 0%,
            rgba(0, 0, 0, 0.42) 42%,
            rgba(0, 0, 0, 0.58) 100%);
    z-index: 2;
}

body.home-page .hero-overlay {
    background: linear-gradient(145deg,
            rgba(0, 0, 0, 0.78) 0%,
            rgba(11, 11, 13, 0.45) 45%,
            rgba(0, 0, 0, 0.68) 100%);
}

/* Overlay Content Wrapper */
.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    padding: 2rem;
}

@media (max-width: 992px) {
    .hero-showcase {
        min-height: 0;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 1.25rem;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: clamp(1.4rem, 6.5vw, 2.2rem) !important;
    }

    .trend-card {
        padding: 1.25rem;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(1.3rem, 7.8vw, 1.95rem) !important;
    }

    .highlight-text {
        padding: 0 6px;
    }

    .hero-tagline-container {
        display: none;
    }

    .hero-tagline,
    .hero-sub-tagline {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   HERO CONTENT ELEMENTS
   ========================================================================== */

/* Main Headline */
.hero-headline-container {
    grid-column: 1 / -1;
    grid-row: 1 / 7;
    align-self: start;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 5.5vw, 5.2rem);
    color: var(--color-text-light);
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Desktop keeps title on one flow; mweb uses .mweb-title-break */
.mweb-title-break {
    display: none;
}

/* Lighter highlighted phrase */
.highlight-text {
    position: relative;
    display: inline-block;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 0.5rem;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .hero-headline-container {
        width: 100%;
    }

    .highlight-text {
        white-space: normal;
    }
}

/* Bottom Left Tagline */
.hero-tagline-container {
    grid-column: 1 / 7;
    grid-row: 10 / 13;
    align-self: end;
}

.hero-tagline {
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    color: var(--color-text-light);
    opacity: 0.9;
    font-weight: 400;
    max-width: 460px;
    line-height: 1.6;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hero-sub-tagline {
    margin-top: 1.25rem;
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    max-width: min(580px, 100%);
}

@media (max-width: 992px) {
    .hero-tagline-container {
        width: 100%;
        order: 2;
    }

    .hero-tagline {
        max-width: 100%;
        font-size: 0.85rem;
    }

    .hero-sub-tagline {
        margin-top: 0.75rem;
        font-size: clamp(0.95rem, 4vw, 1.15rem);
    }
}

.trend-card {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.09) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(237, 87, 47, 0.05) 100%
    );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.75rem;
    max-width: 320px;
    width: 100%;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 20px 48px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition-smooth);
    isolation: isolate;
    overflow: hidden;
}

body.home-page .trend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(237, 87, 47, 0.5) 40%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(237, 87, 47, 0.5) 60%,
        transparent 100%
    );
    pointer-events: none;
}

.trend-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 28px 56px rgba(0, 0, 0, 0.5);
}

.trend-card-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
    color: #fff;
    letter-spacing: -0.02em;
}

.trend-card-desc {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
}

.trend-card-note {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.42);
    margin: 0;
}

.trend-card-btn {
    align-self: flex-end;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.92) 100%);
    color: #0b0b0d;
    border: none;
    padding: 0.7rem 1.35rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 0.02em;
    margin-top: 0.25rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.trend-card-btn:hover {
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, #f06a45 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(237, 87, 47, 0.35);
    transform: translateY(-1px);
}

@media (max-width: 992px) {
    .trend-card {
        position: static;
        max-width: 100%;
        order: 3;
    }
}

/* Mobile sticky bottom CTA + simplified hero */
.mobile-sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    body.has-announcement .hero-showcase {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }

    .hero-sub-tagline {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Login / waitlist: show the full subcopy (no 2-line ellipsis) */
    body.scrollable-page .hero-sub-tagline,
    .waitlist-content .hero-sub-tagline {
        display: block;
        -webkit-line-clamp: unset;
        -webkit-box-orient: unset;
        overflow: visible;
        text-overflow: unset;
        white-space: normal;
    }

    .trend-card-desc {
        display: none;
    }

    .trend-card-btn {
        display: none;
    }

    .trend-card {
        gap: 0.5rem;
        padding: 1rem 1.15rem;
    }

    .trend-card-title {
        font-size: 1rem;
    }

    .mobile-sticky-cta {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 85;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        min-height: 48px;
        padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%);
        color: #0b0b0d;
        font-family: var(--font-sans);
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none;
        letter-spacing: 0.02em;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
    }

    .mobile-sticky-cta:active {
        background: var(--color-accent-orange);
        color: #fff;
    }

    .highlight-text {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.18);
    }

    .trend-card:hover {
        transform: none;
        box-shadow: var(--shadow-card);
    }
}

/* ==========================================================================
   HOME — MOBILE ONLY
   Layout from reference (inset hero + white card); chrome matches dweb
   (black + orange gradient). Desktop untouched.
   ========================================================================== */
@media (max-width: 768px) {
    html.home-page,
    body.home-page {
        width: 100%;
        max-width: 100%;
        height: auto !important;
        min-height: 100%;
        min-height: 100dvh;
        overflow-x: clip !important;
        overflow-y: auto !important;
        background-color: #000 !important;
        color: rgba(255, 255, 255, 0.88);
    }

    body.home-page.has-announcement {
        display: block;
        height: auto !important;
        min-height: 100dvh;
        overflow-x: clip !important;
        overflow-y: auto !important;
        padding: 0;
        margin: 0;
        background-color: #000 !important;
    }

    body.home-page.has-announcement .app-container,
    body.home-page .app-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto !important;
        min-height: 100dvh;
        flex: none;
        box-sizing: border-box;
        padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
        gap: 1.5rem;
        overflow: visible;
        background: transparent;
    }

    /* Dark chrome header — logo left, white hamburger right */
    body.home-page .site-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
        position: relative;
        z-index: 6;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100%;
        height: 50px;
        min-height: 50px;
        padding: 0 !important;
        box-sizing: border-box;
        background: transparent;
        border-bottom: none;
    }

    body.home-page .logo-img {
        height: 40px;
        width: auto;
        max-width: none;
        display: block;
        object-fit: contain;
    }

    body.home-page .logo-wordmark {
        color: #fff;
        font-size: 1.55rem;
    }

    body.home-page .nav-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        flex-shrink: 0;
        background: none;
        border: none;
        border-radius: 0;
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        box-shadow: none;
        overflow: visible;
        z-index: 220;
    }

    body.home-page .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        margin: 0;
        background-color: #fff;
        transform-origin: center;
    }

    /* Keep close button above drawer + dimmer (all inside .app-container) */
    body.home-page.nav-open .site-header {
        z-index: 220;
    }

    body.home-page .main-nav {
        background-color: rgba(14, 14, 16, 0.98);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.45);
        z-index: 210;
        pointer-events: auto;
    }

    body.home-page .main-nav .nav-link {
        color: rgba(255, 255, 255, 0.88);
        font-size: 1.3rem;
        opacity: 0.9;
        pointer-events: auto;
    }

    body.home-page .announcement-strip,
    body.home-page .mobile-sticky-cta {
        display: none !important;
    }

    /* Inset sand hero panel — fills leftover viewport so CTA can sit on the bottom edge */
    body.home-page .hero-showcase,
    body.home-page.has-announcement .hero-showcase {
        position: relative;
        display: flex;
        flex-direction: column;
        flex: 1 1 auto !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 550px !important;
        height: auto !important;
        border-radius: 16px; /* trial — match dweb softness; revert if it feels off */
        overflow: hidden !important;
        box-sizing: border-box;
        margin: 0;
        padding: 0 !important;
        background-color: #e2ddd5;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 8px rgba(0, 0, 0, 0.02);
    }

    body.home-page .hero-bg-fallback {
        display: block !important;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        background-color: #e2ddd5;
        background-image: url('/assets/sand_bg.jpg');
        background-size: cover;
        background-position: center;
    }

    body.home-page .hero-bg {
        display: block !important;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        z-index: 1;
        background: transparent !important;
    }

    body.home-page .hero-overlay {
        z-index: 2;
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.15) 50%,
            rgba(0, 0, 0, 0.3) 100%
        );
    }

    body.home-page .hero-content {
        position: relative;
        z-index: 3;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        padding: 1.5rem 1.25rem 0.85rem;
        gap: 1.25rem;
        box-sizing: border-box;
        overflow: visible;
    }

    body.home-page .hero-headline-container {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
        max-width: 100%;
        align-self: start;
        order: 1;
        flex-shrink: 0;
    }

    body.home-page .hero-title {
        font-family: var(--font-heading);
        color: #fff;
        font-size: clamp(2.65rem, 11.5vw, 3.4rem) !important;
        line-height: 1.08;
        font-weight: 400;
        letter-spacing: -0.5px;
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }

    /* Enable the title line-break only on home mweb */
    body.home-page .mweb-title-break {
        display: inline;
    }

    body.home-page .highlight-text {
        display: inline-block;
        white-space: normal;
        padding: 0 12px;
        margin-top: 0.5rem;
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: none;
        border-radius: 0;
        color: #fff;
    }

    /* Same subheader as dweb (support tagline under title) */
    body.home-page .hero-sub-tagline {
        display: block !important;
        -webkit-line-clamp: unset;
        margin-top: 0.85rem;
        max-width: 100%;
        font-size: 0.95rem !important;
        line-height: 1.55;
        letter-spacing: 0.2px;
        color: #fff;
        opacity: 0.9;
        font-weight: 400;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
        overflow: visible;
    }

    /* Bottom “Built for founders…” stays dweb-only on this layout */
    body.home-page .hero-tagline-container {
        display: none !important;
    }

    /* Same glass CTA card as dweb */
    body.home-page .trend-card {
        position: static;
        order: 3;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-top: auto;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1.75rem;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.09) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(237, 87, 47, 0.05) 100%
        );
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.06) inset,
            0 20px 48px rgba(0, 0, 0, 0.45);
        isolation: isolate;
        overflow: hidden;
        box-sizing: border-box;
    }

    body.home-page .trend-card::before {
        display: block !important;
    }

    body.home-page .trend-card:hover {
        transform: none;
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.06) inset,
            0 20px 48px rgba(0, 0, 0, 0.45);
    }

    body.home-page .trend-card-title {
        font-family: var(--font-sans);
        color: #fff;
        font-size: 1.05rem;
        font-weight: 600;
        line-height: 1.4;
        letter-spacing: -0.02em;
        max-width: 100%;
    }

    body.home-page .trend-card-desc {
        display: block !important;
        font-family: var(--font-sans);
        color: rgba(255, 255, 255, 0.55);
        font-size: 0.85rem;
        line-height: 1.5;
        max-width: 100%;
    }

    body.home-page .trend-card-note {
        display: block !important;
        font-family: var(--font-sans);
        color: rgba(255, 255, 255, 0.42);
        font-size: 0.8rem;
        line-height: 1.4;
        margin: 0;
    }

    body.home-page .trend-card-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        align-self: flex-end;
        margin-top: 0.25rem;
        padding: 0.7rem 1.35rem;
        background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.92) 100%) !important;
        color: #0b0b0d !important;
        border: none;
        border-radius: 999px;
        font-family: var(--font-sans);
        font-size: 0.8rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-decoration: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    }

    body.home-page .trend-card-btn:hover,
    body.home-page .trend-card-btn:active {
        background: linear-gradient(135deg, var(--color-accent-orange) 0%, #f06a45 100%) !important;
        color: #fff !important;
        transform: none;
        box-shadow: 0 6px 20px rgba(237, 87, 47, 0.35);
    }
}

