/* =========================================================
   Greenio Company Limited — corporate site stylesheet
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --green-950: #08261d;
  --green-900: #0d3b2e;
  --green-800: #125a45;
  --green-700: #17694f;
  --green-500: #2fa37a;
  --green-300: #8fd9b8;
  --green-100: #e3f4ec;
  --sand-50:   #f7f8f6;
  --sand-100:  #eef1ee;
  --ink:       #18231f;
  --muted:     #58655f;
  --white:     #ffffff;
  --line:      #dbe3de;
  --radius:    14px;
  --shadow-sm: 0 2px 10px rgba(13, 59, 46, .06);
  --shadow:    0 14px 36px rgba(13, 59, 46, .10);
  --container: 1200px;
  --header-h:  76px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sand-50: #0e1816; --sand-100: #132220; --ink: #e6efea; --muted: #a3b5ad;
    --white: #15241f; --green-100: #1b3a2f; --line: #26352f;
    --shadow-sm: 0 2px 10px rgba(0,0,0,.3); --shadow: 0 14px 36px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --sand-50: #0e1816; --sand-100: #132220; --ink: #e6efea; --muted: #a3b5ad;
  --white: #15241f; --green-100: #1b3a2f; --line: #26352f;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.3); --shadow: 0 14px 36px rgba(0,0,0,.4);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans Thai", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--sand-50);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-tint { background: var(--sand-100); }
.section-dark { background: linear-gradient(135deg, var(--green-950), var(--green-800)); color: #e6f4ec; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #c4e3d3; }
.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--green-500); margin-bottom: .8em;
}
.accent { color: var(--green-500); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 600px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); }
.btn-ghost { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn-ghost:hover { background: var(--green-100); }
.btn-light { background: #fff; color: var(--green-900); }
.btn-light:hover { background: var(--green-100); }
.btn-small { padding: 9px 18px; font-size: .95rem; }
.btn-block { width: 100%; }
:focus-visible { outline: 3px solid var(--green-500); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--sand-50) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--green-700) 10%, transparent);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 24px; }
.logo { display: inline-flex; align-items: center; }
.logo:hover { text-decoration: none; }
.logo img { height: 56px; width: auto; display: block; background: #fff; padding: 3px 7px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  color: var(--ink); font-weight: 500; padding: 8px 14px; border-radius: 999px; font-size: .95rem;
}
.nav a:not(.btn):hover { background: var(--green-100); color: var(--green-800); text-decoration: none; }
.nav a[aria-current="page"]:not(.btn) { color: var(--green-700); font-weight: 600; }
.nav .btn { margin-left: 10px; color: #fff; }
.nav .lang-switch {
  font-weight: 700; font-size: .9rem; color: var(--green-800);
  border: 1.5px solid var(--green-700); border-radius: 999px; padding: 6px 12px; margin-left: 6px;
}
.nav .lang-switch:hover { background: var(--green-100); text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.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 (home) ---------- */
.hero {
  position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 96px);
  background:
    radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--green-300) 45%, transparent), transparent 70%),
    radial-gradient(700px 360px at -10% 110%, color-mix(in srgb, var(--green-500) 25%, transparent), transparent 70%),
    var(--sand-50);
}
.hero-grid { display: grid; gap: 56px; align-items: center; grid-template-columns: 1.1fr .9fr; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-visual { position: relative; min-height: 380px; }
.orb { position: absolute; border-radius: 50%; }
.orb-1 { width: 300px; height: 300px; top: 0; right: 0;
  background: radial-gradient(circle at 30% 30%, #9be6c6, var(--green-500) 60%, var(--green-800)); opacity: .92; }
.orb-2 { width: 150px; height: 150px; bottom: 10px; left: 0;
  background: radial-gradient(circle at 30% 30%, #fff3c4, #e8c76a 70%); opacity: .85; }
.stat-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(290px, 84%); padding: 26px; border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px; text-align: center;
}
.stat-label { font-size: .85rem; color: var(--muted); }
.stat-value { font-size: 3.2rem; font-weight: 800; color: var(--green-700); line-height: 1.1; }
.stat-note { font-size: .85rem; color: var(--muted); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: clamp(56px, 7vw, 88px) 0 clamp(48px, 6vw, 72px);
  background:
    radial-gradient(800px 320px at 90% 0%, color-mix(in srgb, var(--green-300) 40%, transparent), transparent 70%),
    var(--sand-50);
  border-bottom: 1px solid var(--line);
}
.page-hero p.lead { margin-top: 12px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* ---------- Trust strip ---------- */
.strip { background: var(--white); border-block: 1px solid var(--line); padding: 26px 0; }
.strip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; color: var(--muted); font-size: .95rem; }
.strip-row span:first-child { font-weight: 600; color: var(--muted); }
.strip-row span:not(:first-child) { font-weight: 700; color: var(--green-900); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--white); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--green-500) 40%, var(--line)); }
.card p { color: var(--muted); margin: 0 0 .6em; }
.card .more { margin-top: auto; padding-top: 12px; font-weight: 600; font-size: .95rem; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-700); margin-bottom: 20px;
}
.card-icon svg { width: 26px; height: 26px; }
.card.featured { background: linear-gradient(160deg, var(--green-900), var(--green-800)); border-color: transparent; }
.card.featured h3, .card.featured p { color: #e6f4ec; }
.card.featured .card-icon { background: rgba(255,255,255,.12); color: #bff0d8; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: var(--green-100); color: var(--green-800); font-weight: 600; }

/* ---------- Feature split ---------- */
.split { display: grid; gap: 56px; align-items: center; grid-template-columns: 1fr 1fr; }
.split.reverse .split-media { order: -1; }
.split p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; font-weight: 500; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/13px no-repeat;
}
.panel-visual {
  border-radius: var(--radius); min-height: 320px; padding: 36px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--green-900), var(--green-500));
  color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; box-shadow: var(--shadow);
}
.panel-visual .big { font-size: 2.6rem; font-weight: 800; line-height: 1.05; }
.panel-visual .small { opacity: .85; font-size: .95rem; }
.panel-visual::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.18); box-shadow: 0 0 0 40px rgba(255,255,255,.05);
}

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { padding: 28px 24px; border-top: 3px solid var(--green-500); background: var(--white); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-sm); }
.step-num { font-size: .85rem; font-weight: 800; color: var(--green-500); letter-spacing: .1em; }
.steps h3 { margin-top: 8px; }
.steps p { color: var(--muted); margin: 0; }

