/* =========================================================
   MYSTICAL PASS — Landing Page (index.html)
   - Hero แบบ full-viewport
   - Layout: Logo (top-left) | Character (right) | Menu+Date (bottom-center)
   - Responsive: Desktop / Tablet / Mobile
   ========================================================= */

.landing-body {
    background: #050a1c;
    font-family: "Google Sans", "Kanit", sans-serif;
    overflow-x: hidden;
}

/* ---------- HERO CONTAINER ---------- */
.landing {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    padding: clamp(70px, 7vh, 90px) clamp(16px, 4vw, 80px) clamp(28px, 5vh, 60px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: clamp(12px, 2vh, 24px);
    overflow: hidden;
}

/* ดัน .landing-bottom ลงไปอยู่ล่างสุด */
.landing-bottom {
    margin-top: auto;
}

/* BG: ใช้ bg.png + overlay ให้เข้มขึ้น */
.landing-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(2, 8, 22, 0.55) 0%, rgba(2, 8, 22, 0.30) 35%, rgba(2, 8, 22, 0.65) 100%),
        url("../images/landingpage/bg.png") center center / cover no-repeat;
}

.landing-bg::before,
.landing-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.landing-bg::before {
    background:
        radial-gradient(60% 50% at 25% 60%, rgba(0, 200, 255, 0.18) 0%, transparent 70%),
        radial-gradient(50% 40% at 80% 20%, rgba(80, 230, 255, 0.10) 0%, transparent 75%);
}

.landing-bg::after {
    background:
        radial-gradient(120% 60% at 50% 100%, rgba(0, 0, 0, 0.55) 0%, transparent 65%);
}

/* ---------- CHARACTER (right side, full-height) ---------- */
.landing-character {
    position: absolute;
    z-index: 1;
    right: clamp(-40px, -2vw, 40px);
    bottom: 0;
    width: clamp(360px, 46vw, 720px);
    pointer-events: none;
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55));
    animation: heroCharIn 1s ease-out 0.2s both;
}

.landing-character img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes heroCharIn {
    from {
        opacity: 0;
        transform: translate(40px, 30px);
    }

    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* ---------- TOP: LOGO (left aligned) ---------- */
.landing-top {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    display: flex;
    justify-content: end;
}

.landing-logoWrap {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    animation: heroFadeUp 0.8s ease-out 0.1s both;
    padding-top: 10%;
}

.landing-logo {
    width: clamp(340px, 52vw, 820px);
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(0, 220, 255, 0.25));
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

/* ---------- BOTTOM: BUTTONS + DATE (centered) ---------- */
.landing-bottom {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(12px, 2vh, 22px);
}

.landing-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 1.4vw, 22px);
    width: 100%;
    max-width: 980px;
    animation: heroFadeUp 0.8s ease-out 0.3s both;
}

.landing-btn {
    position: relative;
    flex: 0 1 auto;
    width: clamp(150px, 16vw, 200px);
    aspect-ratio: 280 / 70;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 12px 14px;

    background: url("../images/landingpage/buttob.png") center / 100% 100% no-repeat;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
    font-family: "Google Sans", "Kanit", sans-serif;
    line-height: 1.15;

    transition: transform 0.22s ease, filter 0.22s ease;
    filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.20));
}

.landing-btn:hover,
.landing-btn:focus-visible {
    transform: translateY(-3px) scale(1.03);
    filter: drop-shadow(0 0 14px rgba(0, 230, 255, 0.65)) brightness(1.08);
    color: #ffffff;
    outline: none;
}

.landing-btn:active {
    transform: translateY(1px) scale(0.97);
    filter: drop-shadow(0 0 6px rgba(0, 230, 255, 0.45));
}

