/* Visitka marketing site — Kiosk Light + Dark
 * Mirrors packages/shared/src/tokens.json (visitka.kiosk).
 * No build tooling. Mobile-first. Breakpoints: 768px, 1280px.
 */

/* ───── Tokens ──────────────────────────────────────────────── */
:root {
  /* Kiosk · Light (default) */
  --bg:        #f3ede0;
  --bg-alt:    #e8e0cd;
  --ink:       #171511;
  --ink-sub:   #5a544a;
  --border:    #1a1814;
  --accent:    #d83a2a;   /* krasniy */
  --on-accent: #fdf6e3;
  --sineva:    #1c4ad9;
  --yantar:    #f0c419;
  --nefrit:    #1f8a5b;

  /* type */
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body:    "Manrope", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* rules */
  --rule:  2px;
  --stamp: 4px;

  --max-w: 1280px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #15130f;
    --bg-alt:    #211d17;
    --ink:       #f3ede0;
    --ink-sub:   #9b9081;
    --border:    #f3ede0;
    --accent:    #ef5142;
    --on-accent: #15130f;
    --sineva:    #3d68ea;
    --yantar:    #f5cf3a;
    --nefrit:    #36a26f;
  }
}

:root[data-theme="dark"] {
  --bg:        #15130f;
  --bg-alt:    #211d17;
  --ink:       #f3ede0;
  --ink-sub:   #9b9081;
  --border:    #f3ede0;
  --accent:    #ef5142;
  --on-accent: #15130f;
  --sineva:    #3d68ea;
  --yantar:    #f5cf3a;
  --nefrit:    #36a26f;
}

/* ───── Reset + base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; cursor: pointer; }

/* ───── Language toggle plumbing ────────────────────────────── */
/* Each translated element pairs .lang-en + .lang-ru siblings.
 * The toggle flips :root[data-lang]. Default: en. */
:root[data-lang="ru"] .lang-en,
:root:not([data-lang="ru"]) .lang-ru { display: none; }

/* ───── Layout ──────────────────────────────────────────────── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--s-5); }
@media (min-width: 768px)  { .wrap { padding: 0 var(--s-7); } }
@media (min-width: 1280px) { .wrap { padding: 0 var(--s-8); } }

/* ───── Site chrome ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: var(--rule) solid var(--ink);
}
.topbar-inner {
  display: flex; align-items: center; gap: var(--s-4);
  height: 60px;
}
.topbar-mark {
  display: flex; align-items: center; gap: var(--s-3);
  color: var(--ink); text-decoration: none;
}
.topbar-mark .stamp { width: 28px; height: 28px; }
.topbar-mark .word {
  font-family: var(--font-display); font-weight: 800;
  font-size: 17px; letter-spacing: -0.02em; line-height: 1;
}
.topbar-nav {
  display: none; gap: var(--s-5);
  flex: 1; margin-left: var(--s-5);
}
@media (min-width: 768px) { .topbar-nav { display: flex; } }
.topbar-nav a {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; color: var(--ink); padding: 4px 0;
  border-bottom: var(--rule) solid transparent;
}
.topbar-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.topbar-nav a:hover { color: var(--accent); }
.topbar-spacer { flex: 1; }

/* lang chip */
.lang-toggle {
  display: inline-flex; padding: 0; margin: 0;
  border: var(--rule) solid var(--ink); background: var(--bg);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.lang-toggle button {
  border: 0; background: transparent; color: var(--ink);
  padding: 6px 10px; line-height: 1;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--ink); color: var(--bg);
}

