/* =========================================================
   Tumdee Technology Integration — main stylesheet
   ========================================================= */

:root {
    --navy-900: #061233;
    --navy-800: #0a1a3f;
    --navy-700: #0d2457;
    --blue-700: #1446c8;
    --blue-600: #1e5bff;
    --blue-500: #2f74ff;
    --sky-400:  #38b6ff;
    --sky-100:  #e7f0ff;
    --bg:       #ffffff;
    --bg-alt:   #f3f7ff;
    --text:     #1b2540;
    --muted:    #5b6785;
    --border:   #dfe7f7;
    --success:  #16a36b;
    --danger:   #d93a4a;

    --grad: linear-gradient(135deg, var(--blue-600), var(--sky-400));
    --radius: 16px;
    --shadow-sm: 0 4px 14px rgba(20, 70, 200, .08);
    --shadow:    0 14px 40px rgba(20, 70, 200, .12);
    --header-h:  76px;
    --font: "Plus Jakarta Sans", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--navy-800); }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.text-gradient {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--blue-600); margin-bottom: .8rem;
}
.eyebrow::after { content: ""; width: 28px; height: 2px; background: currentColor; opacity: .6; }
.eyebrow-light { color: var(--sky-400); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
    font: 600 .95rem/1 var(--font); cursor: pointer; white-space: nowrap;
    transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(30, 91, 255, .35); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(30, 91, 255, .45); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: #fff; color: var(--navy-800); border-color: #fff; }
.btn-light { background: #fff; color: var(--blue-700); }
.btn-light:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: wait; transform: none; }

/* ---------- Header ---------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    height: var(--header-h);
    transition: background .3s, box-shadow .3s, height .3s;
}
.site-header.scrolled {
    background: rgba(6, 18, 51, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
    --header-h: 66px;
}
.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 38px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.main-nav ul a {
    position: relative; display: block; padding: 8px 12px;
    color: rgba(255, 255, 255, .82); font-weight: 500; font-size: .95rem;
    transition: color .2s;
}
.main-nav ul a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
    background: var(--sky-400); border-radius: 2px; transform: scaleX(0); transition: transform .25s;
}
.main-nav ul a:hover, .main-nav ul a.active { color: #fff; }
.main-nav ul a.active::after, .main-nav ul a:hover::after { transform: scaleX(1); }

.nav-toggle {
    display: none; width: 44px; height: 44px; padding: 10px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    padding: calc(var(--header-h) + 64px) 0 140px;
    color: #fff;
    background:
        radial-gradient(900px 500px at 85% 30%, rgba(56, 182, 255, .28), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(30, 91, 255, .35), transparent 60%),
        linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 55%, #123a9a 100%);
}
.hero-grid-bg {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .45em; }
.hero h1 .text-gradient { background: linear-gradient(90deg, #4fa3ff, #7fdcff); -webkit-background-clip: text; background-clip: text; }
.hero .lead { font-size: 1.08rem; color: rgba(255, 255, 255, .78); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 38px; }
.hero-badges { list-style: none; padding: 18px 0 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px 30px; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero-badges li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; color: rgba(255, 255, 255, .9); }
.hero-badges svg { width: 22px; height: 22px; fill: none; stroke: var(--sky-400); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-visual img { width: 100%; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .35)); }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.hero-wave svg { width: 100%; height: 90px; fill: var(--bg); }

/* ---------- Sections ---------- */
.section { position: relative; padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
.section-head p:last-child { color: var(--muted); margin: 0; }
.section-head .eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; opacity: .6; }

.check-list { list-style: none; padding: 0; margin: 0 0 1.2em; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--text); }
.check-list li::before {
    content: ""; position: absolute; left: 0; top: 4px; width: 19px; height: 19px; border-radius: 50%;
    background: var(--grad);
}
.check-list li::after {
    content: ""; position: absolute; left: 6px; top: 8px; width: 7px; height: 4px;
    border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.check-list-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 1.4em 0 2em; }

