:root {
    --pink: #ED1165;
    --purple: #6D28D9;
    --purple-2: #7D2AE8;
    --cyan: #00C4CC;
    --gold: #F4B93D;
    --gold-deep: #C97F1A;
    --night: #1B1140;
    --paper: #FFF8EC;
    --paper-2: #FBEFDD;
    --ink: #241B3D;
    --ink-soft: #5A527A;
    --line: rgba(109, 40, 217, 0.14);
    --display: 'Montserrat', sans-serif;
    --body: 'Montserrat', sans-serif;
    --tagline: 'Montserrat', sans-serif;
    --radius: 18px;
    --maxw: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    width: 100%;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

img, svg {
    display: block;
    max-width: 100%;
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
}

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.eyebrow {
    font-family: var(--body);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--purple);
}

nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 248, 236, 0.94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}

nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand img {
    height: 34px;
    width: 34px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 26px;
    font-size: 0.92rem;
    font-weight: 500;
}

.nav-links a {
    text-decoration: none;
    color: var(--ink-soft);
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    opacity: 0.6;
    transition: opacity .1s ease-out, color .2s, border-color .2s;
}

.nav-links a:hover {
    color: var(--pink);
    border-color: var(--gold);
}

.nav-links a.active {
    color: var(--ink);
    font-weight: 700;
    opacity: 1;
}

/* ===== Page switching (mỗi mục nav = 1 "trang" riêng, không phải anchor-scroll) ===== */
.page {
    display: none;
}

.page.is-active {
    display: block;
    animation: pageFadeIn .22s ease;
}

.page.is-fading {
    animation: pageFadeOut .22s ease forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pageFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    z-index: 51;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

nav.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

nav.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

nav.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
    display: none;
}

/* Breakpoint 899px khớp mốc tablet/mobile thật Canva dùng (899.9px) */
@media (max-width:899px) {
    /* backdrop-filter trên nav giới hạn compositing layer theo box 68px của nav —
       .nav-links (position:fixed, cao hơn nav nhiều) render sai/trong suốt nếu để nguyên. */
    nav {
        backdrop-filter: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(27, 17, 64, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
        z-index: 45;
    }

    nav.nav-open .nav-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(78vw, 320px);
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        background: var(--paper);
        padding: 90px 32px 32px;
        transform: translateX(100%);
        transition: transform .25s ease;
        box-shadow: -16px 0 32px -20px rgba(27, 17, 64, 0.35);
        z-index: 46;
    }

    nav.nav-open .nav-links {
        transform: translateX(0);
    }

    .nav-links a {
        padding: 12px 0;
        font-size: 1rem;
        font-weight: 700;
    }
}

section {
    padding: 88px 0;
}

.section-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px 48px;
    margin-bottom: 44px;
}

.section-head .eyebrow {
    flex: 1 1 300px;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.section-head h2 {
    flex: 2 1 420px;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    color: var(--purple);
    text-transform: uppercase;
}

.section-head p {
    color: var(--ink-soft);
    font-size: 1.05rem;
    margin-top: 14px;
}

@media (max-width:700px) {
    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 13px 24px;
    border-radius: 999px;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: transform .15s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--gold);
    color: #2A1B06;
}

/* Trang "Sự kiện" (hero + intro) dùng chung 1 nền gradient liên tục,
   khớp mã màu thật: #00c4cc -> #5a32fa -> #7d2ae8 */
#su-kien {
    background: linear-gradient(90deg, #00c4cc 0%, #5a32fa 45%, #7d2ae8 90%);
}

/* ===== Hero ===== */
.hero {
    padding: 32px 0 0;
}

.hero-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 22px;
}

.hero-top .btn-primary {
    background: linear-gradient(90deg, var(--cyan), var(--purple-2));
    color: #fff;
}

.hero-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card .hero-placeholder-text {
    position: relative;
    z-index: 2;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--ink);
    text-align: center;
    padding: 0 20px;
}

.hero-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 24px 0 32px;
}

.hero-pill {
    text-align: center;
    padding: 16px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 228, 248, 0.5);
    color: #ffe4f8;
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.hero-pill.play {
    background: linear-gradient(90deg, var(--cyan), #2B7FD1);
}

.hero-pill.glow {
    background: linear-gradient(90deg, #5B4FD6, var(--purple));
}

.hero-pill.konnect {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.7);
}

@media (max-width:700px) {
    .hero-pills {
        grid-template-columns: 1fr;
    }
}

/* ===== Intro (key-visual) ===== */
.intro-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 48px;
    align-items: center;
}

.intro-copy h2 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    color: #f0f2f5;
    margin-bottom: 20px;
}

.intro-copy p {
    font-size: 1.02rem;
    color: #f0f2f5;
    margin: 0 0 16px;
}

.intro-copy p:last-child {
    margin-bottom: 0;
}

.intro-visual img {
    width: 100%;
    aspect-ratio: 648 / 678;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 24px 48px -18px rgba(27, 17, 64, 0.35);
}

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

