:root {
    --ink: #140c16;
    --cream: #fff6e8;
    --pink: #ff2d95;
    --pink-deep: #d41472;
    --yellow: #ffe14d;
    --yellow-deep: #f0c400;
    --orange: #ff7a18;
    --orange-deep: #e25d00;
    --green: #7cff3a;
    --green-deep: #3db70a;
    --night: #120816;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    min-height: 100dvh;
}

body {
    font-family: Outfit, system-ui, sans-serif;
    color: var(--cream);
    background: var(--night);
    overflow-x: hidden;
}

.noise {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 8;
    opacity: 0.09;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.hero {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 64px);
    min-height: calc(100dvh - 64px);
    display: grid;
    align-items: end;
    padding: 28px 7vw 48px;
    padding-bottom: max(48px, env(safe-area-inset-bottom));
    background: var(--night);
}

.hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.hero-fallback {
    position: absolute;
    inset: 0;
    background: url("../assets/hero.jpg") center/cover no-repeat;
}

.video-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.video-bg.is-on {
    opacity: 1;
}

.video-bg-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.video-bg iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.video-blur-veil {
    position: absolute;
    inset: 0;
    pointer-events: none;
    backdrop-filter: blur(4vmin);
    -webkit-backdrop-filter: blur(4vmin);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18, 8, 22, 0.22) 0%, rgba(18, 8, 22, 0.42) 42%, rgba(18, 8, 22, 0.92) 100%);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link:focus,
.skip-link:focus-visible {
    position: absolute;
    left: 12px;
    top: 12px;
    width: auto;
    height: auto;
    clip: auto;
    clip-path: none;
    overflow: visible;
    margin: 0;
    padding: 8px 12px;
    background: var(--yellow);
    color: var(--ink);
    z-index: 40;
}

.site-bar {
    position: sticky;
    top: 0;
    z-index: 25;
    background: rgba(18, 8, 22, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 246, 232, 0.14);
}

.site-bar-inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 8px 0;
    padding-top: max(8px, env(safe-area-inset-top));
}

.site-bar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-bar .brand img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.site-bar .brand span {
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.16em;
    font-size: 1.35rem;
}

.site-bar-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 12px;
    background: var(--yellow);
    color: var(--ink);
    cursor: pointer;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.08em;
    font-size: 1.05rem;
}

.nav-toggle-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 18px;
}

.nav-toggle-box span {
    display: block;
    height: 2px;
    background: var(--ink);
}

.site-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 6px;
}

a.festival-btn:focus-visible,
.festival-btn:focus-visible,
.site-nav a:focus-visible,
.nav-toggle:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.video-pause {
    margin-top: 14px;
    background: transparent;
    border: 1px solid rgba(255, 246, 232, 0.35);
    color: var(--cream);
    border-radius: 999px;
    padding: 8px 14px;
    min-height: 44px;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
}

.video-pause[hidden] { display: none; }

body.nav-open { overflow: hidden; }

.festival-dialog { display: none; }

html[lang="zh-CN"] body,
html[data-lang="zh"] body {
    font-family: "Noto Sans SC", Outfit, system-ui, sans-serif;
}

html[lang="ja"] body,
html[data-lang="ja"] body {
    font-family: "Noto Sans JP", Outfit, system-ui, sans-serif;
}

html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[data-lang="zh"] h1,
html[data-lang="zh"] h2,
html[lang="ja"] h1,
html[lang="ja"] h2,
html[data-lang="ja"] h1,
html[data-lang="ja"] h2,
html[lang="ru"] h1,
html[lang="ru"] h2,
html[data-lang="ru"] h1,
html[data-lang="ru"] h2 {
    font-family: inherit;
    font-weight: 700;
}

.topbar {
    position: absolute;
    top: 22px;
    left: 7vw;
    right: 7vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    z-index: 3;
}

