/* ─────────────────────────────────────────────
   SONGKORFOODPRODUCTION CO., LTD. — 2gfoodproduction.com
   Design tokens
   ───────────────────────────────────────────── */
:root {
  /* Brand CI — locked, do not change without governance approval */
  --ember: #DC291E;
  --ember-deep: #A81D15;
  --gold: #C9A554;        /* on dark surfaces only */
  --gold-soft: #E0C88A;   /* on dark surfaces only */
  --gold-ink: #8A6B22;    /* text-safe gold for light surfaces — 5.0:1 on white (AA) */

  --stone-50: #FAFAF9;
  --stone-100: #F5F5F4;
  --stone-200: #E7E5E4;
  --stone-300: #D6D3D1;
  --stone-400: #A8A29E;
  --stone-500: #78716C;
  --stone-600: #57534E;
  --stone-700: #44403C;
  --stone-800: #292524;
  --stone-900: #1C1917;
  --stone-950: #0F0D0C;

  /* Semantic */
  --bg: var(--stone-50);
  --surface: #FFFFFF;
  --text: var(--stone-700);
  --text-strong: var(--stone-900);
  --text-muted: var(--stone-600);
  --line: var(--stone-200);

  /* Spacing rhythm — 4pt scale */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px;  --s-6: 24px;  --s-8: 32px;  --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-28: 112px;

  /* Radius scale */
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-full: 999px;

  /* Elevation scale — consistent, never ad-hoc */
  --e-1: 0 1px 2px rgba(28,25,23,.04), 0 1px 1px rgba(28,25,23,.03);
  --e-2: 0 2px 4px rgba(28,25,23,.04), 0 4px 12px rgba(28,25,23,.05);
  --e-3: 0 4px 8px rgba(28,25,23,.05), 0 12px 28px rgba(28,25,23,.08);

  /* Motion tokens — one rhythm across the whole site */
  --dur-fast: 160ms;
  --dur: 240ms;
  --dur-slow: 420ms;
  --ease-out: cubic-bezier(.22, .8, .3, 1);
  --ease-in-out: cubic-bezier(.5, 0, .2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Noto Sans Thai', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--ember); color: #fff; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--s-6); }

/* ─── Nav ─────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,249,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
nav::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--stone-200) 18%, var(--stone-200) 82%, transparent);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: var(--s-6); }
.logo {
  font-weight: 700; font-size: 15px; letter-spacing: .10em;
  color: var(--text-strong); text-decoration: none; white-space: nowrap;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.logo:hover { opacity: .72; }
.logo span { color: var(--ember); }
.nav-links { display: flex; gap: var(--s-8); }
.nav-links a {
  position: relative;
  font-size: 14.5px; font-weight: 500; color: var(--text-muted);
  text-decoration: none; padding: var(--s-2) 0;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--ember); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.nav-links a:hover { color: var(--text-strong); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ─── Hero ────────────────────────────────── */
header.hero {
  background: var(--stone-950);
  color: var(--stone-50);
  padding: var(--s-28) 0 calc(var(--s-28) + var(--s-6));
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 52% 48% at 82% 8%,  rgba(220,41,30,.30), transparent 62%),
    radial-gradient(ellipse 46% 42% at 96% 62%, rgba(168,29,21,.24), transparent 60%),
    radial-gradient(ellipse 60% 50% at 4% 96%,  rgba(201,165,84,.13), transparent 62%);
}
/* fine grain — keeps large dark areas from looking flat/banded */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 600; letter-spacing: .24em;
  color: var(--gold-soft);
  background: rgba(201,165,84,.07);
  border: 1px solid rgba(201,165,84,.30);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-full);
  margin-bottom: var(--s-8);
  backdrop-filter: blur(4px);
}
.eyebrow::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); margin-right: var(--s-3);
  box-shadow: 0 0 0 3px rgba(201,165,84,.18);
}

h1 {
  font-size: clamp(32px, 6vw, 60px);
  font-weight: 700; line-height: 1.16; letter-spacing: -.015em;
  color: #fff;
  text-wrap: balance;
}
.hero-sub {
  margin-top: var(--s-6); max-width: 34em;
  font-size: clamp(16px, 1.6vw, 19px); font-weight: 300; line-height: 1.7;
  color: var(--stone-300);
}
.hero-en {
  margin-top: var(--s-5); font-size: 12.5px; font-weight: 600;
  letter-spacing: .18em; color: var(--stone-400); /* 7.4:1 on --stone-950 (AA) */
}

