/* ==========================================================================
   Hands & Hearts — clean landing theme
   Lavender / ink palette inspired by modern fintech "SuperApp" landing pages.
   Loaded last in index.html so it can restyle the existing sections
   (story tour, feature cards, phone tutorials, pricing band, footer).
   ========================================================================== */

@font-face {
    font-family: 'Khmer OS Siemreap';
    src:
        local('Khmer OS Siemreap'),
        local('KhmerOS Siemreap'),
        local('KhmerOSsiemreap'),
        local('Siemreap'),
        url('/fonts/KhmerOSSiemreap.woff2') format('woff2'),
        url('/fonts/KhmerOSSiemreap.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Khmer OS Muol Light';
    src:
        local('Khmer OS Muol Light'),
        local('KhmerOS Muol Light'),
        local('KhmerOSmuollight'),
        local('Khmer OS Moul Light'),
        url('/fonts/KhmerOSMuolLight.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Khmer OS Muol Light';
    src:
        local('Khmer OS Muol Light'),
        local('KhmerOS Muol Light'),
        local('KhmerOSmuollight'),
        url('/fonts/KhmerOSMuolLight.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

html.hh-landing {
    --hh-bg: #f5f0fe;
    --hh-bg-2: #ece6fb;
    --hh-surface: #ffffff;
    --hh-surface-2: #f8f5ff;
    --hh-ink: #0d1015;
    --hh-ink-2: #332a50;
    --hh-muted: #6b6784;
    --hh-primary: #5043ac;
    --hh-primary-2: #6a5ce0;
    --hh-peri: #9ea0fb;
    --hh-lilac: #d5b4fc;
    --hh-rose: #c3576a;
    --hh-mauve: #c793a5;
    --hh-mint: #1f9d7a;
    --hh-amber: #f5b50a;
    --hh-line: rgba(51, 42, 80, 0.1);
    --hh-font: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --hh-font-khmer: 'Khmer OS Siemreap', sans-serif;
    --hh-font-khmer-display: 'Khmer OS Muol Light', 'Khmer OS Siemreap', sans-serif;
}

/* The compiled Tailwind bundle sets `overflow-x: hidden` on html AND body. With html
   already non-visible, body becomes its own scroll container and every `position: sticky`
   inside the page (the pinned tour phone) stops sticking. `clip` avoids that. */
html.hh-landing {
    overflow-x: clip;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

html.hh-landing body {
    overflow: visible;
    font-family: var(--hh-font);
    background: var(--hh-bg);
    color: var(--hh-ink);
    -webkit-font-smoothing: antialiased;
}

html.hh-landing body.dark {
    --hh-bg: #0d1015;
    --hh-bg-2: #15112a;
    --hh-surface: #12101e;
    --hh-surface-2: #171429;
    --hh-ink: #f5f0fe;
    --hh-ink-2: #e6dffb;
    --hh-muted: #a9a3c4;
    --hh-line: rgba(255, 255, 255, 0.1);
}

#platform-tour,
#features,
#pricing {
    scroll-margin-top: 5.5rem;
}

/* --------------------------------------------------------------------------
   Shared: section label pill
   -------------------------------------------------------------------------- */
.hh-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.42rem 0.95rem 0.42rem 0.7rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(213, 180, 252, 0.42));
    border: 1px solid rgba(80, 67, 172, 0.16);
    box-shadow:
        0 10px 24px -16px rgba(80, 67, 172, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: var(--hh-primary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hh-pill::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--hh-primary);
    box-shadow: 0 0 0 4px rgba(80, 67, 172, 0.16);
    flex-shrink: 0;
}

.dark .hh-pill {
    background: linear-gradient(180deg, rgba(158, 160, 251, 0.2), rgba(80, 67, 172, 0.18));
    border-color: rgba(158, 160, 251, 0.28);
    box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #c9c4ff;
}

.dark .hh-pill::before {
    background: #c9c4ff;
    box-shadow: 0 0 0 4px rgba(158, 160, 251, 0.22);
}

.hh-pill--accent {
    padding: 0.5rem 1.05rem 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(80, 67, 172, 0.16);
    box-shadow:
        0 14px 30px -16px rgba(51, 42, 80, 0.45),
        0 0 0 4px rgba(213, 180, 252, 0.28);
    color: var(--hh-ink-2);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.hh-pill--accent::before {
    display: none;
}

.hh-pill--accent svg {
    color: var(--hh-amber);
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(240, 140, 58, 0.45));
}

.dark .hh-pill--accent {
    background: rgba(23, 20, 41, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 14px 30px -16px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(158, 160, 251, 0.14);
    color: var(--hh-ink-2);
}

.khmer-text .hh-pill,
.crystal-story--khmer .hh-pill {
    letter-spacing: 0;
    text-transform: none;
}

/* --------------------------------------------------------------------------
   Floating navigation bar
   -------------------------------------------------------------------------- */
.hh-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
    display: flex;
    justify-content: center;
    padding: calc(0.7rem + env(safe-area-inset-top, 0px)) 0.75rem 0;
    pointer-events: none;
}

.hh-nav__bar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: min(72rem, 100%);
    padding: 0.45rem 0.5rem 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 12px 32px -16px rgba(51, 42, 80, 0.3);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    transition: background 220ms ease, box-shadow 220ms ease;
}

.hh-nav--scrolled .hh-nav__bar {
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 18px 40px -18px rgba(51, 42, 80, 0.4);
}

.dark .hh-nav__bar {
    background: rgba(18, 16, 30, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}

.dark .hh-nav--scrolled .hh-nav__bar {
    background: rgba(18, 16, 30, 0.92);
}

.hh-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--hh-ink);
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
}

.hh-nav__brand img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.dark .hh-nav__brand img {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.hh-nav__links {
    display: none;
    align-items: center;
    gap: 0.15rem;
    margin: 0 auto;
}

.hh-nav__links a {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    color: var(--hh-ink-2);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease;
}

.hh-nav__links a:hover {
    background: rgba(80, 67, 172, 0.08);
    color: var(--hh-primary);
}

.dark .hh-nav__links a:hover {
    background: rgba(158, 160, 251, 0.14);
    color: #c9c4ff;
}

.hh-nav__tools {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.hh-nav__pulse {
    display: none;
}

.hh-nav__iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 2.35rem;
    min-width: 2.35rem;
    padding: 0 0.6rem;
    border: 1px solid var(--hh-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    color: var(--hh-ink-2);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.hh-nav__iconbtn:hover {
    background: #fff;
    border-color: rgba(80, 67, 172, 0.25);
}

.hh-nav__iconbtn:active {
    transform: scale(0.96);
}

.dark .hh-nav__iconbtn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--hh-ink-2);
}

.dark .hh-nav__iconbtn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.hh-nav__langbtn {
    padding-left: 0.65rem;
}

.hh-nav__langcode {
    letter-spacing: 0.02em;
}

.hh-nav__chev {
    transition: transform 180ms ease;
}

.hh-nav__chev.is-open {
    transform: rotate(180deg);
}

.hh-nav__lang {
    position: relative;
}

.hh-nav__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.55rem);
    min-width: 13rem;
    max-height: min(70vh, 26rem);
    margin: 0;
    padding: 0.4rem;
    overflow: auto;
    list-style: none;
    border-radius: 1rem;
    background: var(--hh-surface);
    border: 1px solid var(--hh-line);
    box-shadow: 0 28px 60px -24px rgba(51, 42, 80, 0.45);
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.hh-nav__menu.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.hh-nav__menuitem {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    color: var(--hh-ink);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.hh-nav__menuitem:hover {
    background: rgba(80, 67, 172, 0.08);
}

.hh-nav__menuitem.is-selected {
    background: rgba(80, 67, 172, 0.1);
    color: var(--hh-primary);
}

.dark .hh-nav__menuitem:hover,
.dark .hh-nav__menuitem.is-selected {
    background: rgba(158, 160, 251, 0.14);
}

.dark .hh-nav__menuitem.is-selected {
    color: #c9c4ff;
}

.hh-nav__menuitem svg {
    margin-left: auto;
}

.hh-nav__cta {
    display: none;
    align-items: center;
    gap: 0.55rem;
    height: 2.35rem;
    padding: 0 0.3rem 0 1rem;
    border-radius: 999px;
    background: var(--hh-ink);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 160ms ease, background 160ms ease;
}

.hh-nav__cta:hover {
    transform: translateY(-1px);
    background: var(--hh-ink-2);
}

.hh-nav__cta-arrow {
    display: grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: var(--hh-primary);
    color: #fff;
}

.dark .hh-nav__cta {
    background: #f5f0fe;
    color: #0d1015;
}

.dark .hh-nav__cta:hover {
    background: #fff;
}

@media (min-width: 640px) {
    .hh-nav__cta {
        display: inline-flex;
    }
}

@media (min-width: 768px) {
    .hh-nav__pulse {
        display: block;
    }
}

@media (min-width: 960px) {
    .hh-nav__links {
        display: flex;
    }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hh-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: calc(6.25rem + env(safe-area-inset-top, 0px)) 1rem 0;
    color: var(--hh-ink);
    background:
        radial-gradient(60% 40% at 50% 0%, rgba(255, 255, 255, 0.85), transparent 70%),
        linear-gradient(180deg, #faf7ff 0%, var(--hh-bg) 40%, #e7dffb 100%);
}

.dark .hh-hero {
    background:
        radial-gradient(70% 50% at 50% 0%, rgba(80, 67, 172, 0.38), transparent 65%),
        linear-gradient(180deg, #0d1015 0%, #14112a 100%);
}

.hh-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.hh-hero__cloud {
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    filter: blur(22px);
}

.hh-hero__cloud--a {
    left: -4rem;
    top: 24%;
    width: 22rem;
    height: 6rem;
}

.hh-hero__cloud--b {
    right: -3rem;
    top: 16%;
    width: 16rem;
    height: 4.5rem;
}

.hh-hero__cloud--c {
    left: 58%;
    top: 7%;
    width: 12rem;
    height: 3.5rem;
    opacity: 0.7;
}

.dark .hh-hero__cloud {
    background: rgba(255, 255, 255, 0.05);
}

.hh-hero__cube {
    display: none;
}

.hh-hero__art {
    display: none;
    position: absolute;
    z-index: 1;
    width: min(17rem, 30vw);
    height: auto;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 18px 28px rgba(80, 67, 172, 0.18));
    animation: hh-art-float 7.5s ease-in-out infinite;
}

.hh-hero__art--shop {
    left: max(-1rem, 1%);
    bottom: 14%;
}

.hh-hero__art--pay {
    right: max(-0.5rem, 1%);
    bottom: 22%;
    width: min(14.5rem, 26vw);
    animation-delay: -2.8s;
}

.dark .hh-hero__art {
    opacity: 0.82;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.4)) saturate(0.92);
}

.hh-hero__inner {
    display: grid;
    justify-items: center;
    gap: clamp(1.5rem, 3.5vw, 2.5rem);
    width: min(72rem, 100%);
    margin: 0 auto;
    text-align: center;
}

.hh-hero__inner--connected {
    width: min(78rem, 100%);
}

.hh-hero__inner--reel {
    width: min(48rem, 100%);
}

.hh-hero__copy {
    display: grid;
    justify-items: center;
    gap: 1rem;
    max-width: 46rem;
}

.hh-hero h1 {
    margin: 0;
    max-width: 18em;
    color: var(--hh-ink);
    font-size: clamp(2.05rem, 5vw, 3.9rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    text-wrap: pretty;
}

.hh-hero h1.khmer-title {
    max-width: 100%;
    letter-spacing: 0;
    line-height: 1.4;
    font-size: clamp(1.45rem, 3.5vw, 2.45rem);
    text-wrap: unset;
}

.hh-hero__lead {
    margin: 0;
    max-width: 42rem;
    color: var(--hh-muted);
    font-size: clamp(1rem, 1.3vw, 1.18rem);
    font-weight: 500;
    line-height: 1.5;
    text-wrap: pretty;
}

.khmer-text .hh-hero__lead {
    max-width: 100%;
    line-height: 1.7 !important;
    text-wrap: unset;
}

.hh-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.hh-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    width: min(36rem, 100%);
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}

.hh-steps__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 0.55rem 0.95rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 16px 32px -24px rgba(51, 42, 80, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
}

.hh-steps__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.55rem;
    left: calc(50% + 1.2rem);
    width: calc(100% - 1.1rem);
    height: 2px;
    background: linear-gradient(90deg, rgba(80, 67, 172, 0.45), rgba(213, 180, 252, 0.15));
    pointer-events: none;
}