.landing-btn-line1 {
    font-size: clamp(13px, 1.05vw, 16px);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.landing-btn-line2 {
    font-size: clamp(11px, 0.85vw, 13px);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #cef4ff;
}

/* ---------- DATE LINE (centered, gradient background) ---------- */
.landing-date {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 22px;
    min-height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: clamp(12px, 0.95vw, 14px);
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 30, 60, 0.55);

    background: linear-gradient(90deg,
            rgba(23, 223, 249, 0.00) 0%,
            rgba(23, 223, 249, 0.55) 35%,
            rgba(120, 240, 255, 0.85) 50%,
            rgba(23, 223, 249, 0.55) 65%,
            rgba(23, 223, 249, 0.00) 100%);

    animation: heroFadeUp 0.8s ease-out 0.5s both;
}

/* ---------- FOOTER: ทับด้วยพื้นหลังเข้ม ---------- */
.footerMainLayout {
    position: relative;
    z-index: 5;
    background: rgba(2, 8, 22, 0.92);
    border-top: 1px solid rgba(80, 220, 255, 0.18);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* ───── 4K / Ultra-wide (≥1920px) ───── */
@media (min-width: 1920px) {
  .landing { padding: 100px clamp(80px, 8vw, 160px) 70px; }
  .landing-logo { width: clamp(620px, 50vw, 920px); }
  .landing-character { width: clamp(720px, 44vw, 920px); right: -30px; }
  .landing-menu { max-width: 1080px; }
  .landing-date { max-width: 820px; }
}

/* ───── Desktop XL (1600–1919px) ───── */
@media (min-width: 1600px) and (max-width: 1919px) {
  .landing { padding-left: clamp(60px, 7vw, 120px); }
  .landing-logo { width: clamp(540px, 46vw, 820px); }
  .landing-character { width: clamp(580px, 42vw, 820px); }
}

/* ───── Tablet Landscape (max 1200px) ───── */
@media (max-width: 1200px) {
  .landing { padding-left: clamp(20px, 4vw, 40px); }
  .landing-logoWrap { padding-top: 0; }
  .landing-logo { width: clamp(360px, 48vw, 620px); }
  .landing-character {
    width: clamp(380px, 50vw, 560px);
    right: clamp(-30px, -2vw, 0px);
  }
  .landing-menu { gap: clamp(8px, 1.2vw, 18px); }
}

/* ───── Tablet Portrait (max 1100px) — stack: character → logo → buttons → date ───── */
@media (max-width: 1100px) {
  .landing {
    padding: 80px 22px 30px;
    justify-content: flex-start;
    align-items: center;
    gap: clamp(8px, 1.4vh, 16px);
  }

  /* ลำดับใหม่: character บนสุด */
  .landing-character {
    order: 1;
    position: relative;
    right: auto;
    bottom: auto;
    width: clamp(280px, 42vw, 420px);
    opacity: 1;
    margin: 0 auto;
    align-self: center;
  }
  .landing-top    { order: 2; justify-content: center; width: 100%; }
  .landing-bottom { order: 3; margin-top: auto; }

  .landing-logoWrap { justify-content: center; margin-top: -40px; }
  .landing-logo { width: clamp(360px, 60vw, 580px); margin-top: -100px;}

  .landing-menu {
    justify-content: center;
    gap: 12px;
    max-width: 720px;
  }
  .landing-btn { width: clamp(150px, 22vw, 200px); }
}

/* ───── Tablet (max 992px) ───── */
@media (max-width: 992px) {
  .landing-character { width: clamp(260px, 50vw, 380px); }
  .landing-logoWrap { margin-top: -50px; }
  .landing-logo { width: clamp(340px, 64vw, 540px); margin-top: -100px;}
  .landing-menu { gap: 10px; max-width: 600px; }
  .landing-btn { width: clamp(150px, 26vw, 200px); }
}

/* ───── Mobile Large (max 768px) — ปุ่ม 2 ต่อแถว ───── */
@media (max-width: 768px) {
  .landing {
    padding: 78px 18px 28px;
    gap: 12px;
  }

  .landing-character { width: clamp(240px, 56vw, 340px); }
  .landing-logoWrap { margin-top: -50px; }
  .landing-logo { width: clamp(300px, 78vw, 460px); }

  .landing-bottom { gap: 14px; }

  .landing-menu {
    gap: 10px;
    max-width: 480px;
  }
  .landing-btn {
    width: calc(50% - 5px);
    max-width: 230px;
    aspect-ratio: 280 / 100;
  }

  .landing-date {
    font-size: 12.5px;
    padding: 7px 14px;
    min-height: 34px;
  }
}

/* ───── Mobile Medium (max 576px) ───── */
@media (max-width: 576px) {
  .landing { padding: 80px 14px 26px; gap: 14px; }
  .landing-logo { width: clamp(240px, 86vw, 420px); }
  .landing-btn-line1 { font-size: 13px; }
  .landing-btn-line2 { font-size: 11px; }
  .landing-date { font-size: 11.8px; padding: 6px 12px; min-height: 32px; }
  .landing-character { width: clamp(200px, 60vw, 280px); }
}

/* ───── Mobile Small (max 480px) — 2 ปุ่มต่อแถว ───── */
@media (max-width: 480px) {
  .landing { padding: 78px 12px 22px; }
  .landing-menu { gap: 8px; max-width: 100%; }
  .landing-btn {
    width: calc(50% - 4px);
    aspect-ratio: 280 / 96;
    padding: 8px 6px;
  }
  .landing-btn-line1 { font-size: 12.5px; }
  .landing-btn-line2 { font-size: 10.5px; }
  .landing-date {
    font-size: 11px;
    line-height: 1.4;
    padding: 5px 8px;
    letter-spacing: 0;
  }
  .landing-character { width: 76%; }
}

/* ───── Mobile Tiny (max 380px) ───── */
@media (max-width: 380px) {
  .landing { padding: 74px 10px 20px; }
  .landing-logo { width: 92%; }
  .landing-menu { gap: 6px; }
  .landing-btn { width: calc(50% - 3px); padding: 6px 4px; }
  .landing-btn-line1 { font-size: 11.5px; }
  .landing-btn-line2 { font-size: 10px; }
  .landing-date {
    font-size: 10.5px;
    background: linear-gradient(90deg,
      rgba(23, 223, 249, 0) 0%,
      rgba(23, 223, 249, 0.45) 25%,
      rgba(120, 240, 255, 0.75) 50%,
      rgba(23, 223, 249, 0.45) 75%,
      rgba(23, 223, 249, 0) 100%);
  }
}

/* ───── Mobile Ultra-tiny (max 320px) ───── */
@media (max-width: 320px) {
  .landing-btn-line1 { font-size: 10.5px; }
  .landing-btn-line2 { font-size: 9.5px; }
  .landing-date { font-size: 10px; }
}

/* ───── Landscape Mobile (เตี้ย, แนวนอน) ───── */
@media (max-height: 560px) and (orientation: landscape) {
  .landing {
    padding: 70px clamp(20px, 4vw, 40px) 18px;
    gap: 12px;
    min-height: 100dvh;
  }
  .landing-logoWrap { justify-content: flex-start; margin-top: 0; }
  .landing-logo { width: clamp(240px, 32vw, 420px); }
  .landing-bottom { gap: 10px; }
  .landing-menu { gap: 8px; }
  .landing-btn {
    width: clamp(120px, 14vw, 160px);
    aspect-ratio: 280 / 96;
  }
  .landing-date {
    font-size: 11.5px;
    padding: 5px 10px;
    min-height: 30px;
  }
  .landing-character {
    position: absolute;
    right: 0; bottom: 0;
    width: clamp(220px, 32vw, 340px);
    margin: 0;
    opacity: 0.85;
  }
}

/* ───── Hover เฉพาะ device ที่ใช้เมาส์จริง ───── */
@media (hover: none) {
  .landing-btn:hover { transform: none; filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.20)); }
}

/* ───── ผู้ใช้ลด motion ───── */
@media (prefers-reduced-motion: reduce) {
  .landing-character,
  .landing-logoWrap,
  .landing-menu,
  .landing-date {
    animation: none !important;
  }
  .landing-btn { transition: none; }
}