/* PS-WRAP site · tokens เดียวกับแอป (pswrap.svg: bg #0b0f14, accent #00a7ff, text #e8edf2) */
:root {
  --bg: #0b0f14;
  --bg-2: #0f151c;
  --surface: #121a23;
  --surface-2: #17212c;
  --line: #22303e;
  --text: #e8edf2;
  --muted: #93a2b2;
  --accent: #00a7ff;
  --accent-ink: #00131f;
  --accent-soft: rgba(0, 167, 255, .14);
  --radius: 16px;
  --wrap: 1180px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Leelawadee UI", "Noto Sans Thai", "Sukhumvit Set", Tahoma, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Leelawadee UI", "Noto Sans Thai", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html:lang(th) body { line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, .78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(34, 48, 62, .6);
}
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 700 19px/1 var(--font-display); letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 26px; margin-left: 16px; }
.nav-links a { color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; height: 34px; min-width: 44px; padding: 0 12px;
  font: 600 13px/1 var(--font); cursor: pointer;
}
.lang:hover { color: var(--text); border-color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink);
  font: 650 15px/1 var(--font); border-radius: 12px;
  height: 42px; padding: 0 18px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; background: #29b6ff; box-shadow: 0 8px 28px -8px rgba(0, 167, 255, .7); }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 17px; border-radius: 14px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }

/* hero */
.hero {
  position: relative; text-align: center; padding: 88px 0 0;
  background:
    radial-gradient(900px 420px at 50% -80px, rgba(0, 167, 255, .22), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
}
.eyebrow { color: var(--accent); font-weight: 650; font-size: 13.5px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
html:lang(th) .eyebrow { letter-spacing: .04em; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(38px, 6.2vw, 72px); line-height: 1.04; font-weight: 750; }
html:lang(th) h1 { line-height: 1.25; }
h1 em { font-style: normal; color: var(--accent); }
.lede { max-width: 720px; margin: 22px auto 0; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.dl-meta { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }

.hero-shot { margin-top: 56px; padding-bottom: 8px; }
.frame {
  margin: 0; border-radius: 14px; overflow: hidden;
  background: #05080b; border: 1px solid var(--line);
}
.frame-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #0d131a; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3746; }
.frame-bar span { margin-left: 8px; font-size: 12.5px; color: var(--muted); }
.glow { position: relative; box-shadow: 0 40px 120px -30px rgba(0, 167, 255, .45), 0 0 0 1px rgba(0, 167, 255, .08); }

/* strip */
.strip { border-block: 1px solid var(--line); background: var(--bg-2); margin-top: 72px; }
.strip-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-in > div { padding: 26px 12px; text-align: center; border-left: 1px solid var(--line); }
.strip-in > div:first-child { border-left: 0; }
.strip b { display: block; font: 750 30px/1.1 var(--font-display); color: var(--text); }
.strip span { color: var(--muted); font-size: 14px; }

/* sections */
.section { padding: 104px 0; }
.section h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.15; font-weight: 720; }
html:lang(th) .section h2 { line-height: 1.35; }
.sub { color: var(--muted); max-width: 640px; margin: 14px 0 0; font-size: 17px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(0, 167, 255, .45); transform: translateY(-2px); }
.ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); margin-bottom: 18px; }
.ic svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 18px; font-weight: 650; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* showcase */
.show { padding-top: 24px; }
.row { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.row + .row { margin-top: 112px; }
.row.rev { grid-template-columns: 7fr 5fr; }
.row.rev .row-text { order: 2; }
.row-text p:not(.eyebrow) { color: var(--muted); font-size: 17px; margin: 16px 0 0; }
.pair { display: grid; grid-template-columns: 1fr 2.6fr; gap: 14px; align-items: center; }

.shot {
  display: block; width: 100%; padding: 0; margin: 0; cursor: zoom-in;
  background: #05080b; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  color: inherit; font: inherit; text-align: left;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.shot:hover { border-color: rgba(0, 167, 255, .55); box-shadow: 0 18px 50px -24px rgba(0, 167, 255, .55); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.gallery .shot img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; width: 100%; }
.gallery .shot span { display: block; padding: 12px 16px; font-size: 14.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }

/* download */
.dl { background: radial-gradient(700px 360px at 85% 50%, rgba(0, 167, 255, .14), transparent 70%), var(--bg-2); border-block: 1px solid var(--line); }
.dl-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 32px 0 0; display: grid; gap: 22px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; }
.steps li::before {
  content: counter(s); grid-row: span 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font: 700 18px/1 var(--font-display);
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(0, 167, 255, .35);
}
.steps b { font-size: 18px; font-weight: 650; }
.steps span { color: var(--muted); }
.dl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 36px 32px; text-align: center; }
.dl-card img { margin: 0 auto 14px; }
.dl-ver { margin: 0 0 20px; font: 700 22px/1.2 var(--font-display); display: flex; gap: 10px; justify-content: center; align-items: center; }
.dl-card .btn { width: 100%; }
.chip { font: 650 12px/1 var(--font); padding: 6px 10px; border-radius: 999px; color: #ffc861; background: rgba(255, 200, 97, .12); border: 1px solid rgba(255, 200, 97, .3); }

/* faq */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { margin-top: 32px; border-top: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative;
  font-size: 18px; font-weight: 600;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 300; color: var(--accent); transition: transform .2s ease; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { margin: 0 0 22px; color: var(--muted); max-width: 70ch; }

/* community */
.community {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(88, 101, 242, .18), rgba(0, 167, 255, .12));
  border: 1px solid var(--line); border-radius: 24px; padding: 48px;
}
.community p { color: var(--muted); margin: 10px 0 0; font-size: 17px; }
.community .cta { margin-top: 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 44px 0 32px; background: var(--bg-2); }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 20px; }
.foot-brand p { max-width: 460px; margin: 12px 0 0; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--text); }

/* viewer */
dialog#viewer {
  padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #05080b;
  max-width: min(96vw, 1600px); max-height: 92vh; overflow: auto;
}
dialog#viewer::backdrop { background: rgba(3, 6, 9, .86); backdrop-filter: blur(4px); }
dialog#viewer img { max-height: 92vh; width: auto; margin: 0 auto; }
dialog#viewer .x {
  position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer;
}

/* responsive */
@media (max-width: 1040px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .row, .row.rev, .dl-in { grid-template-columns: 1fr; gap: 32px; }
  .row.rev .row-text { order: 0; }
  .nav-links { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 56px; }
  .hero-shot { margin-top: 40px; }
  .section { padding: 72px 0; }
  .row + .row { margin-top: 72px; }
  .strip-in { grid-template-columns: repeat(2, 1fr); }
  .strip-in > div:nth-child(3) { border-left: 0; }
  .strip-in > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid, .gallery { grid-template-columns: 1fr; }
  .gallery { gap: 14px; }
  .community { padding: 32px 22px; }
  .btn-lg { width: 100%; }
  .frame-bar { display: none; }
  .dl-card { padding: 28px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
