/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Typography & Reset */
:root {
    --bg-1: #0c1020;
    --bg-2: #121737;
    --bg-3: #1b2458;
    --ink: #e9ecff;
    --muted: #b7c0ff;
    --accent: #ff7fb0;
    --accent-2: #ffd36e;
    --glass: rgba(255, 255, 255, 0.08);
    --stroke: rgba(255, 255, 255, 0.15);
    --shadow: 0 10px 30px rgba(12, 16, 32, 0.35);
}

/* Sky theme (brighter, airy) */
.theme-sky {
    --bg-1: #e9f3ff;
    --bg-2: #d9ecff;
    --bg-3: #cfe6ff;
    --ink: #13223a;
    --muted: #3a557a;
    --accent: #3ec7ff;
    --accent-2: #ffd36e;
    --glass: rgba(255, 255, 255, 0.65);
    --stroke: rgba(19, 34, 58, 0.12);
    --shadow: 0 12px 28px rgba(19, 34, 58, 0.18);
}

/* Ghibli Pastel theme (sky, forest, sunlight, sakura) */
.theme-ghibli {
    --bg-1: #f2f7fb;
    /* misty sky */
    --bg-2: #e6f3ff;
    /* higher sky */
    --bg-3: #def0ff;
    /* horizon */
    --ink: #1b2430;
    /* soft charcoal */
    --muted: #5c6f86;
    /* cool slate */
    --accent: #67d5b5;
    /* forest mint */
    --accent-2: #ffd37a;
    /* sunlight */
    --glass: rgba(255, 255, 255, 0.7);
    --stroke: rgba(27, 36, 48, 0.12);
    --shadow: 0 12px 30px rgba(27, 36, 48, 0.16);
}

/* Forest Night theme (deep blue-green, amber accents) */
.theme-forest-night {
    --bg-1: #0b1220;
    --bg-2: #0e1b2a;
    --bg-3: #102335;
    --ink: #eaf3ff;
    --muted: #a7b8d1;
    --accent: #19c2a0;
    --accent-2: #ffbf4d;
    --glass: rgba(255, 255, 255, 0.08);
    --stroke: rgba(255, 255, 255, 0.14);
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* Nature Greens theme (forest day) */
.theme-nature {
    --bg-1: #eef6f0;
    /* misty light */
    --bg-2: #d6efdb;
    /* canopy haze */
    --bg-3: #c6e6ce;
    /* soft meadow */
    --ink: #122017;
    /* deep evergreen text */
    --muted: #4f6d5a;
    /* moss slate */
    --accent: #3fbf7c;
    /* leaf green */
    --accent-2: #ffd36e;
    /* sunlight */
    --glass: rgba(255, 255, 255, 0.65);
    --stroke: rgba(18, 32, 23, 0.12);
    --shadow: 0 12px 28px rgba(18, 32, 23, 0.16);
}

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

html,
body {
    height: 100%;
}

body {
    font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--ink);

    .frame {
        width: 100%;
        margin: 0;
        border-radius: 0;
        overflow: visible;
    }

    background: radial-gradient(1400px 700px at 80% -10%, var(--bg-2) 0%, transparent 60%),
        radial-gradient(1000px 600px at 10% 0%, var(--bg-3) 0%, transparent 60%), var(--bg-1);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
    border-radius: 16px;
}

a {
    color: inherit;
    text-decoration: none;
}

.sr-only {
    position: absolute;
    left: -9999px;
}

.container {
    width: min(1120px, 92%);
    margin-inline: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(11, 15, 26, 0.7), rgba(11, 15, 26, 0.35) 60%, transparent);
    backdrop-filter: saturate(130%) blur(10px);
    border-bottom: 1px solid var(--stroke);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.brand {
    font-family: "Dela Gothic One", cursive;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: clamp(22px, 2.2vw, 28px);
}

.menu {
    display: flex;
    gap: 18px;
}

.menu a {
    position: relative;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--ink);
    transition: color 0.25s ease;
}

.menu a::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.menu a:hover {
    color: #fff;
}

.menu a:hover::after {
    transform: scaleX(1);
}

.menu .cta-link {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #231b2e;
    padding: 8px 14px;
    border-radius: 999px;
}

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
}

.hamburger {
    display: none;
    width: 38px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.06);
    position: relative;
    cursor: pointer;
}

.hamburger span,
.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: 0.25s ease;
}

