/* MoreTrack Website — Main Stylesheet v1.0 */

/* =============================================================
   GOOGLE FONTS — Noto Sans supports both English and Thai
   ============================================================= */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

/* =============================================================
   CSS CUSTOM PROPERTIES (Brand Colors & Variables)
   To change the color scheme, edit the values here.
   ============================================================= */
:root {
    /* --- Brand Colors --- */
    --color-primary:        #004881;  /* Deep blue */
    --color-primary-light:  #d0e4ff;
    --color-accent:         #ac3306;  /* Orange-red */
    --color-accent-light:   #ffdbcf;
    --color-teal:           #006875;
    --color-teal-light:     #95f0ff;

    /* --- Neutral Colors --- */
    --color-text:           #1a2332;
    --color-text-muted:     #5a6a7e;
    --color-bg:             #ffffff;
    --color-surface:        #f5f8fc;
    --color-border:         #e0e8f0;

    /* --- Typography --- */
    --font-family: 'Noto Sans', 'Noto Sans Thai', system-ui, sans-serif;

    /* --- Shape & Shadow --- */
    --radius:       12px;
    --radius-lg:    20px;
    --radius-xl:    32px;
    --shadow-sm:    0 1px 4px rgba(0, 72, 129, 0.08);
    --shadow-md:    0 4px 16px rgba(0, 72, 129, 0.12);
    --shadow-lg:    0 12px 40px rgba(0, 72, 129, 0.18);

    /* --- Layout --- */
    --max-width:    1100px;
    --header-h:     72px;
}

/* =============================================================
   RESET & BASE
   ============================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 18px; /* Larger base for elderly-friendly readability */
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
p  { font-size: 1.05rem; line-height: 1.75; }

/* =============================================================
   UTILITIES
   ============================================================= */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 88px 24px; }

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.section-title { color: var(--color-primary); margin-bottom: 16px; }

.section-subtitle {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 56px;
    font-size: 1.1rem;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover {
    background: #003566;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #fff;
    text-decoration: none;
}

/* =============================================================
   LANGUAGE TOGGLE — Bilingual EN / TH Support
   ============================================================= */
.lang-th { display: none; }
body.lang-thai .lang-en { display: none !important; }
body.lang-thai .lang-th { display: block !important; }

span.lang-th, a.lang-th, small.lang-th, strong.lang-th, em.lang-th, li.lang-th { display: none; }
span.lang-en, a.lang-en, small.lang-en, strong.lang-en, em.lang-en, li.lang-en { display: inline; }
ul.lang-th, ol.lang-th { display: none; }
ul.lang-en, ol.lang-en { display: block; }

body.lang-thai span.lang-en,
body.lang-thai a.lang-en,
body.lang-thai small.lang-en,
body.lang-thai strong.lang-en,
body.lang-thai em.lang-en,
body.lang-thai li.lang-en { display: none !important; }

body.lang-thai span.lang-th,
body.lang-thai a.lang-th,
body.lang-thai small.lang-th,
body.lang-thai strong.lang-th,
body.lang-thai em.lang-th,
body.lang-thai li.lang-th { display: inline !important; }

body.lang-thai ul.lang-en,
body.lang-thai ol.lang-en { display: none !important; }
body.lang-thai ul.lang-th,
body.lang-thai ol.lang-th { display: block !important; }

.lang-switcher {
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: 50px;
    padding: 3px;
    gap: 2px;
}
.lang-switcher button {
    padding: 5px 14px;
    border: none;
    background: transparent;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.2s;
    font-family: var(--font-family);
}
.lang-switcher button.active { background: var(--color-primary); color: #fff; }

/* =============================================================
   SITE HEADER
   ============================================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    gap: 24px;
}

.site-logo { flex-shrink: 0; display: flex; align-items: center; }
.site-logo img { height: 44px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}
.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0; right: 0;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.2s;
}
.site-nav a:hover, .site-nav a:focus { color: var(--color-primary); text-decoration: none; }
.site-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px; height: 36px;
    background: none; border: none;
    cursor: pointer; padding: 4px;
}
.menu-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s;
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =============================================================
   HERO
   ============================================================= */
.hero {
    min-height: 100vh;
    background: linear-gradient(140deg, var(--color-primary) 0%, var(--color-teal) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: var(--header-h);
}

/* NOTE: Path is relative to THIS CSS FILE (assets/style.css → assets/images/) */
.hero-bg-image {
    position: absolute;
    inset: 0;
    background-image: url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    z-index: 0;
}

.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}
.hero::before {
    width: 600px; height: 600px;
    background: rgba(255,255,255, 0.06);
    top: -200px; right: -100px;
}
.hero::after {
    width: 400px; height: 400px;
    background: rgba(255,255,255, 0.05);
    bottom: -150px; left: -80px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255, 0.18);
    border: 1px solid rgba(255,255,255, 0.35);
    color: #fff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 { color: #fff; margin-bottom: 20px; }

.hero > .hero-inner .hero-text p {
    color: rgba(255,255,255, 0.88);
    font-size: 1.15rem;
    max-width: 500px;
    margin-bottom: 40px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255, 0.15);
    border: 1.5px solid rgba(255,255,255, 0.5);
    color: #fff;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    backdrop-filter: blur(6px);
}
.store-btn:hover {
    background: #fff;
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.store-btn-icon {
    width: 28px; height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: filter 0.2s;
}
.store-btn:hover .store-btn-icon { filter: none; }

.store-btn-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-btn-text small { font-size: 0.7rem; font-weight: 400; opacity: 0.85; }
.store-btn-text strong { font-size: 0.95rem; }

.hero-visual { display: flex; justify-content: center; align-items: center; }

.hero-phone-card {
    background: rgba(255,255,255, 0.15);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255, 0.3);
    border-radius: var(--radius-xl);
    padding: 36px;
    text-align: center;
    color: #fff;
    max-width: 320px;
    width: 100%;
}
.hero-phone-card img.app-icon {
    width: 80px; height: 80px;
    border-radius: 20px;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-lg);
}
.hero-phone-card h3 { color: #fff; font-size: 1.4rem; margin-bottom: 8px; }
.hero-phone-card p { font-size: 0.95rem; color: rgba(255,255,255, 0.8); margin-bottom: 24px; }

.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-stat { background: rgba(255,255,255, 0.15); border-radius: var(--radius); padding: 14px; }
.hero-stat-number { font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1; margin-bottom: 4px; }
.hero-stat-label { font-size: 0.8rem; color: rgba(255,255,255, 0.75); }

/* =============================================================
   ABOUT
   ============================================================= */
.about { background: var(--color-bg); }

.about-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.about-image-wrap { position: relative; }
.about-image-wrap img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    max-height: 480px;
}