.top-end {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-switch {
    position: relative;
    z-index: 6;
}

.lang-toggle {
    min-width: 148px;
    font-size: 1.05rem !important;
    padding: 12px 16px 10px !important;
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: min(300px, 82vw);
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    background: rgba(20, 12, 22, 0.94);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.lang-menu.is-open {
    display: grid;
}

.lang-menu .festival-btn {
    font-size: 0.95rem;
    padding: 12px 8px 10px;
    box-shadow: 0 6px 0 currentColor, 0 10px 18px rgba(0, 0, 0, 0.25);
}

.lang-menu .festival-btn.is-lang-on {
    outline: 2px solid var(--cream);
    outline-offset: 2px;
}

a.festival-btn {
    display: block;
    text-align: center;
    text-decoration: none;
}

.paypal-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.paypal-row .festival-btn {
    flex: 1 1 160px;
    font-size: 1.05rem;
    padding: 14px 10px 12px;
}

.brand-cluster {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.brand {
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.22em;
    font-size: 1.35rem;
    color: inherit;
    text-decoration: none;
}

.brand img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.site-nav a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.78;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.site-nav a:hover,
.site-nav a.is-on,
.site-nav a[aria-current="page"] {
    opacity: 1;
}

.site-nav a.is-on,
.site-nav a[aria-current="page"] {
    color: var(--yellow);
    border-bottom-color: var(--yellow);
}

.place {
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
}

.gears {
    position: absolute;
    top: 18%;
    right: 6vw;
    width: 180px;
    height: 180px;
    opacity: 0.55;
    z-index: 1;
}

.gear {
    position: absolute;
    border-radius: 50%;
    border: 8px dotted currentColor;
    animation: spin 14s linear infinite;
}

.gear-lg {
    width: 130px;
    height: 130px;
    color: var(--yellow);
    top: 0;
    right: 0;
}

.gear-sm {
    width: 72px;
    height: 72px;
    color: var(--pink);
    bottom: 8px;
    left: 8px;
    animation-direction: reverse;
    animation-duration: 9s;
}

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

.content {
    position: relative;
    z-index: 2;
    max-width: 920px;
    padding-bottom: 12px;
}

.kicker {
    display: inline-block;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.78rem;
    padding: 7px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

h1 {
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(2.6rem, 7vw, 6.2rem);
    line-height: 0.92;
    margin: 0 0 18px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

h1 span {
    display: block;
}

.lede {
    max-width: 640px;
    font-size: 1.12rem;
    line-height: 1.55;
    margin: 0 0 28px;
    color: #ffe9d2;
}

.actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.ticket-row {
    margin: 0 0 28px;
    max-width: 920px;
}

.ticket-row[hidden] {
    display: none;
}

.ticket-row .festival-btn {
    width: 100%;
}

.festival-btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.08em;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    padding: 18px 12px 16px;
    border-radius: 18px;
    color: var(--ink);
    box-shadow: 0 10px 0 currentColor, 0 18px 30px rgba(0, 0, 0, 0.28);
    transform: translateY(0);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.festival-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.festival-btn:active {
    transform: translateY(6px);
    box-shadow: 0 4px 0 currentColor, 0 8px 16px rgba(0, 0, 0, 0.25);
}

.festival-btn.pink { background: var(--pink); color: var(--pink-deep); }
.festival-btn.yellow { background: var(--yellow); color: var(--yellow-deep); }
.festival-btn.orange { background: var(--orange); color: var(--orange-deep); }
.festival-btn.green { background: var(--green); color: var(--green-deep); }

.festival-btn span {
    display: block;
    color: var(--ink);
}

.festival-btn small {
    display: block;
    margin-top: 4px;
    font-family: Outfit, system-ui, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: var(--ink);
    opacity: 0.78;
}

.channels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}

.channels span {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255, 246, 232, 0.12);
    border: 1px solid rgba(255, 246, 232, 0.22);
    padding: 6px 10px;
    border-radius: 999px;
}

.print-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    margin: 14px 0 8px;
    box-shadow: 0 12px 28px rgba(20, 12, 22, 0.12);
}

.print-card-photo {
    min-height: 150px;
    background: url("../assets/sponsor-cards.jpg") center/cover no-repeat;
}

.print-card-body {
    padding: 14px 14px 12px;
    font-size: 0.86rem;
    line-height: 1.4;
}

.print-card-body strong {
    display: block;
    font-family: Fraunces, Georgia, serif;
    font-size: 1.02rem;
    margin-bottom: 6px;
}

.print-card-body img {
    width: 84px;
    height: 84px;
    margin-top: 8px;
    background: #fff;
}

.price-tag {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.7rem;
    margin: 0 0 8px;
}

.benefit-list {
    margin: 0 0 12px;
    padding-left: 1.1rem;
}

.benefit-list li {
    margin: 0 0 6px;
}

.signup {
    display: flex;
    gap: 10px;
    max-width: 560px;
    background: rgba(20, 12, 22, 0.55);
    border: 1px solid rgba(255, 246, 232, 0.18);
    border-radius: 999px;
    padding: 8px 8px 8px 18px;
    backdrop-filter: blur(10px);
}

.signup input,
.dialog-signup input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--cream);
    font: inherit;
    outline: none;
    min-width: 0;
    min-height: 44px;
}

.signup input::placeholder,
.dialog-signup input::placeholder {
    color: rgba(255, 246, 232, 0.65);
}

.signup button,
.dialog-signup button {
    border: 0;
    background: var(--pink);
    color: var(--ink);
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.08em;
    font-size: 1.1rem;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
}

.signup.sponsor-signup {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1fr) auto;
    gap: 8px;
    max-width: 820px;
    border-radius: 28px;
    padding: 10px;
}

.signup.sponsor-signup input,
.signup.sponsor-signup select {
    width: 100%;
    flex: none;
    padding: 8px 10px;
    background: transparent;
    color: var(--cream);
    appearance: none;
}

.signup.sponsor-signup select option {
    color: var(--ink);
}

.signup.sponsor-signup button {
    white-space: nowrap;
}

.signup-note,
.form-status {
    margin: 10px 0 0;
    font-size: 0.92rem;
    color: #ffe9d2;
}