.hamburger span {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger::before {
    top: 10px;
}

.hamburger::after {
    bottom: 10px;
}

/* Mobile layout */
@media (max-width: 820px) {
    .hamburger {
        display: block;
    }

    .menu {
        position: absolute;
        top: 62px;
        right: 4%;
        left: 4%;
        display: grid;
        gap: 10px;
        padding: 12px;
        background: rgba(11, 15, 26, 0.9);
        border: 1px solid var(--stroke);
        border-radius: 14px;
        transform-origin: top right;
        transform: scale(0.96) translateY(-8px);
        opacity: 0;
        pointer-events: none;
    }

    .menu a {
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 10px;
    }

    .nav {
        position: relative;
    }

    .nav-toggle:checked ~ .menu {
        opacity: 1;
        transform: scale(1) translateY(0);
        pointer-events: auto;
    }

    .nav-toggle:checked ~ .hamburger span {
        opacity: 0;
    }

    .nav-toggle:checked ~ .hamburger::before {
        transform: translateY(9px) rotate(45deg);
    }

    .nav-toggle:checked ~ .hamburger::after {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 84px 0 60px;
    }

    .heroN__stack {
        order: 2;
        margin-top: 18px;
    }

    .heroN__text h1 {
        font-size: clamp(32px, 10vw, 54px);
    }

    #nhan-vat .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .works__grid {
        column-count: 2;
    }
}

@media (max-width: 560px) {
    .menu {
        left: 3%;
        right: 3%;
    }

    #nhan-vat .grid {
        grid-template-columns: 1fr;
    }

    .works__grid {
        column-count: 1;
    }
}

/* Hero */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
    align-items: center;
    padding: 120px 0 96px;
    border-radius: 20px;
    overflow: hidden;
}

/* remove old background layers in new variant via explicit classes later */

.hero__text h1 {
    font-family: "Dela Gothic One", cursive;
    font-weight: 800;
    line-height: 1.1;
    font-size: clamp(32px, 5.2vw, 64px);
}

.kicker {
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-size: 12px;
    color: #ffd36e;
    margin-bottom: 8px;
    opacity: 0.9;
}

.hero__text h1 span {
    display: block;
    background: linear-gradient(135deg, #ffd36e 0%, #ff8fb9 40%, #8fb8ff 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__text p {
    color: var(--muted);
    margin-top: 14px;
    max-width: 56ch;
}

.hero__text {
    position: relative;
    z-index: 1;
    padding: 10px 12px 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(11, 15, 26, 0.34), rgba(11, 15, 26, 0.18));
    backdrop-filter: blur(3px);
}

/* New hero variant overrides */
.hero--new {
    background: transparent;
    overflow: visible;
}

.hero--new::before,
.hero--new::after {
    display: none;
}

/* New hero layout */
.heroN__text {
    position: relative;
}

.heroN__text h1 {
    font-family: "Dela Gothic One", cursive;
    font-weight: 800;
    line-height: 1.05;
    font-size: clamp(34px, 5.4vw, 66px);
}

.heroN__stack {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 440px;
}

.stack__card {
    position: absolute;
    width: min(440px, 42vw);
    aspect-ratio: 16/11;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    transform-origin: 60% 60%;
    transition: transform 0.6s ease, box-shadow 0.6s ease, filter 0.6s ease;
}

.stack__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stack__card--1 {
    transform: rotate(-4deg) translate(-12px, 14px) scale(1);
    z-index: 3;
}

.stack__card--2 {
    transform: rotate(3deg) translate(40px, -10px) scale(0.96);
    z-index: 2;
    filter: saturate(0.92);
}

.stack__card--3 {
    transform: rotate(8deg) translate(90px, 40px) scale(0.92);
    z-index: 1;
    filter: brightness(0.92);
}

.hero--new:hover .stack__card--1 {
    transform: rotate(-2deg) translate(-4px, 8px) scale(1.02);
}

.hero--new:hover .stack__card--2 {
    transform: rotate(2deg) translate(46px, -4px) scale(0.98);
}

.hero--new:hover .stack__card--3 {
    transform: rotate(6deg) translate(96px, 48px) scale(0.94);
}

.hero__actions {
    display: flex;
    gap: 14px;
    margin-top: 24px;
}

.hero__art {
    position: relative;
}

.hero__art img {
    box-shadow: var(--shadow);
    border: 1px solid var(--stroke);
}

