/* Explain: Styles for UI components like buttons, cards, video elements, and modals. */
.btn-solid,
.btn-outline,
.btn-gold,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.78rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-solid {
    background: var(--primary-color);
    color: #fff9f2;
    box-shadow: 0 12px 24px -18px rgba(168, 58, 44, 0.9);
}

.btn-solid:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-gold {
    background: var(--accent-color);
    color: #241a06;
}

.btn-gold:hover {
    background: #b8892c;
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--border-color);
    color: var(--text-color);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.section--dark .btn-outline,
.hero-nangyai .btn-outline {
    border-color: rgba(201, 154, 58, 0.45);
    color: #f4e9d8;
}

.section--dark .btn-outline:hover,
.hero-nangyai .btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-ghost {
    color: var(--primary-color);
    padding-inline: 0.75rem;
}

.btn-ghost:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.btn-header-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.35rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: #f4e9d8;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-header-outline:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff9f2;
    transform: translateY(-2px);
}

.card-art {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-art:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(201, 154, 58, 0.7);
}

.card-art__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #100c0a;
}

.card-art__media--tall {
    aspect-ratio: 3 / 4;
}

.card-art__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-art:hover .card-art__media img {
    transform: scale(1.05);
}

.card-art__body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
    padding: 1.1rem 1.15rem 1.3rem;
}

.card-art__num {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.12em;
}

.card-art__body h3 {
    font-size: 1.05rem;
}

.card-art__body p {
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.75;
}

.card-art__points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.card-art__points li {
    position: relative;
    padding-left: 1.05rem;
}

.card-art__points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent-color);
}

.card-art__link {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.video-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #0d0a08;
    border: 1px solid rgba(201, 154, 58, 0.35);
    box-shadow: var(--shadow);
}

.video-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.video-frame--player {
    position: relative;
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    border: 2px solid rgba(201, 154, 58, 0.65);
    background: rgba(15, 11, 8, 0.55);
    color: var(--accent-color);
    font-size: 2.4rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 18px 34px -18px rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.video-play:hover {
    background: var(--accent-color);
    color: #241a06;
    transform: translate(-50%, -50%) scale(1.06);
}

.video-play.is-hidden {
    opacity: 0;
    visibility: hidden;
}

@media (min-width: 768px) {
    .video-play {
        width: 104px;
        height: 104px;
        font-size: 3rem;
    }
}

.arch-frame {
    padding: 10px;
    border: 1px solid rgba(201, 154, 58, 0.5);
    border-radius: 240px 240px 18px 18px;
    background: linear-gradient(180deg, rgba(201, 154, 58, 0.14), rgba(0, 0, 0, 0.25));
}

.arch-frame img {
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center;
    border-radius: 230px 230px 12px 12px;
}

.figure-art {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
}

.figure-art img {
    width: 100%;
    height: auto;
}

.figure-art figcaption {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

.step-list {
    display: grid;
    gap: 0.9rem;
}

.step-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1.05rem 1.2rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    border-radius: var(--radius-sm);
}

.step-num {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--ink-900);
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

.step-item h3 {
    font-size: 1rem;
}

.step-item p {
    color: var(--text-muted);
    font-size: 0.93rem;
    margin-top: 0.2rem;
}

.icon-card {
    padding: 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.icon-card:hover {
    border-color: rgba(201, 154, 58, 0.7);
    transform: translateY(-3px);
}

.icon-card__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 0.8rem;
    border-radius: 12px;
    background: rgba(168, 58, 44, 0.1);
    color: var(--primary-color);
    font-size: 1.05rem;
}

.icon-card__media {
    display: grid;
    place-items: center;
    margin: -1.25rem -1.25rem 1rem;
    aspect-ratio: 3 / 2;
    background: #100c0a;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
}

.icon-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.icon-card h3 {
    font-size: 1rem;
}

.icon-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 0.3rem;
}

.note-box {
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: rgba(201, 154, 58, 0.12);
    border: 1px dashed rgba(168, 58, 44, 0.35);
    font-size: 0.93rem;
    color: #4a3a2b;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(168, 58, 44, 0.14);
}

.form-input::placeholder {
    color: #a89a89;
}

.alert-soft {
    display: none;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.alert-soft.is-open {
    display: block;
}

.alert-soft.ok {
    background: #e8f3ec;
    border: 1px solid #b8d6c2;
    color: #20563a;
}

.alert-soft.err {
    background: #fbeae6;
    border: 1px solid #eabfb4;
    color: #7c2a17;
}

.qty-btn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    font-weight: 700;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cart-summary {
    padding: 1.4rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.cart-summary h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.55rem;
    font-size: 0.95rem;
    border-bottom: 1px dashed var(--border-color);
}

.cart-summary__row strong {
    font-family: var(--font-heading);
    font-size: 1.05rem;
}

.video-thumb {
    position: relative;
    display: block;
    width: calc(100% + 2.5rem);
    margin: -1.25rem -1.25rem 1rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0;
    border: 0;
    background: #100c0a;
    cursor: pointer;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.video-thumb:hover img {
    transform: scale(1.05);
}

.video-thumb__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    border: 2px solid rgba(201, 154, 58, 0.65);
    background: rgba(15, 11, 8, 0.55);
    color: var(--accent-color);
    font-size: 2rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 18px 34px -18px rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.video-thumb:hover .video-thumb__play {
    background: var(--accent-color);
    color: #241a06;
    transform: translate(-50%, -50%) scale(1.06);
}

.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.video-modal.is-open {
    display: flex;
}

.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 6, 0.85);
    backdrop-filter: blur(4px);
}

