/* HYABELL cinematic family page — every selector scoped under .hy-page. */

.hy-page {
    --hy-ink: #0b0d1f;
    --hy-ink-soft: #12152c;
    --hy-paper: #f6f2ee;
    --hy-white: #ffffff;
    --hy-accent: #7dd3fc;
    --hy-accent-bright: #bde6ff;
    --hy-accent-deep: #2f9fd8;
    --hy-line-dark: rgba(255, 255, 255, 0.14);
    --hy-line-light: rgba(11, 13, 31, 0.14);
    --hy-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --hy-mouse-x: 50%;
    --hy-mouse-y: 50%;

    position: relative;
    background: var(--hy-ink);
    color: var(--hy-white);
    font-family: "Manrope", "IBM Plex Sans Thai", sans-serif;
    overflow-x: clip;
    isolation: isolate;
}

.hy-page * { box-sizing: border-box; }
.hy-page img { display: block; max-width: 100%; height: auto; }
.hy-page button, .hy-page a { font: inherit; color: inherit; }
.hy-page a { text-decoration: none; }
.hy-page :focus-visible { outline: 2px solid var(--hy-accent-bright); outline-offset: 4px; }

/* ── Ambient chrome ─────────────────────────────────────────────────────── */

.hy-particles {
    position: fixed;
    inset: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.55;
}

.hy-cursor-light {
    position: fixed;
    z-index: 2;
    width: 520px;
    height: 520px;
    left: var(--hy-mouse-x);
    top: var(--hy-mouse-y);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(125, 211, 252, 0.14), transparent 67%);
    mix-blend-mode: screen;
}

.hy-chapter {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 1.75rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
}

.hy-chapter span { color: var(--hy-accent); }

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

.hy-hero {
    position: relative;
    isolation: isolate;
    overflow: clip;
    min-height: 108svh;
    background: var(--hy-ink);
}

.hy-hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.hy-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(11, 13, 31, 0.82) 0%, rgba(11, 13, 31, 0.5) 34%, rgba(11, 13, 31, 0.08) 60%, transparent 76%),
        linear-gradient(0deg, rgba(11, 13, 31, 0.55) 0%, transparent 26%);
    pointer-events: none;
}

.hy-hero-inner {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height, 84px) + 6vh) 4.5vw 10vh;
    min-height: 108svh;
}

.hy-hero-copy { max-width: 660px; }

.hy-kicker {
    display: inline-block;
    margin: 0 0 1.6rem;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    transition: opacity 900ms ease, transform 900ms var(--hy-ease);
}

html:not(.no-js) .hy-kicker { opacity: 0; transform: translateY(14px); }

.hy-title {
    margin: 0 0 1.6rem;
    font-family: "Kanit", "IBM Plex Sans Thai", sans-serif;
    font-weight: 300;
    font-size: clamp(3.2rem, 6.6vw, 6rem);
    line-height: 0.96;
    color: var(--hy-white);
}

.hy-title .hy-title-accent { color: var(--hy-accent-bright); }

.hy-lead {
    max-width: 520px;
    margin: 0 0 2.4rem;
    font-family: "IBM Plex Sans Thai", sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    transition: opacity 900ms ease 120ms, transform 900ms var(--hy-ease) 120ms;
}

html:not(.no-js) .hy-lead { opacity: 0; transform: translateY(20px); }

.hy-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    transition: opacity 900ms ease 220ms, transform 900ms var(--hy-ease) 220ms;
}

html:not(.no-js) .hy-hero-actions { opacity: 0; transform: translateY(20px); }

/* html:not(.no-js) .hy-kicker hides at (0,2,1); the old reveal selector was
   (0,2,0) and silently lost, so the hero copy and both CTA buttons never
   appeared. Adding html:not(.no-js) makes this (0,3,1) and it wins.
   Gated on .hy-hero-copy-in, which JS adds after the hero video finishes
   its first pass. */
