/* =====================================================================
   ATMO Informatics: turnkey IT services
   Plain CSS, no build step, no external requests.
   Design: clean white base, deep navy contrast sections, one confident
   blue, one yellow accent (from the logo). Signature: the isometric IT stack.
   ===================================================================== */

/* ---------- Fonts (self-hosted, woff2, OFL) ---------- */
/* If a font file is missing, the system fonts in the stacks below take over. */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
/* Kanit SemiBold, Thai letters only (OFL, see fonts/OFL-Kanit.txt): Thai headings on /th/.
   unicode-range keeps it from loading on the English page. */
@font-face {
  font-family: "Kanit";
  src: url("../fonts/kanit-thai-600.woff2") format("woff2");
  font-weight: 500 700; font-style: normal; font-display: swap;
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #0B1324;
  --ink-2: #4A5470;
  --line: #E3E8F0;
  --bg: #FFFFFF;
  --soft: #F5F7FB;
  --navy: #0A1330;
  --navy-2: #121D45;
  --blue: #1E4FE0;
  --blue-dark: #1740B8;
  --blue-tint: #EEF3FF;
  --sky: #A9C1FF;
  --accent: #F5C518;
  --ok: #22C55E;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --header-h: 64px;     /* compact header, once the page scrolls (used for scroll offsets) */
  --header-top: 80px;   /* roomy header on first view */
  --logo-h: 32px;
  --logo-top: 42px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 2px rgba(11, 19, 36, .04), 0 12px 32px -12px rgba(11, 19, 36, .14);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--accent); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; border: 1.5px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn svg { flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -10px rgba(30, 79, 224, .7); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn--light:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }
