/* Śmieciominacz / TrashFlash teaser: one screen, same look as the landing page (landing/landing.css):
   cream paper, ink outlines, hard offset shadows, fraction-colour stripes, amber LCD. Light and flat, no blur.
   Pixelify Sans (OFL, bundled in fonts/) draws capital Z like "2", B like "8" and 5 like "S",
   so it is kept to headings and short labels; buttons and body text use the system font. */

@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(fonts/pixelify-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(fonts/pixelify-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f3ead7;
  --dots: #ddceae;
  --surface: #fffaf0;
  --ink: #231f3d;
  --muted: #6b6480;
  --orange: #ff6b35;
  --mustard: #f7b32b;
  --teal: #18a999;
  --accent: var(--orange);
  --panel: #231f3d;
  --amber: #ffb547;
  --shadow-sm: 3px 3px 0 var(--ink);
  --c-paper: #3b82f6;
  --c-glass: #22c55e;
  --c-metals_plastics: #facc15;
  --c-bio: #ef4444;
  --c-mixed: #ffffff;
  --mp-ink: #a16207; /* metals & plastics yellow, dark enough for text on cream */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pixel: "Pixelify Sans", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--bg) radial-gradient(var(--dots) 1.2px, transparent 1.3px) 0 0 / 22px 22px;
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

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

/* ---- top bar ---------------------------------------------------------- */

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--panel); /* dark navy like the device body; wordmark colours for dark backgrounds per brand/README.md */
  color: var(--surface);
  border-bottom: 2px solid var(--ink);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px; /* below the header's 2px ink border, so the strip is framed by ink on both sides */
  height: 8px;
  /* The five fraction colours in device order (J1..J5), between two ink rules so the white reads on cream. */
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(90deg, var(--c-paper) 0 20%, var(--c-glass) 20% 40%, var(--c-metals_plastics) 40% 60%, var(--c-bio) 60% 80%, var(--c-mixed) 80%);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand-name { font-family: var(--pixel); font-weight: 700; font-size: 26px; letter-spacing: 0.01em; white-space: nowrap; }
.brand-name .b2 { color: var(--c-metals_plastics); }

/* Logo marks (brand/README.md): an inline sprite in index.html, coloured via --c. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.logo { display: block; flex: none; width: 40px; height: 40px; }
/* On the navy bar the mark's dark bezel blends in: a thin mustard ring outlines it. */
.topbar .logo { border-radius: 50%; box-shadow: 0 0 0 2px var(--mustard); }

.lang {
  min-width: 46px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 2px solid var(--surface);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--mustard);
  font-weight: 750;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.lang:active { transform: translate(2px, 2px); box-shadow: none; }

/* ---- typography ------------------------------------------------------- */

h1 { margin: 14px 0 0; font-family: var(--pixel); font-weight: 600; font-size: 38px; line-height: 1.12; letter-spacing: 0; font-variant-ligatures: none; }

.lead { margin-top: 12px; color: var(--muted); font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.eyebrow {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--amber);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 14px;
  border: 2px solid var(--ink);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.06s, box-shadow 0.06s, background 0.15s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: #ff7f50; }

/* ---- hero ------------------------------------------------------------- */

.hero { flex: 1; display: flex; align-items: center; padding: 44px 0 40px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }

.ticks { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ticks li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--surface);
  font-size: 14px;
  font-weight: 650;
}
.ticks li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='4'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.cta-row { display: flex; margin: 26px 0 12px; }

/* ---- device ----------------------------------------------------------- */

/* Like the real device (brand/device-vertical.svg): one column of buttons, J1..J5 top to bottom,
   with the fraction icon printed beside each. The device has no screen, so the LCD sits below it as a caption. */
.hero-device { display: flex; flex-direction: column; align-items: center; margin: 0; }
/* Container for the LCD font size below; wide enough for the longest message on one line at 14px. */
.hero-device figcaption { width: 100%; max-width: 440px; margin-top: 26px; container-type: inline-size; }

.device-body {
  padding: 16px 22px 18px 18px;
  border-radius: 24px;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink), 6px 6px 0 2px var(--mustard);
}

