/* ==========================================================================
   DRAWER OF DREAMS - BRAND STYLESHEET
   ========================================================================== */

/* --- Custom Variables & Core Tokens --- */
:root {
    /* Color Palette */
    --color-black: #000000;
    --color-dark: #111111;
    --color-muted: #777777;
    --color-light-gray: #f5f5f5;
    --color-white: #ffffff;
    
    /* Typography */
    --font-eng: 'Plus Jakarta Sans', sans-serif;
    --font-thai: 'IBM Plex Sans Thai', 'Plus Jakarta Sans', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Base Resets & Layout Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--color-white);
    color: var(--color-dark);
    font-family: var(--font-thai);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal);
}

/* --- Typography Hierarchy --- */
strong {
    font-weight: 700;
}

/* ==========================================================================
   NAVIGATION BAR (HEADER)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: all var(--transition-normal);
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand Logo Styling */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    z-index: 1010;
}

.logo-icon-wrapper {
    width: 44px;
    height: 28px;
    display: flex;
    align-items: center;
}

.logo-drawer-svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-black);
    transition: transform var(--transition-bounce);
}

.brand-logo:hover .logo-drawer-svg {
    transform: rotate(-3deg) scale(1.05);
}

.logo-text {
    font-family: var(--font-eng);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-black);
    letter-spacing: -0.5px;
}

.logo-text strong {
    font-weight: 800;
}

/* Menu Links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-family: var(--font-eng);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-muted);
    position: relative;
    padding: 8px 4px;
}

.nav-link:hover {
    color: var(--color-black);
}

/* Active Link & Underline Squiggle */
.nav-link.active {
    color: var(--color-black);
    font-weight: 600;
}

.squiggle-underline-wrapper {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    min-width: 45px;
    height: 8px;
    pointer-events: none;
}

.squiggle-svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-black);
}

/* Hamburger Menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-black);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background-color var(--transition-fast);
}

.mobile-menu-btn:hover {
    background-color: var(--color-light-gray);
}

/* ==========================================================================
   HERO / MAIN CONTENT SECTION
   ========================================================================== */
.hero-section {
    width: 100%;
    min-height: 100vh;
    padding-top: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--color-white);
}

.hero-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Central Content Container */
.hero-content {
    max-width: 720px;
    text-align: center;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Slanted Black Card Badge */
.slanted-badge {
    background-color: var(--color-black);
    padding: 12px 36px;
    transform: rotate(-3.5deg);
    display: inline-block;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    transition: transform var(--transition-bounce);
}

.slanted-badge:hover {
    transform: rotate(-1.5deg) scale(1.03);
}

.badge-text {
    font-family: var(--font-eng);
    font-size: 2.8rem;
    color: var(--color-white);
    letter-spacing: -1.2px;
    font-weight: 300;
    white-space: nowrap;
}

.badge-text strong {
    font-weight: 800;
}

/* Main English Headline */
.hero-headline {
    font-family: var(--font-eng);
    font-size: 3.4rem;
    font-weight: 400;
    color: var(--color-black);
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    line-height: 1.15;
}

.hero-headline .bold-word {
    font-weight: 800;
}

/* Thai Sub-headline description */
.hero-tagline-th {
    font-family: var(--font-thai);
    font-size: 1.35rem;
    line-height: 1.7;
    color: var(--color-dark);
    font-weight: 400;
    margin-bottom: 40px;
    max-width: 580px;
    opacity: 0.95;
    letter-spacing: -0.2px;
}

/* Sharp Solid Black Action Button */
.btn-primary-black {
    font-family: var(--font-thai);
    font-size: 1.2rem;
    font-weight: 600;
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 16px 44px;
    border-radius: 4px;
    display: inline-block;
    border: 2px solid var(--color-black);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-bounce);
    cursor: pointer;
}

