/* ==========================================================
   1. IMPORTS & FONT FACES (ฟอนต์หลักที่ใช้ในเว็บ)
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Gilda+Display&display=swap');

@font-face {
    font-family: 'Geometria';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/public/fonts/Geometria.woff) format('woff');
}

@font-face {
    font-family: 'Geometria';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(/public/fonts/Geometria-Light.woff) format('woff');
}


/* ==========================================================
   2. CSS RESET (ล้างค่าเริ่มต้นของเบราว์เซอร์ให้เป็นศูนย์)
   ========================================================== */
html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, img, ul, li, form, label, table, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}

ol, ul { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
input, select, img { vertical-align: middle; }
html { font-size: 125%; }


/* ==========================================================
   3. GLOBAL BODY & CORE SETTINGS (ตั้งค่าพื้นฐานของหน้าเว็บ)
   ========================================================== */
body {
    font-family: 'Gilda Display', serif;
    font-size: 16px;
    color: #514641;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    background: #FFFFFF;
    cursor: default;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    isolation: isolate;
}

body * {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
}

/* บังคับให้เบราว์เซอร์เรนเดอร์อนิเมชันผ่านการ์ดจอ (GPU Acceleration) เพื่อความลื่นไหลระดับ 60fps */
[data-scroll-speed] {
    will-change: transform;
}

h1, h2, h3, h4, h5, h6 { font-weight: 400; }
a { text-decoration: none; }
.isButton { cursor: pointer; }


/* ==========================================================
   4. LAYOUT UTILITIES & HELPERS (เครื่องมือจัดวางโครงสร้าง)
   ========================================================== */
.relative { position: relative !important; }
.flexed { display: flex; justify-content: space-between; align-items: center; }
.full_width { width: 100%; height: auto; }
.full_height { height: 100%; width: auto; }

/* จัดรูปภาพให้เต็มกรอบแบบสัดส่วนเป๊ะ (ใช้กับ Hero Image และรูปภาพประกอบ) */
.fit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fit.bottom { object-position: bottom; }

.no_overflow { overflow: hidden; }
.no_opacity { opacity: 0 !important; pointer-events: none; }
.inlineBlock { display: inline-block; }
.block { display: block !important; }

.mainContainer {
    width: calc(100% - 5vw);
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.margin { margin-top: 5vw; }
.halfMargin { margin-top: 2.5vw; }
.cWhite { color: #fffff4 !important; }
.bBrown { background: #514641; }


/* ==========================================================
   5. HEADER & NAVIGATION BAR (แถบเมนูด้านบนสุด)
   ========================================================== */
header {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    height: 40px;
    background: #B2E0DC;
    transform: translateY(-40px);
    will-change: transform;
}

header.show { transform: none; }
header .mainContainer { height: 100%; }
header .logoFull { justify-content: center; }
header .logotype { width: 160px; }

#menuBar {
    position: absolute;
    z-index: 1;
    width: 100%;
    top: 35px;
}

.menuController {
    display: flex;
    align-items: center;
    width: 240px;
    cursor: pointer;
}

.lines { margin-right: 15px; }
.line {
    width: 57px;
    height: 1px;
    background: #fffff4;
}
.line._2 { margin-top: 8px; }

.label {
    font-family: 'Geometria', sans-serif;
    font-size: 13px;
    letter-spacing: 3px;
    font-weight: 400;
    transition: all 1000ms cubic-bezier(0.190, 1.000, 0.220, 1.000);
}

.bookNow {
    display: flex;
    align-items: center;
    width: 240px;
    position: relative;
    justify-content: flex-end;
    color: inherit;
}

.bookNow .label { margin-right: 15px; }

.penIcon { margin-bottom: 8px; }
.penIcon .penSprite {
    margin-left: 10px;
    width: 16px;
    height: 16px;
    background-position: 0px -1px;
}
.penIcon:after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: #fffff4;
}


/* ==========================================================
   6. HERO SECTION (ส่วนเปิดหน้าเว็บตัวแรกสุด - สำคัญต่อสปีด 0.6s)
   ========================================================== */
#top { overflow: auto; }

/* เลเยอร์เงาดำด้านบนเพื่อความสวยงาม ห้าม Lazy Load ส่วนนี้เด็ดขาด */
#top:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, black -150%, transparent);
    width: 100%;
    height: 200px;
    z-index: 1;
    opacity: 0;
    transition: opacity 1500ms cubic-bezier(0.575, 0.005, 0.285, 1.005);
}
#top.topVeil:before { opacity: 1; }

#coverPicture {
    height: 100vh;
    will-change: transform;
}

#coverPicture img.hidden {
    transform: scale(1.02);
    opacity: 0;
}

#topVeil {
    background: #000000;
    opacity: 0.4;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

#coverOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    will-change: transform;
}
#coverOverlay .mainContainer { height: 100%; }

#coverStory {
    position: absolute;
    width: 100%;
    bottom: 230px;
}

#coverStory h1 {
    font-family: 'Gilda Display', serif;
    color: #fffff4;
    font-size: 65px;
    font-weight: 400;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

#coverStory.hidden span {
    transform: translateY(101%);
}


/* ==========================================================
   7. TRANSITION TIMINGS & DELAYS (ความเร็วอนิเมชันและระยะเวลาหน่วง)
   ========================================================== */
.d50 { transition-delay: 50ms !important; }
.d100 { transition-delay: 100ms !important; }
.d150 { transition-delay: 150ms !important; }
.d200 { transition-delay: 200ms !important; }
.d250 { transition-delay: 250ms !important; }
.d300 { transition-delay: 300ms !important; }

.has_transition_3000 {
    transition: transform 3000ms cubic-bezier(0.190, 1.000, 0.220, 1.000), opacity 3000ms cubic-bezier(0.190, 1.000, 0.220, 1.000);
}

.has_transition_1500 {
    transition: transform 1500ms cubic-bezier(0.190, 1.000, 0.220, 1.000), opacity 1000ms cubic-bezier(0.190, 1.000, 0.220, 1.000);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}


/* ==========================================================
   8. RESPONSIVE MEDIA QUERIES (ปรับแต่งสำหรับหน้าจอมือถือ < 959px)
   ========================================================== */
@media all and (max-width: 959px) {
    .mobileHidden { display: none !important; }

    .label {
        font-size: 10px;
        letter-spacing: 2px;
        display: block;
    }

    .menuController { width: 60px; }
    .bookNow { width: 60px; }
    .line { width: 32px; }

    #menuBar { top: 15px; }

    #coverStory { bottom: 120px; }
    #coverStory h1 { font-size: 30px; }
    #coverStory.hidden span { transform: translateY(190%); }

    .margin { margin-top: 30px; }
}