:root { --accent: #DC1414; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; touch-action: manipulation; }
body { margin: 0; background: #fff; -webkit-text-size-adjust: 100%; }
a { color: #111; }
a:hover { color: #555; }
h1, h2, h3 { overflow-wrap: break-word; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: #111; color: #fff; padding: 10px 16px; border-radius: 999px; font: 700 15px 'Manrope', sans-serif; }
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Language switch */
.lang-btn { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 13px; border-radius: 999px; min-width: 48px; min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: #111; }
.lang-btn.is-active { background: #111; color: #fff; }
.lang-btn:hover { color: #111; background: #f0f0f0; }
.lang-btn.is-active:hover { background: #111; color: #fff; }

/* Animations */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes ring { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.55, 1.9); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.ticker-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.stamp { animation: spin 18s linear infinite; }
.pulse { position: relative; isolation: isolate; animation: breathe 2.4s ease-in-out infinite; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); z-index: -1; animation: ring 2.4s ease-out infinite; }
.pulse::after { animation-delay: 1.2s; }
.pulse:hover { color: #fff !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse, .pulse::before, .pulse::after, .ticker-track, .stamp { animation: none; }
}

/* Sticky menu: hidden on phones */
@media (max-width: 640px) { .menu { display: none; } }

/* Receipt */
.zig { position: relative; }
.zig::after { content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px; background: linear-gradient(-45deg, transparent 10px, #fff 0) 0 0 / 20px 14px repeat-x, linear-gradient(45deg, transparent 10px, #fff 0) 0 0 / 20px 14px repeat-x; }
.barcode { height: 56px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 5px, #111 5px 9px, transparent 9px 11px, #111 11px 12px, transparent 12px 16px); }
.leader { flex: 1; border-bottom: 2px dotted #bbb; transform: translateY(-5px); min-width: 16px; }

/* Buttons */
.round-btn { border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.dot { width: 36px; height: 44px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.dot > span { display: block; height: 8px; width: 8px; border-radius: 999px; background: #cfcfcf; transition: width .25s ease, background .25s ease; }
.dot.is-active > span { width: 30px; background: var(--accent); }
.dot--dark > span { background: #555; }

/* Examples slider */
.track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 32px; padding: 40px 32px 24px; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.demo-card { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; gap: 16px; }
.demo-open { display: block; padding: 0; margin: 0; border: 3px solid #111; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 8px 8px 0 #111; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.demo-open:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 #111; }
.demo-bar { display: flex; gap: 6px; align-items: center; padding: 10px 14px; border-bottom: 3px solid #111; background: #fff; }
.demo-bar > span:not(.demo-url) { width: 10px; height: 10px; border-radius: 50%; }
.demo-url { margin-left: 8px; flex: 1; border-radius: 999px; background: #f0f0f0; font-size: 12px; font-weight: 700; color: #555; padding: 2px 12px; }
.demo-window { display: block; position: relative; overflow: hidden; width: 418px; height: 300px; background: #f4f4f4; }
.demo-frame { position: absolute; left: 0; top: 0; width: 720px; height: 1300px; border: 0; transform: scale(.58); transform-origin: 0 0; pointer-events: none; }
.demo-open-pill { position: absolute; right: 12px; bottom: 12px; background: #111; color: #fff; font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 999px; display: flex; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .demo-window { width: 300px; height: 230px; }
  .demo-frame { transform: scale(.4167); }
}

/* Demo viewer */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(17, 17, 17, .78); overflow-y: auto; padding: 20px 12px 40px; display: flex; justify-content: center; align-items: flex-start; }
.modal-panel { width: 100%; max-width: 780px; background: #fff; border-radius: 24px; overflow: clip; border: 3px solid #111; font-family: 'Manrope', system-ui, sans-serif; }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 3px solid #111; background: #fff; }
.modal-stage { position: relative; background: #ececec; overflow: hidden; min-height: 300px; }
.modal-frame { position: absolute; top: 24px; left: 50%; width: 720px; height: 1200px; border: 0; transform-origin: 0 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .18); background: #fff; }
body.modal-open { overflow: hidden; }

/* Form */
.field { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: 15px; }
.field input, .field select { font: inherit; font-weight: 500; font-size: 18px; padding: 14px 18px; border: 2px solid #111; border-radius: 14px; min-height: 56px; width: 100%; background: #fff; color: #111; }
.field input[aria-invalid="true"] { border-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[data-submit][disabled] { opacity: .6; cursor: progress; }
[data-form-status].is-ok { color: #0E7C46; }
[data-form-status].is-err { color: var(--accent); }

/* Scroll progress bar (mobile only) */
.scroll-progress { display: none; }
@media (max-width: 640px) {
  .scroll-progress { display: block; position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .2s; }
  .scroll-progress.is-on { opacity: 1; }
  .scroll-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
}
