/* ===========================================================================
   Wiktor Slemp Show — Text-In
   Black / red brutalist poster styling. Display type = Heading Now Heavy.
   The display font is ALREADY heavy — never bold/italic it. font-synthesis:none
   guarantees the browser can't fake a weight either.
   =========================================================================== */

@font-face {
  font-family: 'HeadingNow';
  src: url('/Heading-Now-58-Heavy-trial.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --panel: #0d0d0d;
  --panel-2: #111111;
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #8a8a8a;
  --muted-2: #b5b5b5;
  --red: #ec1d24;
  --red-deep: #c10f15;
  --ok: #34d27b;
  --warn: #ffcf5c;

  --display: 'HeadingNow', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-synthesis: none; /* never fake bold/italic on the heavy display font */
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Anything using the display font is locked to its real (heavy) weight */
.kicker, .headline, .label, .onair, .ticker, .btn, .foot, .rec-time, .att-remove {
  font-family: var(--display);
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
}

img { display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 5vw, 40px);
  border-bottom: 1px solid var(--line-soft);
}
.logo img { height: 26px; width: auto; }

.onair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 6px 12px;
}
.onair .dot { background: var(--red); }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: blink 1.6s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 56px) clamp(16px, 5vw, 40px) 40px;
  flex: 1;
}

/* ---- Hero ---- */
.hero { margin-bottom: 30px; }

.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--red);
}

.headline {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(46px, 13vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.005em;
  color: var(--text);
}

.lede {
  margin: 18px 0 0;
  max-width: 44ch;
  color: var(--muted-2);
  font-size: 16px;
  line-height: 1.5;
}

/* ---- Ticker ---- */
.ticker {
  overflow: hidden;
  background: var(--red);
  margin: 28px 0 34px;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
}
.ticker-track span {
  white-space: nowrap;
  color: #000;
  font-size: 24px;
  letter-spacing: 0.04em;
  padding: 9px 0;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- Form fields ---- */
.field { display: block; margin-bottom: 22px; position: relative; }

.label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 9px;
}
.label em { font-style: normal; opacity: 0.7; font-family: var(--body); text-transform: none; letter-spacing: 0; }

input[type="text"], textarea {
  width: 100%;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 14px 15px;
  font-family: var(--body);
  font-size: 16px; /* >=16px stops iOS zoom-on-focus */
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
  resize: vertical;
}
input[type="text"]::placeholder, textarea::placeholder { color: #5f5f5f; }
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  background: #121212;
  box-shadow: inset 0 0 0 1px var(--red);
}

.counter {
  position: absolute;
  right: 2px;
  bottom: -19px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Attachment preview ---- */
.attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px 12px;
  margin-bottom: 22px;
}
.att-body { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.att-img { width: 54px; height: 54px; object-fit: cover; border-radius: 2px; }
.att-audio { height: 38px; max-width: 100%; }
.att-name { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--body); }
.att-remove {
  flex: none;
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.att-remove:hover { border-color: var(--red); color: var(--red); }

/* ---- Recorder ---- */
.recorder {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(236, 29, 36, 0.08);
  border: 1px solid var(--red);
  border-radius: 2px;
  padding: 12px 14px;
  margin-bottom: 22px;
}
.rec-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--red);
  animation: blink 1s steps(2, start) infinite;
  flex: none;
}
.rec-time { font-variant-numeric: tabular-nums; color: var(--text); font-size: 15px; letter-spacing: 0.06em; font-family: var(--body); }
.bars { display: flex; align-items: center; gap: 3px; height: 22px; flex: 1; }
.bars i {
  display: block; width: 3px; height: 30%;
  background: var(--red);
  animation: eq 0.9s ease-in-out infinite;
}
.bars i:nth-child(2) { animation-delay: 0.1s; }
.bars i:nth-child(3) { animation-delay: 0.2s; }
.bars i:nth-child(4) { animation-delay: 0.3s; }
.bars i:nth-child(5) { animation-delay: 0.15s; }
.bars i:nth-child(6) { animation-delay: 0.25s; }
.bars i:nth-child(7) { animation-delay: 0.05s; }
@keyframes eq { 0%, 100% { height: 22%; } 50% { height: 100%; } }

/* ---- Buttons ---- */
.tools { display: flex; gap: 12px; margin-bottom: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 2px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.06s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: rgba(255, 255, 255, 0.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn.tool { flex: 1; }
.btn.tool.active { border-color: var(--red); color: var(--red); background: rgba(236, 29, 36, 0.08); }

.btn.send {
  width: 100%;
  background: var(--red);
  border-color: var(--red);
  color: #000;
  font-size: 18px;
  letter-spacing: 0.06em;
  padding: 17px 18px;
}
.btn.send:hover { background: #fff; border-color: #fff; color: #000; }
.btn.send .send-icon { stroke: #000; }

.btn.small { padding: 8px 13px; font-size: 13px; }
.btn.ghost { border-color: var(--line-soft); }

.btn.is-busy { pointer-events: none; }
.btn.is-busy .send-label::after {
  content: "";
  display: inline-block;
  width: 13px; height: 13px;
  margin-left: 4px;
  border: 2px solid rgba(0, 0, 0, 0.35);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -1px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Footer ---- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 24px);
  max-width: min(440px, 92vw);
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: #0a0a0a;
  color: var(--text);
  font-size: 14px;
  border-radius: 2px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 10px;
  background: var(--red);
  vertical-align: 1px;
}
.toast.ok::before { background: var(--ok); }
.toast.warn::before { background: var(--warn); }
.toast.err::before { background: var(--red); }

/* ---- Utility ---- */
.hidden { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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