/* Overdrive Labs 998 — shared design system.
   Palette is taken from the brand mark: emerald on graphite, nothing else.
   Neutrals carry a slight green bias so they read as chosen, not inherited. */

:root {
  --emerald:   #10B981;
  --emerald-d: #059669;
  --emerald-l: #34D399;

  --ground:    #0B0D10;
  --raised:    #141A1E;
  --raised-2:  #1B2228;
  --line:      #263039;
  --ink:       #E9F1EC;
  --dim:       #90A1A8;
  --dim-2:     #6B7A82;

  --maxw: 1080px;
  --radius: 14px;

  --font: "Segoe UI", system-ui, -apple-system, "Noto Sans Thai", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --ground:   #F6F8F7;
    --raised:   #FFFFFF;
    --raised-2: #F0F4F2;
    --line:     #DCE5E0;
    --ink:      #0E1512;
    --dim:      #55655C;
    --dim-2:    #7A8A81;
    --emerald:  #047857;
    --emerald-l:#059669;
  }
}
:root[data-theme="light"] {
  --ground:#F6F8F7; --raised:#FFFFFF; --raised-2:#F0F4F2; --line:#DCE5E0;
  --ink:#0E1512; --dim:#55655C; --dim-2:#7A8A81; --emerald:#047857; --emerald-l:#059669;
}
:root[data-theme="dark"] {
  --ground:#0B0D10; --raised:#141A1E; --raised-2:#1B2228; --line:#263039;
  --ink:#E9F1EC; --dim:#90A1A8; --dim-2:#6B7A82; --emerald:#10B981; --emerald-l:#34D399;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--emerald-l); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--emerald-l);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------------------------------------------------------------- header */

.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in {
  max-width: var(--maxw); margin: 0 auto; padding: 13px 22px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand svg { width: 34px; height: 34px; border-radius: 8px; display: block; flex: none; }
.brand__t { font-weight: 800; letter-spacing: -.015em; font-size: 16px; }
.brand__t span { color: var(--emerald-l); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--dim); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 7px 11px; border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--raised); }

.langbtn {
  font: inherit; font-size: 13px; font-weight: 700;
  background: var(--raised); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 12px; cursor: pointer;
}
.langbtn:hover { border-color: var(--emerald); }

/* ------------------------------------------------------------------ hero */

.hero { padding: 76px 0 48px; }
.hero__eyebrow {
  margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .17em;
  text-transform: uppercase; color: var(--emerald-l);
}
.hero h1 {
  margin: 0 0 18px; font-size: clamp(34px, 6vw, 62px); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.08; text-wrap: balance;
}
.hero p {
  margin: 0; max-width: 60ch; font-size: clamp(16px, 2vw, 19px); color: var(--dim);
}

/* --------------------------------------------------------------- section */

.sec { padding: 52px 0; border-top: 1px solid var(--line); }
.sec__hd { display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.sec__hd h2 { margin: 0; font-size: clamp(21px, 3vw, 27px); font-weight: 800; letter-spacing: -.02em; }
.sec__hd p { margin: 0; color: var(--dim); font-size: 14.5px; }
.count {
  font-size: 12px; font-weight: 700; color: var(--emerald-l);
  background: color-mix(in srgb, var(--emerald) 15%, transparent);
  padding: 3px 9px; border-radius: 999px;
}

/* ----------------------------------------------------------------- cards */

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }

.card {
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 13px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s;
}
a.card:hover { border-color: var(--emerald); transform: translateY(-2px); }

.card__top { display: flex; align-items: center; gap: 13px; }
.card__ico { width: 52px; height: 52px; border-radius: 12px; flex: none; display: block; }
.card__nm { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.card__meta { margin: 2px 0 0; font-size: 12.5px; color: var(--dim-2); }
.card__desc { margin: 0; font-size: 14px; color: var(--dim); flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; font-weight: 650; color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px;
}
.tag--live {
  color: var(--emerald-l); border-color: color-mix(in srgb, var(--emerald) 45%, transparent);
  background: color-mix(in srgb, var(--emerald) 12%, transparent);
}

/* Placeholder card for work not yet published */
.card--soon { border-style: dashed; }
.card--soon .card__nm { color: var(--dim); }
.soonico {
  width: 52px; height: 52px; border-radius: 12px; flex: none;
  border: 1px dashed var(--line); display: grid; place-items: center;
  color: var(--dim-2); font-size: 20px; font-weight: 800;
}

/* ---------------------------------------------------------------- contact */

.contact {
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
}
.contact h2 { margin: 0 0 5px; font-size: 20px; font-weight: 800; letter-spacing: -.015em; }
.contact p { margin: 0; color: var(--dim); font-size: 14.5px; }
.mail {
  margin-left: auto; display: inline-flex; align-items: center; gap: 9px;
  background: var(--emerald); color: #04140D; font-weight: 750; font-size: 15px;
  text-decoration: none; padding: 12px 20px; border-radius: 10px;
  word-break: break-all;
}
.mail:hover { background: var(--emerald-l); }

/* ----------------------------------------------------------------- footer */

.foot { border-top: 1px solid var(--line); padding: 30px 0 46px; color: var(--dim-2); font-size: 13.5px; }
.foot__in { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot__sp { margin-left: auto; }

/* ----------------------------------------------------- app page specifics */

.apphero { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; padding: 60px 0 40px; }
.apphero__ico { width: 96px; height: 96px; border-radius: 22px; flex: none; }
.apphero__txt h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -.028em; }
.apphero__txt p { margin: 0; color: var(--dim); font-size: 17px; max-width: 52ch; }

.shots {
  display: flex; gap: 15px; overflow-x: auto; padding: 4px 0 14px;
  scroll-snap-type: x mandatory;
}
.shots img {
  width: 208px; flex: none; border-radius: 13px; border: 1px solid var(--line);
  scroll-snap-align: start;
}

.feat { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.feat > div {
  background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 19px;
}
.feat h3 { margin: 0 0 7px; font-size: 15.5px; font-weight: 750; }
.feat p { margin: 0; font-size: 14px; color: var(--dim); }

.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.fact {
  background: var(--raised-2); border: 1px solid var(--line);
  border-radius: 11px; padding: 15px 16px;
}
.fact dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--dim-2); }
.fact dd {
  margin: 4px 0 0; font-size: 16px; font-weight: 750;
  font-variant-numeric: tabular-nums;
}

/* Language switching: only the active language's nodes are shown. */
[data-lang] { display: none; }
:root[data-site-lang="th"] [data-lang="th"],
:root[data-site-lang="en"] [data-lang="en"] { display: revert; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