/* ─── Sections ────────────────────────────── */
section { padding: var(--s-28) 0; position: relative; }
.section-label {
  display: block;
  font-size: 11.5px; font-weight: 700; letter-spacing: .22em;
  color: var(--ember-deep); /* 7.4:1 on white — plain --ember is 4.4 at this size */
  text-transform: uppercase; margin-bottom: var(--s-4);
}
h2 {
  font-size: clamp(25px, 3.6vw, 38px);
  font-weight: 700; line-height: 1.28; letter-spacing: -.012em;
  color: var(--text-strong);
  text-wrap: balance;
}
.lede {
  margin-top: var(--s-5); max-width: 62ch;
  font-size: clamp(16px, 1.4vw, 17.5px); font-weight: 300; line-height: 1.85;
  color: var(--text);
}
.lede-en {
  margin-top: var(--s-4); max-width: 66ch;
  font-size: 15px; font-weight: 300; line-height: 1.8;
  color: var(--text-muted);
}

/* ─── Pillars ─────────────────────────────── */
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5); margin-top: var(--s-16);
}
.pillar {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-10) var(--s-8) var(--s-8);
  box-shadow: var(--e-1);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.pillar::before {
  content: ""; position: absolute; top: 0; left: var(--s-8); right: var(--s-8); height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
.pillar:hover { transform: translateY(-3px); box-shadow: var(--e-3); border-color: var(--stone-300); }
.pillar:hover::before { opacity: 1; }
.pillar-num {
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  color: var(--gold-ink); font-variant-numeric: tabular-nums;
}
.pillar h3 {
  margin: var(--s-3) 0 var(--s-2);
  font-size: 18.5px; font-weight: 600; line-height: 1.45;
  color: var(--text-strong); letter-spacing: -.005em;
}
.pillar p { font-size: 15px; line-height: 1.75; color: var(--text-muted); }

/* ─── Brands ──────────────────────────────── */
.brands-section {
  background: var(--stone-100);
  border-block: 1px solid var(--line);
}
.brands {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--s-5); margin-top: var(--s-16);
}
.brand {
  display: block; text-decoration: none; position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-10) var(--s-8);
  box-shadow: var(--e-1);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
a.brand::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(120% 90% at 100% 0%, rgba(220,41,30,.05), transparent 58%);
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
  pointer-events: none;
}
a.brand:hover { transform: translateY(-4px); box-shadow: var(--e-3); border-color: rgba(220,41,30,.35); }
a.brand:hover::after { opacity: 1; }
.brand h3 {
  font-size: 23px; font-weight: 700; line-height: 1.35;
  color: var(--text-strong); letter-spacing: -.01em;
}
.brand .brand-type { margin-top: var(--s-2); font-size: 15px; color: var(--text-muted); line-height: 1.65; }
.brand .brand-link {
  margin-top: var(--s-6); font-size: 13px; font-weight: 600;
  color: var(--ember); letter-spacing: .05em;
  display: inline-flex; align-items: center; gap: 2px;
  transition: gap var(--dur) var(--ease-out);
}
a.brand:hover .brand-link { gap: 8px; }

/* ─── Franchise ───────────────────────────── */
.franchise {
  background: var(--stone-950);
  position: relative; overflow: hidden; isolation: isolate;
}
.franchise::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 50% 60% at 88% 6%, rgba(220,41,30,.28), transparent 60%),
    radial-gradient(ellipse 44% 50% at 10% 100%, rgba(201,165,84,.10), transparent 62%);
}
.franchise .container { position: relative; z-index: 1; }
.franchise .section-label { color: var(--gold); }
.franchise h2 { color: #fff; }
.franchise .lede { color: var(--stone-300); }
.franchise-cta { display: flex; gap: var(--s-3); margin-top: var(--s-10); flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  text-decoration: none;
  padding: var(--s-3) var(--s-8);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--ember); color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(220,41,30,.28);
}
.btn-primary:hover { background: #E8352A; box-shadow: 0 2px 4px rgba(0,0,0,.22), 0 12px 32px rgba(220,41,30,.38); }
.btn-ghost { border: 1px solid rgba(250,250,249,.28); color: var(--stone-50); background: rgba(250,250,249,.02); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); background: rgba(201,165,84,.07); }

