/* =============================================================================
   LAMHA — GRAINIENT-INSPIRED HALF-SCREEN HERO v3

   The visual layer is rendered by home-grainient-hero.js. This file owns the
   hero composition, typography and star glints; cinematic entrance state lives
   in home-hero-motion.css.

   Hero colors are intentionally component-scoped. The hero is artwork, not a
   generic media overlay, so it owns a small --hero-* contract that can invert
   cleanly between dark and light without changing platform-wide media tokens.
   ============================================================================= */

.home-experience--landing .home-hero {
    --hero-canvas-bg: #050607;
    --hero-canvas-glow-inner: rgba(27, 44, 71, .10);
    --hero-canvas-glow-mid: rgba(12, 20, 36, .06);
    --hero-canvas-glow-outer: rgba(5, 6, 7, 0);
    --hero-center-core: rgba(4, 5, 6, 1);
    --hero-center-mid: rgba(4, 5, 6, .98);
    --hero-center-edge: rgba(4, 5, 6, .66);
    --hero-center-fade: rgba(4, 5, 6, 0);

    --hero-text: var(--text-on-media);
    --hero-text-muted: var(--text-on-media-muted);
    --hero-kicker-bg: var(--surface-on-media);
    --hero-kicker-border: var(--border-on-media);
    --hero-control-bg: var(--control-on-media-bg);
    --hero-control-hover: var(--control-on-media-hover);
    --hero-control-text: var(--control-on-media-text);
    --hero-control-icon-bg: var(--surface-on-media);
    --hero-control-icon-text: var(--text-on-media);
    --hero-cta-surface: rgba(7, 9, 11, .72);
    --hero-cta-surface-hover: rgba(12, 15, 18, .86);
    --hero-cta-border: rgba(255, 255, 255, .26);
    --hero-cta-border-hover: rgba(255, 255, 255, .46);
    --hero-cta-text: #f7f9fa;
    --hero-star: rgba(248, 249, 250, .92);
    --hero-star-fill: rgba(5, 6, 7, .08);
    --hero-star-shadow: rgba(255, 255, 255, .18);
    --hero-title-shadow: 0 4px 30px rgba(0, 0, 0, .30);
    --hero-atmosphere:
        linear-gradient(180deg,
            rgba(5, 6, 7, .93) 0%,
            rgba(5, 6, 7, .60) 19%,
            rgba(5, 6, 7, .08) 49%,
            rgba(5, 6, 7, .05) 70%,
            rgba(5, 6, 7, .30) 100%),
        radial-gradient(ellipse 42% 31% at 50% 54%, rgba(5, 6, 7, .28), rgba(5, 6, 7, .05) 58%, transparent 82%),
        linear-gradient(90deg, rgba(5, 6, 7, .30), transparent 15%, transparent 85%, rgba(5, 6, 7, .30));

    position: relative;
    width: 100%;
    min-height: 0;
    padding: 0;
    background: var(--hero-canvas-bg);
}

html[data-theme="light"] .home-experience--landing .home-hero {
    --hero-canvas-bg: #f3f5f6;
    --hero-canvas-glow-inner: rgba(101, 123, 137, .12);
    --hero-canvas-glow-mid: rgba(130, 150, 161, .07);
    --hero-canvas-glow-outer: rgba(246, 247, 248, 0);
    --hero-center-core: rgba(249, 250, 251, 1);
    --hero-center-mid: rgba(249, 250, 251, .96);
    --hero-center-edge: rgba(249, 250, 251, .72);
    --hero-center-fade: rgba(249, 250, 251, 0);

    --hero-text: #172026;
    --hero-text-muted: #56636b;
    --hero-kicker-bg: rgba(255, 255, 255, .68);
    --hero-kicker-border: rgba(23, 32, 38, .13);
    --hero-control-bg: #172026;
    --hero-control-hover: #29363e;
    --hero-control-text: #f7f9fa;
    --hero-control-icon-bg: rgba(255, 255, 255, .13);
    --hero-control-icon-text: #f7f9fa;
    --hero-cta-surface: rgba(255, 255, 255, .74);
    --hero-cta-surface-hover: rgba(255, 255, 255, .92);
    --hero-cta-border: rgba(23, 32, 38, .22);
    --hero-cta-border-hover: rgba(23, 32, 38, .38);
    --hero-cta-text: #172026;
    --hero-star: rgba(23, 32, 38, .82);
    --hero-star-fill: rgba(255, 255, 255, .08);
    --hero-star-shadow: rgba(23, 32, 38, .12);
    --hero-title-shadow: 0 2px 22px rgba(255, 255, 255, .64);
    --hero-atmosphere:
        linear-gradient(180deg,
            rgba(246, 247, 248, .92) 0%,
            rgba(246, 247, 248, .50) 19%,
            rgba(246, 247, 248, .04) 48%,
            rgba(246, 247, 248, .08) 70%,
            rgba(238, 241, 243, .52) 100%),
        radial-gradient(ellipse 44% 34% at 50% 54%, rgba(250, 251, 252, .90), rgba(250, 251, 252, .44) 58%, transparent 83%),
        linear-gradient(90deg, rgba(226, 231, 234, .38), transparent 15%, transparent 85%, rgba(226, 231, 234, .38));
}