.btn--lg { padding: 16px 26px; font-size: 1.05rem; }
.btn--sm { padding: 9px 16px; font-size: .94rem; border-radius: 10px; }
.btn--primary svg { transition: transform .2s var(--ease); }
.btn--primary:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
/* Shrinks once the page scrolls. Height and bottom margin change together, so the page below never shifts. */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-top); margin-bottom: 0;
  background: rgba(255, 255, 255, .92); border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s, height .35s var(--ease), margin-bottom .35s var(--ease);
}
.site-header.is-scrolled { height: var(--header-h); margin-bottom: calc(var(--header-top) - var(--header-h)); }
@media (min-width: 960px) { :root { --header-h: 68px; --header-top: 100px; --logo-h: 36px; --logo-top: 56px; } }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(11, 19, 36, .4); }
/* Reading progress along the bottom of the header (set by JS) */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--blue), #3D6BFF); transform: scaleX(var(--scroll, 0)); transform-origin: left;
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand img { height: var(--logo-top); width: auto; transition: height .35s var(--ease); }
.is-scrolled .brand img { height: var(--logo-h); }
.primary-nav { margin-left: auto; display: none; }
.primary-nav ul { display: flex; gap: 4px; }
.primary-nav a {
  display: block; padding: 8px 14px; border-radius: 10px;
  font-size: .96rem; font-weight: 600; color: var(--ink-2); text-decoration: none; transition: color .2s, background-color .2s;
}
.primary-nav a:hover { color: var(--ink); background: var(--soft); }
.primary-nav a[aria-current] { color: var(--blue); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* Language switch: EN | ไทย, the current language filled */
.lang-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.lang-switch a {
  min-width: 38px; padding: 7px 9px; border-radius: 8px; text-align: center;
  font-size: .84rem; font-weight: 600; line-height: 1.2; color: var(--ink-2); text-decoration: none; transition: color .2s, background-color .2s;
}
.lang-switch a:hover { color: var(--ink); background: var(--soft); }
.lang-switch a[aria-current] { background: var(--ink); color: #fff; }
.menu-toggle {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
}
@media (min-width: 960px) {
  .primary-nav { display: block; }
  .header-actions { margin-left: 8px; }
  .menu-toggle { display: none; }
}
@media (max-width: 479px) { .header-actions .btn--sm { display: none; } }

.mobile-menu {
  position: fixed; inset: calc(var(--header-h) + 8px) 12px auto 12px; margin: 0; width: auto;
  padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(11, 19, 36, .35);
}
.site-header:not(.is-scrolled) + .mobile-menu { top: calc(var(--header-top) + 8px); }
.mobile-menu::backdrop { background: rgba(11, 19, 36, .25); }
.mobile-menu ul { display: grid; gap: 2px; margin-bottom: 14px; }
.mobile-menu a:not(.btn) { display: block; padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.mobile-menu a:not(.btn):hover { background: var(--soft); }
.mobile-menu .btn { width: 100%; }
.no-popover .mobile-menu { display: none; z-index: 60; }
.no-popover .mobile-menu.is-open { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: clip; padding-block: clamp(40px, 6vw, 80px) clamp(64px, 9vw, 120px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(circle at 1px 1px, rgba(11, 19, 36, .11) 1px, transparent 0);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; right: -10%; top: 0; width: 70%; height: 100%;
  background: radial-gradient(closest-side, rgba(30, 79, 224, .13), transparent);
}
.hero-grid { display: grid; gap: 56px; align-items: center; }
.hero-grid > * { min-width: 0; } /* keep the ticker's long row from widening the column */
@media (min-width: 1100px) { .hero-grid { grid-template-columns: 1fr 1.1fr; gap: 32px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--blue-tint); color: var(--blue-dark);
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.hero h1 { margin-top: 24px; font-size: clamp(2.7rem, 1.5rem + 4.6vw, 5rem); line-height: 1.02; letter-spacing: -.035em; }
.hl { color: var(--blue); background: linear-gradient(transparent 78%, rgba(245, 197, 24, .55) 78%, rgba(245, 197, 24, .55) 94%, transparent 94%); }
.hero h1 .hl { display: inline-block; }
/* Rotating word: always on its own line, so nothing reflows as the words change.
   JS adds the extra words (aria-hidden) and keeps "IT stack." as the real, screen-reader text. */
.rotator { display: block; }
.rotator.is-rotating { position: relative; height: 1.12em; margin-bottom: -.1em; overflow: hidden; }
.rotator__word {
  position: absolute; left: 0; top: 0; white-space: nowrap; line-height: 1.02; transform-origin: left 80%;
  opacity: 0; transform: translateY(100%); transition: transform .7s var(--ease), opacity .45s ease;
}
.rotator__word.is-in { opacity: 1; transform: none; }
.rotator__word.is-out { opacity: 0; transform: translateY(-100%); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lede { margin-top: 24px; max-width: 34em; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.6; color: var(--ink-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.platforms { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 560px; }
.platforms__label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
/* Platforms ticker: two identical tracks slide left forever; pauses on hover */
.ticker {
  display: flex; overflow: hidden; margin-top: 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track { display: flex; flex: none; animation: ticker 36s linear infinite; }
.ticker__track li {
  display: flex; align-items: center; gap: 22px; padding-right: 22px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: #5B6582;
}
.ticker__track li::after { content: ""; width: 5px; height: 5px; border-radius: 1px; background: #C3CBDB; transform: rotate(45deg); }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* Hero entrance */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.js .hero-copy > * { animation: rise .8s var(--ease) both; }
.js .hero-copy > :nth-child(2) { animation-delay: .08s; }
.js .hero-copy > :nth-child(3) { animation-delay: .16s; }
.js .hero-copy > :nth-child(4) { animation-delay: .24s; }
.js .hero-copy > :nth-child(5) { animation-delay: .32s; }

/* ---------- The IT stack (signature visual) ---------- */
.hero-visual { position: relative; width: 100%; max-width: 600px; justify-self: center; }
.stack { width: 100%; }
.hero-person { display: none; }

/* From 600 px: a welcoming host presents the stack in his open hand, the health card sits below the labels.
   Everything is placed in % of one 680 × 620 box so the composition scales as a unit. The photo has a pure
   white background and multiplies onto the page, so the dot grid and glow show through around him. */
@media (min-width: 600px) {
  .hero-visual { aspect-ratio: 680 / 620; max-width: 680px; }
  .hero-person {
    display: block; position: absolute; left: 36.8%; top: 3.2%; width: 64%; height: auto;
    mix-blend-mode: multiply;
    -webkit-mask-image: linear-gradient(#000 70%, transparent 97%);
    mask-image: linear-gradient(#000 70%, transparent 97%);
  }
  .js .hero-person { animation: rise .9s var(--ease) .15s both; }
  .hero-visual .stack { position: absolute; left: 5.4%; top: -1.1%; width: 58.8%; }
  .hero-visual .monitor { position: absolute; left: 1%; top: 61%; width: min(310px, 52%); margin: 0; }
}
@media (min-width: 1100px) {
  /* bleed into the page margin on wide screens so the host has room */
  .hero-visual { width: auto; max-width: none; justify-self: stretch; margin-right: calc(-1 * clamp(0px, (100vw - 1180px) / 2, 110px)); }
}
.stack__svg { width: 100%; height: auto; overflow: visible; }
.slab { cursor: pointer; text-decoration: none; outline: none; }
.slab > * { transition: transform .35s var(--ease), fill .2s, stroke .2s; }
.slab__top { stroke: rgba(255, 255, 255, .22); stroke-width: 1; }
.slab__lead { fill: none; stroke: #C3CBDB; stroke-width: 1.5; }
.slab text { font-family: var(--font-display); font-weight: 600; font-size: 23px; fill: var(--ink); }
.slab .slab__n { font-family: var(--font-mono); font-weight: 400; font-size: 16px; fill: var(--blue); }
.slab:hover > *, .slab:focus-visible > * { transform: translateY(-10px); }
.slab:hover text, .slab:focus-visible text { fill: var(--blue); }
.slab:focus-visible .slab__top { stroke: var(--ink); stroke-width: 3; }
.slab--1 .slab__top { fill: #1B2A55; } .slab--1 .slab__l { fill: #14224A; } .slab--1 .slab__r { fill: #0E1838; }
.slab--2 .slab__top { fill: #1C3678; } .slab--2 .slab__l { fill: #162C64; } .slab--2 .slab__r { fill: #11234F; }
.slab--3 .slab__top { fill: #1F44A6; } .slab--3 .slab__l { fill: #19388A; } .slab--3 .slab__r { fill: #142C6E; }
.slab--4 .slab__top { fill: #2453D4; } .slab--4 .slab__l { fill: #1D45B2; } .slab--4 .slab__r { fill: #17398F; }
.slab--5 .slab__top { fill: #3D6BFF; } .slab--5 .slab__l { fill: #2F59E6; } .slab--5 .slab__r { fill: #2649C0; }
.slab--6 .slab__top { fill: var(--accent); } .slab--6 .slab__l { fill: #DDAE0C; } .slab--6 .slab__r { fill: #BE9407; }
.slab__live { fill: var(--ok); animation: live 2s ease-in-out infinite; }
.slab .slab__status { font-family: var(--font-mono); font-weight: 400; font-size: 16px; fill: var(--ink-2); }
@keyframes live { 50% { opacity: .35; } }

/* Built from the ground up on load, then a slow glint runs up the stack */
.js .slab { opacity: 0; transform: translateY(-70px); }
.js .stack.is-built .slab { opacity: 1; transform: none; transition: opacity .5s ease, transform .8s var(--ease); }
.stack.is-built .slab--2 { transition-delay: .12s; }
.stack.is-built .slab--3 { transition-delay: .24s; }
.stack.is-built .slab--4 { transition-delay: .36s; }
.stack.is-built .slab--5 { transition-delay: .48s; }
.stack.is-built .slab--6 { transition-delay: .6s; }
.stack.is-built .slab__top { animation: glint 9s ease-in-out 2s infinite; }
.stack.is-built .slab--2 .slab__top { animation-delay: 2.15s; }
.stack.is-built .slab--3 .slab__top { animation-delay: 2.3s; }
.stack.is-built .slab--4 .slab__top { animation-delay: 2.45s; }
.stack.is-built .slab--5 .slab__top { animation-delay: 2.6s; }
.stack.is-built .slab--6 .slab__top { animation-delay: 2.75s; }
@keyframes glint { 0%, 8%, 100% { filter: none; } 4% { filter: brightness(1.35); } }

/* Sample monitoring card under the stack */
.monitor {
  position: relative; z-index: 1; width: min(100%, 320px); margin: 8px 0 0 auto; padding: 14px 16px 14px;
  border-radius: 16px; background: rgba(255, 255, 255, .94); border: 1px solid var(--line);
  box-shadow: 0 24px 50px -24px rgba(11, 19, 36, .35), 0 2px 6px rgba(11, 19, 36, .05);
}
.js .monitor { animation: rise .8s var(--ease) 1.1s both; }
.monitor__head { display: flex; align-items: center; gap: 10px; }
.monitor__title { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.monitor__pause {
  margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer;
}
.monitor__pause:hover { color: var(--ink); border-color: #C3CBDB; }
.monitor__pause[aria-pressed="true"] .ico-pause, .monitor__pause:not([aria-pressed="true"]) .ico-play { display: none; }
.no-js .monitor__pause { display: none; }
.monitor__rows { display: grid; margin-top: 10px; }
.monitor__rows li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .92rem; line-height: 1.4; }
.monitor__rows li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.monitor__k { font-weight: 600; white-space: nowrap; }
.monitor__v { margin-left: auto; font-family: var(--font-mono); font-size: .76rem; color: #15803D; }
/* Each row has a small live indicator, lined up in one column left of the status */
.monitor__viz { flex: none; margin-left: auto; }
.monitor__viz + .monitor__v { margin-left: 8px; min-width: 9ch; text-align: right; }
.monitor__bars { display: flex; align-items: flex-end; gap: 2px; width: 28px; height: 14px; }
.monitor__bars i { width: 3px; height: 100%; border-radius: 1px; background: var(--blue); transform-origin: bottom; animation: bars 1.4s ease-in-out infinite; }
.monitor__bars i:nth-child(2) { animation-delay: -.25s; }
.monitor__bars i:nth-child(3) { animation-delay: -.7s; }
.monitor__bars i:nth-child(4) { animation-delay: -.4s; }
.monitor__bars i:nth-child(5) { animation-delay: -1s; }
.monitor__bars i:nth-child(6) { animation-delay: -.55s; }
@keyframes bars { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
/* Backups: a copy job fills the bar, settles, starts again */
.monitor__sync { width: 28px; height: 5px; border-radius: 3px; background: #DCE4F7; overflow: hidden; }
.monitor__sync i { display: block; height: 100%; border-radius: inherit; background: var(--blue); transform-origin: left; animation: sync 2.6s ease-in-out infinite; }
@keyframes sync { 0% { transform: scaleX(0); opacity: 1; } 65% { transform: scaleX(1); opacity: 1; } 85%, 100% { transform: scaleX(1); opacity: 0; } }
/* Security: a radar sweep */
.monitor__scan {
  position: relative; width: 15px; height: 15px; margin-right: 7px; border-radius: 50%; overflow: hidden;
  border: 1.5px solid rgba(30, 79, 224, .4);
}
.monitor__scan::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(30, 79, 224, .75), rgba(30, 79, 224, 0) 30%, transparent);
  animation: sweep 2.2s linear infinite;
}
.monitor__scan::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%; background: var(--blue); }
@keyframes sweep { to { transform: rotate(1turn); } }
/* Microsoft 365: a heartbeat line draws and fades */
.monitor__beat { width: 30px; height: 14px; overflow: visible; }
.monitor__beat path { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; animation: beat 2.4s linear infinite; }
.monitor__beat .base { stroke: #DCE4F7; stroke-dasharray: none; animation: none; }
@keyframes beat { 0% { stroke-dashoffset: 60; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -60; } }
.dot--live { animation: live 2s ease-in-out infinite; }

/* ---------- Ambient motion: slow, continuous, transform/opacity only (stopped by the pause button and reduced motion) ---------- */
/* Hero: the stack hovers over the host's palm, with a soft glow under it that breathes in step */
.stack.is-built { animation: hover 6s ease-in-out 1.6s infinite; }
@keyframes hover { 50% { transform: translateY(-12px); } }
@media (min-width: 600px) {
  .hero-visual::before {
    content: ""; position: absolute; left: 48.2%; top: 52%; width: 26%; height: 7%; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(61, 107, 255, .45), rgba(61, 107, 255, .12) 55%, transparent);
    transform: translate(-50%, -50%); animation: palm 6s ease-in-out 1.6s infinite;
  }
}
@keyframes palm { 50% { transform: translate(-50%, -50%) scale(.75); opacity: .55; } }
/* Hero background light drifts */
.hero::after { animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-6%, 6%) scale(1.12); } }
/* Live dots send out a ping */
.eyebrow .dot, .monitor__title .dot { position: relative; }
.eyebrow .dot::after, .monitor__title .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ok);
  animation: ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }
/* IT health: each row's check runs in turn */
.monitor__rows li::before { animation: check 4.8s ease-in-out infinite; }
.monitor__rows li:nth-child(2)::before { animation-delay: .6s; }
.monitor__rows li:nth-child(3)::before { animation-delay: 1.2s; }
.monitor__rows li:nth-child(4)::before { animation-delay: 1.8s; }
@keyframes check { 0%, 14%, 100% { transform: none; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } 6% { transform: scale(1.5); box-shadow: 0 0 0 4px rgba(34, 197, 94, .22); } }
/* Large primary buttons: a shine passes over now and then */
.btn--primary.btn--lg { position: relative; overflow: hidden; isolation: isolate; }
.btn--primary.btn--lg::after {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: translateX(-120%) skewX(-18deg); animation: shine 7s ease-in-out 2.5s infinite;
}
@keyframes shine { 0% { transform: translateX(-120%) skewX(-18deg); } 18%, 100% { transform: translateX(330%) skewX(-18deg); } }
/* Services guide: the current layer bobs gently */
.gslab.is-active > * { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
/* Briefing band: a very slow push-in on the photo */
@media (min-width: 800px) { .talk__photo { transform-origin: 80% 40%; animation: push 22s ease-in-out infinite alternate; } }
@keyframes push { to { transform: scale(1.05); } }
/* Contact: a second, soft light drifts across the dark background */
.contact::after {
  content: ""; position: absolute; z-index: -1; left: -15%; bottom: -40%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(169, 193, 255, .14), transparent);
  animation: drift 20s ease-in-out infinite alternate;
}

/* Pause button stops every animation on the page */
.is-paused *, .is-paused *::before, .is-paused *::after { animation-play-state: paused !important; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 10vw, 136px); }
.section--soft { background: var(--soft); }
.section--dark { background: var(--navy); color: #fff; }
.section-head { max-width: 780px; }
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue);
}
.kicker__n {
  display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 8px;
  background: var(--blue-tint); color: var(--blue-dark); letter-spacing: .04em;
}
.section--dark .kicker { color: var(--sky); }
.section--dark .kicker__n { background: rgba(169, 193, 255, .12); color: var(--sky); }
.section-head h2 { margin-top: 18px; font-size: clamp(2rem, 1.25rem + 2.7vw, 3.3rem); }
.section-lede { margin-top: 20px; max-width: 40em; font-size: 1.15rem; color: var(--ink-2); }
.section--dark .section-lede { color: rgba(255, 255, 255, .74); }

/* ---------- Services ---------- */
.svc-layout { margin-top: 56px; }
.svc-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.svc {
  position: relative; isolation: isolate; display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}

/* Stack guide beside the cards: layers fill in as you scroll, the current one lifts */
.guide { display: none; }
@media (min-width: 1100px) {
  .svc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
  .svc-layout .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .guide { display: block; position: sticky; top: calc(var(--header-h) + 32px); }
  .svc.is-current { border-color: #B7C7F3; }
}
.guide__label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.guide__svg { width: 100%; height: auto; margin-top: 18px; overflow: visible; }
@media (max-height: 780px) { .guide__svg { max-width: 170px; } }
.gslab > * { transition: transform .45s var(--ease), fill .35s, stroke .35s; }
.guide.is-tracking .gslab:not(.is-built) > * { fill: #F1F4FA; stroke: #D3DBEA; stroke-width: 1; transform: translateY(-26px); }
.gslab.is-active .slab__top { stroke: #fff; stroke-width: 2; }
.guide__list { display: grid; gap: 2px; margin-top: 18px; }
.guide__list a {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; text-decoration: none;
  font-weight: 600; font-size: .95rem; color: var(--ink-2); transition: color .2s, background-color .2s;
}
.guide__list span { font-family: var(--font-mono); font-weight: 400; font-size: .74rem; }
.guide__list a:hover { background: var(--soft); color: var(--ink); }
.guide__list a.is-active { color: var(--blue-dark); background: var(--blue-tint); }

/* Cursor spotlight on cards (position set by JS) */
.svc::before, .project a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(30, 79, 224, .09), transparent 65%);
  opacity: 0; transition: opacity .3s;
}
.svc--accent::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(245, 197, 24, .18), transparent 65%); }
.svc:hover::before, .project a:hover::before { opacity: 1; }
.svc:hover { border-color: #C9D5F5; box-shadow: var(--shadow); transform: translateY(-4px); }
.svc:target { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 79, 224, .15), var(--shadow); }
.svc__top { display: flex; align-items: center; justify-content: space-between; }
.svc__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--blue-tint); color: var(--blue); }
.mini { width: 44px; height: 44px; }
.mini path { fill: #fff; stroke: #C9D2E3; stroke-width: 1.2; stroke-linejoin: round; }
.mini .on { fill: var(--blue); stroke: var(--blue); }
.svc--accent .svc__icon { background: #FFF6D6; color: #8A6A00; }
.svc--accent .mini .on { fill: var(--accent); stroke: #D9A90A; }
.svc__n { margin-top: 24px; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.svc h3 { margin-top: 6px; font-size: 1.4rem; }
.svc > p:not(.svc__n) { margin-top: 12px; color: var(--ink-2); font-size: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 22px; }
.tags li {
  padding: 4px 11px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line);
  font-size: .82rem; font-weight: 600; color: #2A3450; line-height: 1.5;
}

/* ---------- Briefing band (photo of a person pointing at the copy) ---------- */
/* Background matches the photo's wall so the image blends in at its faded left edge */
.talk { position: relative; isolation: isolate; overflow: clip; background: #F1F5F8; }
.talk__photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 66% 30%; }
.talk .container { padding-block: 64px 0; }
.talk__copy { max-width: 540px; }
.talk__eyebrow {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue);
}
.talk h2 { margin-top: 14px; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.2rem); }
.talk__lede { margin-top: 18px; font-size: 1.12rem; color: var(--ink-2); }
.talk .cta-row { margin-top: 30px; }
@media (max-width: 799px) {
  .talk { display: flex; flex-direction: column-reverse; }
  .talk .container { padding-block: 56px 8px; }
}
@media (min-width: 800px) {
  .talk { min-height: clamp(460px, 42vw, 600px); display: flex; align-items: center; }
  .talk__photo {
    position: absolute; z-index: -1; top: 0; right: 0; width: min(70%, 1100px); height: 100%; aspect-ratio: auto;
    object-position: 70% center;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 28%);
    mask-image: linear-gradient(90deg, transparent, #000 28%);
  }
  .talk .container { padding-block: 96px; }
  .talk__copy { max-width: min(540px, 44%); }
}

/* ---------- Process ---------- */
/* A line joins the steps and fills as you scroll (--p, set by JS; full without JS) */
.steps { --p: 1; position: relative; display: grid; gap: 40px; margin-top: 64px; }
.steps::before, .steps::after { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; }
.steps::before { background: rgba(169, 193, 255, .18); }
.steps::after {
  /* the fill, with a bright pulse flowing along it (the pulse layer is drawn first, on top) */
  background: linear-gradient(transparent, rgba(255, 255, 255, .95), transparent) 0 -60% / 100% 26% no-repeat, linear-gradient(var(--sky), var(--accent));
  transform: scaleY(var(--p)); transform-origin: top; animation: flow-y 3.4s linear infinite;
}
@keyframes flow-y { to { background-position: 0 160%, 0 0; } }
@keyframes flow-x { to { background-position: 160% 0, 0 0; } }
/* the last step (Support) keeps a slow halo: ongoing care */
.steps:not(.is-tracking) .step:last-child .step__icon, .steps.is-tracking .step.is-lit:last-child .step__icon { animation: halo 2.8s ease-out infinite; }
@keyframes halo { from { box-shadow: 0 0 0 0 rgba(245, 197, 24, .45); } to { box-shadow: 0 0 0 16px rgba(245, 197, 24, 0); } }
.step { position: relative; display: flex; flex-direction: column; padding-left: 80px; }
.step__icon {
  position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  background: var(--navy-2); border: 1px solid rgba(169, 193, 255, .3); color: var(--sky);
  transition: background-color .4s, border-color .4s, color .4s, box-shadow .4s;
}
.step:last-child .step__icon { background: var(--accent); border-color: var(--accent); color: var(--navy); }
.steps.is-tracking .step:not(.is-lit) .step__icon { background: var(--navy); border-color: rgba(169, 193, 255, .14); color: rgba(169, 193, 255, .4); }
.steps.is-tracking .step.is-lit .step__icon { box-shadow: 0 0 0 6px rgba(169, 193, 255, .1); }
.step__n { margin-top: 2px; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sky); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .steps::before, .steps::after { left: 28px; right: calc((100% - 84px) / 4 - 28px); top: 27px; bottom: auto; width: auto; height: 2px; }
  .steps::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent) -60% 0 / 22% 100% no-repeat, linear-gradient(90deg, var(--sky), var(--accent));
    transform: scaleX(var(--p)); transform-origin: left; animation-name: flow-x;
  }
  .step { padding-left: 0; }
  .step__icon { position: relative; }
  .step__n { margin-top: 22px; }
}
.step h3 { margin-top: 6px; font-size: 1.55rem; }
.step > p:not(.step__n):not(.step__get) { margin-top: 10px; color: rgba(255, 255, 255, .74); }
.step__get {
  display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 22px;
  font-weight: 600; font-size: .95rem; color: #fff;
}
.step__get svg { color: var(--accent); }
.step > p:nth-last-child(2) { margin-bottom: 18px; }
.step__get { border-top: 1px solid rgba(255, 255, 255, .1); }

/* ---------- Why ATMO ---------- */
.why-grid { display: grid; gap: 48px; }
@media (min-width: 1000px) {
  .why-grid { grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }
  .why-head { position: sticky; top: calc(var(--header-h) + 48px); }
}
.why-head h2 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.2rem); line-height: 1.02; letter-spacing: -.03em; }
/* Open list rather than boxes; a blue rule draws in on reveal and runs full width on hover */
.principles { display: grid; gap: 40px; }
@media (min-width: 640px) { .principles { grid-template-columns: repeat(2, 1fr); gap: 48px 40px; } }
.principle { position: relative; padding-top: 28px; border-top: 1px solid var(--line); }
.principle::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 2px; background: var(--blue);
  transform: scaleX(.2); transform-origin: left; transition: transform .7s var(--ease) .2s;
}
.js .principle:not(.is-visible)::before { transform: scaleX(0); }
.principle:hover::before { transform: scaleX(1); transition-delay: 0s; }
.principle__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--blue-tint); color: var(--blue); }
.principle h3 { margin-top: 20px; font-size: 1.25rem; }
.principle p { margin-top: 8px; color: var(--ink-2); font-size: 1rem; }

/* ---------- Projects ---------- */
.projects { display: grid; gap: 14px; margin-top: 48px; }
@media (min-width: 820px) { .projects { grid-template-columns: repeat(2, 1fr); } }
.project a {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 18px; height: 100%; padding: 22px 24px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.project a:hover { border-color: #C9D5F5; box-shadow: var(--shadow); }
.project__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--blue-tint); color: var(--blue); transition: background-color .25s, color .25s; }
.project a:hover .project__icon { background: var(--blue); color: #fff; }
.project__text { display: grid; gap: 2px; flex: 1; }
.project__text strong { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.3; }
.project__text span { color: var(--ink-2); font-size: .97rem; line-height: 1.5; }
.project__go { flex: none; color: var(--blue); transition: transform .2s var(--ease); }
.project a:hover .project__go { transform: translateX(4px); }

/* ---------- Contact ---------- */
.contact { position: relative; isolation: isolate; overflow: clip; }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 50% 60% at 85% 20%, rgba(30, 79, 224, .35), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .07) 1px, transparent 0) 0 0 / 26px 26px;
}
.contact-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 72px; } }
.contact h2 { margin-top: 18px; font-size: clamp(2.6rem, 1.4rem + 4.4vw, 4.8rem); line-height: 1.02; letter-spacing: -.035em; }
/* Photo card with the brief overlapping its lower edge */
.contact-photo { position: relative; margin: 0; }
.contact-photo img { width: 100%; height: auto; border-radius: 20px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.contact-photo figcaption {
  position: absolute; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 11px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink);
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 6px 20px -8px rgba(11, 19, 36, .35);
}
.contact-side .brief { position: relative; margin: -24px 16px 0; }
@media (min-width: 600px) { .contact-side .brief { margin: -32px 0 0 56px; } }
.brief { padding: 30px; border-radius: 20px; background: var(--navy-2); border: 1px solid rgba(169, 193, 255, .18); }
.brief h3 { font-size: 1.2rem; }
.brief__list { display: grid; gap: 10px; margin-top: 18px; }
.brief__list li, .brief__meta li { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .82); }
.brief__list svg { flex: none; color: var(--accent); }
.brief__meta { display: grid; gap: 10px; margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); }
.brief__meta svg { flex: none; color: var(--sky); }
.brief__meta a { color: #fff; font-weight: 600; text-decoration: none; }
.brief__meta a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: #070E24; color: rgba(255, 255, 255, .72); padding-top: 64px; font-size: .98rem; }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-brand img { height: 40px; width: auto; }
.footer-brand p { margin-top: 16px; max-width: 30ch; }
.footer-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sky); margin-bottom: 12px; }
.site-footer ul { display: grid; gap: 8px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .9rem;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.svc-grid > :nth-child(3n+2), .steps > :nth-child(2), .principles > :nth-child(2), .projects > :nth-child(2n) { transition-delay: .08s; }
.svc-grid > :nth-child(3n), .steps > :nth-child(3), .principles > :nth-child(3) { transition-delay: .16s; }
.steps > :nth-child(4), .principles > :nth-child(4) { transition-delay: .24s; }
.js .svc.reveal.is-visible:hover { transform: translateY(-4px); }

/* ---------- 404 ---------- */
.page-404 { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.page-404 .brand img { height: 40px; width: auto; margin-inline: auto; }
.page-404 .mini { width: 72px; height: 72px; margin: 48px auto 0; }
.page-404 .mini .on { fill: var(--accent); stroke: #D9A90A; }
.page-404 h1 { margin-top: 24px; font-size: clamp(2.4rem, 1.6rem + 3vw, 3.8rem); }
.page-404 p { margin: 14px auto 32px; max-width: 38ch; color: var(--ink-2); font-size: 1.12rem; }
.page-404 .page-404__th { margin: 28px auto 0; font-size: 1rem; }

/* ---------- Thai page (/th/) ----------
   The Latin fonts have no Thai glyphs, so Thai falls through to good system Thai fonts
   (iOS/macOS Sukhumvit Set / Thonburi, Windows Leelawadee UI, Android Noto Sans Thai).
   Thai needs taller lines for tone marks and vowels above and below, and no letter-spacing. */
html[lang="th"] {
  --font-display: "Space Grotesk", "Kanit", "Sukhumvit Set", "Leelawadee UI", "Noto Sans Thai", "Thonburi", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans", "Sukhumvit Set", "Leelawadee UI", "Noto Sans Thai", "Thonburi", Tahoma, sans-serif;
  /* small labels: a proportional font, since Thai in a mono fallback renders tiny */
  --font-mono: "IBM Plex Sans", "Sukhumvit Set", "Leelawadee UI", "Noto Sans Thai", "Thonburi", Tahoma, sans-serif;
}
html[lang="th"] body { line-height: 1.75; }
html[lang="th"] body * { letter-spacing: normal !important; }
html[lang="th"] :is(h1, h2, h3) { line-height: 1.32; }
html[lang="th"] .hero h1 { font-size: clamp(2.2rem, 1.2rem + 3vw, 3.6rem); line-height: 1.28; }
html[lang="th"] .hero h1 .hl { display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
html[lang="th"] :is(.eyebrow, .kicker, .talk__eyebrow, .svc__n, .step__n, .contact-photo figcaption) { font-size: .9rem; }
html[lang="th"] :is(.platforms__label, .guide__label, .footer-label) { font-size: .86rem; }
html[lang="th"] .monitor__v { font-size: .84rem; }
html[lang="th"] .slab .slab__status { font-size: 17px; }
html[lang="th"] .rotator.is-rotating { height: 1.6em; margin-block: -.16em; }
html[lang="th"] .rotator__word { line-height: 1.6; }
html[lang="th"] .contact h2 { line-height: 1.2; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .slab { opacity: 1; transform: none; }
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .ticker__track { flex: 1; flex-wrap: wrap; row-gap: 6px; }
  .ticker__track[aria-hidden="true"], .monitor__pause { display: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .mobile-menu, .stack, .monitor, .hero-person, .guide, .cta-row, .hero::before, .hero::after { display: none !important; }
  .section--dark, .site-footer { background: #fff !important; color: #000 !important; }
  .js .reveal { opacity: 1; transform: none; }
}