/* ===== Trải nghiệm — funrace teaser ===== */
.experience-intro {
    background: linear-gradient(135deg, #5de0e6, #004aad);
    color: #fff;
}

.experience-intro .section-head h2,
.experience-intro .eyebrow {
    color: #fff;
}

.experience-intro .hero-card {
    min-height: 280px;
}

/* ===== Family grids ===== */
.family-challenges {
    background: linear-gradient(135deg, #00c4cc, #5a32fa 50%, #7d2ae8);
}

.family-time {
    background: linear-gradient(135deg, #ff66c4, #ffde59);
}

.family-challenges h2,
.family-time h2 {
    font-size: clamp(1.9rem, 5vw, 2.9rem);
    text-transform: uppercase;
    margin-bottom: 32px;
}

.family-challenges h2 {
    color: #f0f2f5;
}

.family-time h2 {
    color: #3c4d8b;
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.family-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.family-card-media {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.family-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.family-card-label {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    font-family: var(--display);
    font-weight: 800;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    color: #f0f2f5;
    text-transform: uppercase;
}

.family-time .family-card-media,
.family-time .family-card-label {
    border-color: rgba(60, 77, 139, 0.35);
}

.family-time .family-card-label {
    color: #3c4d8b;
}

@media (max-width:900px) {
    .family-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Breakpoint 599px khớp mốc "phone" thật Canva dùng */
@media (max-width:599px) {
    .family-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Agenda — mỗi ngày là 1 section full-width riêng, khớp mã màu thật */
.day-panel.day-1 {
    background: linear-gradient(135deg, #ff5757, #8c52ff);
}

.day-panel.day-2 {
    background: linear-gradient(135deg, #5de0e6, #004aad);
    padding-bottom: 140px;
}

.agenda-row {
    display: flex;
    align-items: center;
    gap: 48px;
}

.agenda-media {
    flex: 1 1 440px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

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

.agenda-info {
    flex: 1 1 380px;
}

/* Chủ nhật dùng layout khác: ảnh banner full-width phía trên, 2 cột thông tin bên dưới */
.agenda-stack {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.agenda-media-wide {
    width: 100%;
    aspect-ratio: 2.9 / 1;
}

.agenda-split {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px 48px;
}

.agenda-split > * {
    flex: 1 1 300px;
}

.day-head {
    margin-bottom: 28px;
}

.day-head .eyebrow,
.day-head h3 {
    display: block;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 2.9rem);
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: inherit;
}

.slot-line {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 8px 0;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
}

.slot-line time {
    flex: 0 0 150px;
}

.slot-line span::before {
    content: "— ";
}

.slot-line.no-time time {
    visibility: hidden;
}

.day-note {
    margin: 24px 0 0;
    font-style: italic;
    font-weight: 600;
    font-size: 0.92rem;
    opacity: 0.85;
}

.day-1 .day-head,
.day-1 .slot-line,
.day-1 .day-note {
    color: #f0f2f5;
}

.day-2 .day-head,
.day-2 .slot-line,
.day-2 .day-note {
    color: #3c4d8b;
}

@media (max-width:900px) {
    .agenda-row {
        flex-direction: column;
        align-items: stretch;
    }

    .slot-line time {
        flex: 0 0 110px;
    }
}

/* ===== FAQ ===== */
.faq {
    background: linear-gradient(90deg, #00c4cc, #5a32fa 50%, #7d2ae8);
}

.faq-media {
    aspect-ratio: 2.7 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1.5px solid rgba(240, 242, 245, 0.5);
    margin-bottom: 40px;
}

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

.faq-heading {
    color: #f0f2f5;
    text-transform: uppercase;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    max-width: 900px;
    margin-bottom: 40px;
}

.faq-list {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, 1fr);
}

.faq-item {
    background: #ffe4f8;
    border-radius: var(--radius);
    padding: 24px 22px;
}

.faq-item .q {
    font-weight: 700;
    font-size: 1.1rem;
    color: #3c4d8b;
    text-align: center;
    margin-bottom: 10px;
}

.faq-item .a {
    font-size: 0.92rem;
    color: #3c4d8b;
}

@media (max-width:900px) {
    .faq-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width:599px) {
    .faq-list {
        grid-template-columns: 1fr;
    }
}

/* ===== Tickets ===== */
.tickets {
    background: linear-gradient(90deg, #ff5757, #8c52ff);
}

.tickets .section-head h2 {
    color: #f0f2f5;
}

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

.ticket-card {
    background: linear-gradient(90deg, #5de0e6, #004aad);
    border-radius: var(--radius);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ticket-icon {
    width: 72px;
    height: 72px;
    color: #fff;
    margin-bottom: 20px;
}

.ticket-icon svg {
    width: 100%;
    height: 100%;
}

.ticket-info {
    background: #f0f2f5;
    border-radius: 12px;
    padding: 18px 20px;
    width: 100%;
    flex: 1;
    margin-bottom: 22px;
}

.ticket-card h3 {
    font-size: 1.15rem;
    text-transform: uppercase;
    color: #3c4d8b;
    margin-bottom: 8px;
}

.ticket-card p {
    color: #3c4d8b;
    font-size: 0.92rem;
    margin: 0;
}

.ticket-card .btn {
    background: #c2e1ff;
    color: #3c4d8b;
    justify-content: center;
    width: 100%;
}

.ticket-card.funrace .btn {
    background: linear-gradient(90deg, #c840d4, #e970f7, #f7b5fd);
    color: #fff;
}

.ticket-card.bus .btn {
    color: #bf446f;
}

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

/* ===== Contact / closing ===== */
.contact {
    padding: 0;
}

.contact-photo {
    aspect-ratio: 2.8 / 1;
    overflow: hidden;
}

.contact-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

.contact-bar {
    background: linear-gradient(90deg, #ff5757, #8c52ff);
}

.contact-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 48px 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-info a {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    text-transform: uppercase;
    text-decoration: underline;
    color: #fff;
}

.contact-social {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fd8ef1;
    color: #9553f1;
    transition: transform .15s ease;
}

.contact-social:hover {
    transform: translateY(-2px);
}

@media (max-width:700px) {
    .contact-photo {
        aspect-ratio: 4 / 5;
    }

    .contact-bar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
        padding: 36px 0;
    }
}
