/* ============================================================
   GREAT LOGISTICS SOLUTION CO., LTD. — corporate landing page
   Single self-contained stylesheet. No build step.

   Token system mirrors the AITMS v2 brand:
   - Tier 1: raw brand palette (never flips between themes)
   - Tier 2: semantic aliases (flip together per theme —
     "Theme-Token Flip-Together Discipline")
   - Components consume ONLY semantic aliases.
   Light is the primary corporate look; dark honors
   prefers-color-scheme. All pairs are WCAG AA engineered —
   reuse exact pairs, do not lighten.
   ============================================================ */

:root {
  color-scheme: light dark;

  /* ---- Tier 1 · raw brand palette (constant) ---- */
  --blue-900: #00193f;
  --blue-800: #002664;   /* THE brand blue */
  --blue-700: #0a34a1;   /* hover */
  --blue-600: #0a49a1;
  --blue-500: #4b87e0;   /* focus ring + dark-mode primary text accents */
  --blue-100: #bcdbec;
  --blue-050: #eef4fa;
  --amber:      #ffca0c; /* accent — kicker/active-nav only, never button fill */
  --amber-soft: #ffe68b;

  /* ---- Tier 2 · semantic aliases (light) ---- */
  --bg:            #f6f7f9;
  --bg-panel:      #ffffff;
  --bg-panel-alt:  #eff0f0;
  --fg:            #2f3135;
  --fg-2:          #565a5c;  /* AA-hardened secondary */
  --fg-3:          #565c63;
  --line:          #cdd0d3;
  --line-soft:     #eff0f0;
  --link:          #0a34a1;
  --kicker:        #0a49a1;
  --surface-info:  #eef4fa;
  --on-info:       #002664;
  --shadow-1: 0 1px 2px rgba(0, 38, 100, 0.06), 0 2px 8px rgba(0, 38, 100, 0.08);
  --shadow-2: 0 6px 20px rgba(0, 38, 100, 0.08);
  --shadow-hero: 0 20px 48px rgba(0, 25, 63, 0.18);

  /* ---- primary button: solid-identity contract (BOTH themes) ---- */
  --primary-bg:        var(--blue-800);
  --primary-bg-hover:  var(--blue-700);
  --primary-bg-active: var(--blue-900);
  --primary-fg:        #ffffff;
  --focus-ring:        var(--blue-500);

  /* ---- type + rhythm ---- */
  --font: 'Sarabun', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Tier 2 flips together; Tier 1 stays put. */
    --bg:            #0a1628;
    --bg-panel:      #121f35;
    --bg-panel-alt:  #1e2b44;
    --fg:            #e8ecf3;
    --fg-2:          #aeb8c7;  /* AA-hardened */
    --fg-3:          #aab4c5;
    --line:          #22304a;
    --line-soft:     #2d3a54;
    --link:          #6ea4ee;
    --kicker:        #6ea4ee;
    --surface-info:  #172a4a;
    --on-info:       #6ea4ee;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-hero: 0 20px 48px rgba(0, 0, 0, 0.55);
  }
}

/* ============ base ============ */

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

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;             /* generous for Thai script */
  color: var(--fg);
  background: var(--bg);
}

h1, h2, h3, h4 {
  line-height: 1.3;
  text-wrap: balance;           /* Baseline widely available 2026-04 */
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--link); }
a:hover { color: var(--primary-bg-hover); }

img, svg { max-width: 100%; height: auto; }

/* universal focus ring (brand contract) */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary-bg);
  color: var(--primary-fg);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 100;
}
.skip-link:focus-visible {
  left: 0;
  color: var(--primary-fg);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

section { scroll-margin-top: 84px; }

.section { padding-block: clamp(56px, 8vw, 96px); }
.section--alt { background: var(--bg-panel); border-block: 1px solid var(--line-soft); }

/* brand mannerism: uppercase letter-spaced kicker */
.kicker {
  display: block;
  font-size: 0.6875rem;          /* 11px */
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kicker);
  margin-bottom: 10px;
}

.section h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }

/* GEO answer capsule: direct 40–60 word answer under each H2 */
.capsule {
  max-width: 62ch;
  padding: 14px 18px;
  border-left: 3px solid var(--primary-bg);
  border-radius: var(--radius-sm);
  background: var(--surface-info);
  color: var(--fg);
  margin-bottom: clamp(24px, 4vw, 40px);
}

/* ============ header / nav ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 800;
  margin-right: auto;
}
.brand img { width: 36px; height: 36px; }
.brand .brand__name { font-size: 1rem; line-height: 1.2; }
.brand .brand__name small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fg-2);
  text-transform: uppercase;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--fg-2);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.site-nav a:hover { color: var(--fg); background: var(--bg-panel-alt); }

.lang-switch {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 14px !important;
  font-size: 0.8125rem !important;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--fg);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  line-height: 0;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    padding: 8px clamp(16px, 4vw, 32px) 16px;
  }
  .site-header.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 12px 8px; }
  .lang-switch { display: inline-block; margin-top: 8px; width: max-content; }
}

/* ============ hero ============ */

