/* =========================================================================
   OTC Foundation — styl. Sportovní, čisté, tmavá se žlutozeleným akcentem.
   ========================================================================= */
:root {
  --bg: #0b1018;
  --bg-alt: #0f1622;
  --panel: #16202e;
  --panel-2: #1b2838;
  --line: #25364a;
  --text: #e9eef5;
  --muted: #9fb1c6;
  --accent: #c7f501;        /* svítivě žlutozelená (OTC) */
  --accent-2: #e2fa63;      /* světlejší limetka pro popisky */
  --ink: #10180a;           /* tmavý text na limetce */
  --good: #2fd07a;
  --radius: 16px;
  --maxw: 1120px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--ink); }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Barlow Condensed", "Inter", sans-serif; letter-spacing: 0.3px; line-height: 1.05; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---- Buttons ---- */
.btn {
  --b: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.2rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
  background: transparent; color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn--primary:hover { background: #d6ff33; }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--lg { padding: 0.9rem 1.6rem; font-size: 1.05rem; }
.btn--text { background: none; border: none; color: var(--accent-2); padding: 0.4rem 0; font-weight: 600; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 16, 24, 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__logo { font-weight: 800; font-size: 1.15rem; text-decoration: none; display: flex; align-items: center; gap: 0.6rem; }
.nav__logo-badge {
  font-family: "Barlow Condensed", sans-serif; background: var(--accent); color: var(--ink);
  padding: 0.15rem 0.5rem; border-radius: 8px; font-weight: 800; letter-spacing: 1px;
}
.nav__logo-img { height: 24px; width: auto; display: block; }
.nav__links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav__links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav__links a:hover { color: var(--text); }
.nav__cta { margin-left: 0; }

/* ---- Hero ---- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,16,24,0.95) 0%, rgba(11,16,24,0.7) 45%, rgba(11,16,24,0.25) 100%); }
.hero__content { position: relative; z-index: 2; max-width: var(--maxw); width: 100%; margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem); }
.hero__eyebrow { text-transform: uppercase; letter-spacing: 3px; font-size: 0.8rem; color: var(--accent-2); font-weight: 600; margin: 0 0 0.6rem; }
.hero__title { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 800; text-transform: uppercase; max-width: 16ch; }
.hero__title span { color: var(--accent); }
.hero__tagline { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 46ch; margin: 1.1rem 0 1.8rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---- Countdown ---- */
.countdown { margin-top: 2.4rem; }
.countdown__label { display: block; text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.6rem; }
.countdown__grid { display: flex; gap: 0.6rem; }
.countdown__grid > div {
  background: rgba(22, 32, 46, 0.8); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.6rem 0.9rem; text-align: center; min-width: 64px;
}
.countdown__grid strong { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 2rem; font-weight: 700; }
.countdown__grid span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }

/* ---- Progress ---- */
.progress-wrap { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.progress { max-width: var(--maxw); margin: 0 auto; padding: 1.6rem clamp(1rem, 4vw, 2.5rem); }
.progress__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.progress__raised { font-family: "Barlow Condensed", sans-serif; font-size: 2rem; font-weight: 700; color: var(--good); }
.progress__goal { color: var(--muted); margin-left: 0.5rem; }
.progress__pct { font-family: "Barlow Condensed", sans-serif; font-size: 1.6rem; font-weight: 700; }
.progress__bar { height: 14px; background: var(--panel); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress__fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--good), var(--accent-2)); transition: width 0.6s ease; }
.progress__link { display: inline-block; margin-top: 0.7rem; color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.progress__link:hover { color: var(--text); }

/* ---- Sections ---- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.5rem); }
.section--alt { max-width: none; background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { margin-bottom: 2rem; }
.kicker { text-transform: uppercase; letter-spacing: 3px; font-size: 0.75rem; color: var(--accent); font-weight: 700; }
.section__head h2 { font-size: clamp(2rem, 4.5vw, 3rem); text-transform: uppercase; margin: 0.4rem 0; }
.section__lead { color: var(--muted); max-width: 60ch; }

/* ---- Story ---- */
.story { max-width: 70ch; }
.story__short { font-size: 1.15rem; }
.story__long p { color: var(--muted); }

/* ---- Give / contribute ---- */
.give { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: start; }
.give__presets { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.give__presets button {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  padding: 0.7rem 1.1rem; border-radius: 12px; font-weight: 600; cursor: pointer; font-size: 1rem;
}
.give__presets button.active, .give__presets button:hover { border-color: var(--accent); background: var(--panel-2); }
.give__custom { display: block; margin-bottom: 1.4rem; }
.give__custom span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
.give__custom input, .field input {
  width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  padding: 0.75rem 0.9rem; border-radius: 12px; font-size: 1rem;
}
.give__custom input:focus, .field input:focus { outline: none; border-color: var(--accent); }
.give__details { display: grid; gap: 0.6rem; margin: 0; }
.give__details > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: 0.5rem; }
.give__details dt { color: var(--muted); }
.give__details dd { margin: 0; font-weight: 600; text-align: right; }
.give__qr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; text-align: center; }
.qrbox { display: inline-flex; padding: 12px; background: #fff; border-radius: 12px; min-height: 160px; min-width: 160px; align-items: center; justify-content: center; }
.qrbox img, .qrbox canvas { display: block; }
.give__qr-amount { margin: 1rem 0 0.2rem; }

/* ---- Items / auction ---- */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.items__loading { color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card__media { aspect-ratio: 1 / 1; background: var(--panel-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card__cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent-2); font-weight: 700; }
.card__title { font-family: "Inter", sans-serif; font-size: 1.1rem; font-weight: 700; line-height: 1.25; }
.card__desc { color: var(--muted); font-size: 0.9rem; flex: 1; }
.card__price { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-top: 0.4rem; }
.card__price-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.card__price-val { font-family: "Barlow Condensed", sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--good); }
.card__bids { font-size: 0.78rem; color: var(--muted); }
.card .btn { margin-top: 0.4rem; }
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.badge--ended { background: rgba(255,90,44,0.15); color: var(--accent); }

/* ---- Auth banner ---- */
.auth-banner { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1.1rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.auth-banner .muted { margin: 0; }

/* ---- Steps ---- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.steps li { display: flex; gap: 0.9rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.steps li span { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 800; display: grid; place-items: center; font-family: "Barlow Condensed", sans-serif; font-size: 1.3rem; }
.steps li strong { display: block; margin-bottom: 0.2rem; }
.steps li p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---- Footer ---- */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 2.5rem); display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; border-top: 1px solid var(--line); }
.footer__acc { text-align: right; }
.footer__acc a { color: var(--accent-2); text-decoration: none; font-weight: 600; }
.footer__credit { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__logos { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer__logos a { display: inline-flex; align-items: center; opacity: 0.92; transition: opacity 0.2s ease; }
.footer__logos a:hover { opacity: 1; }
.footer__logos img { width: auto; display: block; }
.footer__logos .logo-onboard { height: 28px; }
.footer__logos .logo-montei { height: 20px; }

/* ---- Modal ---- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 8, 14, 0.7); backdrop-filter: blur(3px); }
.modal__card { position: relative; z-index: 1; width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.modal__x { position: absolute; top: 0.8rem; right: 1rem; background: none; border: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.modal__card h3 { font-family: "Inter", sans-serif; font-size: 1.3rem; margin-bottom: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
.note { font-size: 0.85rem; color: var(--muted); }
.check { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.88rem; color: var(--muted); margin: 0.2rem 0 1rem; cursor: pointer; }
.check input { margin-top: 0.2rem; flex: none; accent-color: var(--accent); }
.check a, .link-accent { color: var(--accent-2); }
.link-accent { text-decoration: none; font-weight: 600; white-space: nowrap; }
.terms { margin: 0.4rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; }
.terms li { margin-bottom: 0.55rem; }
.modal--top { z-index: 80; }
.note--good { color: var(--good); }
.note--err { color: #dc2626; }
.modal__item { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 1.1rem; }
.modal__item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }

/* ---- Polish: karty, badge, copy, hero ---- */
.card { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.card__media img { transition: transform 0.4s ease; }
.card:hover .card__media img { transform: scale(1.04); }

.badge--preview { background: rgba(255,180,61,0.14); color: var(--accent-2); }
.card__foot { display: flex; align-items: center; gap: 0.6rem; }
.card__media { position: relative; }
.media-badge {
  position: absolute; top: 10px; left: 10px; background: rgba(11,16,24,0.78);
  color: var(--accent-2); border: 1px solid var(--line); padding: 0.2rem 0.6rem;
  border-radius: 999px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.card__donor { font-size: 0.78rem; color: var(--accent-2); }

/* tlačítko kopírovat u údajů účtu */
.copy {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 0.15rem 0.5rem; font-size: 0.72rem; cursor: pointer;
  margin-left: 0.5rem; transition: all 0.15s ease;
}
.copy:hover { color: var(--text); border-color: var(--accent); }
.copy.copied { color: var(--good); border-color: var(--good); }
.give__details dd { display: inline-flex; align-items: center; }

/* jemný „glow" za hero claimem */
.hero__title { text-shadow: 0 2px 30px rgba(0,0,0,0.35); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero__eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); display: inline-block; }

/* pomocný režim pro renderování náhledu (?shot=1) — fixní výška hero */
html.shot .hero { min-height: 640px; }

/* scroll-reveal (aktivuje app.js; bez JS zůstane viditelné) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card__media img { transition: none; }
}

/* malý toast po zkopírování / akci */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 0.7rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 70;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- OTC logo: nav, watermark, pattern ---- */
.hero__watermark {
  position: absolute; right: -2%; bottom: -8%; width: 60%; max-width: 740px;
  opacity: 0.07; z-index: 1; pointer-events: none; user-select: none;
}
@media (max-width: 820px) { .hero__watermark { width: 130%; right: -15%; opacity: 0.05; } }

.logo-pattern { position: relative; isolation: isolate; }
.logo-pattern::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("assets/brand/otc-logo-lime.png");
  background-size: 190px auto; background-repeat: space; opacity: 0.035;
}

/* ---- Banner sekce (fotka z OTC) ---- */
.banner { position: relative; min-height: 58vh; display: flex; align-items: flex-end; overflow: hidden; border-top: 1px solid var(--line); }
.banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,16,24,0.35) 0%, rgba(11,16,24,0.55) 45%, rgba(11,16,24,0.94) 100%); }
.banner__content { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem); }
.banner__title { font-size: clamp(2rem, 5vw, 3.6rem); text-transform: uppercase; max-width: 18ch; }
.banner__title span { color: var(--accent); }
.banner__text { color: #cdd9e8; max-width: 54ch; margin: 1rem 0 1.6rem; }
html.shot .banner { min-height: 440px; }

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .nav__links { display: none; }
  .give { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; }
  .countdown__grid { flex-wrap: wrap; }
}