html:not(.no-js) .hy-hero-copy-in .hy-kicker,
html:not(.no-js) .hy-hero-copy-in .hy-lead,
html:not(.no-js) .hy-hero-copy-in .hy-hero-actions { opacity: 1; transform: translateY(0); }

.hy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 280ms var(--hy-ease), background 280ms ease, color 280ms ease, border-color 280ms ease;
}

.hy-btn--solid {
    background: linear-gradient(135deg, var(--hy-accent-bright), var(--hy-accent-deep));
    color: #0b0d1f;
}

.hy-btn--solid:hover { transform: translateY(-2px); }

.hy-btn--glass {
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.04);
    color: var(--hy-white);
}

.hy-btn--glass:hover { border-color: var(--hy-accent-bright); color: var(--hy-accent-bright); }

.hy-hero-hint {
    position: absolute;
    left: 50%;
    bottom: 4vh;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.55);
}

/* ── Family intro chapter (transition beat) ───────────────────────────── */

.hy-intro {
    padding: 16vh 6vw;
    text-align: center;
    background: var(--hy-ink-soft);
}

.hy-intro-inner { max-width: 900px; margin: 0 auto; }

.hy-intro .hy-chapter { justify-content: center; }

.hy-intro h2 {
    margin: 0 0 2vh;
    font-family: "Kanit", "IBM Plex Sans Thai", sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    line-height: 1.3;
    color: var(--hy-white);
}

.hy-intro p.hy-intro-lead {
    margin: 0 auto;
    max-width: 640px;
    font-family: "IBM Plex Sans Thai", sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.62);
}

.hy-intro-swatches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 6vh;
}

.hy-swatch {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
}

.hy-swatch i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--hy-swatch-color, var(--hy-accent));
    box-shadow: 0 0 10px 1px var(--hy-swatch-color, var(--hy-accent));
}

/* ── Family comparison table ───────────────────────────────────────────── */

.hy-compare-table-wrap {
    margin-top: 6vh;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    /* momentum scrolling + no vertical rubber-banding while swiping the table */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.hy-compare-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-family: "IBM Plex Sans Thai", sans-serif;
    font-size: 0.9rem;
}

.hy-compare-table th,
.hy-compare-table td {
    padding: 1rem 1.3rem;
    text-align: left;
    white-space: nowrap;
}

.hy-compare-table thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hy-compare-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hy-compare-table tbody tr:last-child { border-bottom: 0; }

.hy-compare-table td {
    color: rgba(255, 255, 255, 0.82);
}

.hy-compare-table td:last-child {
    color: rgba(255, 255, 255, 0.55);
    white-space: normal;
}

.hy-compare-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: var(--hy-v-accent);
    box-shadow: 0 0 10px 1px var(--hy-v-accent);
}

/* ── Variant sections ──────────────────────────────────────────────────── */

.hy-variant {
    --hy-v-accent: #7dd3fc;
    position: relative;
    padding: 12vh 6vw;
    background: var(--hy-ink);
    border-top: 1px solid var(--hy-line-dark);
    transition: opacity 900ms ease, transform 900ms var(--hy-ease);
    overflow: clip;
}

.hy-variant::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at var(--hy-glow-x, 20%) 30%, color-mix(in srgb, var(--hy-v-accent) 26%, transparent), transparent 55%),
        color-mix(in srgb, var(--hy-ink) 60%, transparent);
    pointer-events: none;
}

.hy-variant--right .hy-variant-inner { flex-direction: row-reverse; }
.hy-variant--right { --hy-glow-x: 80%; }

.hy-variant-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6vw;
    max-width: 1320px;
    margin: 0 auto;
}

.hy-variant-visual {
    flex: 0 0 auto;
    width: min(38vw, 460px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.hy-variant-gelphoto {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center center;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--hy-v-accent) 24%, rgba(255, 255, 255, 0.08));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.hy-variant-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    transition: transform 320ms ease-out;
    will-change: transform;
}