.about-badge {
    position: absolute;
    bottom: -20px; right: -20px;
    background: var(--color-accent);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.about-badge-number { font-size: 2rem; font-weight: 700; line-height: 1; }
.about-badge-text { font-size: 0.8rem; margin-top: 4px; opacity: 0.9; }

.about-text .section-label { margin-bottom: 10px; }
.about-text h2 { margin-bottom: 20px; }
.about-text p { color: var(--color-text-muted); margin-bottom: 18px; }

.checklist { margin: 24px 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; font-size: 1rem; color: var(--color-text); }
.checklist li::before {
    content: '';
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--color-primary-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23004881' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 14px;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: 1px;
}

/* =============================================================
   FEATURES
   ============================================================= */
.features { background: var(--color-surface); }

.features-header { text-align: center; max-width: var(--max-width); margin: 0 auto 56px; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    border: 1.5px solid var(--color-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-teal));
    transform: scaleX(0);
    transition: transform 0.3s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--color-primary-light); }
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon-wrap {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.feature-icon-wrap svg { width: 36px; height: 36px; fill: var(--color-primary); }
.feature-card h3 { color: var(--color-primary); margin-bottom: 12px; }
.feature-card p { color: var(--color-text-muted); font-size: 1rem; line-height: 1.7; }

/* =============================================================
   DOWNLOAD CTA
   ============================================================= */
.download {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-teal) 100%);
    position: relative;
    overflow: hidden;
}
.download::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: rgba(255,255,255, 0.06);
    top: -200px; right: -100px;
}
.download-inner { max-width: var(--max-width); margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.download h2 { color: #fff; margin-bottom: 16px; }
.download p { color: rgba(255,255,255, 0.85); font-size: 1.15rem; margin-bottom: 40px; max-width: 560px; margin-left: auto; margin-right: auto; }
.download-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.store-btn-white {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--color-primary);
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: none;
}
.store-btn-white:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-primary);
    text-decoration: none;
}
.store-btn-white img { width: 28px; height: 28px; object-fit: contain; }
.store-btn-white-text { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.store-btn-white-text small { font-size: 0.7rem; font-weight: 400; opacity: 0.7; }
.store-btn-white-text strong { font-size: 1rem; }

/* =============================================================
   CONTACT
   ============================================================= */
.contact { background: var(--color-bg); }

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 72px;
    align-items: start;
    max-width: var(--max-width);
    margin: 0 auto;
}

.contact-info .section-label { margin-bottom: 10px; }
.contact-info h2 { margin-bottom: 16px; }
.contact-info > p { color: var(--color-text-muted); margin-bottom: 36px; font-size: 1.05rem; }
.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; align-items: center; gap: 14px; color: var(--color-text-muted); font-size: 1rem; }
.contact-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    background: var(--color-primary-light);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 22px; height: 22px; fill: var(--color-primary); }

.contact-form-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 44px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}
.contact-form-card h3 { color: var(--color-primary); margin-bottom: 28px; font-size: 1.2rem; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; color: var(--color-text); }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-group textarea { min-height: 150px; resize: vertical; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #b0bec5; }

.form-notice {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

/* =============================================================
   SITE FOOTER
   ============================================================= */
.site-footer { background: #0d1b2a; color: rgba(255,255,255, 0.7); padding: 64px 0 32px; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 52px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    margin-bottom: 52px;
}
.footer-brand-logo { height: 40px; width: auto; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-brand p { font-size: 0.95rem; color: rgba(255,255,255, 0.55); max-width: 280px; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: rgba(255,255,255, 0.55); font-size: 0.95rem; transition: color 0.2s; }
.footer-links a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255, 0.1);
    padding: 28px 24px 0;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255,255,255, 0.4);
    flex-wrap: wrap;
    gap: 12px;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 48px; }
    .hero-text p { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .hero-visual { display: none; }
    .about-inner { grid-template-columns: 1fr; gap: 48px; }
    .about-badge { display: none; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-inner { grid-template-columns: 1fr; gap: 48px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    html { font-size: 16px; }
    .section { padding: 64px 20px; }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-h); left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px 20px 24px;
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--color-border); font-size: 1rem; }
    .site-nav a:last-child { border-bottom: none; }
    .site-nav a::after { display: none; }
    .menu-toggle { display: flex; }

    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 36px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .contact-form-card { padding: 28px 20px; }
    .hero-inner { padding: 60px 20px; }
}

@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; align-items: center; }
    .download-buttons { flex-direction: column; align-items: center; }
}