/* ---------- Core services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--border); border-radius: 20px;
    padding: 38px 32px 30px; box-shadow: var(--shadow-sm);
    transition: transform .3s, box-shadow .3s, border-color .3s;
}
.service-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad);
    transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-num { position: absolute; top: 20px; right: 26px; font-size: 3rem; font-weight: 800; color: var(--sky-100); line-height: 1; }
.service-icon {
    width: 76px; height: 76px; display: grid; place-items: center; margin-bottom: 24px;
    border-radius: 20px; background: var(--grad); box-shadow: 0 12px 26px rgba(30, 91, 255, .3);
}
.service-icon svg { width: 40px; height: 40px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { font-size: 1.35rem; }
.service-card > p { color: var(--muted); }
.service-card .check-list { margin: 0; }
.service-card .check-list li { font-size: .94rem; }

.process {
    list-style: none; margin: 64px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, 1fr); position: relative;
}
.process::before {
    content: ""; position: absolute; top: 26px; left: 12.5%; right: 12.5%; height: 2px;
    background: repeating-linear-gradient(90deg, var(--blue-500) 0 8px, transparent 8px 16px);
}
.process li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 10px; }
.process-dot {
    width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px;
    background: #fff; border: 2px solid var(--blue-600); color: var(--blue-600); font-weight: 800; font-size: 1.15rem;
    box-shadow: 0 0 0 8px var(--bg);
}
.process li:hover .process-dot { background: var(--grad); color: #fff; border-color: transparent; }
.process strong { color: var(--navy-800); font-size: 1.05rem; }
.process small { color: var(--muted); font-size: .88rem; }

/* ---------- Solutions ---------- */
.solution-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.solution-card {
    background: #fff; border-radius: var(--radius); padding: 28px 24px;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transition: transform .3s, box-shadow .3s, background .3s;
}
.solution-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.solution-icon {
    width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
    background: var(--sky-100); transition: background .3s;
}
.solution-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--blue-600); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.solution-card:hover .solution-icon { background: var(--grad); }
.solution-card:hover .solution-icon svg { stroke: #fff; }
.solution-card h3 { font-size: 1.08rem; margin-bottom: .4em; }
.solution-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-visual { position: relative; }
.about-badge {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    background: var(--grad); color: #fff; border-radius: 18px; padding: 18px 24px;
    box-shadow: 0 16px 36px rgba(30, 91, 255, .35);
}
.about-badge strong { display: block; font-size: 1.4rem; line-height: 1.1; }
.about-badge span { font-size: .88rem; opacity: .9; }
.about-text h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; }
.about-text > p { color: var(--muted); }

/* ---------- Why us ---------- */
.section-dark {
    overflow: hidden; color: #fff;
    background:
        radial-gradient(700px 400px at 100% 0%, rgba(56, 182, 255, .22), transparent 60%),
        linear-gradient(160deg, var(--navy-900), var(--navy-700));
}
.section-dark .container { position: relative; }
.section-head-light h2 { color: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card {
    padding: 32px 26px; border-radius: var(--radius); text-align: center;
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
    transition: background .3s, transform .3s, border-color .3s;
}
.why-card:hover { background: rgba(255, 255, 255, .09); border-color: rgba(56, 182, 255, .5); transform: translateY(-6px); }
.why-icon {
    width: 66px; height: 66px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(56, 182, 255, .14); box-shadow: inset 0 0 0 1px rgba(56, 182, 255, .4);
}
.why-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--sky-400); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.why-card h3 { color: #fff; font-size: 1.12rem; }
.why-card p { color: rgba(255, 255, 255, .7); font-size: .93rem; margin: 0; }

/* ---------- CTA ---------- */
.cta { padding: 0; margin-top: -1px; background: linear-gradient(var(--navy-700) 50%, var(--bg-alt) 50%); }
.cta-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 30px;
    padding: 46px 52px; border-radius: 24px; color: #fff;
    background:
        radial-gradient(400px 200px at 90% 0%, rgba(255, 255, 255, .22), transparent 70%),
        linear-gradient(120deg, var(--blue-700), var(--blue-600) 50%, var(--sky-400));
    box-shadow: 0 24px 50px rgba(20, 70, 200, .35);
}
.cta h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.95rem); margin-bottom: .3em; }
.cta p { margin: 0; color: rgba(255, 255, 255, .85); }

