/* ==========================================================================
   WANNEXT — Site Styles
   ==========================================================================
   โครงสร้างไฟล์แบ่งเป็นส่วน ๆ เพื่อให้ง่ายต่อการแก้ไข:
     1) Variables (สี/ฟอนต์/เงา — แก้ได้ที่นี่ที่เดียว)
     2) Base / ตั้งค่าพื้นฐาน
     3) Utilities (section, ปุ่มเมนู ฯลฯ)
     4) Components (navbar, card, timeline, chip, ecosystem)
     5) Sections เฉพาะ (hero, cta, footer)
     6) Animation (reveal)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) Variables — สีหลักตาม wannext_brand.md (ห้ามเปลี่ยนโดยไม่มีเหตุผล)
   -------------------------------------------------------------------------- */
:root {
    --wan-navy:  #0B2A5B;            /* สีหลัก / พื้นหลังเข้ม */
    --wan-blue:  #1E6BFF;            /* สีเทคโนโลยีหลัก */
    --wan-cyan:  #00C2FF;            /* สีเน้น / highlight */
    --wan-light: #EAF2FF;            /* พื้นหลังอ่อน */
    --wan-white: #FFFFFF;            /* พื้นสะอาด */

    --wan-ink:        #12233F;       /* ตัวอักษรหลักบนพื้นสว่าง */
    --wan-muted:      #5B6B82;       /* ตัวอักษรรอง */
    --wan-border:     #DFE9F6;
    --wan-gradient:   linear-gradient(135deg, #0B2A5B, #1E6BFF, #00C2FF);

    --wan-shadow:    0 12px 28px rgba(11, 42, 91, 0.10);
    --wan-shadow-lg: 0 24px 48px rgba(11, 42, 91, 0.16);

    --wan-radius: 1.1rem;
    --wan-section-pad: 5.5rem 0;
}

/* --------------------------------------------------------------------------
   2) Base
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans Thai', 'Sora', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--wan-white);
    color: var(--wan-ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

section[id], header[id] { scroll-margin-top: 78px; }

img { max-width: 100%; }

/* --------------------------------------------------------------------------
   3) Utilities
   -------------------------------------------------------------------------- */
.section { padding: var(--wan-section-pad); position: relative; }

.section-light { background: var(--wan-light); }

.section-navy {
    background: linear-gradient(160deg, #0B2A5B 0%, #123d80 100%);
    color: var(--wan-white);
}

.section-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wan-blue);
    background: rgba(30, 107, 255, 0.10);
    border: 1px solid rgba(30, 107, 255, 0.25);
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    margin-bottom: 0.9rem;
}

.section-tag-on-dark {
    color: var(--wan-cyan);
    background: rgba(0, 194, 255, 0.12);
    border-color: rgba(0, 194, 255, 0.35);
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--wan-navy);
    margin-bottom: 0.6rem;
}

.section-title-light { color: var(--wan-white); }

.section-lead {
    color: var(--wan-muted);
    max-width: 660px;
    line-height: 1.9;
    margin-bottom: 0;
}

.section-lead-on-dark { color: rgba(255, 255, 255, 0.82); }

/* --------------------------------------------------------------------------
   4) Components
   -------------------------------------------------------------------------- */

/* ---- ปุ่ม ---- */
.btn-wan {
    --bs-btn-bg: var(--wan-blue);
    --bs-btn-border-color: var(--wan-blue);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #1759D8;
    --bs-btn-hover-border-color: #1759D8;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #0F4BC4;
    --bs-btn-active-border-color: #0F4BC4;
    --bs-btn-active-color: #fff;
    border-radius: 999px;
    font-weight: 600;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
}

.btn-hero-ghost {
    border: 2px solid rgba(255, 255, 255, 0.65);
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
}
.btn-hero-ghost:hover { background: #fff; color: var(--wan-navy); border-color: #fff; }

/* ---- Navbar + โลโก้ ---- */
.site-navbar {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--wan-border);
    transition: box-shadow 0.25s ease;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}
.site-navbar.scrolled { box-shadow: var(--wan-shadow); }

.site-logo { height: 34px; width: auto; }

.site-navbar .nav-link {
    font-weight: 500;
    color: var(--wan-navy);
    margin: 0 0.15rem;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus,
.site-navbar .nav-link.active { color: var(--wan-blue); }

/* ---- ไอคอนบริการ (กล่องไล่สี) ---- */
.service-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--wan-gradient);
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ---- Card ทั่วไป (Why / Services) ---- */
.why-card,
.service-card {
    background: #fff;
    border: 1px solid var(--wan-border);
    border-radius: var(--wan-radius);
    padding: 1.7rem;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.why-card { text-align: center; }

.service-card:hover,
.why-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--wan-shadow-lg);
    border-color: rgba(30, 107, 255, 0.4);
}

.service-en {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wan-blue);
    margin-bottom: 0.35rem;
}

.service-points {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--wan-muted);
    font-size: 0.92rem;
}
.service-points li { padding: 0.22rem 0; }
.service-points .bi { color: var(--wan-blue); margin-right: 0.4rem; }

/* ---- Process (ขั้นตอนทำงาน) ---- */
.process-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--wan-border);
    border-radius: var(--wan-radius);
    padding: 1.8rem 1.5rem 1.5rem;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.process-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--wan-shadow-lg);
}
.process-no {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-weight: 800;
    font-size: 2.4rem;
    line-height: 1;
    color: rgba(30, 107, 255, 0.18);
}

/* ---- Tech chips ---- */
.tech-chip {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--wan-border);
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    margin: 0.3rem;
    font-weight: 500;
    color: var(--wan-navy);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.tech-chip:hover {
    border-color: var(--wan-blue);
    color: var(--wan-blue);
    transform: translateY(-2px);
}

