/* AI Cashier landing page: the paper half of docs/DESIGN.md.
   Fonts are served from this folder (IBM Plex Sans Thai + Plex Mono, OFL). */

@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexSansThai-Regular.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexSansThai-Medium.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexSansThai-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexSansThai-Bold.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexMono-Regular.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexMono-Medium.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexMono-SemiBold.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --paper: #F3F1EC;
  --paper-2: #FBFAF7;
  --ink: #1A1714;
  --muted: #6B655C;
  --rule: #D6D2C9;
  --accent: #FF7A18;
  --accent-ink: #B4500A;
  --ok: #1E8E4E;
  /* the receipt is paper in either theme */
  --receipt: #FBFAF7;
  --receipt-ink: #1A1714;
  --shadow: 0 18px 40px -24px rgba(26, 23, 20, .4);

  --sans: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "IBM Plex Sans Thai", ui-monospace, SFMono-Regular, Menlo, monospace;
  --measure: 62ch;
  --w: 1120px;
  --s-1: .5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2.5rem; --s-5: 4rem; --s-6: clamp(4rem, 3rem + 5vw, 7rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #131110; --paper-2: #1C1917; --ink: #F2EDE4; --muted: #A39B8F; --rule: #3A342F;
    --accent-ink: #FFA45C; --ok: #3DD68C;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #131110; --paper-2: #1C1917; --ink: #F2EDE4; --muted: #A39B8F; --rule: #3A342F;
  --accent-ink: #FFA45C; --ok: #3DD68C;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); margin-bottom: var(--s-3); }
h3 { font-size: 1.25rem; margin-bottom: var(--s-1); }
p { margin: 0 0 var(--s-2); max-width: var(--measure); }
code { font-family: var(--mono); font-size: .92em; background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 1px 6px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-2); }
.eyebrow--accent { color: var(--accent-ink); }
.lede { font-size: 1.2rem; color: var(--ink); }
.lede--tight { margin-bottom: var(--s-3); }
.fine { font-size: .9rem; color: var(--muted); }

/* masthead */
.mast {
  max-width: var(--w); margin: 0 auto; padding: var(--s-3) var(--s-3) 0;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap;
}
.mast__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.mast__brand img { border-radius: 7px; }
.mast__nav { display: flex; gap: var(--s-3); flex-wrap: wrap; font-size: .95rem; }
.mast__nav a { color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.mast__nav a:hover { border-bottom-color: var(--accent); }

main { max-width: var(--w); margin: 0 auto; padding: 0 var(--s-3); }
section { padding-top: var(--s-6); }

/* hero: copy left, receipt right */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s-5); align-items: center; padding-top: var(--s-5); }
.cta { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-4) 0 var(--s-2); }

.btn {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 64px; padding: 12px 22px; border-radius: 6px; text-decoration: none;
  font-weight: 600; line-height: 1.2; border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #1A1714; box-shadow: 0 10px 24px -14px rgba(255, 122, 24, .9); }
.btn--primary:hover { box-shadow: 0 14px 30px -14px rgba(255, 122, 24, 1); }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.btn__k { font-size: 1.05rem; }
.btn__m { font-family: var(--mono); font-size: .75rem; font-weight: 500; opacity: .8; letter-spacing: .04em; }

.receipt {
  margin: 0; justify-self: center; width: min(100%, 360px);
  background: var(--receipt); color: var(--receipt-ink);
  padding: 22px 0 18px; box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
  /* the torn bottom edge */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 96% 100%, 92% calc(100% - 10px), 88% 100%, 84% calc(100% - 10px), 80% 100%, 76% calc(100% - 10px), 72% 100%, 68% calc(100% - 10px), 64% 100%, 60% calc(100% - 10px), 56% 100%, 52% calc(100% - 10px), 48% 100%, 44% calc(100% - 10px), 40% 100%, 36% calc(100% - 10px), 32% 100%, 28% calc(100% - 10px), 24% 100%, 20% calc(100% - 10px), 16% 100%, 12% calc(100% - 10px), 8% 100%, 4% calc(100% - 10px), 0 100%);
}
.receipt pre { margin: 0; font-family: var(--mono); font-size: .8rem; line-height: 1.5; white-space: pre; overflow-x: auto; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) { .receipt { transition: transform .3s ease; } .receipt:hover { transform: rotate(0deg); } }

/* screenshots */
.shot img { border-radius: 6px; border: 1px solid var(--rule); box-shadow: var(--shadow); }
.shot figcaption { font-size: .92rem; color: var(--muted); margin-top: var(--s-2); }
.shot--pair { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .9fr) minmax(0, .7fr); gap: var(--s-4); align-items: start; }
.shot--pair .phone img { border-radius: 24px; }
.shot--pair figure { margin: 0; }

/* steps: a numbered sequence, because a sale is one */
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.steps li { border-top: 3px solid var(--rule); padding-top: var(--s-2); position: relative; }
.steps li .n { font-family: var(--mono); color: var(--accent-ink); font-size: .85rem; letter-spacing: .1em; display: block; margin-bottom: var(--s-1); }
.steps li:first-child { border-top-color: var(--accent); }

/* refusals */
.refuses ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); max-width: 72ch; }
.refuses li { padding: var(--s-2) var(--s-3); background: var(--paper-2); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; }
.refuses li b { display: block; margin-bottom: 2px; }

/* download cards */
.dl__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); }
.card { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 6px; padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-1); }
.card p { max-width: none; }
.card--win { border-color: var(--accent); box-shadow: var(--shadow); }
.card .btn { margin: var(--s-2) 0; align-self: flex-start; max-width: 100%; }
.card .btn__k { overflow-wrap: anywhere; }
.mini { margin: 0 0 var(--s-2); padding-left: 1.2em; }
.mini li { margin-bottom: 4px; }
details { border-top: 1px dashed var(--rule); padding-top: var(--s-1); margin-top: auto; }
summary { cursor: pointer; font-weight: 600; font-size: .95rem; }
details p { margin-top: var(--s-1); font-size: .92rem; }

/* research */
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-1); max-width: 72ch; }
.links li { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: var(--s-2); padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.links span { color: var(--muted); font-size: .92rem; }

.foot { max-width: var(--w); margin: var(--s-6) auto 0; padding: var(--s-4) var(--s-3) var(--s-5); border-top: 1px solid var(--rule); color: var(--muted); font-size: .92rem; }
.foot p { max-width: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .receipt { justify-self: start; transform: rotate(0); }
  .steps ol, .dl__grid, .shot--pair { grid-template-columns: minmax(0, 1fr); }
  .links li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .mast { padding-top: var(--s-2); }
  .btn { width: 100%; }
}