.hero {
  position: relative;
  isolation: isolate;
  color: #ffffff;
  background: linear-gradient(160deg, #00193f 0%, #002664 55%, #0a34a1 120%);
  overflow: hidden;
}

/* subtle 56px white grid overlay, radially masked (brand gradient spec) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 30% 10%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 30% 10%, #000 0%, transparent 75%);
}

.hero .container {
  padding-block: clamp(72px, 11vw, 136px);
  max-width: 880px;
}

.hero .kicker { color: var(--amber); }

.hero h1 {
  font-size: clamp(1.75rem, 4.6vw, 2.875rem);
  font-weight: 800;
  color: #ffffff;
}
.hero h1 em {
  font-style: normal;
  color: var(--amber);           /* accent em-highlight mannerism */
}

.hero .hero__lead {
  font-size: clamp(1rem, 1.8vw, 1.1875rem);
  color: var(--blue-100);
  max-width: 60ch;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ============ buttons ============ */

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--primary-bg); color: var(--primary-fg); }
.btn--primary:hover { background: var(--primary-bg-hover); color: var(--primary-fg); }
.btn--primary:active { background: var(--primary-bg-active); }

/* inverse button for use ON the navy hero panel only */
.btn--inverse { background: #ffffff; color: var(--blue-800); }
.btn--inverse:hover { background: var(--blue-050); color: var(--blue-900); }

.btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: #ffffff; }
.btn--ghost:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.08); color: #ffffff; }

/* ============ cards ============ */

.grid {
  display: grid;
  gap: clamp(16px, 2.5vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-1);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

.card h3 { font-size: 1.0625rem; font-weight: 700; }
.card p { color: var(--fg-2); font-size: 0.9375rem; margin-bottom: 0; }

.card .card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface-info);
  color: var(--on-info);
  margin-bottom: 14px;
}
.card .card__icon svg { width: 24px; height: 24px; }

/* ============ industries ============ */

.industries {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.industries li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--fg);
}
.industries svg { width: 18px; height: 18px; color: var(--kicker); }

/* ============ product highlight (AITMS) ============ */

.product-panel {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  background: linear-gradient(160deg, #00193f 0%, #002664 55%, #0a34a1 120%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow-hero);
}
.product-panel .kicker { color: var(--amber); }
.product-panel h3 { color: #ffffff; font-size: clamp(1.25rem, 2.6vw, 1.625rem); }
.product-panel p { color: var(--blue-100); }
.product-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.9375rem;
}
.product-panel ul li { padding-left: 24px; position: relative; }
.product-panel ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--amber);
}
@media (max-width: 760px) {
  .product-panel { grid-template-columns: 1fr; }
}

.status-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--amber);
  color: var(--blue-900);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============ customers ============ */

.customer-card {
  display: grid;
  gap: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary-bg);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.5vw, 32px);
  box-shadow: var(--shadow-1);
  max-width: 820px;
}
.customer-card h3 { font-size: 1.125rem; }
.customer-card p { color: var(--fg-2); margin-bottom: 4px; }

/* ============ FAQ ============ */

.faq { max-width: 820px; }
.faq details {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  border-radius: var(--radius-md);
}
.faq summary:hover { background: var(--bg-panel-alt); }
.faq details[open] summary { border-bottom: 1px solid var(--line-soft); }
.faq details p { padding: 14px 18px 4px; color: var(--fg-2); max-width: 68ch; }

/* ============ about ============ */

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 24px;
  margin: 0;
  max-width: 820px;
}
.facts dt { font-weight: 700; color: var(--fg); }
.facts dd { margin: 0; color: var(--fg-2); }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 12px; }
}

/* ============ contact ============ */

.contact-grid {
  display: grid;
  gap: clamp(16px, 3vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 900px;
}
address { font-style: normal; color: var(--fg-2); }
.todo-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-panel-alt);
  border: 1px dashed var(--line);
  color: var(--fg-3);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============ footer ============ */

.site-footer {
  background: var(--blue-900);
  color: var(--blue-100);
  padding-block: clamp(32px, 5vw, 48px);
  font-size: 0.875rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.site-footer p { margin: 0; }
.site-footer a { color: #ffffff; }
.site-footer a:hover { color: var(--amber-soft); }

/* small, unobtrusive internal-demo link (AITMS) */
.aitms-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--blue-100) !important;
}
.aitms-link:hover { border-color: var(--amber); color: var(--amber-soft) !important; }
.aitms-link small { font-weight: 400; opacity: 0.85; }

/* ============ 404 page ============ */

.nf-center { text-align: center; }
.nf-center .hero__lead { margin-inline: auto; }
.nf-center .hero__cta { justify-content: center; }

/* ============ motion preferences ============ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
