/* Teras Pintar: one static page. Warm cream "teras" ground with wood-brown accents, so the three app colours
   (only on each card's icon and Buka button) stand out. Light/dark follows the phone, there is no toggle. */
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
:root {
  --bg: #FAF5EC;
  --surface: #FFFFFF;
  --fg: #2B1D12;
  --muted: #6F5B4B;
  --line: #E8DCCB;
  --wood: #7A4E2D;
  --wood-soft: #F3E8D8;
  --gold: #E8A800;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B1511;
    --surface: #251D17;
    --fg: #F3E9DC;
    --muted: #BBA996;
    --line: #3A2E25;
    --wood: #D9A877;
    --wood-soft: #33271E;
    --gold: #FFD23F;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2 { text-wrap: balance; margin: 0; }

.top { padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; gap: 14px; padding-block: 28px 8px; }
.logo { width: 56px; height: 56px; border-radius: 15px; flex: none; }
h1 { font-size: 1.75rem; font-weight: 900; line-height: 1.15; }
.tagline { margin: 2px 0 0; color: var(--muted); font-weight: 600; }
.intro { margin: 12px 0 24px; max-width: 60ch; }

.apps { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.card-head { display: flex; gap: 14px; align-items: center; }
.card-head img { width: 60px; height: 60px; border-radius: 16px; flex: none; }
.card h2 { font-size: 1.3rem; font-weight: 900; line-height: 1.2; }
.what { margin: 0; color: var(--muted); font-weight: 600; }
.for { margin: 0; font-weight: 700; }
.for span {
  display: inline-block;
  background: var(--wood-soft);
  color: var(--wood);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 1px 7px;
  margin-right: 4px;
  vertical-align: 1px;
}
.card ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.card li::marker { color: var(--gold); }

.actions { display: flex; gap: 8px; margin-top: 4px; }
.btn {
  font: inherit;
  font-weight: 800;
  min-height: 48px;
  min-width: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }
.actions .btn { flex: 1 1 0; padding: 0 12px; }
.actions .btn.qr { flex: 0 0 auto; padding: 0 16px; }
.btn.open { background: var(--app); border-color: var(--app); color: #FFFFFF; }

.block { margin-top: 36px; }
.block h2 { font-size: 1.2rem; font-weight: 900; margin-bottom: 12px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.facts li { padding-left: 26px; position: relative; }
.facts li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}
.steps { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; max-width: 62ch; }
.steps li::marker { font-weight: 900; color: var(--wood); }

.foot { padding-block: 40px calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: .9rem; text-align: center; }

.qr-dialog {
  border: none;
  border-radius: 24px;
  padding: 24px 20px 20px;
  width: min(340px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--fg);
  text-align: center;
}
.qr-dialog::backdrop { background: rgb(20 12 6 / .55); }
.qr-dialog h2 { font-size: 1.25rem; font-weight: 900; }
/* The QR always sits on white with a quiet zone, also in dark mode, so every camera can read it. */
.qr-dialog img {
  display: block;
  width: 100%;
  max-width: 264px;
  height: auto;
  aspect-ratio: 1;
  margin: 16px auto 12px;
  background: #FFFFFF;
  border-radius: 12px;
}
.qr-dialog p { margin: 0 0 4px; }
.qr-url { color: var(--muted); font-size: .9rem; word-break: break-all; }
.qr-dialog .close { margin-top: 14px; width: 100%; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  max-width: calc(100vw - 32px);
}

@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
}