.hero__art::after {
    content: "";
    position: absolute;
    inset: auto 10% -16px 10%;
    height: 24px;
    background: radial-gradient(60% 14px at 50% 0, #0006, transparent);
    filter: blur(8px);
}

/* Floating decorative thumbnails in hero */
.hero__decors {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero__decors .shine {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 70%;
    height: 140%;
    background: radial-gradient(50% 50% at 30% 30%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
    filter: blur(12px);
    transform: rotate(-8deg);
}

.hero__decors .float {
    position: absolute;
    width: clamp(90px, 14vw, 160px);
    height: clamp(70px, 10vw, 120px);
    object-fit: cover;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    opacity: 0.9;
    animation: drift 12s ease-in-out infinite alternate;
}

.float--1 {
    top: 12%;
    right: 8%;
    transform: rotate(4deg);
    width: clamp(80px, 12vw, 140px);
}

.float--2 {
    bottom: 12%;
    right: 16%;
    transform: rotate(-6deg);
    width: clamp(80px, 12vw, 140px);
}

.float--3 {
    top: 24%;
    right: 30%;
    transform: rotate(8deg);
    width: clamp(80px, 12vw, 140px);
}

@keyframes drift {
    0% {
        transform: translateY(0) rotate(var(--r, 0deg));
    }

    100% {
        transform: translateY(-14px) rotate(calc(var(--r, 0deg) + 3deg));
    }
}

.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: 0.25s ease;
}

.btn--primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #1b1230;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 143, 185, 0.35);
}

.btn--ghost {
    border: 1px solid var(--stroke);
    color: var(--ink);
    background: transparent;
}

.btn--ghost:hover {
    background: var(--glass);
}

/* Sections */
.section {
    padding: 72px 0;
}

.section--alt {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02) 20%, transparent 80%);
}

.section__head {
    text-align: center;
    margin: 28px;
}

.section__head h2 {
    font-family: "Dela Gothic One", cursive;
    font-size: clamp(26px, 3.3vw, 40px);
}

.section__head p {
    color: var(--muted);
}

/* Magic strip redesign */
.magic {
    position: relative;
}

.magic__strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.magic-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 16/11;
    box-shadow: var(--shadow);
    border: 1px solid var(--stroke);
}

.magic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 0.6s ease;
}

.magic-card__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: end;
    padding: 18px;
    gap: 6px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.45));
    color: #fff;
}

.magic-card h3 {
    font-weight: 800;
}

.magic-card p {
    opacity: 0.9;
}

.magic-card:hover img {
    transform: scale(1.1);
}

.tear-sep {
    height: 36px;
    margin-top: 22px;
    background: radial-gradient(34px 24px at 12px 50%, var(--bg-1) 60%, transparent 61%) repeat-x;
    -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Cards */
.grid {
    display: grid;
    gap: 22px;
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--stroke);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    border-radius: 18px;
}

.card {
    padding: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.card__thumb {
    height: 200px;
    object-fit: cover;
    margin-bottom: 12px;
}

.card h3 {
    font-weight: 800;
    margin-bottom: 6px;
}

.card p {
    color: var(--muted);
}

/* Works grid (cinematic) */
.works__grid {
    column-count: 3;
    column-gap: 20px;
}

.work {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--stroke);
    margin: 0 0 20px;
    background: #0000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    break-inside: avoid;
}

.work::before {
    content: "";
    display: block;
    padding-top: 133%;
}

.work--s::before {
    padding-top: 110%;
}

.work--m::before {
    padding-top: 133%;
}

.work--l::before {
    padding-top: 160%;
}

.work img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 0.6s ease, filter 0.6s ease;
}

.work__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: end;
    gap: 8px;
    padding: 16px;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55));
}

.work h3 {
    font-weight: 800;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #1b1b1b;
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 800;
    font-size: 12px;
    width: fit-content;
}

.chips {
    display: flex;
    gap: 8px;
    font-size: 12px;
    opacity: 0.95;
}

.work:hover img {
    transform: scale(1.08);
    filter: saturate(1.05);
}