.form-status.ok { color: var(--green); }
.form-status.err { color: #ffb3d4; }

.ui-front {
    z-index: 10000;
}

.ui-dialog {
    border: 0 !important;
    padding: 0 !important;
    border-radius: 28px !important;
    overflow: hidden;
    background: var(--cream) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45) !important;
    font-family: Outfit, system-ui, sans-serif;
    z-index: 10000 !important;
    max-width: calc(100vw - 24px);
}

.ui-dialog .ui-dialog-titlebar {
    border: 0;
    background: var(--ink);
    color: var(--cream);
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.12em;
    font-size: 1.4rem;
    padding: 14px 18px;
    border-radius: 0;
}

.ui-dialog .ui-dialog-titlebar-close {
    background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' d='M3.2 3.2l9.6 9.6M12.8 3.2l-9.6 9.6' stroke='%23141018' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat !important;
    border: 0 !important;
    border-radius: 999px;
    right: 12px;
    top: 50%;
    margin: 0;
    padding: 0 !important;
    text-indent: -9999px !important;
    color: transparent !important;
    font-size: 0 !important;
    overflow: hidden !important;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
}
.ui-dialog .ui-dialog-titlebar-close .ui-icon,
.ui-dialog .ui-dialog-titlebar-close .ui-button-icon,
.ui-dialog .ui-dialog-titlebar-close .ui-button-icon-space {
    display: none !important;
}

.ui-dialog .ui-dialog-content {
    padding: 0;
    color: var(--ink);
    overflow: auto;
}

.dialog-body {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 360px;
}

.dialog-photo {
    min-height: 280px;
    background-size: cover;
    background-position: center;
}

.dialog-copy {
    padding: 22px 22px 26px;
}

.dialog-copy h2 {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.85rem;
    margin: 0 0 10px;
}

.dialog-copy p {
    margin: 0 0 12px;
    line-height: 1.55;
}

.dialog-signup {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    background: var(--ink);
    border-radius: 22px;
    padding: 7px 7px 7px 16px;
}

.dialog-signup input {
    flex: 1 1 140px;
}

.signup-note a,
.lede a {
    color: var(--yellow);
}

.accent-pink .dialog-copy h2 { color: var(--pink-deep); }
.accent-yellow .dialog-copy h2 { color: #c79a00; }
.accent-orange .dialog-copy h2 { color: var(--orange-deep); }
.accent-green .dialog-copy h2 { color: #2f9208; }

.ui-widget-overlay {
    background: #120816 !important;
    opacity: 0.72 !important;
    z-index: 9998 !important;
}

@media (prefers-reduced-motion: reduce) {
    .video-bg, .video-blur-veil { display: none; }
    .gear { animation: none; }
}

@media (max-width: 1100px) {
    .actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .noise { display: none; }
    .actions { grid-template-columns: 1fr 1fr; gap: 10px; }
    .festival-btn { font-size: 1.05rem; padding: 16px 10px 14px; min-height: 48px; }
    .dialog-body { grid-template-columns: 1fr; }
    .dialog-photo { min-height: 160px; }
    .gears { display: none; }
    .hero { padding: 16px 5vw 28px; align-items: stretch; min-height: calc(100dvh - 64px); }
    .content h1 { font-size: clamp(2.1rem, 11vw, 3.4rem); }
    .lede { font-size: 0.98rem; }
    .sponsor-signup, .signup.sponsor-signup { grid-template-columns: 1fr; max-width: none; }
    .print-card { grid-template-columns: 1fr; }
    .lang-toggle { min-width: 0; width: auto; }
    .lang-menu { width: min(100vw - 24px, 320px); }
    .content { max-width: none; }
    .ui-dialog { max-height: 92dvh !important; }
    .video-blur-veil { backdrop-filter: blur(2.5vmin); -webkit-backdrop-filter: blur(2.5vmin); }
    .nav-toggle { display: inline-flex; }
    .site-bar { position: sticky; }
    .site-bar-inner { position: relative; width: calc(100% - 24px); }
    .site-bar-panel {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        z-index: 26;
        flex-direction: column;
        align-items: stretch;
        background: rgba(18, 8, 22, 0.96);
        padding: 12px 16px 18px;
        border-bottom: 1px solid rgba(255, 246, 232, 0.14);
    }
    .site-bar.is-open .site-bar-panel { display: flex; }
    .site-nav { flex-direction: column; gap: 0; }
    .site-nav a { width: 100%; }
    .top-end { width: 100%; justify-content: space-between; padding-top: 10px; }
    .place { display: none; }
}

@media (max-width: 560px) {
    .actions { grid-template-columns: 1fr; }
    .signup { flex-direction: column; border-radius: 24px; padding: 12px; width: 100%; max-width: none; }
    .signup button, .sponsor-signup button { width: 100%; min-height: 48px; }
    .signup.sponsor-signup { grid-template-columns: 1fr; }
    .dialog-copy { padding: 16px; }
    .dialog-copy h2 { font-size: 1.35rem; }
    .paypal-row { flex-direction: column; }
    .paypal-row .festival-btn { width: 100%; }
    .ticket-row .festival-btn { width: 100%; }
    .site-bar .brand span { font-size: 1.15rem; }
}