.hh-steps__num {
    display: grid;
    place-items: center;
    width: 2.05rem;
    height: 2.05rem;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(180deg, #6e61e4, #5043ac);
    font-size: 0.88rem;
    font-weight: 800;
    box-shadow:
        0 10px 18px -8px rgba(80, 67, 172, 0.85),
        0 0 0 4px rgba(158, 160, 251, 0.28);
}

.hh-steps__glyph {
    display: grid;
    place-items: center;
    color: var(--hh-primary);
}

.hh-steps__glyph svg {
    width: 1.05rem;
    height: 1.05rem;
}

.hh-steps__text {
    color: var(--hh-ink);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-wrap: pretty;
}

.dark .hh-steps__item {
    background: rgba(23, 20, 41, 0.72);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 32px -24px rgba(0, 0, 0, 0.7);
}

.dark .hh-steps__text {
    color: #efeafc;
}

.khmer-text .hh-steps__text {
    font-size: 0.74rem;
    line-height: 1.45;
    text-wrap: unset;
}

/* App-store style dark buttons */
.hh-storebtn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.25rem;
    padding: 0.5rem 1.15rem 0.5rem 0.75rem;
    border-radius: 0.95rem;
    background: var(--hh-ink);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 18px 36px -18px rgba(13, 16, 21, 0.65);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hh-storebtn:hover {
    transform: translateY(-2px);
    background: #1c1a2e;
    box-shadow: 0 22px 40px -18px rgba(13, 16, 21, 0.6);
}

.hh-storebtn:active {
    transform: translateY(0) scale(0.98);
}

.hh-storebtn:focus-visible,
.hh-nav__iconbtn:focus-visible,
.hh-nav__cta:focus-visible,
.hh-nav__links a:focus-visible {
    outline: 3px solid var(--hh-peri);
    outline-offset: 3px;
}

.hh-storebtn__icon {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.hh-storebtn__icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.hh-storebtn__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    text-align: left;
}

.hh-storebtn__text small {
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
}

.hh-storebtn__text strong {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.khmer-text .hh-storebtn__text small {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.72rem;
}

.hh-storebtn--alt {
    background: var(--hh-primary);
    box-shadow: 0 18px 36px -18px rgba(80, 67, 172, 0.75);
}

.hh-storebtn--alt:hover {
    background: var(--hh-primary-2);
}

.dark .hh-storebtn {
    background: #f5f0fe;
    color: #0d1015;
    box-shadow: 0 18px 36px -18px rgba(245, 240, 254, 0.35);
}

.dark .hh-storebtn:hover {
    background: #fff;
}

.dark .hh-storebtn__icon {
    background: rgba(13, 16, 21, 0.08);
}

.dark .hh-storebtn--alt {
    background: var(--hh-primary-2);
    color: #fff;
}

.dark .hh-storebtn--alt .hh-storebtn__icon {
    background: rgba(255, 255, 255, 0.14);
}

/* Stage: skyline + phone + floating UI cards */
.hh-hero__stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: min(66rem, 100%);
    padding-top: 0.5rem;
    overflow: hidden;
}

.hh-hero__stage--connected {
    align-items: stretch;
    overflow: visible;
    width: min(78rem, 100%);
}

.hh-hero__skyline {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 0;
    width: max(100%, 64rem);
    height: clamp(8rem, 22vw, 14.5rem);
    transform: translateX(-50%);
    pointer-events: none;
}

.hh-sky--back rect {
    fill: #e6ddfb;
}

.hh-sky--mid rect {
    fill: #d2c4f6;
}

.hh-sky--front rect {
    fill: #bda8ef;
}

.hh-sky--tree circle {
    fill: #a3dcc6;
}

.hh-sky--ground {
    fill: #ad98e7;
}

.dark .hh-sky--back rect {
    fill: #1a1733;
}

.dark .hh-sky--mid rect {
    fill: #241e46;
}

.dark .hh-sky--front rect {
    fill: #302758;
}

.dark .hh-sky--tree circle {
    fill: #1f6b55;
}

.dark .hh-sky--ground {
    fill: #3b306f;
}

/* The frame PNG is square (5000×5000) with the device centred at ~40% of the width and
   ~86% of the height. The shell therefore has to be much wider than the visible phone;
   the transparent margins are clipped by the stage. A negative bottom margin lets the
   product strip below “cut” the lower part of the device (Zenith-style). */
.hh-hero__stage {
    --hh-shell: clamp(28rem, 82vw, 58rem);
}

.hh-hero__phone {
    position: relative;
    z-index: 2;
    flex: none;
    width: var(--hh-shell);
    margin-top: calc(var(--hh-shell) * -0.06);
    margin-bottom: calc(var(--hh-shell) * -0.42);
}

.hh-hero__phone .phone-mockup--compact .phone-mockup__shell {
    width: 100%;
    filter: drop-shadow(0 34px 54px rgba(51, 42, 80, 0.36))
        drop-shadow(0 8px 16px rgba(51, 42, 80, 0.16));
}

.dark .hh-hero__phone .phone-mockup--compact .phone-mockup__shell {
    filter: drop-shadow(0 34px 60px rgba(158, 160, 251, 0.28))
        drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
}

.hh-hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ece6fb;
}

