/* SystemTALK / AIWeb public site */
:root {
  --bg: #faf8f5;
  --paper: #ffffff;
  --ink: #17181c;
  --ink-2: #3a3d46;
  --muted: #646a78;
  --line: #e7e2dc;
  --brand: #7f1416;          /* SystemTALK maroon, from the original logo */
  --brand-2: #b3262b;
  --brand-soft: #f7e9e8;
  --dark: #141519;
  --dark-2: #1d1f25;
  --dark-line: #2c2f37;
  --ok: #1f8a4c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,20,30,.06), 0 8px 24px rgba(20,20,30,.08);
  --font: "IBM Plex Sans", "IBM Plex Sans Thai", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
html:lang(th) { --font: "IBM Plex Sans Thai", "IBM Plex Sans", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.075rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; border: 1px solid var(--brand); transition: background .15s, transform .15s; }
.btn:hover { background: var(--brand-2); transform: translateY(-1px); }
.btn .ico { width: 1.1em; height: 1.1em; }
.btn-sm { padding: .45em 1.1em; font-size: .92rem; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-light { background: #fff; color: var(--brand); border-color: #fff; }
.btn-light:hover { background: #fdf3f2; }

/* Brand */
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { display: block; height: 44px; width: auto; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(250,248,245,.86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--ink-2); font-size: .95rem; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--brand); }
.nav-links .lang { font-family: var(--mono); font-size: .8rem; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--ink); cursor: pointer; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(179,38,43,.45), transparent 60%), radial-gradient(800px 400px at -10% 110%, rgba(142,27,31,.25), transparent 60%), var(--dark); color: #fff; padding: 88px 0 104px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.eyebrow { font-family: var(--mono); font-size: .85rem; letter-spacing: .04em; color: #ff9da0; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2rem, 3.9vw, 3.2rem); font-weight: 700; line-height: 1.15; margin-bottom: 20px; }
html:lang(th) .hero h1 { line-height: 1.3; }
.hero h1 .hl { color: #ff8a8d; white-space: nowrap; }
.hero .lead { color: #c9cbd3; font-size: 1.08rem; max-width: 34em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 28px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: #b9bcc6; font-size: .93rem; }
.hero-points li { display: flex; align-items: center; gap: 6px; }
.hero-points .ico { color: #6fd39a; width: 1.05em; height: 1.05em; }

.hero-visual { position: relative; padding-bottom: 40px; }
.browser { background: #2a2c33; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06); overflow: hidden; transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transform-origin: left center; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #24262c; }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #4a4d57; }
.browser-bar i:first-child { background: #e0615b; } .browser-bar i:nth-child(2) { background: #e3b341; } .browser-bar i:nth-child(3) { background: #5bbf6a; }
.browser-bar span { margin-left: 12px; font-family: var(--mono); font-size: .72rem; color: #8c909c; background: #1b1c21; padding: 2px 10px; border-radius: 5px; }
.phone { position: absolute; right: -8px; bottom: -6px; width: 34%; max-width: 210px; background: #0d0e11; border-radius: 26px; padding: 8px; box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); }
.phone img { display: block; width: 100%; height: auto; border-radius: 19px; }

/* Problem */
/* Track record: totals + cumulative projects chart */
.record { padding: 80px 0; }
.rc-stats { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 16px; }
.rc-stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; }
.rc-stat b { font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rc-stat span { font-weight: 600; margin-top: 6px; }
.rc-stat small { color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: 4px; }
.rc-trend { margin-top: auto; padding-top: 14px; }
.rc-trend svg { display: block; width: 100%; height: 76px; overflow: visible; }
.rc-area { fill: var(--brand-soft); }
.rc-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.rc-years { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--muted); font-size: .78rem; }
.problem { background: var(--paper); border-bottom: 1px solid var(--line); }
.problem h2 { max-width: 22em; }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 40px 0; }
.problem-item { border-top: 2px solid var(--ink); padding-top: 18px; }
.problem-item p { color: var(--muted); }
.num { font-family: var(--mono); font-size: .8rem; color: var(--brand); display: block; margin-bottom: 8px; }
.answer { display: flex; gap: 14px; align-items: flex-start; background: var(--brand-soft); border-radius: var(--radius); padding: 20px 24px; font-size: 1.1rem; font-weight: 500; color: #4b1012; margin: 0; }
.answer .ico { color: var(--brand); width: 1.5em; height: 1.5em; margin-top: 2px; }

/* Section headings */
.sec-head { max-width: 46em; margin-bottom: 48px; }
.sec-head p { color: var(--muted); font-size: 1.05rem; }

/* Features */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feat { background: var(--paper); padding: 28px 26px; transition: background .15s; }
.feat:hover { background: #fffdfb; }
.feat p { color: var(--muted); font-size: .95rem; margin: 0; }
.feat-ico { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; }

/* Showcase */
.showcase { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shot { display: grid; grid-template-columns: 1.55fr 1fr; gap: 48px; align-items: center; margin-bottom: 72px; }
.shot.rev { grid-template-columns: 1fr 1.55fr; }
.shot.rev .shot-img { order: 2; }
.shot-img { margin: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.shot-img a { display: block; cursor: zoom-in; }
.shot-img img { transition: transform .4s; }
.shot-img:hover img { transform: scale(1.015); }
.shot-copy p { color: var(--muted); }
.tablet-block { display: grid; grid-template-columns: 1fr 1.45fr; gap: 48px; align-items: center; background: var(--dark); color: #fff; border-radius: 20px; padding: 48px 56px; margin-bottom: 28px; }
.tablet-copy h3 { font-size: 1.5rem; }
.tablet-copy p { color: #c2c5ce; }
.tablet-copy .ticks li { align-items: flex-start; line-height: 1.5; }
.tablet-copy .ticks .ico { margin-top: .15em; flex: none; }
.tablet-copy .tb-badge { display: inline-flex; align-items: center; gap: .5em; margin: 0 0 10px; padding: .35em .9em; border-radius: 999px; background: var(--brand); color: #fff; font-size: .95rem; }
.tb-badge .ico { width: 1.1em; height: 1.1em; }
.tablet { background: #0d0e11; border-radius: 24px; padding: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.1); }
.tablet a { display: block; cursor: zoom-in; }
.tablet img { display: block; width: 100%; height: auto; border-radius: 6px; }
.mobile-block { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; background: var(--dark); color: #fff; border-radius: 20px; padding: 48px 56px; }
.mobile-block p { color: #c2c5ce; max-width: 32em; }
.phone-lg { position: relative; right: auto; bottom: auto; width: 230px; max-width: none; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 8px; align-items: center; }
.ticks .ico { color: #6fd39a; }
.shot-copy .ticks { gap: 10px; }
.shot-copy .ticks li { align-items: flex-start; color: var(--ink-2); font-size: .97rem; line-height: 1.5; }
.shot-copy .ticks .ico { color: var(--ok); margin-top: .15em; }
.shot-copy h3 { font-size: 1.3rem; }
.shot-copy .badge { display: inline-flex; align-items: center; gap: .5em; margin: 0 0 6px; padding: .35em .9em; border-radius: 999px; background: var(--brand); color: #fff; font-size: .95rem; letter-spacing: .02em; }
.shot-copy .badge .ico { width: 1.1em; height: 1.1em; }
.shot-copy .for { color: var(--brand); font-weight: 600; font-size: .95rem; margin-bottom: 14px; }

/* Two modes: quick comparison cards above the detail blocks */
.mode-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: -16px 0 64px; }
.mode-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); text-decoration: none; transition: border-color .15s, transform .15s; }
.mode-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.mode-card .ico { grid-row: span 2; width: 48px; height: 48px; padding: 11px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.mode-card b { font-size: 1.2rem; }
.mode-card span { color: var(--muted); font-size: .95rem; }
.mock-note { color: var(--muted); font-size: .85rem; text-align: center; margin: 20px 0 0; }

/* Reporter & Importer: Importer -> AIWeb -> Reporter strip */
.flow { list-style: none; counter-reset: f; display: flex; gap: 0; padding: 0; margin: -16px 0 56px; }
.flow li { counter-increment: f; flex: 1; position: relative; padding: 14px 18px 14px 52px; background: var(--bg); border: 1px solid var(--line); font-weight: 600; font-size: .97rem; }
.flow li + li { border-left: 0; }
.flow li:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.flow li:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.flow li::before { content: counter(f); position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; display: grid; place-items: center; font-family: var(--mono); }

/* Industry examples: live demo screenshots, 16:9 frame (the tablet shot is letterboxed) */
.ex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ex-card { margin: 0; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.ex-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.ex-img { display: block; aspect-ratio: 16 / 9; background: #070b12; cursor: zoom-in; }
.ex-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.ex-card figcaption { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.ex-ind { color: var(--brand); font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ex-card h3 { font-size: 1.05rem; margin: 4px 0 6px; }
.ex-card p { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 0 0 14px; }
.ex-kind { margin-top: auto; display: inline-flex; align-items: center; gap: .4em; align-self: flex-start; font-family: var(--mono); font-size: .72rem; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.ex-kind .ico { width: 1.1em; height: 1.1em; color: var(--brand); }

/* Industries */
.industries { padding: 80px 0; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; color: var(--ink-2); }
.chips-lg li { padding: 10px 18px; font-size: .98rem; }

/* Connect hub */
.connect { background: var(--dark); color: #fff; }
.connect .sec-head p { color: #b7bac4; }
.hub { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-areas: "a b c" "d core e"; gap: 20px; }
.hub-group { background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius); padding: 22px; }
.hub-group:nth-of-type(1) { grid-area: a; } .hub-group:nth-of-type(2) { grid-area: b; } .hub-group:nth-of-type(3) { grid-area: c; }
.hub-group:nth-of-type(4) { grid-area: d; } .hub-group:nth-of-type(5) { grid-area: e; }
.hub-group h3 { font-size: .95rem; color: #ff9da0; font-weight: 600; }
.hub-group .chips li { background: #262931; border-color: #343843; color: #e1e3e8; font-size: .85rem; }
.hub-core { grid-area: core; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: var(--radius); background: radial-gradient(circle at 50% 40%, rgba(179,38,43,.55), rgba(142,27,31,.15) 70%), var(--dark-2); border: 1px solid #5a2326; min-height: 180px; }
.hub-core b { font-size: 1.8rem; letter-spacing: -.01em; font-family: "IBM Plex Sans", sans-serif; }
.hub-core img { height: 40px; width: auto; }

/* AI */
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ai-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); }
.ai-card > .ico { color: var(--brand); width: 30px; height: 30px; margin-bottom: 16px; }
.ai-card p { color: var(--muted); margin: 0; font-size: .96rem; }
.tag { position: absolute; top: 18px; right: 18px; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #e6f5ec; color: var(--ok); }
.ai-card.soon { background: repeating-linear-gradient(135deg, #fff, #fff 12px, #fbf7f4 12px, #fbf7f4 24px); }
.ai-card.soon .tag { background: #fbefd9; color: #9a6400; }

/* Process */
.process { background: var(--paper); border-top: 1px solid var(--line); }
.partner { border-top: 1px solid var(--line); }
.partner-card { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 28px 32px; }
.partner-logo { display: block; height: 62px; width: auto; margin-bottom: 14px; }
.partner-id h3 { font-size: 1.3rem; margin: 0 0 6px; }
.partner-role { color: var(--brand); font-weight: 600; margin: 0 0 12px; }
.partner-since { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.partner-card > div > p { margin: 0 0 16px; color: var(--ink-2); line-height: 1.6; }
.partner-card .chips { margin-bottom: 20px; }
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.steps li { position: relative; padding-top: 56px; }
.steps li::before { content: ""; position: absolute; top: 19px; left: 44px; right: -24px; height: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.step-n { position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-family: var(--mono); }
.steps p { color: var(--muted); font-size: .95rem; }

/* Contact */
.contact { background: linear-gradient(135deg, var(--brand) 0%, #5d1013 100%); color: #fff; }
.contact-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.contact .lead { color: #f2d6d6; font-size: 1.08rem; margin-bottom: 28px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 16px; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: 18px 22px; }
.contact-list .ico { width: 26px; height: 26px; color: #ffc9ca; }
.contact-list small { display: block; color: #f0c4c5; font-size: .8rem; }
.contact-list a { color: #fff; text-decoration: none; font-weight: 600; font-size: 1.1rem; word-break: break-all; }
.contact-list a:hover { text-decoration: underline; }

/* Footer */
.foot { background: var(--dark); color: #9a9ea9; padding: 48px 0; font-size: .9rem; }
.foot-in { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.foot-logo { display: block; height: 52px; width: auto; margin-bottom: 8px; }
.foot-meta p { margin-bottom: .6em; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10,10,12,.88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1600px, 100%); max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Responsive */
@media (max-width: 980px) {
  section { padding: 72px 0; }
  .hero-in { grid-template-columns: 1fr; gap: 48px; }
  .browser { transform: none; }
  .feat-grid, .ex-grid { grid-template-columns: repeat(2, 1fr); }
  .shot, .shot.rev { grid-template-columns: 1fr; gap: 24px; }
  .shot.rev .shot-img { order: 0; }
  .hub { grid-template-columns: 1fr 1fr; grid-template-areas: "core core" "a b" "c d" "e e"; }
  .ai-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li::before { display: none; }
  .contact-in, .foot-in, .partner-card { grid-template-columns: 1fr; }
  .tablet-block { grid-template-columns: 1fr; gap: 32px; padding: 36px 28px; }
  .rc-stats { grid-template-columns: repeat(3, 1fr); }
  .rc-projects { grid-column: 1 / -1; }
  .mobile-block { grid-template-columns: 1fr; padding: 36px 28px; justify-items: center; text-align: left; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; justify-content: center; }
  .nav-links .lang { align-self: flex-start; margin-top: 12px; border-bottom: 1px solid var(--line) !important; }
  .problem-grid, .feat-grid, .ex-grid { grid-template-columns: 1fr; }
  .hub { grid-template-columns: 1fr; grid-template-areas: "core" "a" "b" "c" "d" "e"; }
  .steps { grid-template-columns: 1fr; }
  .phone { width: 38%; right: -4px; }
  .phone-lg { width: 200px; }
  .tablet-block { padding: 28px 16px; }
  .record { padding: 56px 0; }
  .rc-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rc-tags { grid-column: 1 / -1; }
  .rc-stat { padding: 16px; }
  .tablet { padding: 8px; border-radius: 14px; }
  .hero { padding: 56px 0 72px; }
  .mode-pair { grid-template-columns: 1fr; gap: 12px; margin-bottom: 48px; }
  .flow { flex-direction: column; }
  .flow li + li { border-left: 1px solid var(--line); border-top: 0; }
  .flow li:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .flow li:last-child { border-radius: 0 0 var(--radius) var(--radius); }
}