.device-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 12px 4px; }
/* Normal case on purpose: in Pixelify Sans an uppercase Z reads as "2" (ŚMIECIOMINAC2). */
.device-name {
  font-family: var(--pixel);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: rgba(255, 250, 240, 0.6);
}
.stripes { display: flex; gap: 3px; transform: skewX(-20deg); }
/* Fraction colours in device order (J1..J5), as on the buttons below. */
.stripes i { width: 6px; height: 14px; background: var(--c-paper); }
.stripes i:nth-child(2) { background: var(--c-glass); }
.stripes i:nth-child(3) { background: var(--c-metals_plastics); }
.stripes i:nth-child(4) { background: var(--c-bio); }
.stripes i:nth-child(5) { background: var(--c-mixed); }

.orbs { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.slot {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: none;
}
.slot:hover .orb { border-color: #57507f; }
.slot:active .orb { transform: scale(0.94); }

.slot-icon { flex: none; width: 34px; height: 39px; color: rgba(255, 250, 240, 0.78); }

.orb {
  position: relative;
  display: block;
  flex: none;
  width: clamp(52px, 15vw, 62px);
  aspect-ratio: 1;
  border-radius: 50%;
  /* Unlit cap: the fraction colour, dimmed (like brand/device-vertical.svg), so each button is recognisable when off. */
  background: color-mix(in srgb, var(--c) 35%, #2c2848);
  border: 3px solid #3a3558;
  transition: transform 0.06s;
}
.orb::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent), 0 0 26px 6px color-mix(in srgb, var(--c) 50%, transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.orb.pulse::after { animation: pulse var(--dur, 1.6s) ease-in-out infinite; }
.orb.blink::after { animation: blink-n 0.6s steps(2, jump-none) var(--n, 3) both; }
.orb.ack::after { animation: ack 0.9s steps(3, end) both; }

@keyframes pulse { 0%, 100% { opacity: 0.08; } 50% { opacity: 1; } }
@keyframes blink-n { from { opacity: 1; } to { opacity: 0; } }
@keyframes ack { from { opacity: 1; } to { opacity: 0; } }

.lcd {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 9px 12px;
  white-space: nowrap;
  overflow: hidden;
  border-radius: 10px;
  background: #15122a repeating-linear-gradient(0deg, rgba(255, 181, 71, 0.06) 0 1px, transparent 1px 3px);
  border: 2px solid #3a3558;
  font-family: var(--mono);
  /* One line always: the longest message (~41 mono chars + prompt + cursor, about 26.5em + 52px with
     padding and gaps) shrinks the font on narrow screens instead of wrapping. */
  font-size: 14px;
  font-size: min(14px, calc((100cqw - 52px) / var(--lcd-em, 26.5)));
  line-height: 1.35;
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255, 181, 71, 0.45);
}
.lcd-prompt { opacity: 0.7; }
.lcd-text::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 4px;
  vertical-align: -0.12em;
  background: var(--amber);
  animation: cursor 1s steps(1) infinite;
}
@keyframes cursor { 50% { opacity: 0; } }

.device-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
}
.device-hint::before { content: "↑ "; color: var(--accent); }

/* ---- footer ----------------------------------------------------------- */

.footer { padding: 18px 0 calc(18px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 2px solid var(--ink); }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.footer a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---- responsive ------------------------------------------------------- */

/* Single column (phones, tablets): the device moves up between the headline and the lead,
   so it is seen without scrolling. The copy's children join the column through display: contents. */
@media (max-width: 959px) {
  .hero { padding-top: 32px; }
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy .eyebrow { order: 1; align-self: flex-start; }
  .hero-copy h1 { order: 2; }
  .hero-device { order: 3; margin: 26px 0 30px; }
  .hero-copy .lead { order: 4; margin-top: 0; }
  .hero-copy .ticks { order: 5; }
  .hero-copy .cta-row { order: 6; }
  .hero-copy > .small { order: 7; }
}

@media (max-width: 559px) {
  .cta-row .btn { width: 100%; }

  /* Compact device, so it fits above the fold with the headline. */
  .device-body { padding: 12px 18px 14px 14px; }
  .device-top { margin-bottom: 8px; }
  .orbs { gap: 0; }
  .slot { gap: 16px; padding: 5px; }
  .orb { width: 46px; }
  .slot-icon { width: 28px; height: 32px; }
  .hero-device figcaption { margin-top: 20px; }
  .device-hint { margin-top: 10px; }

  /* The LCD uses short fraction names here (teaser.js), so the longest message is ~20.5em, not ~26.5em. */
  .lcd { --lcd-em: 20.5; }
}

@media (min-width: 760px) {
  h1 { font-size: 48px; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
  h1 { font-size: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .orb.pulse::after { animation: none; opacity: 1; }
}