.hh-hero__card {
    position: absolute;
    z-index: 3;
    display: none;
    align-items: center;
    gap: 0.7rem;
    min-width: 13.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 24px 54px -22px rgba(51, 42, 80, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: left;
    animation: hh-float 6.5s ease-in-out infinite;
}

.dark .hh-hero__card {
    background: rgba(23, 20, 41, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 54px -22px rgba(0, 0, 0, 0.8);
}

.hh-hero__card--left {
    left: clamp(0rem, 7%, 6rem);
    top: 24%;
}

.hh-hero__card--right {
    right: clamp(0rem, 7%, 6rem);
    top: 12%;
    animation-delay: -2.2s;
}

.hh-hero__card--bottom {
    right: clamp(0rem, 12%, 9rem);
    bottom: 20%;
    min-width: 12.5rem;
    animation-delay: -4.3s;
}

.hh-hero__card-avatar img {
    display: block;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    object-fit: cover;
}

.hh-hero__card-icon {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.8rem;
    color: #fff;
    flex-shrink: 0;
}

.hh-hero__card-icon svg {
    width: 1.2rem;
    height: 1.2rem;
}

.hh-hero__card-icon--rose {
    background: linear-gradient(135deg, #f08aa0, var(--hh-rose));
}

.hh-hero__card-icon--violet {
    background: linear-gradient(135deg, var(--hh-peri), var(--hh-primary));
}

.hh-hero__card-body {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    line-height: 1.2;
}

.hh-hero__card-body strong {
    color: var(--hh-ink);
    font-size: 0.86rem;
    font-weight: 700;
}

.hh-hero__card-body small {
    color: var(--hh-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.hh-hero__card-chip {
    margin-left: auto;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}

.hh-hero__card-chip--violet {
    background: rgba(80, 67, 172, 0.1);
    color: var(--hh-primary);
}

.dark .hh-hero__card-chip--violet {
    background: rgba(158, 160, 251, 0.16);
    color: #c9c4ff;
}

.hh-hero__card-chip--green {
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    background: #d7f7e9;
    color: #0f8a5f;
}

.hh-hero__card-dot {
    width: 0.6rem;
    height: 0.6rem;
    margin-left: auto;
    border-radius: 50%;
    background: var(--hh-rose);
    box-shadow: 0 0 0 4px rgba(195, 87, 106, 0.18);
}

/* Product strip (“trusted by” row) */
.hh-platforms {
    position: relative;
    z-index: 4;
    margin: 0 -1rem;
    padding: 2rem 1rem 2.25rem;
    border-radius: 2rem 2rem 0 0;
    background: var(--hh-surface);
    box-shadow: 0 -24px 48px -36px rgba(51, 42, 80, 0.5);
    text-align: center;
}

.hh-platforms__label {
    margin: 0 0 1.1rem;
    color: var(--hh-ink-2);
    font-size: 0.95rem;
    font-weight: 700;
}

.hh-platforms__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hh-platforms__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.9rem 0.42rem 0.45rem;
    border-radius: 999px;
    color: var(--hh-ink-2);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(80, 67, 172, 0.1);
    box-shadow: 0 10px 22px -18px rgba(51, 42, 80, 0.45);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.hh-platforms__item:hover {
    color: var(--hh-primary);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -18px rgba(80, 67, 172, 0.45);
}

.hh-platforms__index {
    display: grid;
    place-items: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(180deg, #6e61e4, #5043ac);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hh-platforms__icon {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.55rem;
    background: rgba(51, 42, 80, 0.08);
}

.hh-platforms__icon svg {
    width: 1rem;
    height: 1rem;
}

.dark .hh-platforms {
    background: #0d1015;
    box-shadow: none;
}

.dark .hh-platforms__item {
    color: #d8d3ee;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .hh-platforms__item:hover {
    color: #c9c4ff;
    background: rgba(158, 160, 251, 0.12);
}

.dark .hh-platforms__icon {
    background: rgba(255, 255, 255, 0.08);
}

/* Entrance */
.hh-hero [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    animation: hh-rise 720ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
    animation-delay: calc(90ms + var(--i, 0) * 110ms);
}

@keyframes hh-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hh-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes hh-art-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes hh-float-rot {
    0%,
    100% {
        transform: translateY(0) rotate(14deg);
    }
    50% {
        transform: translateY(-10px) rotate(20deg);
    }
}

@media (min-width: 768px) {
    .hh-hero__art {
        display: block;
    }
}

@media (min-width: 960px) {
    .hh-hero__card {
        display: flex;
    }
}

@media (max-width: 639px) {
    .hh-hero {
        padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
    }

    .hh-hero__stage {
        --hh-shell: min(135vw, 30rem);
    }

    .hh-hero__ctas {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .hh-storebtn {
        justify-content: flex-start;
    }

    .hh-steps {
        gap: 0.45rem;
    }

    .hh-steps__item {
        padding: 0.75rem 0.35rem 0.8rem;
    }

    .hh-steps__item:not(:last-child)::after {
        display: none;
    }

    .hh-steps__text {
        font-size: 0.72rem;
    }

    .hh-platforms {
        padding: 1.5rem 0.75rem 1.75rem;
    }

    .hh-platforms__item {
        padding: 0.38rem 0.7rem 0.38rem 0.38rem;
        font-size: 0.84rem;
    }
}

/* --------------------------------------------------------------------------
   Platform tour (existing pinned-phone story) — recoloured
   -------------------------------------------------------------------------- */
.crystal-story {
    --story-bg: #f5f0fe;
    --story-bg-mid: #f7f3ff;
    --story-bg-end: #ffffff;
    --story-ink: var(--hh-ink);
    --story-muted: #5f5a7a;
    --story-line: rgba(51, 42, 80, 0.12);
    --story-chip: rgba(80, 67, 172, 0.07);
    background:
        radial-gradient(60% 40% at 90% 20%, rgba(213, 180, 252, 0.28), transparent 60%),
        radial-gradient(50% 40% at 8% 60%, rgba(158, 160, 251, 0.2), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f5f0fe 18%, #f2ecfd 75%, #ffffff 100%);
}

.crystal-story--night {
    --story-bg: #0d1015;
    --story-bg-mid: #14112a;
    --story-bg-end: #000000;
    --story-muted: var(--hh-muted);
    --story-line: rgba(255, 255, 255, 0.12);
    --story-chip: rgba(255, 255, 255, 0.07);
    --story-screen: #0b0f17;
    background:
        radial-gradient(60% 40% at 90% 20%, rgba(80, 67, 172, 0.3), transparent 60%),
        linear-gradient(180deg, #0d1015 0%, #14112a 50%, #000000 100%);
}

.story-intro {
    display: grid;
    justify-items: center;
    gap: 0.9rem;
    width: min(64rem, 100%);
    margin: 0 auto;
    padding: clamp(3rem, 7vh, 5rem) clamp(1rem, 6vw, 6rem) 0;
    text-align: center;
}

.crystal-story .story-intro h2 {
    margin: 0;
    max-width: 22em;
    color: var(--story-ink);
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.12;
    text-wrap: pretty;
}

.crystal-story--khmer .story-intro h2 {
    max-width: 100%;
    letter-spacing: 0;
    line-height: 1.4;
    font-size: clamp(1.45rem, 3.2vw, 2.35rem);
    text-wrap: unset;
}

.story-intro__desc {
    margin: 0;
    max-width: 46rem;
    color: var(--story-muted);
    font-size: clamp(0.98rem, 1.2vw, 1.1rem);
    line-height: 1.55;
    text-wrap: pretty;
}

.crystal-story--khmer .story-intro__desc {
    max-width: 100%;
    line-height: 1.7 !important;
}

.story-intro__cue {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.4rem 0 0;
    color: var(--story-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.story-intro__cue span {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border: 1px solid var(--story-line);
    border-radius: 50%;
    animation: story-bob 1.8s ease-in-out infinite;
}

.crystal-story .story-copy__step {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.7rem 0.22rem 0.22rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--story-line);
    box-shadow: 0 10px 22px -16px rgba(51, 42, 80, 0.4);
}

.crystal-story .story-copy__step span {
    color: #fff;
    box-shadow:
        0 10px 18px -8px var(--accent),
        0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.crystal-story .story-copy__tags li {
    background: rgba(255, 255, 255, 0.78);
    border-color: color-mix(in srgb, var(--accent) 28%, var(--story-line));
    box-shadow: 0 8px 16px -14px var(--accent);
}

.crystal-story--night .story-copy__step,
.dark .crystal-story .story-copy__step {
    background: rgba(23, 20, 41, 0.72);
    border-color: rgba(255, 255, 255, 0.12);
}

.crystal-story--night .story-copy__tags li,
.dark .crystal-story .story-copy__tags li {
    background: rgba(255, 255, 255, 0.06);
}

.crystal-story .cinematic-actions a {
    color: #fff;
    background: var(--hh-ink);
    border-color: transparent;
    box-shadow: 0 16px 32px -16px rgba(13, 16, 21, 0.55);
}

.crystal-story .cinematic-actions a:hover {
    box-shadow: 0 20px 36px -16px rgba(13, 16, 21, 0.5);
}

.crystal-story .cinematic-actions .cinematic-action--ghost {
    color: var(--story-ink);
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--story-line);
    box-shadow: none;
}

.crystal-story--night .cinematic-actions a {
    color: #0d1015;
    background: #f5f0fe;
}

.crystal-story--night .cinematic-actions .cinematic-action--ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.story-stage__phone::before {
    opacity: 0.8;
}

/* The frame PNG is square with the device in the middle ~40% — size the shell so the
   visible phone is a proper hero object, and let clicks pass through its transparent margins. */
.story-stage {
    min-width: 0; /* don't let the (mostly transparent) shell widen the grid column */
}

.story-stage .phone-mockup--compact,
.story-stage .phone-mockup--compact .phone-mockup__shell {
    max-width: none;
}

.story-stage .phone-mockup--compact .phone-mockup__shell {
    flex: none; /* the shell is a flex item — don't let it shrink to the column */
    width: min(40rem, 100svh - 7rem, 200%);
}

.story-stage .phone-mockup--compact.phone-mockup--fullbleed-vertical {
    --phone-screen-slot-top: 7.35%;
    --phone-screen-slot-h: 84.2%;
}

.story-stage__phone {
    pointer-events: none;
}

.story-stage__phone .story-screen__play {
    pointer-events: auto;
}

@media (max-width: 767px) {
    .story-stage .phone-mockup--compact .phone-mockup__shell {
        width: min(18.5rem, 110vw, 46svh);
    }
}

@media (max-width: 767px) {
    .story-intro {
        padding-top: 2.5rem;
    }

    .story-intro__cue {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Features (“Benefits”) — soft cards with gradient icon tiles
   -------------------------------------------------------------------------- */
.landing-features-section {
    background: var(--hh-surface) !important;
}

.features-cards-panel,
.dark .features-cards-panel,
html.dark .features-cards-panel {
    padding: 0.5rem 0 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}

.landing-features-intro--in-panel {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.hh-section-art {
    display: block;
    width: min(11.5rem, 46vw);
    height: auto;
    margin: 0 auto 0.15rem;
    pointer-events: none;
    user-select: none;
}

.hh-section-art--tour {
    width: min(9.5rem, 40vw);
}

.hh-section-art--pricing {
    width: min(12rem, 48vw);
    margin-bottom: 0.4rem;
}

.dark .hh-section-art {
    opacity: 0.88;
    filter: saturate(0.92);
}

.crystal-story .story-copy {
    position: relative;
}

.crystal-story .story-copy__art {
    position: absolute;
    right: 0;
    top: 0.4rem;
    width: min(10.5rem, 40%);
    height: auto;
    opacity: 0.14 !important;
    transform: none !important;
    pointer-events: none;
    z-index: 0;
}

.crystal-story .story-chapter[data-active='true'] .story-copy__art {
    opacity: 0.3 !important;
}

@media (max-width: 719px) {
    .crystal-story .story-copy__art {
        display: none;
    }
}

.landing-features-intro__title {
    margin: 0 !important;
    color: var(--hh-ink) !important;
    font-size: clamp(1.7rem, 3.4vw, 2.6rem) !important;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    white-space: normal !important;
    text-wrap: pretty;
}

.khmer-text .landing-features-intro__title {
    letter-spacing: 0;
    line-height: 1.4;
    font-size: clamp(1.35rem, 3vw, 2.1rem) !important;
    text-wrap: unset;
}

.landing-features-intro__desc {
    margin: 0 !important;
    max-width: 40rem;
    color: var(--hh-muted) !important;
    font-size: 1rem !important;
    line-height: 1.55;
    text-wrap: pretty;
}

.features-grid-cards {
    gap: 1rem !important;
}

@media (min-width: 1024px) {
    .features-grid-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.1rem !important;
    }
}

.landing-features-section .feature-card,
.dark .landing-features-section .feature-card,
html.dark .landing-features-section .feature-card {
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.35rem 1.25rem 1.45rem;
    border-radius: 1.4rem;
    background: var(--hh-surface-2);
    border: 1px solid var(--hh-line);
    box-shadow: 0 14px 36px -26px rgba(51, 42, 80, 0.45);
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.landing-features-section .feature-card:hover,
.dark .landing-features-section .feature-card:hover,
html.dark .landing-features-section .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 48px -26px rgba(51, 42, 80, 0.5);
}

.feature-card[data-tone='violet'] {
    --tone-a: #9ea0fb;
    --tone-b: #5043ac;
}

.feature-card[data-tone='rose'] {
    --tone-a: #f2a1b5;
    --tone-b: #c3576a;
}

.feature-card[data-tone='amber'] {
    --tone-a: #ffd08a;
    --tone-b: #f08c3a;
}

.feature-card[data-tone='mint'] {
    --tone-a: #a7f0d8;
    --tone-b: #1f9d7a;
}

.landing-features-section .feature-card__icon-wrap,
.dark .landing-features-section .feature-card__icon-wrap,
html.dark .landing-features-section .feature-card__icon-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    border: 0;
    background: linear-gradient(135deg, var(--tone-a, #9ea0fb), var(--tone-b, #5043ac));
    box-shadow: 0 12px 24px -12px var(--tone-b, #5043ac);
}

.landing-features-section .feature-card__icon {
    width: 1.35rem;
    height: 1.35rem;
    color: #fff;
}

.landing-features-section .feature-card__title {
    color: var(--hh-ink) !important;
    font-size: 1.05rem;
    letter-spacing: -0.015em;
}

.landing-features-section .feature-card__text {
    color: var(--hh-muted) !important;
    font-size: 0.93rem;
    line-height: 1.55;
}

/* Tutorials (phone previews) */
.features-tutorials-intro {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    width: 100%;
    margin: 1.25rem auto 1.5rem;
    text-align: center;
}

.features-tutorials-intro__title {
    margin: 0;
    color: var(--hh-ink);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-wrap: pretty;
}

.khmer-text .features-tutorials-intro__title {
    letter-spacing: 0;
    line-height: 1.4;
    font-size: clamp(1.3rem, 2.8vw, 1.9rem);
    text-wrap: unset;
}

.features-tutorials-intro__desc {
    margin: 0;
    max-width: 42rem;
    color: var(--hh-muted);
    font-size: 0.98rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.features-phone-title,
.dark .features-phone-title,
html.dark .features-phone-title {
    color: var(--hh-ink-2);
    font-size: 0.9rem;
}

.dark .features-phone-sidebar {
    background: transparent !important;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.hh-landing-footer {
    margin-top: 1rem;
    border-radius: 2rem 2rem 0 0;
    background: #0d1015 !important;
}

.hh-landing-footer span.text-gray-700 {
    color: #a9a3c4;
}

.hh-landing-footer a:hover {
    color: var(--hh-lilac) !important;
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .hh-hero [data-reveal] {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .hh-hero__card,
    .hh-hero__art,
    .story-intro__cue span {
        animation: none;
    }
}

/* --------------------------------------------------------------------------
   Khmer: Khmer OS Siemreap (body / UI) + Khmer OS Muol Light (titles)
   Loaded last so these beat Metal / Battambang / Noto stacks in earlier CSS.
   -------------------------------------------------------------------------- */
html.hh-landing body.khmer-text {
    font-family: var(--hh-font-khmer);
    font-feature-settings: 'liga' 1, 'kern' 1;
}

html.hh-landing .khmer-text,
html.hh-landing .khmer-text *,
html.hh-landing .khmer-subtitle,
html.hh-landing .crystal-story--khmer,
html.hh-landing .crystal-story--khmer *,
html.hh-landing #pricing.hh-pricing-khmer,
html.hh-landing #pricing.hh-pricing-khmer * {
    font-family: var(--hh-font-khmer) !important;
}

html.hh-landing .khmer-text h1,
html.hh-landing .khmer-text h2,
html.hh-landing .khmer-text h3,
html.hh-landing .khmer-text h4,
html.hh-landing .khmer-text h5,
html.hh-landing .khmer-text h6,
html.hh-landing .khmer-title,
html.hh-landing .crystal-story--khmer h1,
html.hh-landing .crystal-story--khmer h2,
html.hh-landing .crystal-story--khmer h3,
html.hh-landing #pricing.hh-pricing-khmer h1,
html.hh-landing #pricing.hh-pricing-khmer h2,
html.hh-landing #pricing.hh-pricing-khmer h3,
html.hh-landing #pricing.hh-pricing-khmer h4,
html.hh-landing #pricing.hh-pricing-khmer h5,
html.hh-landing #pricing.hh-pricing-khmer h6 {
    font-family: var(--hh-font-khmer-display) !important;
    font-weight: 400 !important;
    letter-spacing: 0;
}

html.hh-landing .khmer-text,
html.hh-landing .crystal-story--khmer {
    word-break: keep-all;
    line-break: auto;
}

html.hh-landing .khmer-text p,
html.hh-landing .khmer-text .story-copy__body,
html.hh-landing .khmer-text .feature-card__text,
html.hh-landing .crystal-story--khmer .story-copy__body {
    line-height: 1.7 !important;
    text-align: justify;
    text-justify: inter-word;
    text-wrap: unset;
}

html.hh-landing .hh-hero__lead,
html.hh-landing .story-intro__desc,
html.hh-landing .landing-features-intro__desc,
html.hh-landing .features-tutorials-intro__desc,
html.hh-landing .khmer-text .hh-hero__lead,
html.hh-landing .khmer-text .story-intro__desc,
html.hh-landing .khmer-text .landing-features-intro__desc,
html.hh-landing .khmer-text .features-tutorials-intro__desc {
    text-align: center;
}

html.hh-landing .crystal-story--khmer .story-copy h2 {
    max-width: none;
    font-size: clamp(1.5rem, 3vw, 2.35rem);
    line-height: 1.4;
    text-wrap: unset;
}

html.hh-landing .khmer-text .feature-card h3 {
    line-height: 1.4;
    text-wrap: unset;
}

html.hh-landing .story-copy__body,
html.hh-landing .feature-card__text {
    text-align: justify;
    text-justify: inter-word;
    hyphens: none;
    text-wrap: pretty;
}
