/* AI Automation side — "Arctic Console". Modelled on leftclick.ai's calm,
   centred structure; painted as the cold, technical third side of the brand:
   ice-white paper, graphite ink, hairline blueprint lines, dark console
   panels in Fragment Mono. Neon #39FF14 is status only (running dots, active
   workflow steps, the console caret, CTA hover) and never floods the page.
   Loaded after base.css, which reads the tokens below. */

:root[data-theme="ai"] {
  color-scheme: light;
  --bg: #F3F6FA;
  --surface: #FFFFFF;
  --surface-2: #EDF1F6;
  --ink: #0E1116;
  --ink-soft: #2B323D;
  --ink-muted: #5B6472;          /* 5.5:1 on --bg, 6.0:1 on white */
  --ink-quiet: #616B7A;          /* h2 second lines, 4.9:1 on --bg */
  --line: #DCE3EC;
  --line-strong: #C5CFDB;
  --console: #0B0F14;
  --console-2: #121922;
  --console-line: #212A36;
  --console-ink: #E6EBF2;
  --console-soft: #B4BDC9;       /* 9.9:1 on --console */
  --console-muted: #8A94A3;      /* 6.2:1 on --console */
  --neon: #39FF14;
  --neon-edge: #1FA80A;          /* outline so neon dots read on ice white */
  --accent: #39FF14;
  --focus: #0E1116;
  --header-bg: rgba(243, 246, 250, 0.84);

  --font-display: "Geist", "Inter", "Noto Sans Thai", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans Thai", system-ui, sans-serif;
  --font-mono: "Fragment Mono", ui-monospace, "SFMono-Regular", Menlo, "Noto Sans Thai", "Thonburi", "Leelawadee UI", "Noto Sans Thai", monospace;
  --font-thai: "Noto Sans Thai", "Thonburi", "Leelawadee UI", "Noto Sans Thai", "Sukhumvit Set", system-ui, sans-serif;
  --display-weight: 500;
  --display-tracking: -0.04em;
  --display-leading: 1.02;
  --display-case: none;

  --text-body: 16px;
  --text-h1: clamp(40px, 6vw, 86px);
  --text-h2: clamp(32px, 4.1vw, 56px);
  --text-h3: clamp(18px, 1.45vw, 21px);

  --max-width: 1240px;
  --section-y: clamp(80px, 9vw, 136px);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-pop: cubic-bezier(.34, 1.45, .64, 1);

  --toggle-bg: var(--surface);
  --toggle-border: 2px solid var(--line);   /* 2px like the other themes: same 586×44 box */
  --toggle-ink: var(--ink-muted);
  --toggle-ink-hover: var(--ink);
  --toggle-active-bg: var(--ink);
  --toggle-active-ink: #FFFFFF;
  --toggle-active-shadow: 0 1px 2px rgba(14, 17, 22, 0.18), 0 6px 16px -8px rgba(14, 17, 22, 0.5);
  --toggle-font: 500 13px/1 var(--font-body);
  --toggle-tracking: -0.005em;

  --btn-font: 500 15px/1 var(--font-body);
  --btn-tracking: -0.01em;
  --btn-case: none;
}

[data-theme="ai"] ::selection { background: var(--ink); color: var(--neon); }
[data-theme="ai"] body { line-height: 1.6; }
[data-theme="ai"] :is(h1, h2, h3) { font-feature-settings: "ss01"; }
/* Thai snippets inside the English page (the demo chat). Scoped below <html>
   so the generated Thai page (lang="th" on <html>) keeps the theme fonts. */
body [lang="th"] { font-family: var(--font-thai); }
.a-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Buttons ---------- */
[data-theme="ai"] .btn { padding-right: 6px; }
[data-theme="ai"] .btn--lg { padding-left: 24px; }
[data-theme="ai"] .btn--primary { background: var(--ink); color: #FFFFFF; box-shadow: 0 1px 2px rgba(14, 17, 22, 0.2), 0 12px 28px -14px rgba(14, 17, 22, 0.55); }
[data-theme="ai"] .btn--primary:hover { background: var(--neon); color: var(--ink); box-shadow: 0 0 0 1px var(--neon-edge), 0 14px 34px -14px rgba(31, 168, 10, 0.7); }
[data-theme="ai"] .btn--ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
[data-theme="ai"] .btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
[data-theme="ai"] .btn__icon {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--neon); color: var(--ink); transition: background-color .2s ease, color .2s ease;
}
[data-theme="ai"] .btn--primary:hover .btn__icon { background: var(--ink); color: var(--neon); }
[data-theme="ai"] .btn--ghost .btn__icon { background: var(--surface-2); color: var(--ink); }
[data-theme="ai"] .btn__icon svg { width: 14px; height: 14px; }
[data-theme="ai"] .btn:not(:has(.btn__icon)) { padding-right: 24px; }

