:root {
  --orange: #ff6b17;
  --orange-dark: #e55505;
  --navy: #0d1c29;
  --navy-2: #13293a;
  --text: #17202a;
  --muted: #6d7680;
  --line: #e7eaed;
  --card: #ffffff;
  --bg: #f6f7f8;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 16px 40px rgba(14, 29, 43, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: rgba(8, 20, 31, .72);
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .02em; }
.brand-mark { color: var(--orange); font-size: 24px; line-height: 1; }
.brand-science { font-size: 14px; }
.brand-divider { width: 1px; height: 24px; background: rgba(255,255,255,.5); margin: 0 3px; }
.brand-kmitl { color: #ff7b31; font-size: 18px; }
.desktop-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 600; }
.desktop-nav a { opacity: .9; transition: .2s ease; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--orange); opacity: 1; }
.lang-btn { border: 0; background: none; color: #fff; cursor: pointer; }
.lang-btn span { opacity: .45; margin: 0 4px; }
.mobile-menu-btn { display: none; width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(255,255,255,.12); padding: 10px; }
.mobile-menu-btn span { display: block; height: 2px; margin: 5px 0; background: #fff; border-radius: 2px; }

.hero {
  position: relative;
  min-height: 760px;
  padding: 160px clamp(20px, 6vw, 92px) 190px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(6, 17, 27, .92) 0%, rgba(6, 17, 27, .66) 42%, rgba(8, 25, 37, .15) 70%),
    url("assets/hero-building.jpg") center/cover no-repeat,
    linear-gradient(135deg, #112c42, #32536b);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -100px -160px auto;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: rgba(255, 107, 23, .13);
  filter: blur(1px);
}
.hero-content { position: relative; z-index: 2; max-width: 700px; }
.eyebrow, .section-kicker { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .14em; }
.eyebrow { color: #d4dce3; }
.hero h1 { margin: 0; font-size: clamp(48px, 6vw, 86px); line-height: .96; letter-spacing: -.03em; }
.hero h1 span { color: var(--orange); }
.hero-copy { margin: 28px 0 30px; font-size: clamp(18px, 2vw, 26px); line-height: 1.55; color: #eef2f5; }
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 54px;
  padding: 0 26px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ff812b);
  box-shadow: 0 10px 24px rgba(255, 107, 23, .28);
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(255, 107, 23, .34); }
.primary-btn.small { min-height: 48px; font-size: 14px; }

.quick-actions {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  width: min(1080px, calc(100% - 40px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.quick-card {
  min-height: 126px;
  padding: 20px 18px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text);
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 28px rgba(5, 16, 26, .18);
  transition: transform .18s ease;
}
.quick-card:hover { transform: translateY(-4px); }
.quick-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 7px; font-size: 24px; font-weight: 800; }
.quick-icon.orange { color: #ff6b17; background: #fff1e7; }
.quick-icon.blue { color: #1678d3; background: #e8f3ff; }
.quick-icon.purple { color: #7441c9; background: #f1eafd; }
.quick-card strong { font-size: 16px; }
.quick-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 92px 0; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 28px; }
.section-kicker { color: var(--orange); }
.section h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.15; letter-spacing: -.02em; }
.section p { color: var(--muted); line-height: 1.8; }
.section code { color: var(--orange-dark); background: #fff1e8; padding: 2px 6px; border-radius: 6px; }

.building-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.building-card { overflow: hidden; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); }
.building-thumb { aspect-ratio: 16/9; background-size: cover; background-position: center; }
.building-1 { background: linear-gradient(145deg, rgba(9,31,47,.15), rgba(255,107,23,.08)), url("assets/building-phrachomklao.jpg") center/cover, linear-gradient(135deg,#aab8c1,#637787); }
.building-2 { background: linear-gradient(145deg, rgba(9,31,47,.15), rgba(255,107,23,.08)), url("assets/building-chulabhorn.jpg") center/cover, linear-gradient(135deg,#ccd5da,#7b8e9a); }
.building-3 { background: linear-gradient(145deg, rgba(9,31,47,.15), rgba(255,107,23,.08)), url("assets/building-scientific-center.jpg") center/cover, linear-gradient(135deg,#c2cdd2,#6f8390); }
.building-info { padding: 22px; }
.building-type { display: inline-block; padding: 6px 10px; border-radius: 99px; background: #fff1e8; color: var(--orange-dark); font-size: 12px; font-weight: 800; }
.building-info h3 { margin: 12px 0 4px; font-size: 21px; }
.building-info p { margin: 0 0 18px; font-size: 14px; }
.outline-btn { width: 100%; min-height: 46px; border: 1px solid #d8dde2; border-radius: 11px; color: var(--text); background: #fff; font-weight: 800; cursor: pointer; }
.outline-btn:hover { border-color: var(--orange); color: var(--orange-dark); }

.map-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center; }
.map-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.text-link { color: var(--orange-dark); font-weight: 800; }
.campus-map { position: relative; min-height: 420px; border-radius: 26px; overflow: hidden; background: #9ec27d; box-shadow: var(--shadow); border: 10px solid #fff; }
.road { position: absolute; height: 60px; background: #cfd6d8; border: 8px solid #eef1f2; transform-origin: left center; }
.road-a { width: 125%; left: -8%; top: 43%; transform: rotate(-14deg); }
.road-b { width: 105%; left: 20%; top: 55%; transform: rotate(64deg); }
.pond { position: absolute; width: 190px; height: 100px; left: 9%; bottom: 12%; border-radius: 45% 55% 48% 52%; background: #77b9c5; border: 8px solid rgba(255,255,255,.45); }
.map-building { position: absolute; display: grid; place-items: center; color: rgba(0,0,0,.5); font-weight: 900; background: #e7e9ea; border: 6px solid #d0d4d6; box-shadow: 0 8px 18px rgba(0,0,0,.12); }
.b1 { width: 180px; height: 90px; left: 12%; top: 13%; transform: rotate(-8deg); }
.b2 { width: 155px; height: 100px; right: 10%; top: 10%; transform: rotate(9deg); }
.b3 { width: 145px; height: 112px; left: 42%; top: 42%; transform: rotate(-5deg); }
.b4 { width: 180px; height: 88px; right: 8%; bottom: 9%; transform: rotate(7deg); }
.map-pin { position: absolute; z-index: 4; width: 44px; height: 44px; border: 5px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); color: #fff; background: var(--orange); box-shadow: 0 6px 12px rgba(0,0,0,.25); cursor: pointer; }
.map-pin::first-letter { transform: rotate(45deg); }
.pin-1 { left: 25%; top: 21%; }
.pin-2 { right: 23%; top: 15%; }
.pin-3 { left: 51%; top: 47%; }

.info-section { padding-top: 20px; }
.info-panel { border-radius: 28px; padding: clamp(28px, 5vw, 64px); background: linear-gradient(135deg, #0d1c29, #193c55); color: #fff; box-shadow: var(--shadow); }
.info-panel p { max-width: 760px; color: #d7e0e6; }

footer { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 44px clamp(20px, 6vw, 90px); background: #08141e; color: #fff; }
footer p { margin: 6px 0 0; color: #9facb5; font-size: 13px; }

.tour-modal { position: fixed; z-index: 3000; inset: 0; display: grid; grid-template-rows: 58px 1fr; background: #050b10; opacity: 0; visibility: hidden; transform: scale(.985); transition: .2s ease; }
.tour-modal.is-open { opacity: 1; visibility: visible; transform: scale(1); }
.tour-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; color: #fff; background: #0c1822; border-bottom: 1px solid #24313c; }
.tour-modal__header > div { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 0 5px rgba(53,208,127,.13); }
.viewer-actions a { font-size: 13px; color: #d9e1e6; }
.viewer-actions button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #33414c; color: #fff; background: #172733; cursor: pointer; }
#tourFrame { width: 100%; height: 100%; border: 0; background: #000; }

@media (max-width: 980px) {
  .desktop-nav { position: fixed; top: 76px; left: 14px; right: 14px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px; border-radius: 16px; background: rgba(8,20,31,.97); box-shadow: var(--shadow); }
  .desktop-nav.is-open { display: flex; }
  .desktop-nav a, .lang-btn { padding: 13px 14px; text-align: left; }
  .mobile-menu-btn { display: block; }
  .hero { min-height: 800px; padding-top: 130px; align-items: flex-start; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); bottom: 28px; }
  .building-grid { grid-template-columns: 1fr 1fr; }
  .map-section { grid-template-columns: 1fr; }
  .campus-map { min-height: 380px; }
}

/* ==========================
   HERO
========================== */

.hero {
    position: relative;

    min-height: calc(100vh - 70px);

    background:
        linear-gradient(
            110deg,
            #061825 0%,
            #0b2231 45%,
            #254b63 100%
        );

    overflow: hidden;

    padding-bottom: 150px;
}


/* ==========================
   LEFT
========================== */

.hero-left {
    position: relative;

    z-index: 10;

    width: 52%;

    padding:
        110px
        20px
        80px
        75px;
}


.hero-left h1 {
    margin: 0;

    color: white;

    font-size: clamp(55px, 5.7vw, 100px);

    line-height: .98;

    font-weight: 900;

    letter-spacing: -3px;
}


.hero-left h1 span {
    display: block;

    color: #ff6418;
}

.hero-content h1 {
    margin-top: -30px;
}

.hero-content h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(54px, 6vw, 96px);
    line-height: 0.92;
    font-weight: 900;
    letter-spacing: -2px;
    margin-top: -30px;
}

.hero-content {
    position: relative;
    z-index: 5;

    width: 60%;
    max-width: none;

    padding: 50px 0 120px 60px;
}

.hero-description {
    margin-top: 40px;

    color: white;

    font-size: 28px;

    line-height: 1.6;
}


/* ==========================
   BUTTON
========================== */

.start-btn {
    display: inline-flex;

    align-items: center;

    gap: 30px;

    margin-top: 32px;

    padding: 19px 30px;

    background: #ff671b;

    color: white;

    text-decoration: none;

    border-radius: 15px;

    font-size: 18px;

    font-weight: 700;

    box-shadow:
        0 10px 25px
        rgba(255, 103, 27, .25);

    transition: .3s;
}


.start-btn:hover {
    transform: translateY(-4px);

    background: #ff7b31;
}


/* ==========================
   RIGHT IMAGE
========================== */

.hero-right {
    position: absolute;

    top: 0;

    right: 0;

    width: 55%;

    height: calc(100% - 100px);

    overflow: hidden;
}


.hero-img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center;

    display: block;
}


/*
ทำให้ภาพค่อย ๆ กลืนกับพื้นหลัง
*/

.hero-right::before {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 2;

    pointer-events: none;

    background:

        linear-gradient(
            90deg,

            #0b2231 0%,

            rgba(11,34,49,.95) 5%,

            rgba(11,34,49,.65) 18%,

            rgba(11,34,49,.15) 38%,

            transparent 55%
        );
}


/* เงาด้านล่าง */

.hero-right::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 2;

    pointer-events: none;

    background:

        linear-gradient(
            0deg,

            rgba(6,24,37,.65) 0%,

            transparent 30%
        );
}


/* ==========================
   360 ICON
========================== */

.circle-360 {
    position: absolute;

    z-index: 5;

    left: 42%;

    top: 45%;

    width: 130px;

    height: 130px;

    transform:
        translate(-50%, -50%);

    border:
        4px solid rgba(255,255,255,.9);

    border-radius: 50%;

    background:
        rgba(0,0,0,.18);

    backdrop-filter: blur(4px);

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    color: white;
}


.circle-360 strong {
    font-size: 40px;
}


.circle-360 small {
    font-size: 12px;
}


/* ==========================
   LOCATION PIN
========================== */

.location-pin {
    position: absolute;

    z-index: 6;

    top: 36%;

    left: 68%;

    width: 55px;

    height: 55px;

    background: #ff671b;

    border: 5px solid white;

    border-radius:
        50% 50% 50% 0;

    transform:
        rotate(-45deg);

    box-shadow:
        0 6px 15px
        rgba(0,0,0,.3);
}


.location-pin span {
    position: absolute;

    width: 14px;

    height: 14px;

    background: white;

    border-radius: 50%;

    top: 50%;

    left: 50%;

    transform:
        translate(-50%, -50%);
}


/* ==========================
   QUICK MENU
========================== */

.quick-menu {
    position: absolute;

    z-index: 20;

    bottom: 35px;

    left: 50%;

    transform:
        translateX(-50%);

    width:
        min(1280px, 86%);

    display: grid;

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

    gap: 18px;
}


.quick-card {
    min-height: 155px;

    background: #ffffff;

    border-radius: 22px;

    text-decoration: none;

    color: #091d2e;

    padding: 24px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    text-align: center;

    box-shadow:
        0 8px 25px
        rgba(0,0,0,.10);

    transition: .25s;
}


.quick-card:hover {
    transform:
        translateY(-6px);
}


.quick-card h3 {
    margin: 12px 0 7px;

    font-size: 18px;
}


.quick-card p {
    margin: 0;

    color: #818181;

    font-size: 13px;
}


.quick-icon {
    width: 48px;

    height: 48px;

    display: flex;

    justify-content: center;

    align-items: center;

    border-radius: 15px;

    font-size: 25px;
}


.quick-icon.orange {
    color: #ff671b;

    background: #fff1e8;
}


.quick-icon.purple {
    color: #7c3aed;

    background: #f2eaff;
}


.quick-icon.blue {
    color: #1477d4;

    background: #eaf4ff;
}


/* ==========================
   MOBILE
========================== */

@media (max-width: 900px) {

    .hero {
        padding-bottom: 30px;
    }


    .hero-left {
        width: 100%;

        padding:
            45px
            25px;
    }


    .hero-left h1 {
        font-size: 50px;
    }


    .hero-description {
        font-size: 20px;
    }


    .hero-right {
        position: relative;

        width: 100%;

        height: 380px;
    }


    .hero-right::before {

        background:

            linear-gradient(
                0deg,

                #0b2231 0%,

                transparent 45%
            );
    }


    .quick-menu {
        position: relative;

        left: auto;

        bottom: auto;

        transform: none;

        width: calc(100% - 40px);

        margin: -35px auto 0;

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

}


@media (max-width: 520px) {

    .hero-left h1 {
        font-size: 39px;
    }


    .quick-menu {
        grid-template-columns: 1fr;
    }


    .hero-right {
        height: 300px;
    }

}

.building-thumb {
    width: 100%;
    height: 265px;
    overflow: hidden;

    background: #9ca6ac;

    border-radius: 28px 28px 0 0;
}

.building-thumb img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;
}

.outline-btn {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
  .site-header { height: 66px; padding: 0 15px; }
  .brand-science { font-size: 12px; }
  .brand-kmitl { font-size: 16px; }
  .desktop-nav { top: 66px; }
  .hero { min-height: 780px; padding: 112px 18px 310px; background-position: 58% center; }
  .hero h1 { font-size: 42px; }
  .hero-copy { font-size: 18px; }
  .quick-actions { width: calc(100% - 28px); bottom: 18px; gap: 9px; }
  .quick-card { min-height: 116px; padding: 14px 10px; }
  .quick-icon { width: 38px; height: 38px; font-size: 20px; }
  .quick-card strong { font-size: 14px; }
  .quick-card small { display: none; }
  .section { width: min(100% - 28px, 1180px); padding: 64px 0; }
  .building-grid { grid-template-columns: 1fr; }
  .campus-map { min-height: 300px; }
  .b1 { width: 125px; height: 70px; }
  .b2 { width: 115px; height: 75px; }
  .b3 { width: 110px; height: 85px; }
  .b4 { width: 125px; height: 66px; }
  footer { align-items: flex-start; flex-direction: column; }
  .viewer-actions a { display: none; }
}
