/* Phema — vizuál „Fama“: tmavá noc, zlatá a terakotová, pätkové nadpisy.
 * Spoločný základ pre účastníka, plátno aj moderátora. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-ext.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  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;
}

:root {
  color-scheme: dark;
  --bg: #15110e;
  --surface: #1f1915;
  --surface-2: #2a221c;
  --line: #3d3128;
  --text: #f3e9dc;
  --muted: #b3a291;
  --gold: #d9a441;
  --gold-soft: #d9a44126;
  --terra: #c4553a;
  --terra-soft: #c4553a2e;
  --ok: #8fb573;
  --radius: 14px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 85% -10%, #c4553a1f, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #d9a4411a, transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--body);
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }

a { color: var(--gold); }

button, input, textarea, select { font: inherit; color: inherit; }

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

.visually-hidden, .honeypot {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- značka ---- */

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--display); font-size: 1.5rem; font-weight: 700; font-style: italic; }

/* ---- ovládacie prvky ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--text);
  font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #1c140b; }
.btn-primary:hover { background: #e6b556; }
.btn-danger { color: #f0a08c; }
.btn-danger:hover { border-color: var(--terra); }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 0.875rem; }

.field { display: grid; gap: 6px; }
.field label { font-size: 0.875rem; color: var(--muted); }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
textarea.input { resize: vertical; min-height: 96px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}

.muted { color: var(--muted); }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--gold-soft); color: var(--gold);
}
.badge-terra { background: var(--terra-soft); color: #f0a08c; }
.badge-ok { background: #8fb57324; color: var(--ok); }

.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 50;
  transform: translate(-50%, 40px); opacity: 0;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--text); color: var(--bg); font-weight: 600;
  transition: transform 0.2s, opacity 0.2s; pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---- výsledky ankety (účastník aj plátno) ---- */

.bars { display: grid; gap: 10px; }
.bar { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.bar-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, var(--terra), var(--gold));
  opacity: 0.55; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar.is-mine .bar-fill { opacity: 0.85; }
.bar-row { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.bar-label { font-weight: 600; }
.bar-value { font-variant-numeric: tabular-nums; font-weight: 700; }

.cloud {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 4px 16px; padding: 8px; text-align: center;
}
.cloud span { font-family: var(--display); line-height: 1.1; transition: font-size 0.4s; }
.cloud .l1 { font-size: 1rem; color: var(--muted); }
.cloud .l2 { font-size: 1.25rem; color: #d8c6b2; }
.cloud .l3 { font-size: 1.6rem; color: #e8b97a; }
.cloud .l4 { font-size: 2rem; color: var(--gold); }
.cloud .l5 { font-size: 2.5rem; color: #e07a5a; font-weight: 700; }
.cloud .l6 { font-size: 3.1rem; color: var(--terra); font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