/* Responsive */
@media (max-width: 980px) {
    .works__grid {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .works__grid {
        column-count: 1;
    }
}

/* remove old helpers replaced by s/m/l */

/* Auto height rhythm like the reference */
.works__masonry .work:nth-child(6n + 1)::before {
    padding-top: 140%;
}

.works__masonry .work:nth-child(6n + 2)::before {
    padding-top: 125%;
}

.works__masonry .work:nth-child(6n + 3)::before {
    padding-top: 150%;
}

.works__masonry .work:nth-child(6n + 4)::before {
    padding-top: 135%;
}

.works__masonry .work:nth-child(6n + 5)::before {
    padding-top: 120%;
}

.works__masonry .work:nth-child(6n + 6)::before {
    padding-top: 145%;
}

/* Chips */
.chip {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
}

.chip__avatar {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--stroke);
}

.chip__body h3 {
    font-weight: 800;
    margin-bottom: 2px;
}

.chip__body p {
    color: var(--muted);
}

/* CTA */
.cta {
    padding: 72px 0;
}

.cta__box {
    padding: 28px;
    display: grid;
    gap: 14px;
    justify-items: center;
    text-align: center;
}

.form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 560px;
    margin-top: 6px;
}

.form input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
}

.form input::placeholder {
    color: #cdd3ff99;
}

.form button {
    white-space: nowrap;
}

/* Footer */
.site-footer {
    padding: 40px 0;
    color: var(--muted);
    text-align: center;
}

/* Responsive */
@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 96px 0 72px;
    }

    .heroN__stack {
        min-height: 360px;
    }

    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .works__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .menu {
        gap: 8px;
    }

    .menu a {
        padding: 8px 10px;
    }

    .grid--3 {
        grid-template-columns: 1fr;
    }

    .grid--4 {
        grid-template-columns: 1fr;
    }

    .magic__strip {
        grid-template-columns: 1fr;
    }

    .hero__decors {
        display: none;
    }

    .hero__text {
        padding: 6px 8px 10px;
        background: rgba(11, 15, 26, 0.4);
    }

    .heroN__stack {
        min-height: 300px;
    }

    .stack__card {
        width: 82vw;
    }

    .works__grid {
        grid-template-columns: 1fr;
    }

    .form {
        flex-direction: column;
    }
}

/* Signature Works size control */
.works {
    width: 49%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 980px) {
    .works {
        width: 90%;
    }
}

@media (max-width: 640px) {
    .works {
        width: 100%;
    }
}

/* Characters We Love */
#nhan-vat .grid {
    grid-template-columns: repeat(3, 1fr);
}

.chip {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chip:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.chip__avatar {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 0;
    position: relative;
}

/* gradient ring around avatar */
.chip__avatar::after {
    content: "";
}

.chip__avatar-wrap {
    position: relative;
    width: 76px;
    height: 76px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    flex: none;
}

.chip__avatar-wrap > img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.chip__body h3 {
    font-weight: 800;
    margin-bottom: 4px;
}

.chip__body p {
    color: var(--muted);
}

@media (max-width: 980px) {
    #nhan-vat .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    #nhan-vat .grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatPulse {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

/* apply animations */
.hero__text {
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.magic-card {
    animation: fadeUp 0.7s ease both;
}

.magic-card:nth-child(2) {
    animation-delay: 0.08s;
}

.magic-card:nth-child(3) {
    animation-delay: 0.16s;
}

.works__grid .work {
    animation: scaleIn 0.6s ease both;
}

.works__grid .work:nth-child(2) {
    animation-delay: 0.05s;
}

.works__grid .work:nth-child(3) {
    animation-delay: 0.1s;
}

.works__grid .work:nth-child(4) {
    animation-delay: 0.15s;
}

.works__grid .work:nth-child(5) {
    animation-delay: 0.2s;
}

.works__grid .work:nth-child(6) {
    animation-delay: 0.25s;
}

#nhan-vat .chip {
    animation: fadeUp 0.7s ease both;
}

#nhan-vat .chip:nth-child(2) {
    animation-delay: 0.06s;
}

#nhan-vat .chip:nth-child(3) {
    animation-delay: 0.12s;
}

#nhan-vat .chip:nth-child(4) {
    animation-delay: 0.18s;
}

#nhan-vat .chip:nth-child(5) {
    animation-delay: 0.24s;
}

#nhan-vat .chip:nth-child(6) {
    animation-delay: 0.3s;
}