/* ---- Journey (เส้นทางแบรนด์) ---- */
.journey-list { position: relative; }

.journey-list::before {
    content: "";
    position: absolute;
    left: 1.65rem;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: linear-gradient(to bottom, #00C2FF, #1E6BFF);
    opacity: 0.45;
}

.journey-item {
    position: relative;
    display: flex;
    gap: 1.3rem;
    padding-bottom: 1.4rem;
}
.journey-item:last-child { padding-bottom: 0; }

.journey-dot {
    flex: 0 0 auto;
    width: 3.3rem;
    height: 3.3rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--wan-blue);
    box-shadow: 0 0 0 6px rgba(30, 107, 255, 0.12), var(--wan-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.journey-dot .bi { font-size: 1.3rem; color: var(--wan-blue); }

.journey-item.is-active .journey-dot {
    background: var(--wan-gradient);
    border-color: transparent;
    box-shadow: 0 0 0 6px rgba(0, 194, 255, 0.22), 0 10px 24px rgba(11, 42, 91, 0.28);
}
.journey-item.is-active .journey-dot .bi { color: #fff; }

.journey-body {
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--wan-border);
    border-radius: var(--wan-radius);
    padding: 1.1rem 1.35rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.journey-body:hover {
    transform: translateY(-3px);
    box-shadow: var(--wan-shadow);
    border-color: rgba(30, 107, 255, 0.35);
}

.journey-item.is-active .journey-body {
    border-color: rgba(30, 107, 255, 0.35);
    background: linear-gradient(180deg, #FFFFFF 0%, #F4F9FF 100%);
}

.journey-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.journey-stage {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wan-blue);
    background: rgba(30, 107, 255, 0.10);
    border: 1px solid rgba(30, 107, 255, 0.2);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}

.journey-now,
.journey-status {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

.journey-status.is-ongoing {
    color: var(--wan-navy);
    background: var(--wan-light);
    border: 1px solid rgba(30, 107, 255, 0.25);
}

.journey-status.is-new {
    color: #fff;
    background: var(--wan-gradient);
}

@media (max-width: 575.98px) {
    .journey-dot { width: 2.9rem; height: 2.9rem; }
    .journey-dot .bi { font-size: 1.1rem; }
    .journey-list::before { left: 1.44rem; }
}

/* ---- Why quote ---- */
.why-quote {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--wan-navy);
    border: none;
    margin-bottom: 0.3rem;
}

/* ---- Ecosystem ---- */
.eco-card {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--wan-radius);
    padding: 1.6rem 1.4rem;
    height: 100%;
    text-align: center;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.eco-card:hover { transform: translateY(-6px); background: rgba(255, 255, 255, 0.10); }

.eco-card.is-active {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(0, 194, 255, 0.6);
}

.eco-name {
    display: block;
    font-weight: 800;
    font-size: 1.45rem;
    color: #fff;
}
.eco-thai {
    display: block;
    font-size: 0.82rem;
    color: var(--wan-cyan);
    margin: 0.3rem 0 0.6rem;
}
.eco-desc { color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; }

.eco-badge {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
}

.eco-badge.is-ongoing {
    color: var(--wan-navy);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.eco-badge.is-new {
    color: #fff;
    background: var(--wan-gradient);
}

/* --------------------------------------------------------------------------
   5) Sections เฉพาะ
   -------------------------------------------------------------------------- */

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, #0B2A5B 0%, #154399 45%, #1E6BFF 100%);
    color: #fff;
    text-align: center;
    padding: 4.5rem 0 7rem;
    position: relative;
    overflow: hidden;
}

.hero-logo {
    display: inline-flex;
    background: #fff;
    padding: 0.95rem 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--wan-shadow-lg);
    margin-bottom: 1.8rem;
}
.hero-logo img { height: 54px; width: auto; }

.hero-eyebrow {
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--wan-cyan);
    margin-bottom: 0.4rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.4rem);
    font-weight: 800;
    line-height: 1.12;
    margin: 0.4rem 0 1rem;
}

.hero-message {
    max-width: 740px;
    margin: 0 auto;
    font-size: 1.02rem;
    line-height: 1.95;
    color: rgba(255, 255, 255, 0.88);
}

.hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 110px;
    display: block;
}

/* ---- CTA (วานเรา แล้วไปต่อ) ---- */
.cta {
    background: linear-gradient(135deg, #0B2A5B 0%, #1E6BFF 70%, #00C2FF 135%);
    color: #fff;
    padding: 5rem 0;
}

.cta-title {
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.cta-sub {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    margin-bottom: 0;
}
.cta-sub strong { color: #fff; }

.cta-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    font-size: 0.92rem;
    transition: background 0.2s ease, transform 0.2s ease;
}
.cta-contact:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: translateY(-2px);
}

/* ---- Footer ---- */
.site-footer {
    background: #081E40;
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 1.6rem;
}
.site-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; transition: color 0.2s ease; }
.site-footer a:hover { color: #fff; }

.footer-logo-wrap {
    display: inline-block;
    background: #fff;
    padding: 0.7rem 1rem;
    border-radius: 0.7rem;
}
.footer-logo { height: 32px; width: auto; }

.footer-head {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-hr {
    border-color: rgba(255, 255, 255, 0.14);
    margin: 2.4rem 0 1.4rem;
    opacity: 1;
}

/* --------------------------------------------------------------------------
   6) Animation (แสดงผลเมื่อเลื่อนถึง — ค่อย ๆ ขึ้นเบา ๆ)
   -------------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive เก็บรายละเอียด
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .hero { padding: 3.2rem 0 6rem; }
    .hero-logo img { height: 42px; }
    .site-logo { height: 30px; }
}