/* Box Label Maker – "Label stock": a sheet of white die-cut labels on a lilac-grey backing,
   box codes on black label tape, one signal red. Rubik + Source Code Pro (self-hosted, OFL). */

@font-face { font-family: "Rubik"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/rubik-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/rubik-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/rubik-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Code Pro"; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/source-code-pro-latin-900-normal.woff2") format("woff2"); }

:root {
  --sheet: #edebee;
  --die: #d6d2d9;
  --label: #ffffff;
  --ink: #17151b;
  --soft: #4d4953;
  --faint: #67626d;
  --tape: #1e1b22;
  --red: #c23327;
  --red-dark: #9e2416;
  --red-tint: #fbe1dc;
  --olive: #46601f;
  --radius: 16px;
  --sans: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Source Code Pro", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--sheet); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-dark); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, li, summary, figcaption, dd, dt { overflow-wrap: anywhere; hyphens: auto; }
h1, h2, h3 { font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--tape); color: #fff; padding: 10px 16px; z-index: 10; border-radius: 6px; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

/* Label primitives */
.label { background: var(--label); border: 1px solid var(--die); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); }
.tape { display: inline-block; background: var(--tape); color: #fff; font-family: var(--mono); font-weight: 900; font-size: 0.95rem; letter-spacing: 0.08em; line-height: 1; padding: 0.42em 0.6em 0.38em; border-radius: 4px; margin-bottom: 18px; }
.code-chip { display: inline-block; background: var(--tape); color: #fff; font-family: var(--mono); font-weight: 900; letter-spacing: 0.06em; padding: 0.15em 0.45em; border-radius: 3px; font-size: 0.85em; }
.window { background: var(--label); border: 1px solid var(--die); border-radius: 26px; padding: 10px; }
.window .shot { border-radius: 18px; width: 100%; }
.perf { height: 10px; background:
    linear-gradient(var(--red), var(--red)) left center / 26px 5px no-repeat,
    radial-gradient(circle, #9a95a0 1.8px, transparent 2.2px) 36px center / 9px 10px repeat-x; }
.section-title { font-size: clamp(1.75rem, 4.4vw, 2.75rem); margin-bottom: 22px; }
.lead { font-size: clamp(1.08rem, 2.2vw, 1.25rem); color: var(--soft); }

/* Header */
.top { padding-top: 18px; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.nav a { display: inline-block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--label); }
.nav a[aria-current="page"] { background: var(--tape); color: #fff; }

/* Hero */
.hero { padding: clamp(28px, 6vw, 64px) 0 clamp(40px, 7vw, 80px); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='190'%3E%3Crect x='8' y='8' width='284' height='174' rx='14' fill='none' stroke='%23d6d2d9' stroke-width='1.5'/%3E%3C/svg%3E"); background-size: 300px 190px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-label h1 { font-size: clamp(2.3rem, 7vw, 4.1rem); margin-bottom: 18px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 28px 0 22px; }
.text-link { font-weight: 500; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { border: 1.5px solid var(--ink); border-radius: 4px; padding: 3px 10px; font-weight: 500; font-size: 0.95rem; }
.facts li:first-child { background: var(--red); border-color: var(--red); color: #fff; }
.hero-shot { margin: 0 auto; max-width: 380px; width: 100%; }
.hero-shot figcaption { margin-top: 12px; text-align: center; color: var(--soft); font-size: 0.95rem; }

/* Google Play button */
.play { display: inline-flex; align-items: center; gap: 12px; background: var(--tape); color: #fff; border-radius: 10px; padding: 10px 20px 10px 14px; text-decoration: none; min-height: 56px; }
.play:hover { color: #fff; background: #000; }
.play-tile { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--red); font-size: 0.9rem; }
.play-text { display: flex; flex-direction: column; line-height: 1.15; }
.play-small { font-size: 0.78rem; opacity: 0.85; }
.play-big { font-weight: 800; font-size: 1.15rem; }
.play-soon { background: var(--label); color: var(--ink); border: 2px dashed var(--faint); cursor: default; }
.play-soon .play-tile { background: var(--sheet); color: var(--faint); }

/* Steps */
.steps { padding: clamp(40px, 7vw, 80px) 0; }
.step-list { list-style: none; display: grid; gap: 24px; }
.step { display: grid; gap: 24px; align-items: center; }
.step h3 { font-size: clamp(1.4rem, 3.2vw, 2rem); margin-bottom: 12px; }
.step p { color: var(--soft); }
.step .tape { color: #fff; }
.step-shot { max-width: 320px; width: 100%; margin: 0 auto; }

/* Print section */
.print { background: var(--tape); color: #fff; padding: clamp(48px, 8vw, 96px) 0; }
.print .lead { color: #c9c5ce; }
.print-grid { display: grid; gap: 36px; align-items: center; }
.layouts { list-style: none; display: grid; gap: 12px; margin: 26px 0; }
.layouts li { display: grid; gap: 2px; border-left: 4px solid var(--red); padding: 4px 0 4px 14px; }
.layouts strong { font-weight: 800; font-size: 1.1rem; }
.layouts span { color: #c9c5ce; }
.qr-note { background: #2b2731; border-radius: 10px; padding: 16px 18px; color: #e6e3e9; font-size: 0.98rem; }
.sheet { margin: 0; }
.sheet img { background: #fff; border-radius: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.sheet figcaption { margin-top: 12px; color: #c9c5ce; font-size: 0.95rem; text-align: center; }

/* More */
.more { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 6vw, 64px); }
.more-grid { list-style: none; display: grid; gap: 14px; }
.more-grid li { background: var(--label); border: 1px solid var(--die); border-radius: 12px; padding: 20px 20px 22px; position: relative; }
.more-grid li::before { content: ""; position: absolute; left: 20px; top: 0; width: 26px; height: 5px; background: var(--red); border-radius: 0 0 2px 2px; }
.more-grid h3 { font-size: 1.15rem; margin: 6px 0 6px; }
.more-grid p { color: var(--soft); font-size: 0.98rem; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.gallery .window { border-radius: 20px; padding: 7px; }
.gallery .shot { border-radius: 14px; }

/* FAQ */
.faq { padding: clamp(32px, 6vw, 64px) 0; }
.faq-wrap { max-width: 860px; }
.faq details { background: var(--label); border: 1px solid var(--die); border-radius: 12px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 800; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-weight: 900; font-size: 1.3rem; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; color: var(--soft); }

/* Closing */
.closing { padding: clamp(24px, 5vw, 48px) 0 clamp(48px, 8vw, 88px); }
.closing-label { display: grid; gap: 16px; justify-items: start; }
.closing-label h2 { font-size: clamp(1.8rem, 5vw, 3rem); }
.closing-label .tape { margin-bottom: 0; }

/* Inner pages */
.page { padding: clamp(24px, 5vw, 56px) 0 clamp(48px, 8vw, 88px); }
.page h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin-bottom: 16px; }
.legal h2 { font-size: 1.3rem; margin: 30px 0 8px; }
.legal p { color: var(--soft); }
.legal .lead { color: var(--ink); }
.toc { margin: 22px 0 0; padding-left: 1.4em; display: grid; gap: 6px; }
.howto { padding: 30px 4px 6px; }
.howto h2 { font-size: clamp(1.35rem, 3.5vw, 1.8rem); display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.howto .num { font-family: var(--mono); font-weight: 900; color: #fff; background: var(--tape); border-radius: 4px; font-size: 0.75em; padding: 0.15em 0.4em; flex: none; }
.howto p { color: var(--soft); }
.contact { margin-top: 36px; }
.contact h2 { font-size: 1.6rem; margin-bottom: 10px; }
.contact p + p { margin-top: 10px; }
.small { font-size: 0.95rem; color: var(--faint); }

/* Footer */
.foot { background: var(--label); border-top: 1px solid var(--die); padding: 28px 0 36px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-name { font-weight: 800; }
.foot-small { color: var(--faint); font-size: 0.92rem; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--ink); }

@media (min-width: 720px) {
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding: 34px 40px; }
  .step-flip .step-text { order: 2; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; }
  .print-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; }
  .more-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