.home-experience--landing .home-hero__stage {
    position: relative;
    width: 100%;
    height: clamp(440px, 52svh, 610px);
    min-height: 440px;
    max-height: 610px;
    overflow: hidden;
    isolation: isolate;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(ellipse 76% 66% at 50% 60%, color-mix(in srgb, var(--accent-primary) 9%, transparent), transparent 70%),
        var(--hero-canvas-bg);
    box-shadow: none;
    transition: background-color var(--duration-normal) var(--ease-default);
}

/* -----------------------------------------------------------------------------
   Animated visual surface
   ----------------------------------------------------------------------------- */

.home-experience--landing .home-hero__canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.home-experience--landing .home-hero__atmosphere {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: var(--hero-atmosphere);
}

/* Fine grain keeps the canvas from looking digitally sterile. */
.home-experience--landing .home-hero__atmosphere::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .13;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
    background-size: 160px 160px;
    pointer-events: none;
}

html[data-theme="light"] .home-experience--landing .home-hero__atmosphere::after {
    opacity: .075;
    mix-blend-mode: multiply;
}

/* -----------------------------------------------------------------------------
   Hand-drawn four-point star glints
   ----------------------------------------------------------------------------- */

.home-experience--landing .home-hero__stars {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.home-experience--landing .home-hero__star {
    position: absolute;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--hero-star);
    opacity: 0;
    transform-origin: 50% 50%;
    filter: drop-shadow(0 0 7px var(--hero-star-shadow));
    animation: lamha-hand-star 5.6s ease-in-out infinite;
}

.home-experience--landing .home-hero__star svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.home-experience--landing .home-hero__star path {
    fill: var(--hero-star-fill);
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.home-experience--landing .home-hero__star--1 {
    left: 19%;
    top: 64%;
    width: 31px;
    height: 31px;
    animation-delay: .25s;
}

.home-experience--landing .home-hero__star--2 {
    right: 22%;
    top: 57%;
    width: 20px;
    height: 20px;
    animation-delay: 2.35s;
    animation-duration: 6.4s;
}

.home-experience--landing .home-hero__star--3 {
    left: 47%;
    bottom: 9%;
    width: 17px;
    height: 17px;
    animation-delay: 1.25s;
    animation-duration: 5.1s;
}

.home-experience--landing .home-hero__star--4 {
    right: 36%;
    bottom: 18%;
    width: 24px;
    height: 24px;
    animation-delay: 3.65s;
    animation-duration: 6.8s;
}

/* -----------------------------------------------------------------------------
   Center hierarchy
   ----------------------------------------------------------------------------- */

.home-experience--landing .home-hero__content {
    position: absolute;
    z-index: 7;
    top: 46%;
    left: 50%;
    width: min(820px, calc(100% - 32px));
    transform: translate(-50%, -50%);
    text-align: center;
    direction: rtl;
}

.home-experience--landing .home-hero__kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin: 0 0 13px;
    padding: 5px 11px 6px;
    border: 1px solid var(--hero-kicker-border);
    border-radius: var(--radius-full);
    background: var(--hero-kicker-bg);
    color: var(--hero-text-muted);
    font-size: 10px;
    font-weight: var(--font-medium);
    letter-spacing: 0;
    text-shadow: none;
    -webkit-backdrop-filter: blur(12px) saturate(112%);
    backdrop-filter: blur(12px) saturate(112%);
    box-shadow: var(--shadow-xs);
}

.home-experience--landing .home-hero__title {
    max-width: 780px;
    margin: 0 auto;
    font-family: var(--font-family-base), sans-serif;
    font-size: clamp(34px, 4.15vw, 62px);
    font-weight: var(--font-medium);
    line-height: 1.12;
    letter-spacing: -0.045em;
    color: var(--hero-text);
    text-wrap: balance;
    text-shadow: var(--hero-title-shadow);
}

.home-experience--landing .home-hero__title span {
    color: var(--hero-text);
    font-weight: var(--font-medium);
}

.home-experience--landing .home-hero__subtitle {
    width: min(540px, 88%);
    margin: 15px auto 0;
    color: var(--hero-text-muted);
    font-size: clamp(11px, .9vw, 13px);
    line-height: 1.65;
    text-shadow: none;
}

/* Primary action ---------------------------------------------------------- */
.home-experience--landing .home-hero__cta {
    position: relative;
    isolation: isolate;
    display: inline-grid;
    grid-template-columns: auto 20px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: var(--space-5);
    padding: 12px 28px;
    overflow: hidden;
    border: 1px solid var(--hero-cta-border);
    border-radius: var(--radius-full);
    background: var(--hero-cta-surface);
    color: var(--hero-cta-text);
    font-size: 16px;
    font-weight: var(--font-semibold);
    line-height: 1;
    letter-spacing: 0;
    text-decoration: none;
    -webkit-backdrop-filter: blur(18px) saturate(118%);
    backdrop-filter: blur(18px) saturate(118%);
    transition:
        transform var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out),
        background-color var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out);
}