.btn-primary-black:hover {
    background-color: var(--color-white);
    color: var(--color-black);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.btn-primary-black:active {
    transform: translateY(-1px);
}

/* ==========================================================================
   FLOATING DECORATIVE SKETCH ELEMENTS (SVGs)
   ========================================================================== */
.floating-element {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    transition: transform var(--transition-bounce), opacity var(--transition-normal);
}

.sketch-svg {
    width: 100%;
    height: 100%;
    opacity: 0.85;
}

.sketch-svg path, 
.sketch-svg circle {
    stroke: var(--color-black);
}

/* Individual Placements & Float Animations */

/* 1. Rocket (Left Side) */
.rocket-elem {
    width: 140px;
    height: 210px;
    left: 8%;
    top: 35%;
    transform: translateY(-50%) rotate(-8deg);
    animation: floatingBob 6s ease-in-out infinite alternate;
}

/* 2. Coin (Top Middle-Left) */
.coin-elem {
    width: 70px;
    height: 70px;
    left: 28%;
    top: 15%;
    animation: floatingBob 5s ease-in-out infinite alternate 1s;
}

/* 3. Squiggly Loop (Top Right) */
.loop-elem {
    width: 60px;
    height: 80px;
    right: 21%;
    top: 16%;
    animation: floatingBob 7s ease-in-out infinite alternate 0.5s;
}

/* 4. Brain/Cloud (Bottom Left) */
.brain-elem {
    width: 90px;
    height: 72px;
    left: 25%;
    bottom: 12%;
    animation: floatingBob 6.5s ease-in-out infinite alternate 1.5s;
}

/* 5. Piggy Bank (Bottom Right) */
.piggy-elem {
    width: 110px;
    height: 88px;
    right: 17%;
    bottom: 20%;
    animation: floatingBob 5.5s ease-in-out infinite alternate 2s;
}

/* Micro-interaction on mouse move/hover effect simulation in CSS */
.hero-wrapper:hover .rocket-elem { transform: translateY(-53%) rotate(-12deg) scale(1.04); }
.hero-wrapper:hover .coin-elem { transform: rotate(15deg) scale(1.05); }
.hero-wrapper:hover .loop-elem { transform: scale(1.08) rotate(5deg); }
.hero-wrapper:hover .brain-elem { transform: scale(1.05) translateY(2px); }
.hero-wrapper:hover .piggy-elem { transform: scale(1.06) rotate(-3deg); }

/* --- Gentle Floating Bob Animation Keyframes --- */
@keyframes floatingBob {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-15px) rotate(3deg);
    }
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.main-footer {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(0, 0, 0, 0.02);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.footer-container {
    width: 100%;
    max-width: 1400px;
    padding: 0 40px;
    text-align: center;
}

.copyright-text {
    font-family: var(--font-eng);
    font-size: 0.85rem;
    color: var(--color-muted);
    font-weight: 400;
}

/* ==========================================================================
   MOBILE MENU DRAWER OVERLAY
   ========================================================================== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 340px;
    height: 100%;
    background-color: var(--color-white);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active .mobile-menu-drawer {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-logo {
    gap: 8px;
}

.drawer-logo .logo-drawer-svg {
    width: 32px;
    height: 20px;
}

.drawer-logo .logo-text {
    font-size: 1.15rem;
}

.mobile-menu-close-btn {
    background: none;
    border: 1px solid var(--color-light-gray);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-black);
    transition: background-color var(--transition-fast);
}

.mobile-menu-close-btn:hover {
    background-color: var(--color-light-gray);
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-link {
    font-family: var(--font-eng);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-muted);
    padding: 14px 18px;
    border-radius: 8px;
    background-color: var(--color-light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-link.active {
    background-color: var(--color-black);
    color: var(--color-white);
    font-weight: 600;
}

.mobile-nav-link::after {
    content: '→';
    font-weight: 700;
    opacity: 0.6;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Notebooks & Mid-size Desktops (max-width: 1200px) */
@media (max-width: 1200px) {
    .nav-container {
        padding: 0 32px;
    }
    
    .hero-headline {
        font-size: 3rem;
    }
    
    .slanted-badge .badge-text {
        font-size: 2.4rem;
    }
    
    /* Scale SVGs down and push them wider */
    .rocket-elem {
        width: 110px;
        height: 165px;
        left: 4%;
    }
    
    .coin-elem {
        width: 55px;
        height: 55px;
        left: 20%;
    }
    
    .loop-elem {
        width: 50px;
        height: 66px;
        right: 15%;
    }
    
    .brain-elem {
        width: 75px;
        height: 60px;
        left: 15%;
    }
    
    .piggy-elem {
        width: 90px;
        height: 72px;
        right: 10%;
    }
}

/* Tablets (max-width: 992px) */
@media (max-width: 992px) {
    .hero-headline {
        font-size: 2.6rem;
    }
    
    .slanted-badge .badge-text {
        font-size: 2.1rem;
    }
    
    .hero-tagline-th {
        font-size: 1.2rem;
    }
    
    /* Reposition sketches for Tablet so they don't hit the center text */
    .rocket-elem {
        left: 3%;
        top: 25%;
    }
    
    .coin-elem {
        left: 10%;
        top: 8%;
    }
    
    .loop-elem {
        right: 8%;
        top: 8%;
    }
    
    .brain-elem {
        left: 8%;
        bottom: 8%;
    }
    
    .piggy-elem {
        right: 5%;
        bottom: 12%;
    }
}

/* Small Tablets & Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    .navbar {
        height: 75px;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-icon-wrapper {
        width: 36px;
        height: 22px;
    }
    
    /* Toggle Mobile Navigation controls */
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-wrapper {
        padding: 40px 20px;
    }
    
    .hero-content {
        max-width: 100%;
        padding-top: 40px;
    }
    
    .slanted-badge {
        padding: 8px 24px;
        margin-bottom: 20px;
    }
    
    .badge-text {
        font-size: 1.8rem;
    }
    
    .hero-headline {
        font-size: 2.2rem;
        margin-bottom: 16px;
    }
    
    .hero-tagline-th {
        font-size: 1.05rem;
        margin-bottom: 30px;
        line-height: 1.6;
    }
    
    .btn-primary-black {
        font-size: 1.05rem;
        padding: 14px 36px;
        width: 100%; /* Full width button on mobile */
        max-width: 320px;
        text-align: center;
    }
    
    /* 
       CRITICAL RESPONSIVENESS FOR DECORATIONS ON MOBILE:
       To ensure the center text remains 100% legible and easy to read without overlaps,
       we reduce the opacity of the absolute drawings, make them slightly smaller, and
       send them to the background borders.
    */
    .floating-element {
        opacity: 0.18; /* Set very light watermark opacity */
        z-index: 1;    /* Underneath everything */
    }
    
    .rocket-elem {
        width: 75px;
        height: 112px;
        left: 2%;
        top: 20%;
    }
    
    .coin-elem {
        width: 44px;
        height: 44px;
        left: 6%;
        top: 5%;
    }
    
    .loop-elem {
        width: 38px;
        height: 50px;
        right: 4%;
        top: 4%;
    }
    
    .brain-elem {
        width: 60px;
        height: 48px;
        left: 4%;
        bottom: 4%;
    }
    
    .piggy-elem {
        width: 70px;
        height: 56px;
        right: 2%;
        bottom: 5%;
    }
}

/* Very Small Mobile Screen (max-width: 480px) */
@media (max-width: 480px) {
    .badge-text {
        font-size: 1.55rem;
    }
    
    .hero-headline {
        font-size: 1.95rem;
    }
    
    .hero-tagline-th {
        font-size: 0.95rem;
    }
    
    /* Clean up floating items to prevent clutter on tiny displays */
    .coin-elem, .loop-elem, .brain-elem {
        display: none; /* Hide secondary doodles */
    }
    
    .rocket-elem {
        width: 60px;
        height: 90px;
        left: 5%;
        top: 15%;
    }
    
    .piggy-elem {
        width: 60px;
        height: 48px;
        right: 5%;
        bottom: 12%;
    }
}