.hy-variant-panel {
    position: absolute;
    inset: 4%;
    border-radius: 28px;
    background:
        linear-gradient(165deg, color-mix(in srgb, var(--hy-v-accent) 14%, transparent), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid color-mix(in srgb, var(--hy-v-accent) 28%, rgba(255, 255, 255, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.hy-variant-glow {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 68%;
    height: 68%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, color-mix(in srgb, var(--hy-v-accent) 55%, transparent), transparent 70%);
    filter: blur(28px);
    opacity: 0.55;
    pointer-events: none;
}

.hy-variant-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14%;
    filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.45));
    transition: transform 420ms var(--hy-ease);
}

.hy-variant-stage:hover .hy-variant-img { transform: translateY(-6px) scale(1.02); }

.hy-variant-floor {
    position: absolute;
    left: 50%;
    bottom: 9%;
    width: 54%;
    height: 10%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45), transparent 72%);
    filter: blur(4px);
    pointer-events: none;
}

.hy-variant-content { flex: 1 1 auto; min-width: 0; }

.hy-variant-no {
    display: inline-block;
    margin-bottom: 1rem;
    font-family: "Kanit", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--hy-v-accent);
}

.hy-variant-name {
    margin: 0 0 0.6rem;
    font-family: "Kanit", "IBM Plex Sans Thai", sans-serif;
    font-weight: 500;
    font-size: clamp(2rem, 3.6vw, 3.1rem);
    line-height: 1.05;
    color: var(--hy-white);
}

.hy-variant-name span { color: var(--hy-v-accent); }

.hy-variant-tag {
    margin: 0 0 2rem;
    font-family: "IBM Plex Sans Thai", sans-serif;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.62);
}

.hy-variant-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.9rem;
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
}

.hy-variant-specs li {
    padding: 0.9rem 1.05rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 12, 20, 0.55);
    backdrop-filter: blur(10px);
}

.hy-variant-specs span {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.3rem;
}

.hy-variant-specs strong {
    font-family: "Kanit", sans-serif;
    font-size: 1.05rem;
    color: var(--hy-v-accent);
}

.hy-variant-desc {
    margin: 0 0 1.6rem;
    font-family: "IBM Plex Sans Thai", sans-serif;
    font-size: 0.98rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.68);
}

.hy-variant-areas {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.hy-variant-areas li {
    position: relative;
    padding-left: 1.3rem;
    font-family: "IBM Plex Sans Thai", sans-serif;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
}

.hy-variant-areas li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hy-v-accent);
}

/* ── Trust / safety strip ──────────────────────────────────────────────── */

.hy-trust {
    padding: 1.6vh 0;
    background: var(--hy-ink);
    border-top: 1px solid var(--hy-line-dark);
    border-bottom: 1px solid var(--hy-line-dark);
    overflow: hidden;
}

.hy-trust-track {
    display: flex;
    align-items: center;
    gap: 2.8rem;
    width: max-content;
    animation: hy-trust-scroll 24s linear infinite;
}

.hy-trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.4);
}

.hy-trust-item i { font-size: 0.7rem; color: rgba(125, 211, 252, 0.6); }

@keyframes hy-trust-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ── Gallery ────────────────────────────────────────────────────────────── */

.hy-gallery {
    padding: 14vh 5vw 16vh;
    background: var(--hy-paper);
    color: var(--hy-ink);
}

.hy-gallery-heading { width: min(1200px, 100%); margin: 0 auto 6vh; }
.hy-gallery-heading .hy-chapter { color: rgba(11, 13, 31, 0.5); }
.hy-gallery-heading .hy-chapter span { color: var(--hy-accent-deep); }

.hy-gallery-heading h2 {
    margin: 0;
    font-family: "Kanit", "IBM Plex Sans Thai", sans-serif;
    font-weight: 300;
    font-size: clamp(2.1rem, 3.4vw, 3.2rem);
}