/* ---------- Type + small parts ---------- */
.a-h1 { font-size: var(--text-h1); line-height: 0.98; letter-spacing: -0.05em; }
.a-h2 { font-size: var(--text-h2); }
.a-h3 { font-size: var(--text-h3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.a-muted { color: var(--ink-quiet); }
.a-body { font-size: 17px; line-height: 1.6; color: var(--ink-muted); max-width: 54ch; }
.a-label { font: 400 12px/1.3 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }

.a-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 13px 7px 11px; border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
  font: 400 12px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(14, 17, 22, 0.04);
}
.a-live, .a-status__dot {
  position: relative; flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--neon); box-shadow: 0 0 0 1px var(--neon-edge);
}
.js-motion .a-live::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--neon-edge);
  animation: a-ping 2.4s var(--ease-out) infinite;
}
@keyframes a-ping { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(2.8); opacity: 0; } }

.a-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
}
.a-icon svg { width: 22px; height: 22px; }

.a-checks { display: grid; gap: 12px; }
.a-checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; color: var(--ink-soft); line-height: 1.45; }
.a-checks li::before {
  content: ""; width: 22px; height: 22px; margin-top: 0; border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.a-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.a-link svg { width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.a-link:hover svg { transform: translate(2px, -2px); }

.a-sec { position: relative; padding-block: var(--section-y); }
.a-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 5vw, 64px); }
.a-head .a-pill { justify-self: start; }
.a-head--center { justify-items: center; text-align: center; }
.a-head--center .a-pill { justify-self: center; }
.a-head--center .a-h2 { max-width: 20ch; }
.a-head--split .a-h2 { max-width: 18ch; margin-top: 20px; }
.a-head__sub { font-size: 17px; line-height: 1.6; color: var(--ink-muted); max-width: 52ch; }
@media (min-width: 1024px) {
  .a-head--split { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 64px; }
}