.home-experience--landing .home-hero__cta-label,
.home-experience--landing .home-hero__cta-arrow {
    position: relative;
    z-index: 1;
}

.home-experience--landing .home-hero__cta-label {
    white-space: nowrap;
}

.home-experience--landing .home-hero__cta-arrow {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: var(--hero-cta-text);
    animation: lamha-cta-arrow 2.8s ease-in-out infinite;
}

.home-experience--landing .home-hero__cta-arrow svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.7;
}

.home-experience--landing .home-hero__cta:active {
    transform: translateY(1px) scale(.985);
}

@media (hover: hover) and (pointer: fine) {
    .home-experience--landing .home-hero__cta:hover {
        color: var(--hero-cta-text);
        border-color: var(--hero-cta-border-hover);
        background: var(--hero-cta-surface-hover);
        transform: translateY(-2px);
        box-shadow:
            0 20px 44px rgba(0, 0, 0, .24),
            inset 0 1px 0 color-mix(in srgb, var(--hero-cta-text) 12%, transparent);
    }

    .home-experience--landing .home-hero__cta:hover .home-hero__cta-arrow {
        transform: translateX(-3px);
    }
}

@keyframes lamha-cta-arrow {
    0%, 70%, 100% { transform: translateX(0); }
    80% { transform: translateX(-3px); }
    90% { transform: translateX(1px); }
}

/* -----------------------------------------------------------------------------
   Star motion
   ----------------------------------------------------------------------------- */

@keyframes lamha-hand-star {
    0%, 62%, 100% {
        opacity: 0;
        transform: scale(.30) rotate(-13deg);
    }
    68% {
        opacity: .42;
        transform: scale(.66) rotate(-4deg);
    }
    74% {
        opacity: 1;
        transform: scale(1.10) rotate(4deg);
    }
    80% {
        opacity: .56;
        transform: scale(.84) rotate(8deg);
    }
    86% {
        opacity: .94;
        transform: scale(1) rotate(11deg);
    }
    93% {
        opacity: 0;
        transform: scale(.42) rotate(17deg);
    }
}

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

@media (max-width: 991.98px) {
    .home-experience--landing .home-hero__stage {
        height: clamp(430px, 53svh, 560px);
        min-height: 430px;
    }

    .home-experience--landing .home-hero__content { top: 45%; }
    .home-experience--landing .home-hero__title { font-size: clamp(36px, 6.2vw, 54px); }
}

@media (max-width: 767.98px) {
    .home-experience--landing .home-hero__stage {
        height: clamp(420px, 56svh, 520px);
        min-height: 420px;
    }

    .home-experience--landing .home-hero__content {
        top: 44%;
        width: calc(100% - 28px);
    }

    .home-experience--landing .home-hero__title {
        max-width: 620px;
        font-size: clamp(33px, 9.2vw, 48px);
        line-height: 1.15;
        letter-spacing: -0.035em;
    }

    .home-experience--landing .home-hero__subtitle {
        max-width: 390px;
        margin-top: var(--space-3);
        font-size: 11px;
    }

    .home-experience--landing .home-hero__cta {
        grid-template-columns: auto 18px;
        gap: 14px;
        min-width: 154px;
        min-height: 50px;
        margin-top: 17px;
        padding: 0 16px;
        border-radius: var(--radius-full);
        font-size: 14px;
    }

    .home-experience--landing .home-hero__cta-arrow {
        width: 18px;
        height: 18px;
    }

    .home-experience--landing .home-hero__cta-arrow svg {
        width: 17px;
        height: 17px;
    }

    .home-experience--landing .home-hero__star--1 { left: 8%; top: 68%; }
    .home-experience--landing .home-hero__star--2 { right: 9%; top: 62%; }
    .home-experience--landing .home-hero__star--3 { display: none; }
    .home-experience--landing .home-hero__star--4 { right: 27%; bottom: 10%; }
}

@media (max-width: 575.98px) {
    .home-experience--landing .home-hero__stage {
        height: min(500px, 58svh);
        min-height: 410px;
    }

    .home-experience--landing .home-hero__content { top: 43%; }
    .home-experience--landing .home-hero__kicker { margin-bottom: 10px; }
    .home-experience--landing .home-hero__title { font-size: clamp(31px, 10.6vw, 43px); }
    .home-experience--landing .home-hero__subtitle { width: min(330px, 92%); line-height: 1.6; }
}

/* -----------------------------------------------------------------------------
   Accessibility / capability fallbacks
   ----------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .home-experience--landing .home-hero__star {
        animation: none !important;
        display: none;
    }

    .home-experience--landing .home-hero__cta-arrow {
        animation: none !important;
    }
}

@supports not (backdrop-filter: blur(1px)) {
    .home-experience--landing .home-hero__kicker {
        background: var(--hero-kicker-bg);
    }

    .home-experience--landing .home-hero__cta {
        background: var(--hero-cta-surface-hover);
    }
}