/* ---------- Metrics ---------- */
.metrics { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 0; padding: 0; list-style: none; }
.metrics li { background: var(--white); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.metric-value { display: block; font-size: 2.4rem; font-weight: 800; color: var(--green-700); line-height: 1.1; }
.metric-label { color: var(--muted); font-size: .95rem; }

/* ---------- News list ---------- */
.news-list { display: grid; gap: 20px; }
.news-item {
  display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
}
.news-date { font-size: .85rem; font-weight: 700; color: var(--green-500); padding-top: 4px; }
.news-item p { color: var(--muted); margin: 0; }
.news-item h3 { margin-bottom: 6px; }
.news-item ul { color: var(--muted); margin: 0 0 1em; }
.news-th { font-size: .92rem; font-style: italic; color: var(--muted); }
.news-item .more { display: inline-block; }

/* ---------- Quote ---------- */
.quote {
  margin: 0; padding: 40px; background: var(--green-900); color: #e6f4ec; border-radius: var(--radius); box-shadow: var(--shadow);
}
.quote p { font-size: 1.3rem; line-height: 1.5; color: #fff; margin-bottom: 14px; }
.quote footer { color: #a9d9c2; font-size: .92rem; }

/* ---------- Forms ---------- */
.contact-layout { display: grid; gap: 40px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: var(--white); padding: 34px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.form .full { grid-column: 1 / -1; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; font-size: 1rem; padding: 12px 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: var(--sand-50);
}
.form textarea { resize: vertical; }
.form button { border: 0; cursor: pointer; font-family: inherit; }
.form-note { grid-column: 1 / -1; margin: 0; color: var(--green-700); font-weight: 600; min-height: 1.4em; }
.info-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.info-card + .info-card { margin-top: 18px; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.info-card p { color: var(--muted); margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--green-950), var(--green-700)); color: #e6f4ec; text-align: center;
  border-radius: 24px; padding: clamp(48px, 6vw, 72px) 28px; margin: 0 auto;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfeadd; max-width: 560px; margin: 0 auto 28px; }
.cta-band .cta-row { justify-content: center; margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-950); color: #cfe6da; padding: 64px 0 28px; font-size: .95rem; margin-top: 40px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; align-items: start; }
.footer-logo { display: inline-block; }
.footer-logo img { height: 72px; width: auto; display: block; background: #fff; padding: 4px 8px; border-radius: 10px; }
.site-footer p { color: #a9cbb9; margin: 14px 0 0; }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.site-footer nav { display: flex; flex-direction: column; gap: 9px; }
.site-footer nav a, .site-footer a { color: #cfe6da; }
.site-footer address { font-style: normal; color: #a9cbb9; line-height: 1.7; }
.site-footer .copy { grid-column: 1 / -1; margin: 36px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: #8fb3a1; font-size: .85rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav a:not(.btn) { padding: 8px 10px; }
}
@media (max-width: 900px) {
  .hero-grid, .split, .contact-layout { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .hero-visual { min-height: 300px; }
}
@media (max-width: 820px) {
  :root { --header-h: 68px; }
  .logo img { height: 48px; }
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--sand-50); border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px; display: none; box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin: 14px 0 0; }
  .news-item { grid-template-columns: 1fr; gap: 8px; }
  .form { grid-template-columns: 1fr; padding: 24px; }
  .quote { padding: 28px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; }
}

/* ---------- Photos from the legacy site ---------- */
.news-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 18px; }
.news-photos figure { margin: 0; }
.news-photos img { width: 100%; height: auto; border-radius: 10px; }
.news-photos figcaption, .photo-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.card-photo { width: 100%; height: auto; border-radius: 10px; margin-bottom: 14px; }
.photo-figure { margin: 0; }
.photo-figure img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 560px) { .news-photos { grid-template-columns: 1fr; } }

/* ---------- Local article pages (original Thai text) ---------- */
.article-body { max-width: 820px; }
.article-body p { color: var(--ink); }
.article-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 28px; }
.article-photos figure { margin: 0; }
.article-photos img { width: 100%; height: 220px; object-fit: cover; border-radius: 10px; }
@media (max-width: 560px) { .article-photos { grid-template-columns: 1fr; } .article-photos img { height: 200px; } }

/* ---------- Product spec tables (Air monitor) ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.spec-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.spec-card h3 { margin: 0 0 12px; font-size: 1.05rem; }
.spec-card ul { list-style: none; margin: 0; padding: 0; }
.spec-card li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.spec-card li:first-child { border-top: 0; }
.spec-card li span:first-child { color: var(--muted); }
.spec-card li span:last-child { text-align: right; font-weight: 600; }
.spec-wide { grid-column: 1 / -1; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec-table th, .spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.spec-table th { background: var(--green-100); color: var(--green-950, var(--ink)); font-weight: 700; }
@media (max-width: 720px) { .spec-grid { grid-template-columns: 1fr; } .spec-table { font-size: .85rem; } }

.table-wrap { overflow-x: auto; }

/* ---------- On Device AI tiers ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tier-card { display: flex; flex-direction: column; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.tier-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tier-card h3 { margin: 0; }
.tier-card-featured { border-color: var(--green-500); border-width: 2px; }
.tier-badge { align-self: flex-start; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--green-100); color: var(--green-700); padding: 5px 12px; border-radius: 999px; }
.tier-chip { margin: 0; color: var(--green-700); font-weight: 600; font-size: .95rem; }
.tier-facts { list-style: none; padding: 0; margin: 6px 0 4px; }
.tier-facts li { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line); }
.tier-facts li span { color: var(--muted); font-size: .85rem; }
.tier-facts li strong { font-size: .98rem; }
.tier-card .more { margin-top: auto; }
.small-note { font-size: .92rem; color: var(--muted); margin-top: 16px; }
.step-no { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: var(--green-500); color: #fff; font-weight: 700; margin-bottom: 12px; }
.image-slot { margin: 0; }
.image-slot img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.image-slot figcaption { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.slot-placeholder { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; border-radius: var(--radius); border: 2px dashed var(--green-500); background: repeating-linear-gradient(135deg, var(--green-100) 0 14px, var(--white) 14px 28px); color: var(--green-700); font-weight: 600; font-size: .95rem; }
@media (max-width: 900px) { .tier-grid { grid-template-columns: 1fr; } }