/* theme chip */
.theme-toggle {
  border: var(--rule) solid var(--ink); background: var(--bg);
  width: 32px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.theme-toggle svg { width: 14px; height: 14px; display: block; }
@media (max-width: 480px) { .theme-toggle { display: none; } }

/* ───── Section primitives ──────────────────────────────────── */
.kicker {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-sub);
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.kicker::before {
  content: ""; display: block; width: 22px; height: var(--rule); background: var(--accent);
}
.kicker--ink::before { background: var(--ink); }
.tag {
  display: inline-block; padding: 4px 8px;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; line-height: 1;
}
.tag--accent { background: var(--accent); color: var(--on-accent); }

.h-display {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: -0.03em; line-height: 0.93;
  font-size: clamp(48px, 11vw, 128px);
  margin: 0;
}
.h-section {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: -0.025em; line-height: 0.95;
  font-size: clamp(36px, 6vw, 64px);
  margin: 0;
}
.h-step {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1;
  font-size: clamp(28px, 4vw, 42px);
  margin: 0;
}
.body-lg { font-size: clamp(15px, 1.5vw, 18px); line-height: 1.55; color: var(--ink-sub); max-width: 56ch; }
.body { font-size: 15px; line-height: 1.55; color: var(--ink-sub); max-width: 56ch; }

/* Big horizontal accent rule between major sections */
.section { padding: clamp(48px, 9vw, 120px) 0; position: relative; }
.section + .section { border-top: var(--rule) solid var(--ink); }
.section--accent { background: var(--accent); color: var(--on-accent); }
.section--accent .body, .section--accent .body-lg, .section--accent .kicker { color: var(--on-accent); opacity: .85; }
.section--accent .kicker::before { background: var(--on-accent); }
.section--ink { background: var(--ink); color: var(--bg); }
.section--ink .body, .section--ink .body-lg, .section--ink .kicker { color: var(--bg); opacity: .65; }
.section--ink .kicker::before { background: var(--accent); }

/* ───── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-3);
  padding: 16px 22px;
  background: var(--accent); color: var(--on-accent);
  border: var(--rule) solid var(--ink);
  font-family: var(--font-body); font-weight: 700;
  font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; line-height: 1;
  transition: transform .12s ease, box-shadow .12s ease;
  position: relative;
}
.btn::after {
  content: ""; position: absolute;
  inset: 6px -6px -6px 6px;
  background: var(--ink); z-index: -1;
}
.btn:hover { transform: translate(-2px, -2px); }
.btn:hover::after { inset: 8px -8px -8px 8px; }
.btn:active { transform: translate(0, 0); }
.btn--ghost {
  background: transparent; color: var(--ink);
}
.btn--ghost::after { display: none; }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--lg { padding: 22px 30px; font-size: 17px; }

.arrow { width: 18px; height: 14px; }

/* ───── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: var(--rule) solid var(--ink);
  padding: var(--s-7) 0 var(--s-6);
  background: var(--bg);
}
.footer-inner { display: grid; grid-template-columns: 1fr; gap: var(--s-5); }
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer .word {
  font-family: var(--font-display); font-weight: 800;
  font-size: 22px; letter-spacing: -0.02em;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.footer-h {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  margin: 0 0 var(--s-3); color: var(--ink-sub);
}
.footer a {
  text-decoration: none;
  font-size: 14px; color: var(--ink);
}
.footer a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: var(--s-6); padding-top: var(--s-5);
  border-top: var(--rule) solid var(--ink);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3);
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-sub);
}

/* ───── The Kiosk В stamp ───────────────────────────────────── */
.kiosk-mark {
  display: block; aspect-ratio: 1;
  color: var(--ink); /* the solid block */
}
.kiosk-mark rect.solid { fill: currentColor; }
.kiosk-mark rect.cut   { fill: var(--bg); }

/* ───── Phone frame ─────────────────────────────────────────── */
.phone {
  --phone-w: 280px;
  --phone-h: 580px;
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--bg);
  border: var(--rule) solid var(--ink);
  outline: 6px solid var(--ink);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.phone--lg { --phone-w: 320px; --phone-h: 660px; }
.phone-screen { width: 100%; height: 100%; display: flex; flex-direction: column; }
.phone-statusbar {
  height: 28px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  color: var(--ink);
}
.phone-content { flex: 1; padding: 8px 14px 0; display: flex; flex-direction: column; min-height: 0; }
.phone-nav { height: 16px; display: flex; align-items: center; justify-content: center; }
.phone-nav::after { content: ""; width: 80px; height: 3px; background: var(--ink); opacity: .35; }

/* Phone Home-card recreation (the marquee screen, compressed) */
.card-stamp {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  background: var(--bg); color: var(--ink);
}
.card-stamp-head {
  background: var(--ink); color: var(--bg);
  padding: 8px 12px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: -0.01em;
}
.card-stamp-head .dot { width: 10px; height: 10px; background: var(--accent); }
.card-stamp-body {
  flex: 1; border: var(--rule) solid var(--ink); border-top: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 12px; position: relative; min-height: 0;
}
.card-stamp-body .qr { width: 100%; max-width: 220px; aspect-ratio: 1; }
.card-stamp-body .center-v {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  background: var(--accent); color: var(--bg);
  border: var(--rule) solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1;
}
.card-stamp-foot {
  background: var(--accent); color: var(--on-accent);
  padding: 8px 12px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  border: var(--rule) solid var(--ink); border-top: 0;
}
.tab-strip {
  flex-shrink: 0;
  display: flex; gap: 0;
  border-top: var(--rule) solid var(--ink);
  margin: 0 -14px;
  padding: 8px 6px 4px;
}
.tab-strip > div {
  flex: 1;
  font-family: var(--font-mono); font-size: 8px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-align: center; padding: 4px 0;
  color: var(--ink-sub);
}
.tab-strip > div.on {
  color: var(--on-accent); background: var(--accent);
}

/* ───── Big numbered Kiosk stamp (1·2·3) ───────────────────── */
.numbered-stamp {
  width: clamp(72px, 10vw, 120px); aspect-ratio: 1;
  background: var(--accent); color: var(--on-accent);
  border: 4px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.04em; line-height: 1;
  flex-shrink: 0;
}
.numbered-stamp.alt { background: var(--ink); color: var(--bg); }

/* ───── QR / SVG helpers ─────────────────────────────────────── */
.qr-svg rect.bg { fill: var(--bg); }
.qr-svg rect.fg { fill: var(--ink); }

/* ───── Accessibility focus ──────────────────────────────────── */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* ───── Utility ──────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.row { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