/* ---------- Contact ---------- */
.contact-inner { display: grid; grid-template-columns: 1fr 1.5fr; gap: 32px; align-items: start; }
.contact-info {
    display: grid; gap: 4px; padding: 30px; border-radius: 20px; color: #fff;
    background: linear-gradient(160deg, var(--navy-800), var(--blue-700));
    box-shadow: var(--shadow);
}
.info-item { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.info-item:last-child { border-bottom: 0; }
.info-icon {
    flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(56, 182, 255, .16);
}
.info-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--sky-400); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.info-item h3 { color: #fff; font-size: .95rem; margin: 2px 0 2px; }
.info-item p { margin: 0; color: rgba(255, 255, 255, .78); font-size: .94rem; overflow-wrap: anywhere; }
.info-item a { color: rgba(255, 255, 255, .9); }
.info-item a:hover { color: var(--sky-400); }

.contact-form {
    background: #fff; border-radius: 20px; padding: 34px; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--navy-800); }
.req { color: var(--danger); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 13px 15px; font: 400 .97rem/1.4 var(--font); color: var(--text);
    background: var(--bg-alt); border: 1.5px solid var(--border); border-radius: 12px;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none; appearance: none;
}
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6785' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px;
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; background: #fff; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47, 116, 255, .15);
}
.form-group.has-error input, .form-group.has-error textarea { border-color: var(--danger); }
.field-error { display: block; margin-top: 6px; font-size: .83rem; color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { display: none; margin-bottom: 16px; padding: 13px 16px; border-radius: 12px; font-size: .94rem; font-weight: 500; }
.form-status.is-success { display: block; background: #e6f8f0; color: var(--success); border: 1px solid #b6e9d2; }
.form-status.is-error   { display: block; background: #fdecee; color: var(--danger); border: 1px solid #f6c3c9; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .7); font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1.3fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.footer-brand img { height: 36px; width: auto; margin-bottom: 18px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; overflow-wrap: anywhere; }
.site-footer a { color: rgba(255, 255, 255, .7); transition: color .2s; }
.site-footer a:hover { color: var(--sky-400); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px 0; font-size: .86rem; }
.footer-bottom p { margin: 0; text-align: center; }

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 90;
    width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
    background: var(--grad); box-shadow: 0 10px 24px rgba(30, 91, 255, .4);
    opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }
.js .reveal-delay   { transition-delay: .12s; }
.js .reveal-delay-2 { transition-delay: .24s; }

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

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
    .main-nav { gap: 16px; }
    .main-nav ul a { padding: 8px 9px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Tablet & mobile navigation */
@media (max-width: 960px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 16px;
        padding: 18px 24px 26px;
        background: rgba(6, 18, 51, .98);
        box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
        transform: translateY(-12px); opacity: 0; visibility: hidden;
        transition: opacity .25s, transform .25s, visibility .25s;
    }
    .main-nav.open { transform: none; opacity: 1; visibility: visible; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav ul a { padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 1rem; }
    .main-nav ul a::after { display: none; }
    .main-nav ul a.active { color: var(--sky-400); }
    .site-header.menu-open { background: rgba(6, 18, 51, .98); }

    .hero { padding-bottom: 120px; }
    .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 36px; }
    .hero .lead { margin-left: auto; margin-right: auto; }
    .hero-actions, .hero-badges { justify-content: center; }
    .hero-visual { max-width: 560px; margin: 0 auto; }

    .service-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
    .solution-grid { grid-template-columns: repeat(2, 1fr); }
    .about-inner { grid-template-columns: 1fr; gap: 40px; }
    .about-visual { max-width: 520px; margin: 0 auto; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-inner { grid-template-columns: 1fr; }
    .cta-inner { flex-direction: column; text-align: center; padding: 40px 32px; }
}

@media (max-width: 768px) {
    .section { padding: 76px 0; }
    .section-head { margin-bottom: 40px; }
    .solution-grid { gap: 16px; }
    .process { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
    .process::before { display: none; }
}

@media (max-width: 560px) {
    :root { --header-h: 66px; }
    .container { padding: 0 16px; }
    .brand img { height: 32px; }
    .hero { padding-top: calc(var(--header-h) + 40px); padding-bottom: 100px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .hero-badges { gap: 12px 20px; }
    .hero-wave svg { height: 50px; }
    .solution-grid, .why-grid { grid-template-columns: 1fr; }
    .solution-card { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; padding: 20px; }
    .solution-icon { grid-row: span 2; margin: 0; }
    .service-card { padding: 30px 22px 24px; }
    .check-list-2col { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-form, .contact-info { padding: 24px 20px; }
    .cta-inner { padding: 34px 22px; border-radius: 20px; }
    .cta-inner .btn { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; }
    .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}