/* playful floating for header brand */
.brand {
    animation: floatPulse 6s ease-in-out infinite;
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* Decorative gradient orbs */
.decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.orb {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.35;
    animation: floatPulse 14s ease-in-out infinite;
}

.orb--1 {
    top: 8%;
    left: -120px;
    background: radial-gradient(closest-side, #7ae2ff, transparent 70%);
}

.orb--2 {
    bottom: 6%;
    right: -140px;
    background: radial-gradient(closest-side, #ffd36e, transparent 70%);
    animation-delay: -3s;
}

.orb--3 {
    top: 40%;
    right: 10%;
    width: 280px;
    height: 280px;
    background: radial-gradient(closest-side, #6df0b5, transparent 70%);
    animation-delay: -6s;
}

/* Hero decorations: stars, fireflies, wind */
.hero-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.star,
.firefly,
.wind {
    position: absolute;
    display: block;
}

/* stars */
.star {
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px #fff;
    animation: twinkle 2.4s ease-in-out infinite;
}

.star:nth-child(1) {
    top: 8%;
    left: 12%;
}

.star:nth-child(2) {
    top: 16%;
    left: 22%;
    animation-delay: -0.3s;
}

.star:nth-child(3) {
    top: 10%;
    left: 48%;
    animation-delay: -0.8s;
}

.star:nth-child(4) {
    top: 6%;
    left: 68%;
    animation-delay: -1.1s;
}

.star:nth-child(5) {
    top: 18%;
    left: 76%;
    animation-delay: -0.5s;
}

.star:nth-child(6) {
    top: 26%;
    left: 8%;
    animation-delay: -1.6s;
}

.star:nth-child(7) {
    top: 30%;
    left: 28%;
    animation-delay: -0.2s;
}

.star:nth-child(8) {
    top: 22%;
    left: 56%;
    animation-delay: -1.3s;
}

.star:nth-child(9) {
    top: 28%;
    left: 64%;
    animation-delay: -0.9s;
}

.star:nth-child(10) {
    top: 14%;
    left: 36%;
    animation-delay: -1.8s;
}

@keyframes twinkle {
    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* fireflies */
.firefly {
    width: 6px;
    height: 6px;
    background: #fff1a6;
    border-radius: 50%;
    box-shadow: 0 0 10px 3px #ffe37a;
    animation: fly 8s linear infinite;
}

.firefly:nth-of-type(11) {
    top: 60%;
    left: 18%;
}

.firefly:nth-of-type(12) {
    top: 68%;
    left: 26%;
    animation-delay: -2s;
}

.firefly:nth-of-type(13) {
    top: 58%;
    left: 44%;
    animation-delay: -3.5s;
}

.firefly:nth-of-type(14) {
    top: 70%;
    left: 62%;
    animation-delay: -5s;
}

.firefly:nth-of-type(15) {
    top: 56%;
    left: 74%;
    animation-delay: -6.5s;
}

.firefly:nth-of-type(16) {
    top: 64%;
    left: 86%;
    animation-delay: -1s;
}

@keyframes fly {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(18px, -12px);
    }

    50% {
        transform: translate(-8px, -18px);
    }

    75% {
        transform: translate(12px, 6px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* wind streaks */
.wind {
    width: 160px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    filter: blur(2px);
    animation: sweep 4.5s ease-in-out infinite;
}

.wind:nth-last-child(3) {
    top: 35%;
    left: 10%;
}

.wind:nth-last-child(2) {
    top: 44%;
    left: 30%;
    animation-delay: -1s;
}

.wind:nth-last-child(1) {
    top: 38%;
    left: 60%;
    animation-delay: -2s;
}

@keyframes sweep {
    0% {
        transform: translateX(-40px) rotate(6deg);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    50% {
        transform: translateX(40px) rotate(0);
    }

    80% {
        opacity: 0.8;
    }

    100% {
        transform: translateX(120px) rotate(-4deg);
        opacity: 0;
    }
}

/* Global dark sky layer */
.sky {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.s-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #dfe8ff;
    border-radius: 50%;
    opacity: 0.5;
    animation: twinkle 2.6s ease-in-out infinite;
}

/* scatter stars */
.s-star:nth-child(1) {
    top: 8%;
    left: 6%;
}

.s-star:nth-child(2) {
    top: 14%;
    left: 18%;
}

.s-star:nth-child(3) {
    top: 10%;
    left: 30%;
}

.s-star:nth-child(4) {
    top: 6%;
    left: 46%;
}

.s-star:nth-child(5) {
    top: 12%;
    left: 68%;
}

.s-star:nth-child(6) {
    top: 18%;
    left: 80%;
}

.s-star:nth-child(7) {
    top: 24%;
    left: 12%;
}

.s-star:nth-child(8) {
    top: 26%;
    left: 26%;
}

.s-star:nth-child(9) {
    top: 22%;
    left: 44%;
}

.s-star:nth-child(10) {
    top: 28%;
    left: 64%;
}

.s-star:nth-child(11) {
    top: 30%;
    left: 82%;
}

.s-star:nth-child(12) {
    top: 36%;
    left: 8%;
}

.s-star:nth-child(13) {
    top: 38%;
    left: 24%;
}

.s-star:nth-child(14) {
    top: 34%;
    left: 52%;
}

.s-star:nth-child(15) {
    top: 40%;
    left: 70%;
}

.s-star:nth-child(16) {
    top: 42%;
    left: 86%;
}

.s-star:nth-child(17) {
    top: 48%;
    left: 16%;
}

.s-star:nth-child(18) {
    top: 52%;
    left: 32%;
}

.s-star:nth-child(19) {
    top: 50%;
    left: 60%;
}

.s-star:nth-child(20) {
    top: 56%;
    left: 78%;
}

.s-fly {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #ffd36e;
    border-radius: 50%;
    box-shadow: 0 0 8px 2px #ffcf6a;
    animation: fly 10s linear infinite;
    opacity: 0.7;
}

.s-fly:nth-last-child(10) {
    bottom: 20%;
    left: 12%;
}

.s-fly:nth-last-child(9) {
    bottom: 24%;
    left: 22%;
    animation-delay: -2s;
}

.s-fly:nth-last-child(8) {
    bottom: 26%;
    left: 36%;
    animation-delay: -4s;
}

.s-fly:nth-last-child(7) {
    bottom: 22%;
    left: 48%;
    animation-delay: -6s;
}

.s-fly:nth-last-child(6) {
    bottom: 18%;
    left: 62%;
    animation-delay: -8s;
}

.s-fly:nth-last-child(5) {
    bottom: 20%;
    left: 76%;
    animation-delay: -1s;
}

.s-fly:nth-last-child(4) {
    bottom: 16%;
    left: 84%;
}

.s-fly:nth-last-child(3) {
    bottom: 22%;
    left: 28%;
}

.s-fly:nth-last-child(2) {
    bottom: 18%;
    left: 54%;
}

.s-fly:nth-last-child(1) {
    bottom: 24%;
    left: 72%;
}

/* dim hero-specific effects for contrast */
.hero-decor .star {
    opacity: 0.35;
}

.hero-decor .firefly {
    opacity: 0.75;
}

/* --- Hero polish: sheen, vignette, richer hover --- */
.heroN__stack {
    position: relative;
    perspective: 1200px;
}

.heroN__stack::before {
    content: "";
    position: absolute;
    inset: -6% -8% -10% -8%;
    background: radial-gradient(60% 50% at 65% 55%, rgba(0, 0, 0, 0.35), transparent 65%);
    filter: blur(22px);
    z-index: 0;
    pointer-events: none;
}

/* glossy sweep on each poster */
.stack__card {
    overflow: hidden;
}

.stack__card::after {
    content: "";
    position: absolute;
    inset: -20% -40% -20% -40%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.22) 45%, rgba(255, 255, 255, 0) 60%);
    transform: translateX(-120%) rotate(12deg);
    animation: sheen 7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sheen {
    0% {
        transform: translateX(-120%) rotate(12deg);
    }

    20% {
        transform: translateX(120%) rotate(12deg);
    }

    100% {
        transform: translateX(120%) rotate(12deg);
    }
}

/* stronger 3D lift on hover */
.hero--new:hover .stack__card--1 {
    transform: rotate(-4deg) translate(-8px, 0) scale(1.03);
}

.hero--new:hover .stack__card--2 {
    transform: rotate(4deg) translate(52px, -10px) scale(0.99);
}

.hero--new:hover .stack__card--3 {
    transform: rotate(7deg) translate(104px, 52px) scale(0.95);
}

/* --- Characters We Love: interactive effects --- */
/* ring pulse around avatar */
.chip__avatar-wrap {
    position: relative;
}

.chip__avatar-wrap::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
    -webkit-mask: radial-gradient(circle at 50% 50%, transparent 62%, #000 64%);
    mask: radial-gradient(circle at 50% 50%, transparent 62%, #000 64%);
    filter: blur(0.6px);
    opacity: 0;
    transition: opacity 0.25s ease;
    animation: spin 3.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(1turn);
    }
}

/* floating effect & sparkle */
.chip {
    position: relative;
}

.chip::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(#fff, rgba(255, 255, 255, 0) 60%);
    filter: drop-shadow(0 0 6px #fff);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    animation: twinkle 2s ease-in-out infinite;
}

.chip:hover .chip__avatar-wrap::before {
    opacity: 0.85;
}

.chip:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.chip:hover .chip__avatar {
    transform: translateY(-2px);
    transition: transform 0.25s ease;
}

/* subtle float on idle */
#nhan-vat .chip:nth-child(odd) {
    animation: floatPulse 7.5s ease-in-out infinite;
}

#nhan-vat .chip:nth-child(even) {
    animation: floatPulse 8.5s ease-in-out infinite;
    animation-delay: -2s;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 22px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #1b1230;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 60;
}

/* reveal after some scroll (approx by using :has where supported) */
body:has(main:focus-within) .back-to-top,
body:has(#hanh-trinh:target) .back-to-top,
body:has(#tac-pham:target) .back-to-top,
body:has(#nhan-vat:target) .back-to-top {
    opacity: 1;
    transform: translateY(0);
}

/* slower feeling when jumping to anchors */
:target {
    scroll-margin-top: 80px;
}

/* Disable hero wind streaks */
.wind {
    display: none !important;
}

/* Decorative clouds */
.clouds {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.cloud {
    position: absolute;
    top: calc(10% + 30vh * var(--i, 0));
    left: -20vw;
    width: 260px;
    height: 90px;
    border-radius: 80px;
    background: radial-gradient(ellipse at 30% 60%, #ffffffcc 0%, #ffffffa8 30%, #ffffff70 60%, #ffffff00 75%),
        radial-gradient(ellipse at 70% 50%, #ffffffcc 0%, #ffffffa8 30%, #ffffff70 60%, #ffffff00 75%);
    filter: blur(2px);
    opacity: 0.55;
    animation: drift 40s linear infinite;
}

.cloud:nth-child(1) {
    --i: 0;
    top: 12%;
    animation-duration: 52s;
    transform: scale(1);
}

.cloud:nth-child(2) {
    --i: 0.2;
    top: 22%;
    animation-duration: 60s;
    transform: scale(1.2);
}

.cloud:nth-child(3) {
    --i: 0.35;
    top: 32%;
    animation-duration: 70s;
    transform: scale(1.4);
}

.cloud:nth-child(4) {
    --i: 0.5;
    top: 44%;
    animation-duration: 64s;
    transform: scale(1.1);
}

.cloud:nth-child(5) {
    --i: 0.65;
    top: 58%;
    animation-duration: 76s;
    transform: scale(1.3);
}

.cloud:nth-child(6) {
    --i: 0.8;
    top: 66%;
    animation-duration: 68s;
    transform: scale(1.15);
}

@keyframes drift {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(140vw);
    }
}

/* Hide decorative clouds */
.clouds,
.cloud {
    display: none !important;
}

/* Improved shooting stars (realistic head + tail, diagonal path) */
.shooting {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Base meteor */
.meteor {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px 4px rgba(255, 255, 255, 0.85), 0 0 30px 8px rgba(255, 255, 255, 0.35);
    transform: rotate(-35deg);
    opacity: 0;
    animation: meteorFly 4.8s linear infinite;
}

/* Fading tail */
.meteor::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -220px;
    width: 220px;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 60%, rgba(255, 255, 255, 0));
    filter: blur(1px);
}

/* Three different tracks with different origins and delays */
.meteor:nth-child(1) {
    top: 12%;
    left: 86%;
    animation-delay: 0s;
}

.meteor:nth-child(2) {
    top: 28%;
    left: 78%;
    animation-delay: 2.2s;
}

.meteor:nth-child(3) {
    top: 44%;
    left: 92%;
    animation-delay: 4.4s;
}

@keyframes meteorFly {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-35deg);
    }

    8% {
        opacity: 1;
    }

    75% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-120vw, 65vh) rotate(-35deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .meteor {
        animation: none;
        opacity: 0.2;
    }
}

/* Disable shooting stars */
.shooting {
    display: none !important;
}