.hy-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    width: min(1200px, 100%);
    margin: 0 auto;
    background: rgba(11, 13, 31, 0.1);
}

.hy-gallery-tile {
    position: relative;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    cursor: zoom-in;
    overflow: hidden;
    background: #efe9e2;
}

.hy-gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 800ms var(--hy-ease);
}

.hy-gallery-tile:hover img { transform: scale(1.05); }

.hy-gallery-tile span {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: 6px 10px;
    background: rgba(11, 13, 31, 0.72);
    color: var(--hy-white);
    font-size: 0.64rem;
    backdrop-filter: blur(8px);
}

.hy-gallery-tile--video { background: var(--hy-ink); }

.hy-gallery-play {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 13, 31, 0.32);
    transition: background 280ms ease;
}

.hy-gallery-play i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(4px);
    color: var(--hy-white);
    font-size: 1.2rem;
    padding-left: 3px;
}

.hy-gallery-tile--video:hover .hy-gallery-play { background: rgba(11, 13, 31, 0.5); }

/* ── Lightbox ───────────────────────────────────────────────────────────── */

.hy-lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    padding: 3rem;
    background: rgba(4, 4, 8, 0.95);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.hy-lightbox.is-open { opacity: 1; visibility: visible; }

.hy-lightbox img {
    grid-column: 2;
    max-width: min(80vw, 1100px);
    max-height: 82vh;
    margin: 0 auto;
    object-fit: contain;
}

.hy-lightbox video {
    grid-column: 2;
    max-width: min(80vw, 1100px);
    max-height: 82vh;
    margin: 0 auto;
    background: #000;
}

.hy-lightbox button {
    justify-self: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    color: var(--hy-white);
    cursor: pointer;
}

.hy-lightbox__close { position: absolute; top: 22px; right: 22px; }

/* ── Reveal-on-scroll (generic) ────────────────────────────────────────── */

.hy-reveal { transition: opacity 800ms ease, transform 800ms var(--hy-ease); }
html:not(.no-js) .hy-reveal { opacity: 0; transform: translateY(30px); }
/* html:not(.no-js) .hy-reveal hides at (0,2,1); this was (0,2,0) and lost,
   so a revealed section stayed at opacity 0 — a full-height blank hole even
   though JS had added .is-visible. html:not(.no-js) makes it (0,3,0). */
html:not(.no-js) .hy-reveal.is-visible { opacity: 1; transform: translateY(0); }

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

@media (max-width: 1180px) {
    .hy-hero-inner { padding-top: calc(var(--header-height, 84px) + 4vh); }
    .hy-variant-inner { gap: 4vw; }
    .hy-variant-visual { width: min(42vw, 380px); }
}

@media (max-width: 900px) {
    .hy-variant-inner, .hy-variant--right .hy-variant-inner {
        flex-direction: column;
        text-align: center;
    }
    .hy-variant-visual { width: min(70vw, 340px); margin: 0 auto; }
    .hy-variant-areas li { text-align: left; }
    .hy-variant-specs { justify-items: center; }
}

@media (max-width: 820px) {
    /* Phones show the hero artwork alone — the kicker, lead and CTAs are
       hidden here, so min-height keeps the section from collapsing to its
       padding. svh (not vh) so the mobile URL bar does not resize it. */
    .hy-hero { min-height: 62svh; }
    .hy-hero-inner { padding: calc(var(--header-height, 66px) + 5vh) 6vw 8vh; min-height: 62svh; }
    .hy-kicker,
    .hy-lead,
    .hy-hero-actions { display: none; }
    .hy-title { font-size: clamp(2.5rem, 10vw, 3.8rem); }
    .hy-intro { padding: 10vh 6vw; }
    .hy-variant { padding: 9vh 6vw; }
    .hy-gallery { padding: 10vh 6vw; }
    .hy-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .hy-lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 1rem; }
}

@media (max-width: 460px) {
    .hy-gallery-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .hy-page *,
    .hy-page *::before,
    .hy-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