.video-modal__panel {
    position: relative;
    z-index: 2;
    width: min(960px, 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(201, 154, 58, 0.4);
    background: #0d0a08;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}

.video-modal__panel video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
}

.video-modal__close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(201, 154, 58, 0.4);
    background: rgba(12, 9, 7, 0.8);
    color: #f4e9d8;
    transition: all 0.2s ease;
}

.video-modal__close:hover {
    background: var(--accent-color);
    color: #241a06;
}

/* Cinema room shell for the teaser video */
.cinema-room {
    position: relative;
    padding: clamp(0.9rem, 3vw, 2.3rem) clamp(1rem, 4vw, 3.4rem);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(201, 154, 58, 0.3);
    background-color: #0b0807;
    background-image:
        linear-gradient(90deg, rgba(96, 22, 11, 0.92) 0%, rgba(96, 22, 11, 0) 10%, rgba(96, 22, 11, 0) 90%, rgba(96, 22, 11, 0.92) 100%),
        radial-gradient(120% 90% at 50% -12%, rgba(201, 154, 58, 0.18), transparent 62%),
        linear-gradient(180deg, #1e1712 0%, #0b0807 100%);
    box-shadow: inset 0 0 130px rgba(0, 0, 0, 0.9), var(--shadow);
    overflow: hidden;
    perspective: 1400px;
    perspective-origin: 50% 42%;
}

.cinema-room::before {
    content: '';
    position: absolute;
    inset: auto 0 -35% 0;
    height: 75%;
    pointer-events: none;
    background: radial-gradient(55% 100% at 50% 100%, rgba(201, 154, 58, 0.15), transparent 72%);
}

.cinema-room__screen {
    position: relative;
    z-index: 1;
    border-radius: 12px;
    transform: rotateX(1.6deg);
    transform-style: preserve-3d;
    box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.95);
}

.video-frame--cinema {
    border-radius: 12px;
    border: 1px solid rgba(201, 154, 58, 0.45);
    background: #000;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.75),
        0 0 46px rgba(201, 154, 58, 0.22),
        inset 0 0 90px rgba(0, 0, 0, 0.7);
}

.video-frame--cinema video {
    width: 100%;
    aspect-ratio: 2.35 / 1;
    object-fit: cover;
    display: block;
    background: #000;
}

/* Compact intro block + character row + detail popup */
.char-intro {
    display: grid;
    gap: 1.1rem;
    align-items: start;
}

@media (min-width: 768px) {
    .char-intro {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .char-intro .note-box {
        grid-column: 1 / -1;
    }
}

.char-intro .figure-art figcaption {
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
}

.char-strip {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.char-mini {
    flex: 0 0 auto;
    width: 168px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.6rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    text-align: left;
    scroll-snap-align: start;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.char-mini:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 154, 58, 0.7);
    box-shadow: var(--shadow);
}

.char-mini__media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    overflow: hidden;
    background: #100c0a;
}

.char-mini__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.char-mini:hover .char-mini__media img {
    transform: scale(1.05);
}

.char-mini__num {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-color);
}

.char-mini__name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-color);
}

.char-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.char-modal.is-open {
    display: flex;
}

.char-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 6, 0.85);
    backdrop-filter: blur(4px);
}

.char-modal__panel {
    position: relative;
    z-index: 2;
    width: min(940px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(201, 154, 58, 0.4);
    background: #120d0a;
    color: #f4e9d8;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.92);
}

.char-modal.is-open .char-modal__panel {
    animation: char-pop 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes char-pop {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (min-width: 768px) {
    .char-modal__panel {
        display: grid;
        grid-template-columns: 0.85fr 1.15fr;
    }
}

.char-modal__media {
    position: relative;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    min-height: 280px;
    background: radial-gradient(120% 90% at 50% 0%, #251b13 0%, #0a0705 72%);
}

.char-modal__media img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.9);
}

.char-modal__media.is-loading::after {
    content: '';
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 3px solid rgba(201, 154, 58, 0.25);
    border-top-color: var(--accent-color);
    animation: char-spin 0.8s linear infinite;
}

@keyframes char-spin {
    to {
        transform: rotate(360deg);
    }
}

.char-modal__body {
    padding: 1.6rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.char-modal__body h3 {
    font-size: 1.4rem;
    margin-top: 0.3rem;
}

.char-modal__body p {
    margin-top: 0.7rem;
    color: #d3c3ae;
    font-size: 0.95rem;
    line-height: 1.9;
}

.char-modal__meta {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.char-modal__points {
    list-style: none;
    margin: 0.8rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
    color: #d3c3ae;
    font-size: 0.93rem;
    line-height: 1.75;
}

.char-modal__points li {
    position: relative;
    padding-left: 1.1rem;
}

.char-modal__points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent-color);
}

.char-modal__close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(201, 154, 58, 0.4);
    background: rgba(12, 9, 7, 0.8);
    color: #f4e9d8;
    transition: all 0.2s ease;
}

.char-modal__close:hover {
    background: var(--accent-color);
    color: #241a06;
}