/* ─── Contact ─────────────────────────────── */
.contact-grid {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: var(--s-5); margin-top: var(--s-16);
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-10) var(--s-8);
  box-shadow: var(--e-1);
  transition: box-shadow var(--dur) var(--ease-out);
}
.contact-card:hover { box-shadow: var(--e-2); }
.contact-card h3 {
  font-size: 17.5px; font-weight: 600; color: var(--text-strong);
  line-height: 1.5; margin-bottom: var(--s-1);
}
.contact-card .contact-en {
  font-size: 12px; letter-spacing: .12em; color: var(--text-muted);
  font-weight: 600; margin-bottom: var(--s-5);
}
.contact-card p { font-size: 15px; color: var(--text-muted); line-height: 1.8; }
.contact-row {
  display: flex; gap: var(--s-4); align-items: baseline;
  margin-top: var(--s-4); padding-top: var(--s-4);
  border-top: 1px solid var(--stone-100);
}
.contact-row:first-of-type { border-top: 0; padding-top: 0; }
.contact-row .k {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: var(--gold-ink); min-width: 62px; text-transform: uppercase;
}
.contact-row .v { font-size: 15px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.contact-row .v a {
  color: var(--text-strong); text-decoration: none;
  border-bottom: 1px solid var(--stone-300);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.contact-row .v a:hover { color: var(--ember); border-color: var(--ember); }

/* ─── Company seal ────────────────────────── */
.seal-block {
  display: flex; gap: var(--s-8); align-items: center; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  margin-top: var(--s-12);
  box-shadow: var(--e-1);
}
.seal-block a {
  flex-shrink: 0; border-radius: var(--r-md);
  transition: transform var(--dur) var(--ease-out);
}
.seal-block a:hover { transform: scale(1.03); }
.seal-block img { width: 200px; height: auto; display: block; }
.seal-block .seal-body { flex: 1; min-width: 270px; }
.seal-caption { font-size: 14px; line-height: 1.8; color: var(--text-muted); }
.seal-caption strong { color: var(--text-strong); font-weight: 600; }

/* ─── Doc pages (support / privacy) ───────── */
.doc-head {
  background: var(--stone-950);
  padding: var(--s-20) 0 var(--s-16);
  position: relative; overflow: hidden; isolation: isolate;
}
.doc-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 55% 60% at 86% 10%, rgba(220,41,30,.26), transparent 62%),
    radial-gradient(ellipse 40% 50% at 6% 100%, rgba(201,165,84,.10), transparent 60%);
}
.doc-head .container { position: relative; z-index: 1; }
.doc-head h1 { font-size: clamp(28px, 4.6vw, 46px); line-height: 1.2; }
.doc-head .doc-sub {
  margin-top: var(--s-4); font-size: 16.5px; font-weight: 300;
  color: var(--stone-400); line-height: 1.7;
}

.doc-body { padding: var(--s-20) 0 var(--s-28); }
.doc-body .container { max-width: 860px; }
.doc-block { margin-bottom: var(--s-16); scroll-margin-top: 88px; }
.doc-block h2 { font-size: clamp(21px, 2.4vw, 25px); margin-bottom: var(--s-1); }
.doc-block .h2-en {
  font-size: 13.5px; font-weight: 600; letter-spacing: .09em;
  color: var(--text-muted); margin-bottom: var(--s-6);
  text-transform: uppercase;
}
.doc-block p { font-size: 16px; line-height: 1.85; margin-bottom: var(--s-3); }
.doc-block p.en { font-size: 15px; color: var(--text-muted); }
.doc-block ul { margin: 0 0 var(--s-3) var(--s-5); font-size: 16px; line-height: 1.85; }
.doc-block ul.en { font-size: 15px; color: var(--text-muted); }
.doc-block li { margin-bottom: var(--s-2); padding-left: var(--s-1); }
.doc-block li::marker { color: var(--gold-ink); }
.doc-block a { color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--stone-300); text-underline-offset: 3px; transition: color var(--dur-fast) var(--ease-out), text-decoration-color var(--dur-fast) var(--ease-out); }
.doc-block a:hover { color: var(--ember); text-decoration-color: var(--ember); }

