/* Sync Earth — syncearth.co.th · static site · no build step */
@font-face {
  font-family: "Sarabun";
  src: url("../fonts/Sarabun-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sarabun";
  src: url("../fonts/Sarabun-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #1f4e36;
  --green-dark: #163a28;
  --gold: #c9955a;
  --ivory: #fbf7ee;
  --paper: #ffffff;
  --ink: #23303b;
  --muted: #5b6670;
  --line: #e4ddcd;
  --line-green: #06c755;
  --warn-bg: #fff4d6;
  --warn-ink: #6b4b00;
  --radius: 14px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Sarabun", "Leelawadee UI", "Thonburi", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--ivory);
}
img { max-width: 100%; height: auto; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); line-height: 1.2; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font: inherit; color: var(--ink); cursor: pointer;
}
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--ivory); color: var(--green); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px 20px 16px; }
}

/* Hero */
.hero { background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%); color: #fff; padding: 64px 0 56px; }
.hero p.lead { font-size: 1.15rem; max-width: 720px; opacity: .95; }
.hero .eyebrow { color: var(--gold); font-weight: 700; letter-spacing: .02em; margin-bottom: .4em; }
.hero-small { padding: 44px 0 36px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 20px; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; font-size: 1rem; line-height: 1.3; cursor: pointer; text-align: center;
}
.btn-line { background: var(--line-green); color: #fff; }
.btn-line:hover { color: #fff; filter: brightness(.95); }
.btn-outline { border-color: currentColor; color: var(--green); background: transparent; }
.hero .btn-outline { color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn[data-pending="true"] { background: #8a969f; cursor: help; flex-direction: column; gap: 0; border-radius: 18px; }
.btn small { font-weight: 400; font-size: .8rem; opacity: .9; white-space: nowrap; }
.card .card-actions .btn { width: 100%; }

/* Sections */
section { padding: 56px 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-intro { max-width: 720px; color: var(--muted); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column;
}
.card .tag { font-size: .85rem; color: var(--muted); margin-bottom: .3em; }
.card p { color: var(--ink); }
.card .card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.card .more { font-weight: 700; }
.icon { width: 44px; height: 44px; margin-bottom: 12px; }

.service-block { padding: 36px 0; border-bottom: 1px solid var(--line); }
.service-block:last-child { border-bottom: 0; }
.service-block ul { padding-left: 1.2em; }
.not-list li::marker { content: "✕  "; color: #a23b2a; }

/* Notices */
.notice {
  background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f0d78c;
  border-radius: var(--radius); padding: 16px 20px; margin: 20px 0;
}
.notice strong { color: #4a3400; }
.trust { background: #eef5f0; border: 1px solid #cfe3d6; color: var(--green-dark); border-radius: var(--radius); padding: 16px 20px; }
.draft-banner {
  background: #b3261e; color: #fff; text-align: center; font-weight: 700; padding: 10px 16px;
}
.pending { background: #ffe9a8; color: #5a4100; padding: 0 4px; border-radius: 4px; font-size: .92em; }

/* Legal pages */
.legal { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px clamp(18px, 4vw, 44px); margin: 32px auto 56px; max-width: 860px; }
.legal h2 { margin-top: 1.6em; padding-top: .6em; border-top: 1px solid var(--line); font-size: 1.35rem; }
.legal h3 { margin-top: 1.2em; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .95rem; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--ivory); }
.table-wrap { overflow-x: auto; }
.toc { background: var(--ivory); border-radius: 10px; padding: 14px 20px; }
.toc ol { margin: 0; padding-left: 1.3em; }
.meta { color: var(--muted); font-size: .95rem; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.label { display: inline-block; min-width: 150px; color: var(--muted); }

/* Footer */
.site-footer { background: #1b2a22; color: #d9e2dc; padding: 40px 0 28px; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 4px 0; }
.footer-bottom { border-top: 1px solid #33473b; margin-top: 28px; padding-top: 16px; font-size: .88rem; color: #aebcb3; }

@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { background: #fff; }
}

/* Images (v1.1) */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; }
.hero.has-bg::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(14,38,26,.94) 0%, rgba(22,58,40,.86) 55%, rgba(22,58,40,.62) 100%); }
.hero.has-bg .container { position: relative; z-index: 2; }
.card-media { display: block; width: calc(100% + 48px); max-width: none; margin: -24px -24px 16px; height: 180px;
  object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; background: #0f1d2b; }
.card-media.contain { object-fit: contain; padding: 12px; }
.card-media.top { object-position: center 18%; }
.card-media-box { display: flex; align-items: center; justify-content: center; background: #eef5f0; }
.card-media-box .icon { width: 72px; height: 72px; margin: 0; }
.portrait { border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.portrait-main { width: 100%; max-width: 340px; height: auto; margin: 0 0 16px; }
.portrait-side { float: right; width: 38%; max-width: 280px; height: auto; margin: 0 0 16px 24px; }
.inline-coin { float: right; width: 120px; height: 120px; border-radius: 50%; margin: 0 0 12px 20px; }
.clearfix::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) {
  .portrait-side { float: none; width: 70%; margin: 0 auto 16px; }
  .inline-coin { width: 88px; height: 88px; }
}
.media-row { align-items: center; }
.illus { width: 100%; height: auto; border-radius: 18px; display: block; }
.btn-row .more { align-self: center; }

/* v1.4 company logo (dragon coin) · @syncearth icon */
.brand-mark { width: 40px; height: 40px; border-radius: 8px; }
.footer-logo { display: block; width: 64px; height: 64px; border-radius: 12px; margin: 0 0 12px; }
.logo-404 { display: block; width: 96px; height: 96px; border-radius: 16px; margin: 0 0 16px; }
.card-media-box.hub img { width: 96px; height: 96px; }
.inline-icon { border-radius: 0; }