/* ---------- Console panel (dark, Fragment Mono) ---------- */
.a-console {
  position: relative; margin: 0; overflow: hidden;
  background: var(--console); color: var(--console-soft);
  border-radius: 18px; border: 1px solid #1A212B;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 40px 80px -40px rgba(11, 15, 20, 0.55), 0 10px 24px -12px rgba(11, 15, 20, 0.3);
  font: 400 13px/1.55 var(--font-mono);
}
.a-console__bar {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px;
  border-bottom: 1px solid var(--console-line); background: rgba(255, 255, 255, 0.02);
}
.a-console__dots { display: flex; gap: 6px; }
.a-console__dots i { width: 10px; height: 10px; border-radius: 50%; background: #262F3B; }
.a-console__title { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--console-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-status { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px 3px 8px; border-radius: 999px; background: rgba(57, 255, 20, 0.08); color: #B8FFA6; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.a-status .a-status__dot { width: 6px; height: 6px; box-shadow: 0 0 8px rgba(57, 255, 20, 0.8); }
.js-motion .a-status .a-status__dot { animation: a-blink 1.6s ease-in-out infinite; }
@keyframes a-blink { 50% { opacity: .35; } }
.a-tag { margin-left: auto; flex: none; padding: 3px 9px; border-radius: 999px; border: 1px solid #2C3642; color: var(--console-soft); font-size: 11px; letter-spacing: 0.02em; }
.a-console__body { padding: 18px; }
.a-console figcaption { padding: 12px 18px 16px; border-top: 1px solid var(--console-line); color: var(--console-muted); font: 400 12px/1.5 var(--font-body); }

/* Log / trace lines: time · key · text */
.a-log__lines, .a-trace { display: grid; gap: 7px; }
.a-log .cl, .a-trace .cl { display: grid; grid-template-columns: 68px 92px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.cl time { color: var(--console-muted); font-variant-numeric: tabular-nums; }
.cl b { font-weight: 400; color: #FFFFFF; }
.cl > span { color: var(--console-soft); min-width: 0; }
.cl q { color: #FFFFFF; quotes: "“" "”"; }
.cl--ok, .cl--prompt { grid-template-columns: auto 1fr !important; gap: 10px !important; }
.cl--ok > span:last-child { color: #FFFFFF; }
.a-ok { color: var(--neon); }
.a-prompt { color: var(--console-muted); }
.a-caret { display: inline-block; width: 8px; height: 15px; vertical-align: -3px; background: var(--neon); box-shadow: 0 0 10px rgba(57, 255, 20, 0.7); }
.js-motion .a-caret { animation: a-caret 1.05s steps(1) infinite; }
@keyframes a-caret { 50% { opacity: 0; } }
.a-hide-xs { display: inline; }
@media (max-width: 479px) {
  .a-hide-xs { display: none; }
  .a-console__dots { display: none; }
  .a-console { font-size: 12px; }
  .a-log .cl, .a-trace .cl { grid-template-columns: 78px minmax(0, 1fr); column-gap: 10px; }
  .a-log .cl time, .a-trace .cl time { display: none; }
}

/* Typing: motion.js adds .is-drawn when 35% in view; console.js writes
   --c/--t per line and adds .is-timed. Hidden states need .js-motion, so
   no JS / reduced motion shows every line. */
.js-motion [data-console]:not(.is-drawn) .cl { opacity: 0; }
.js-motion [data-console].is-timed.is-drawn .cl {
  animation: a-type calc(var(--c, 24) * 14ms) steps(var(--c, 24), end) var(--t, 0ms) both;
}
.js-motion [data-console].is-timed.is-drawn .a-msg { animation: a-say .45s var(--ease-out) var(--t, 0ms) both; }
@keyframes a-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -2px 0 0); } }
@keyframes a-say { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- 1. Hero ---------- */
.a-hero { position: relative; padding-top: clamp(40px, 6vw, 88px); padding-bottom: 8px; isolation: isolate; }
.a-hero::before {
  content: ""; position: absolute; inset: -140px 0 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: .7;
}
.a-hero__copy { display: grid; justify-items: center; text-align: center; }
.a-hero .a-h1 { max-width: 15ch; margin-top: 26px; }
.a-mark { position: relative; display: inline-block; white-space: nowrap; }
.a-mark::before {
  content: ""; position: absolute; inset: 0.1em -0.1em 0 -0.1em; pointer-events: none;
  border: 1.5px dashed #95A1B2; border-radius: 4px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 7px 7px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 100% 0 / 7px 7px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 100% / 7px 7px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 100% 100% / 7px 7px no-repeat;
  background-origin: border-box; margin: -1.5px;
}
.a-mark::after {
  content: "automate()"; position: absolute; left: 100%; top: 50%; margin-left: 0.34em; transform: translateY(-50%);
  padding: 6px 10px 6px 22px; border-radius: 8px; background-color: var(--ink); color: #FFFFFF;
  font: 400 13px/1 var(--font-mono); letter-spacing: 0.01em; white-space: nowrap;
  background-image: radial-gradient(circle at 11px 50%, var(--neon) 3px, transparent 3.5px);
  box-shadow: 0 10px 24px -12px rgba(14, 17, 22, 0.6);
}
@media (max-width: 1099px) { .a-mark::after { display: none; } }
.a-lede { margin-top: 26px; max-width: 58ch; font-size: clamp(17px, 1.35vw, 19px); line-height: 1.55; color: var(--ink-muted); }
.a-hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.a-hero__facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 22px; color: var(--ink-muted); }
.a-hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.a-hero__facts li::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--ink-muted); }
.a-hero__stage { margin-top: clamp(48px, 5.5vw, 72px); }
.a-console--hero { max-width: 1120px; margin-inline: auto; }
.a-hide-sm { color: var(--console-muted); }

.a-flowgrid { display: grid; gap: 18px; padding: clamp(16px, 2vw, 24px); }
.a-flow {
  position: relative; display: grid; place-items: center; min-width: 0;
  padding: clamp(16px, 2.4vw, 28px) clamp(8px, 1.6vw, 20px); border-radius: 12px;
  background-color: #0E131A;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 18px 18px; border: 1px solid var(--console-line);
}
.a-flow__svg { width: 100%; height: auto; overflow: visible; }
.a-flow__svg--wide { max-width: 760px; }
.a-flow__svg--tall { display: none; max-width: 340px; }
@media (max-width: 599px) {
  .a-flow__svg--wide { display: none; }
  .a-flow__svg--tall { display: block; }
}
.a-log { display: grid; align-content: start; gap: 12px; padding: 16px 18px 18px; border-radius: 12px; background: #080B0F; border: 1px solid var(--console-line); min-width: 0; }
.a-log__head { display: flex; justify-content: space-between; color: var(--console-muted); font-size: 11px; padding-bottom: 10px; border-bottom: 1px dashed var(--console-line); }
/* Side by side only where the log lines fit on one line each. */
@media (min-width: 1200px) {
  .a-flowgrid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: stretch; }
}

/* Workflow diagram (SVG). Static by default: every step shows done. */
.a-wire path { fill: none; stroke: #334050; stroke-width: 1.5; stroke-dasharray: 3 5; }
.a-pulse path { fill: none; stroke: var(--neon); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 16 200; stroke-dashoffset: 16; opacity: 0; filter: drop-shadow(0 0 4px rgba(57, 255, 20, 0.9)); }
.a-node rect { fill: #121922; stroke: #2A3544; stroke-width: 1; }
.a-node--ai rect { fill: #141D18; stroke: #2E4A2A; }
.a-node__dot { fill: var(--neon); }
.a-node__k { fill: var(--console-muted); font: 400 10.5px var(--font-mono); letter-spacing: 0.08em; }
.a-node__t { fill: #FFFFFF; font: 500 16px var(--font-display); letter-spacing: -0.01em; }
.a-flow__svg--tall .a-node__t { font-size: 15px; }
.a-node__s { fill: var(--console-soft); font: 400 11.5px var(--font-mono); }
.a-flow__svg--tall .a-node__s { font-size: 11px; }
.a-node__s--end { text-anchor: end; }
/* Motion: one 6s cycle. The pulse leaves a node as it finishes and lights the next. */
.js-motion .a-node__dot { fill: #3A4555; animation: a-dot 6s linear infinite; animation-delay: var(--nd, 0s); }
.js-motion .a-node rect { animation: a-rect 6s linear infinite; animation-delay: var(--nd, 0s); }
.js-motion .a-pulse path { animation: a-flow 6s linear infinite; animation-delay: var(--pd, 0s); }
.a-node--1 { --nd: 0s; }
.a-node--2 { --nd: 1.6s; }
.a-node--3 { --nd: 3.1s; }
.a-node--4 { --nd: 4.6s; }
.a-pulse--1 { --pd: .5s; }
.a-pulse--2 { --pd: 2s; }
.a-pulse--3 { --pd: 3.5s; }
@keyframes a-flow {
  0% { stroke-dashoffset: 16; opacity: 1; }
  18% { stroke-dashoffset: -100; opacity: 1; }
  18.5%, 100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes a-dot {
  0%, 20% { fill: var(--neon); filter: drop-shadow(0 0 5px rgba(57, 255, 20, 0.95)); }
  26%, 100% { fill: #3A4555; filter: none; }
}
@keyframes a-rect {
  0%, 20% { stroke: rgba(57, 255, 20, 0.75); }
  26%, 100% { stroke: #2A3544; }
}

/* Hero entrance (after the h1 words). Arriving through the toggle wipe sets
   .intro-done up front, so all of this is skipped and the hero is whole. */
.js-motion:not(.intro-done) .a-hero :is(.a-hero__pill, .a-lede, .a-hero__ctas, .a-hero__facts) { opacity: 0; transform: translateY(24px); }
.js-motion:not(.intro-done) .a-hero .a-hero__stage { opacity: 0; transform: translateY(80px) scale(.97); }
.js-motion:not(.intro-done) .a-mark::after { opacity: 0; transform: translate(-8px, -50%); }
.intro-go:not(.intro-done) .a-hero .a-hero__pill { animation: rise .6s var(--ease-out) both; }
.intro-go:not(.intro-done) .a-hero .a-lede { animation: rise .7s var(--ease-out) .45s both; }
.intro-go:not(.intro-done) .a-hero .a-hero__ctas { animation: rise .7s var(--ease-out) .55s both; }
.intro-go:not(.intro-done) .a-hero .a-hero__facts { animation: rise .7s var(--ease-out) .65s both; }
.intro-go:not(.intro-done) .a-hero .a-hero__stage { animation: rise 1s var(--ease-expo) .6s both; }
.intro-go:not(.intro-done) .a-mark::after { animation: a-tagin .5s var(--ease-pop) .9s both; }
@keyframes a-tagin { to { opacity: 1; transform: translateY(-50%); } }
/* The hero run log never waits after the wipe. */
.via-switch .a-hero [data-console] .cl { opacity: 1 !important; animation: none !important; clip-path: none !important; }

@media (max-width: 599px) {
  .a-hero .a-h1 { font-size: clamp(38px, 11vw, 46px); letter-spacing: -0.045em; }
  .a-hero__ctas { flex-direction: column; align-items: stretch; width: 100%; }
  .a-hero__ctas .btn { width: 100%; justify-content: space-between; }
  .a-hide-sm { display: none; }
}

/* ---------- 2. What we build ---------- */
.a-cards { display: grid; gap: 14px; }
@media (min-width: 640px) { .a-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .a-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.a-card {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 22px 22px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(14, 17, 22, 0.04);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .25s ease;
}
.a-card .a-icon { margin-bottom: 10px; }
.a-card__k { color: var(--ink-muted); font-size: 11px; }
.a-card > p:not(.a-card__k) { color: var(--ink-muted); font-size: 15px; line-height: 1.55; }
.a-snip {
  display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 9px 12px; border-radius: 9px;
  background: var(--console); color: var(--console-soft); font: 400 11.5px/1.35 var(--font-mono);
  overflow-wrap: anywhere;
}
.a-card > p:not(.a-card__k) { margin-bottom: 10px; }
.a-snip i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #3A4555; transition: background-color .25s ease, box-shadow .25s ease; }
.a-card.is-revealed:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 24px 48px -28px rgba(14, 17, 22, 0.35); }
.a-card:hover .a-snip i { background: var(--neon); box-shadow: 0 0 8px rgba(57, 255, 20, 0.8); }

.a-feature { display: grid; gap: 36px; margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.a-feature__copy { display: grid; gap: 22px; align-content: center; }
.a-feature__k { color: var(--ink-muted); }
.a-feature__title { font-size: clamp(28px, 3.2vw, 44px); max-width: 16ch; }
@media (min-width: 1024px) { .a-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; align-items: center; } }

.a-chat__lines { display: grid; gap: 12px; }
.a-msg { display: grid; gap: 3px; max-width: 86%; padding: 10px 14px 11px; border-radius: 14px; }
.a-msg b { font-weight: 400; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--console-muted); }
.a-msg > span { color: #FFFFFF; font-size: 13.5px; line-height: 1.5; }
.a-msg > span[lang="th"] { font-size: 15px; }
.a-msg small { color: var(--console-muted); font-size: 11.5px; line-height: 1.45; }
.a-msg--in { justify-self: start; background: #161E28; border-bottom-left-radius: 4px; }
.a-msg--out { justify-self: end; background: #1D2733; border: 1px solid #2B3746; border-bottom-right-radius: 4px; }
.a-msg--out b { display: inline-flex; align-items: center; gap: 6px; }
.a-msg--out b::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 6px rgba(57, 255, 20, 0.8); }
.a-msg--sys { justify-self: center; max-width: none; grid-auto-flow: column; align-items: center; gap: 10px; padding: 6px 12px; border: 1px dashed #2C3642; border-radius: 999px; }
.a-msg--sys > span { color: var(--console-soft); font-size: 12px; }
@media (max-width: 479px) { .a-msg { max-width: 94%; } .a-msg--sys { grid-auto-flow: row; justify-items: center; text-align: center; border-radius: 12px; } }

/* ---------- 3. Our systems (dark inset band) ---------- */
.a-systems { padding-block: 0; }
.a-inset {
  position: relative; overflow: clip; margin-inline: 16px; border-radius: 32px;
  background-color: var(--console); color: var(--console-ink); padding-block: var(--section-y);
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
}
@media (max-width: 599px) { .a-inset { margin-inline: 8px; border-radius: 24px; } }
.a-inset .a-h2 { color: #FFFFFF; }
.a-inset .a-muted { color: var(--console-muted); }
.a-inset .a-body { color: var(--console-soft); }
.a-pill--dark { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: var(--console-soft); box-shadow: none; }
.a-pill--dark .a-live { box-shadow: 0 0 8px rgba(57, 255, 20, 0.8); }
.a-systems__grid { display: grid; gap: 48px; }
.a-systems__copy { display: grid; gap: 22px; align-content: start; }
.a-systems__copy .a-pill { justify-self: start; }
.a-systems__copy .a-h2 { max-width: 17ch; }
.a-sys { display: grid; margin-top: 18px; border-top: 1px solid var(--console-line); }
.a-sys__item { display: grid; gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--console-line); }
.a-sys__item .a-h3 { color: #FFFFFF; }
.a-sys__item p:not(.a-sys__k) { color: var(--console-soft); font-size: 15.5px; max-width: 56ch; }
.a-sys__k { display: inline-flex; align-items: center; gap: 9px; color: var(--console-muted); font-size: 11px; }
.a-sys__k .a-status__dot { width: 6px; height: 6px; box-shadow: 0 0 8px rgba(57, 255, 20, 0.8); }
.a-sys .a-link { justify-self: start; margin-top: 6px; color: #FFFFFF; }
.a-sys .a-link:hover { color: var(--neon); }
.a-inset :focus-visible { outline-color: var(--neon); }
.a-console--trace { border-color: #232C38; background: #080B0F; }
@media (min-width: 1024px) {
  .a-systems__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); align-items: start; }
  .a-console--trace { position: sticky; top: 112px; }
}

/* ---------- 4. How it works ---------- */
.a-steps { position: relative; display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 700px) { .a-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .a-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .a-steps::before {
    content: ""; position: absolute; left: 40px; right: 40px; top: 41px; height: 0; z-index: 0;
    border-top: 1.5px dashed var(--line-strong);
  }
}
.a-step { position: relative; z-index: 1; display: grid; align-content: start; gap: 12px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.a-step__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.a-step__num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: var(--ink); color: #FFFFFF; font: 400 14px/1 var(--font-mono);
}
.a-step:first-child .a-step__num { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--neon-edge); }
.a-step__phase { padding: 5px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-muted); font-size: 11px; }
.a-step p:not(.a-step__top) { color: var(--ink-muted); font-size: 15px; line-height: 1.55; }

/* ---------- 5. Why Arctis ---------- */
.a-why__grid { display: grid; gap: 40px; }
.a-why__head { display: grid; gap: 22px; align-content: start; }
.a-why__head .a-pill { justify-self: start; }
.a-spec { display: grid; border-top: 1px solid var(--line); }
.a-spec__row { display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 20px; row-gap: 6px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.a-spec__row .a-icon { grid-row: span 2; background: var(--surface); }
.a-spec__row p { color: var(--ink-muted); font-size: 15.5px; max-width: 58ch; }
@media (min-width: 1024px) {
  .a-why__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(48px, 7vw, 112px); }
  .a-why__head { position: sticky; top: 112px; }
  .a-spec__row { grid-template-columns: 42px minmax(0, 0.85fr) minmax(0, 1.15fr); column-gap: 24px; align-items: start; }
  .a-spec__row .a-icon { grid-row: auto; }
  .a-spec__row .a-h3 { padding-top: 9px; }
  .a-spec__row p { padding-top: 8px; }
}

/* ---------- 6. Founder ---------- */
.a-founder-wrap { padding-top: 0; }
.a-founder {
  display: grid; gap: 28px; margin: 0; padding: clamp(24px, 4vw, 48px);
  border-radius: 24px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(14, 17, 22, 0.04), 0 40px 80px -60px rgba(14, 17, 22, 0.4);
}
.a-founder__id { display: flex; align-items: center; gap: 16px; align-self: start; }
.a-avatar {
  position: relative; flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px;
  background: var(--ink); color: #FFFFFF; font: 600 32px/1 var(--font-display); letter-spacing: -0.04em;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px); background-size: 8px 8px;
}
.a-avatar img { width: 32px; height: 32px; }
.a-avatar::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--neon); border: 3px solid var(--surface); }
.a-founder__name { font: 600 20px/1.2 var(--font-display); letter-spacing: -0.02em; }
.a-founder__role { margin-top: 6px; color: var(--ink-muted); font-size: 11px; }
.a-founder blockquote { margin: 0; display: grid; gap: 16px; }
.a-founder blockquote p { font: 500 clamp(19px, 1.9vw, 26px)/1.4 var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
.a-founder blockquote p + p { color: var(--ink-muted); }
@media (min-width: 900px) { .a-founder { grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1.5fr); gap: 48px; } .a-founder__id { flex-direction: column; align-items: flex-start; } }

/* ---------- 7. FAQ ---------- */
.a-faq { padding-top: 0; }
.a-faq__grid { display: grid; gap: 40px; }
.a-faq__head { display: grid; gap: 22px; align-content: start; }
.a-faq__head .a-pill { justify-self: start; }
.a-faq__head .a-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.a-faq .faq-list { gap: 10px; }
.a-faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s ease, box-shadow .2s ease; }
.a-faq details:hover { border-color: var(--line-strong); }
.a-faq details[open] { border-color: var(--line-strong); box-shadow: 0 20px 40px -30px rgba(14, 17, 22, 0.35); }
.a-faq summary { min-height: 60px; padding: 16px 20px; font: 500 17px/1.35 var(--font-display); letter-spacing: -0.015em; border-radius: 16px; }
.a-faq summary:focus-visible { outline-offset: -2px; }
.a-faq details p { padding: 0 20px 20px; color: var(--ink-muted); max-width: 64ch; }
.a-faq .faq-icon { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.a-faq .faq-icon::before, .a-faq .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -0.75px 0 0 -5.5px; background: var(--ink); border-radius: 1px; }
.a-faq .faq-icon::after { transform: rotate(90deg); }
.a-faq details[open] .faq-icon { background: var(--ink); border-color: var(--ink); }
.a-faq details[open] .faq-icon::before, .a-faq details[open] .faq-icon::after { background: #FFFFFF; }
@media (min-width: 1024px) {
  .a-faq__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(48px, 7vw, 112px); }
  .a-faq__head { position: sticky; top: 112px; }
}

/* ---------- 8. Final CTA + inline enquiry ---------- */
.a-final { padding-top: 0; padding-bottom: clamp(56px, 6vw, 96px); }
.a-final__grid {
  position: relative; display: grid; gap: 40px; padding: clamp(24px, 5vw, 64px); border-radius: 32px;
  background-color: var(--surface-2); border: 1px solid var(--line); isolation: isolate; overflow: hidden;
}
.a-final__grid::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(115deg, #000, transparent 60%);
  mask-image: linear-gradient(115deg, #000, transparent 60%);
}
.a-final__copy { display: grid; gap: 22px; align-content: center; }
.a-final__copy .a-pill { justify-self: start; }
.a-final__copy .a-h2 { max-width: 15ch; }
@media (min-width: 1024px) { .a-final__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: clamp(48px, 6vw, 88px); align-items: center; } }
@media (max-width: 599px) { .a-final__grid { border-radius: 24px; padding: 24px 16px 16px; } }

/* Inline enquiry flow (start.js mounts into [data-inline-start]): light card,
   graphite ink; neon only for the status dot and focus. */
[data-theme="ai"] .start-inline {
  --err: #B42318;
  position: relative; width: 100%; text-align: left;
  padding: clamp(20px, 3.2vw, 32px); border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  box-shadow: 0 1px 2px rgba(14, 17, 22, 0.05), 0 40px 80px -40px rgba(14, 17, 22, 0.4);
}
[data-theme="ai"] .start-inline__head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-bottom: 16px; margin-bottom: clamp(20px, 2.6vw, 26px); border-bottom: 1px solid var(--line);
}
[data-theme="ai"] .start-inline__title { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 11.5px; }
[data-theme="ai"] .start-inline__progress { flex: none; padding: 5px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-muted); font-size: 11px; }
[data-theme="ai"] .start-inline__progress:empty { display: none; }
[data-theme="ai"] .start-inline__noscript { margin-bottom: 20px; color: var(--ink-muted); }
[data-theme="ai"] .start-inline .form-stage h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 10px; outline: none; }
[data-theme="ai"] .start-inline .form-stage p { color: var(--ink-muted); margin: 0 0 20px; }
[data-theme="ai"] .start-inline .form-stage p strong { color: var(--ink); font-weight: 600; }
[data-theme="ai"] .start-inline .form-stage h3 + label,
[data-theme="ai"] .start-inline .form-stage h3 + .choice { margin-top: 20px; }
[data-theme="ai"] .start-inline label { display: block; margin-bottom: 18px; }
[data-theme="ai"] .start-inline label > span { display: block; font: 500 14.5px/1.4 var(--font-body); color: var(--ink); margin-bottom: 8px; }
[data-theme="ai"] .start-inline .hint { font-weight: 400; font-size: 13px; line-height: 1.45; color: var(--ink-muted); margin: -2px 0 10px; }
[data-theme="ai"] .start-inline .req { color: var(--err); margin-left: 2px; }
[data-theme="ai"] .start-inline :is(input[type="text"], input[type="email"], textarea) {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); color: var(--ink);
  font: 400 16px/1.4 var(--font-body); transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
[data-theme="ai"] .start-inline textarea { min-height: 110px; resize: vertical; }
[data-theme="ai"] .start-inline :is(input, textarea)::placeholder { color: #616B7A; }
[data-theme="ai"] .start-inline :is(input, textarea):hover { border-color: #9AA6B6; }
[data-theme="ai"] .start-inline :is(input, textarea):focus { outline: none; border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 4px rgba(57, 255, 20, 0.35); }
[data-theme="ai"] .start-inline .choice {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 54px; margin-bottom: 10px; padding: 14px 16px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink);
  font: 500 15.5px/1.35 var(--font-body); cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s var(--ease-out);
}
[data-theme="ai"] .start-inline .choice::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #8C97A6; background: var(--surface); transition: all .2s ease; }
[data-theme="ai"] .start-inline .choice input { position: absolute; opacity: 0; pointer-events: none; }
[data-theme="ai"] .start-inline .choice:hover { border-color: #9AA6B6; background: var(--bg); transform: translateX(2px); }
[data-theme="ai"] .start-inline .choice.selected { border-color: var(--ink); background: var(--bg); box-shadow: inset 0 0 0 1px var(--ink); }
[data-theme="ai"] .start-inline .choice.selected::before { border-color: var(--ink); background: var(--neon); box-shadow: inset 0 0 0 3px var(--ink); }
[data-theme="ai"] .start-inline .choice:has(input:focus-visible) { box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 4px rgba(57, 255, 20, 0.45); }
[data-theme="ai"] .start-inline .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 26px; }
[data-theme="ai"] .start-inline .secondary + .primary { margin-left: auto; }
[data-theme="ai"] .start-inline .actions:has(.primary + .primary) { flex-direction: column; align-items: stretch; }
[data-theme="ai"] .start-inline button { cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent; }
[data-theme="ai"] .start-inline button.primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 24px;
  border: 0; border-radius: 999px; background: var(--ink); color: #FFFFFF;
  font: 500 15px/1.2 var(--font-body); text-align: center;
  transition: transform .2s var(--ease-out), background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
[data-theme="ai"] .start-inline button.primary:hover:not(:disabled) { background: var(--neon); color: var(--ink); transform: translateY(-1px); box-shadow: 0 0 0 1px var(--neon-edge), 0 14px 34px -14px rgba(31, 168, 10, 0.7); }
[data-theme="ai"] .start-inline button.secondary {
  min-height: 44px; padding: 10px 4px; border: 0; background: none; color: var(--ink-muted);
  font: 500 15px/1.3 var(--font-body); text-align: left;
}
[data-theme="ai"] .start-inline button.secondary:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
[data-theme="ai"] .start-inline button:disabled { opacity: 0.4; cursor: not-allowed; }
[data-theme="ai"] .start-inline button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px rgba(57, 255, 20, 0.35); }
[data-theme="ai"] .start-inline .form-error { margin: 0 0 16px; padding: 12px 16px; border: 1px solid #F3B4AE; border-radius: 12px; background: #FEF3F2; color: var(--err); font-size: 14px; font-weight: 500; }
[data-theme="ai"] .start-inline .form-stage ul { display: grid; gap: 12px; margin: 0 0 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
[data-theme="ai"] .start-inline .form-stage li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; color: var(--ink-soft); line-height: 1.45; }
[data-theme="ai"] .start-inline .form-stage li::before {
  content: ""; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}
@media (max-width: 479px) {
  [data-theme="ai"] .start-inline .actions { gap: 8px; }
  [data-theme="ai"] .start-inline button.primary { order: -1; flex: 1 1 100%; margin-left: 0; }
  [data-theme="ai"] .start-inline button.secondary { flex: 1 1 100%; text-align: center; }
  [data-theme="ai"] .start-inline .secondary + .primary { margin-left: 0; }
}

/* ---------- 9. Footer ---------- */
.a-footer { position: relative; overflow: hidden; padding-top: clamp(56px, 6vw, 88px); border-top: 1px solid var(--line); background: var(--surface); }
.a-footer__top { display: grid; gap: 48px; }
.a-footer__brand { display: grid; gap: 18px; justify-items: start; align-content: start; }
.a-footer__brand .brand { grid-area: auto; }
.a-footer__brand p { color: var(--ink-muted); max-width: 32ch; }
.a-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.a-footer__h { color: var(--ink-muted); font-size: 11px; margin-bottom: 14px; }
.a-footer__cols ul { display: grid; gap: 10px; }
.a-footer__cols a { color: var(--ink-soft); font-size: 15px; }
.a-footer__cols a:hover { color: var(--ink); }
.a-footer__cols a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.a-footer__word {
  margin: clamp(40px, 6vw, 72px) 0 0; font: 600 clamp(64px, 17.5vw, 250px)/0.8 var(--font-display); letter-spacing: -0.06em;
  white-space: nowrap; color: #E6ECF3; text-align: center;
  user-select: none;
}
.a-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--ink-muted); }
.a-footer__bottom small { font-size: 13px; }
.a-footer__bottom .a-label { font-size: 11px; }
@media (min-width: 900px) {
  .a-footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .a-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .a-footer__brand .btn { width: 100%; justify-content: space-between; }
}

/* ---------- Reduced motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  .a-pulse path, .a-node__dot, .a-node rect, .a-caret, .a-live::after, .a-status__dot { animation: none !important; }
}
@media print {
  [data-console] .cl { opacity: 1 !important; clip-path: none !important; animation: none !important; }
  .a-hero :is(.a-hero__pill, .a-lede, .a-hero__ctas, .a-hero__facts, .a-hero__stage) { opacity: 1 !important; transform: none !important; }
}

/* Built-with-Claude numbers strip, inside the dark systems band */
.a-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.a-proof li { display: grid; gap: 4px; align-content: start; padding: 16px; border: 1px solid var(--console-line); border-radius: 12px; }
.a-proof b { color: #FFFFFF; font-family: "Geist", sans-serif; font-size: 28px; font-weight: 600; line-height: 1.1; }
.a-proof span { color: var(--console-muted); font-size: 13px; line-height: 1.4; }
@media (max-width: 599px) { .a-proof { grid-template-columns: minmax(0, 1fr); } }

/* Apps we've shipped: same card as "What we build", plus an outbound link */
.a-app .a-link { align-self: start; margin-bottom: 12px; font-size: 15px; }