.info-table {
  width: 100%; border-collapse: collapse; margin-top: var(--s-3);
  font-size: 15.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.info-table tr { transition: background var(--dur-fast) var(--ease-out); }
.info-table tr:hover { background: var(--stone-50); }
.info-table th, .info-table td {
  text-align: left; padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--line); vertical-align: top;
  line-height: 1.7;
}
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.info-table th { width: 38%; font-weight: 500; color: var(--text-muted); font-size: 14.5px; }
.info-table td { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.info-table td a { color: var(--text-strong); text-decoration: none; border-bottom: 1px solid var(--stone-300); }
.info-table td a:hover { color: var(--ember); border-color: var(--ember); }

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: var(--s-6) 0;
}
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-q { font-size: 16.5px; font-weight: 600; color: var(--text-strong); line-height: 1.6; }
.faq-q-en { font-size: 13.5px; font-weight: 500; color: var(--text-muted); margin-top: var(--s-1); line-height: 1.6; }
.faq-a { font-size: 15.5px; margin-top: var(--s-3); line-height: 1.85; }
.faq-a-en { font-size: 14.5px; color: var(--text-muted); margin-top: var(--s-2); line-height: 1.8; }
.doc-updated { margin-top: var(--s-4); font-size: 13.5px; color: var(--text-muted); }

/* ─── Footer ──────────────────────────────── */
footer {
  background: var(--stone-950); color: var(--stone-400);
  padding: var(--s-16) 0 var(--s-12);
  position: relative;
}
footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,165,84,.30) 30%, rgba(220,41,30,.30) 70%, transparent);
}
.foot-name { color: #fff; font-weight: 600; font-size: 17px; line-height: 1.5; }
.foot-en { margin-top: var(--s-1); font-size: 12.5px; letter-spacing: .12em; color: var(--stone-400); font-weight: 600; }
.foot-legal {
  margin-top: var(--s-6); font-size: 13.5px; color: var(--stone-400);
  line-height: 2; font-variant-numeric: tabular-nums;
}
.foot-links { margin-top: var(--s-6); display: flex; gap: var(--s-6); flex-wrap: wrap; }
.foot-links a {
  font-size: 13.5px; color: var(--stone-300); text-decoration: none;
  padding: var(--s-1) 0;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.foot-links a:hover { color: var(--gold-soft); border-color: var(--gold); }
.foot-note {
  margin-top: var(--s-8); padding-top: var(--s-5);
  border-top: 1px solid rgba(250,250,249,.08);
  font-size: 12.5px; color: var(--stone-400); /* 7.4:1 on --stone-950 (AA) */
}

/* ─── Scroll reveal — CSS only, no JS ────────
   Deliberately animates transform ONLY, never opacity: this page is
   used as evidence in identity verification, and a screenshot taken
   without scrolling must still show every word. Browsers without
   scroll-driven animation support just render the static layout. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .pillar, .brand, .contact-card, .seal-block {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}
@keyframes reveal {
  from { transform: translateY(14px) scale(.994); }
  to   { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ─── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .container { padding: 0 var(--s-5); }
  section { padding: var(--s-16) 0; }
  header.hero { padding: var(--s-20) 0 var(--s-16); }
  .doc-head { padding: var(--s-16) 0 var(--s-12); }
  .doc-body { padding: var(--s-12) 0 var(--s-16); }
  .pillars, .brands { grid-template-columns: 1fr; }
  .pillars, .brands, .contact-grid { margin-top: var(--s-10); }
  .pillar, .brand, .contact-card { padding: var(--s-8) var(--s-6); }
  .seal-block { gap: var(--s-6); padding: var(--s-6); }
  .seal-block img { width: 156px; }
  /* keep the legal-name pill on one line at 375px */
  .eyebrow { font-size: 10px; letter-spacing: .1em; padding: var(--s-2) var(--s-3); margin-bottom: var(--s-6); }
  .eyebrow::before { margin-right: var(--s-2); }
  .doc-block { margin-bottom: var(--s-12); }
  .info-table th, .info-table td { display: block; width: 100%; padding: var(--s-3) var(--s-5); }
  .info-table th { border-bottom: 0; padding-bottom: 0; }
  .btn { width: 100%; }
  /* comfortable tap areas on touch devices */
  .contact-row .v a, .info-table td a, .foot-links a {
    display: inline-block; min-height: 44px; line-height: 44px;
  }
  .contact-row { padding-block: var(--s-2); }
}
