/* Rivalové.cz — modern public UI */

:root {
  --bg: #0b1210;
  --bg-deep: #121a16;
  --surface: #18241e;
  --surface-2: #1e2e26;
  --ink: #eef5f0;
  --muted: #9aafa3;
  --forest: #1b4a35;
  --forest-2: #266348;
  --accent: #2f9e5f;
  --accent-hover: #3bb872;
  --accent-soft: #8fd4a8;
  --danger: #e85d4c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --max: 1040px;
  --font: "Archivo Black", "Arial Black", "Segoe UI", sans-serif;
  --font-ui: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.public-body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1000px 480px at 80% -20%, rgba(47, 158, 95, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  min-height: 100vh;
}

a {
  color: var(--accent-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

.public-skip {
  position: absolute;
  left: -9999px;
}

.public-skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.public-wrap {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.public-header {
  background: rgba(8, 14, 12, 0.85);
  backdrop-filter: blur(14px);
  color: #f4faf6;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.public-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.public-logo {
  font-family: var(--font);
  font-size: 1.45rem;
  font-weight: 400;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.public-logo:hover {
  color: var(--accent-soft);
}

.public-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
}

.public-nav {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0 1rem;
  list-style: none;
  margin: 0;
}

.public-nav.is-open {
  display: flex;
}

.public-nav a {
  display: block;
  color: #eaf5ee;
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-weight: 500;
}

.public-nav a:hover,
.public-nav a.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.public-nav__cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
  text-align: center;
  margin-top: 0.35rem;
  border-radius: 12px;
}

.public-nav__cta:hover {
  background: var(--accent-hover) !important;
}

@media (min-width: 960px) {
  .public-nav-toggle {
    display: none;
  }

  .public-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
    padding: 0;
    flex: 1;
    justify-content: flex-end;
  }

  .public-nav a {
    padding: 0.45rem 0.75rem;
    font-size: 0.98rem;
  }

  .public-nav__cta {
    margin-top: 0;
    margin-left: 0.55rem;
    padding-inline: 1.05rem !important;
  }
}

/* Main */
.public-main {
  padding: 1.5rem 0 3rem;
}

.public-main--bleed {
  padding: 0 0 3rem;
  overflow-x: hidden;
}

.public-panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  box-shadow: var(--shadow);
  color: var(--ink);
  overflow: hidden;
}

.public-main:not(.public-main--bleed) .public-panel.public-panel--auth,
.public-panel.public-panel--auth {
  max-width: 440px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.public-panel--auth h1 {
  font-family: var(--font);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.public-content.public-form,
.public-form {
  padding: 1.5rem;
}

.public-lead {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.public-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3rem;
  padding: 0.7rem 1.3rem;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  transition: transform 0.15s ease, background 0.15s ease;
}

.public-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.public-btn--green {
  background: var(--accent);
}

.public-btn--green:hover {
  background: var(--accent-hover);
}

.public-login {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* Convert split (login + new player) */
.convert {
  padding: 3.5rem 1.5rem;
}

.convert__grid {
  display: grid;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 800px) {
  .convert__grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.convert__new {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.convert__new h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.convert__new ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.convert__new li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.convert__new li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  flex: none;
  transform: translateY(-2px);
}

.convert__new .btn {
  margin-top: auto;
  align-self: flex-start;
}

.public-login h2 {
  margin: 0 0 1rem;
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.public-field {
  margin-bottom: 0.85rem;
}

.public-field label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-weight: 600;
}

.public-field input[type="text"],
.public-field input[type="password"],
.public-field input[type="email"],
.public-form input[type="text"],
.public-form input[type="password"],
.public-form input[type="email"] {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: var(--surface-2);
  font: inherit;
  color: var(--ink);
}

.public-field input:focus,
.public-form input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 158, 95, 0.35);
  border-color: var(--accent);
}

.public-form > .public-btn {
  margin-top: 0.4rem;
}

.public-radio-group {
  display: flex;
  gap: 1.25rem;
}

.public-radio,
.public-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}

.public-radio input[type="radio"],
.public-checkbox input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.public-login__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.85rem;
  font-size: 0.95rem;
}

.public-alert {
  background: rgba(232, 93, 76, 0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 700;
}

.public-alert--ok {
  background: rgba(47, 158, 95, 0.15);
  border-color: var(--accent);
  color: var(--accent-soft);
}

/* Village autocomplete (naseptavac.php) */
.naseptavac-wrap {
  position: relative;
}

#naseptavacDiv {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  visibility: hidden;
}

.naseptavac-select {
  width: 100%;
  margin-top: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: var(--surface-2);
  font: inherit;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.naseptavac-select option {
  padding: 0.5rem 0.7rem;
}

.naseptavac-select option:checked,
.naseptavac-select option:hover {
  background: var(--accent-soft);
}

.naseptavac-empty {
  margin-top: 0.3rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.9rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* ================================================================
   Homepage v2 — hero, live preview, stats, final CTA
   ================================================================ */

.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  background:
    radial-gradient(760px 560px at 82% 40%, rgba(47, 158, 95, 0.24), transparent 67%),
    radial-gradient(680px 420px at 8% 110%, rgba(27, 74, 53, 0.32), transparent 70%),
    linear-gradient(135deg, #070b09 0%, #0b1210 52%, #101a14 100%);
  color: #fff;
  padding: 3.5rem 1.5rem;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    min-height: min(calc(100vh - 4.5rem), 720px);
    padding: 4.5rem 1.5rem;
  }

  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
    min-height: inherit;
  }
}

.hero__brand {
  margin: 0 0 0.75rem;
  font-family: var(--font);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: rgba(184, 230, 200, 0.12);
  border: 1px solid rgba(184, 230, 200, 0.3);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 158, 95, 0.35);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hero h1 .accent-text {
  background: linear-gradient(100deg, var(--accent-soft), var(--accent) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.hero__lead {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: 1.12rem;
  line-height: 1.6;
  color: rgba(244, 250, 246, 0.88);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3.1rem;
  padding: 0 1.6rem;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(47, 158, 95, 0.35);
}

.btn--accent:hover {
  background: #35b56a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(47, 158, 95, 0.45);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateY(-2px);
}

.hero__art {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero__art::before {
  content: "";
  position: absolute;
  inset: 8% 0 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(143, 212, 168, 0.28), rgba(47, 158, 95, 0.12) 38%, transparent 72%);
  filter: blur(4px);
}

.hero__char {
  position: relative;
  z-index: 1;
  width: min(330px, 82%);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.58));
}

/* Homepage mid and bottom sections */
.showcase {
  padding: 4.5rem 0;
  text-align: center;
}

.showcase__head {
  max-width: 34rem;
  margin: 0 auto 2.25rem;
}

.showcase__head h2 {
  font-family: var(--font);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.showcase__head p {
  color: var(--muted);
  margin: 0;
}

.browser-frame {
  max-width: var(--max);
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}

.browser-frame__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.browser-frame__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.browser-frame__bar span:first-child { background: #f0a7a1; }
.browser-frame__bar span:nth-child(2) { background: #f3d68a; }
.browser-frame__bar span:nth-child(3) { background: #9bd6ae; }

.browser-frame__body {
  padding: 1.25rem;
  background: #0f1813;
}

.browser-frame__body .resource-chip {
  font-size: 0.85rem;
}

.browser-frame__body .building-card-list {
  margin-top: 0.75rem;
}

/* Steps ("Jak to funguje") */
.steps {
  padding: 4.5rem 0 0;
}

.steps__grid {
  display: grid;
  gap: 0;
  margin: 0 auto;
}

@media (min-width: 700px) {
  .steps__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .step + .step {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
  }

  .step:not(:last-child) {
    padding-right: 2rem;
  }
}

@media (max-width: 699px) {
  .step {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .step:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.step__num {
  display: block;
  color: var(--accent-soft);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.9rem;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font);
  letter-spacing: -0.02em;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Stats band */
.stats-band {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.35rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

@media (min-width: 700px) {
  .stats-band {
    flex-direction: row;
    gap: 0;
  }

  .stats-band__item + .stats-band__item {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }
}

.stats-band__item {
  flex: 1;
}

.stats-band__item strong {
  display: block;
  font-family: var(--font);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 400;
  color: var(--accent-soft);
}

.stats-band__item span {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Final CTA band */
.cta-band {
  margin-top: 4.5rem;
  padding: 3rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background:
    radial-gradient(500px 260px at 90% 0%, rgba(47, 158, 95, 0.22), transparent 60%),
    linear-gradient(135deg, var(--surface-2), var(--surface));
  color: #fff;
  text-align: center;
}

.cta-band h2 {
  font-family: var(--font);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.cta-band p {
  margin: 0 0 1.5rem;
  color: rgba(244, 250, 246, 0.85);
}

.cta-band .btn {
  min-width: 220px;
}

.public-content {
  padding: 1.5rem;
  color: var(--ink);
}

.public-content h1,
.public-content h2 {
  font-family: var(--font);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
}

.public-content h1 {
  margin: 0 0 1rem;
}

.public-content h2 {
  margin: 1.25rem 0 0.75rem;
}

.public-content p,
.public-content li {
  color: var(--ink);
}

.public-content input[type="text"],
.public-content input[type="email"],
.public-content input[type="password"],
.public-content input[type="search"],
.public-content input[type="tel"],
.public-content input[type="url"],
.public-content input[type="number"],
.public-content input:not([type]),
.public-content select,
.public-content textarea {
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
}

.public-content input[type="text"]:focus,
.public-content input[type="email"]:focus,
.public-content input[type="password"]:focus,
.public-content input[type="search"]:focus,
.public-content input[type="tel"]:focus,
.public-content input[type="url"]:focus,
.public-content input[type="number"]:focus,
.public-content input:not([type]):focus,
.public-content select:focus,
.public-content textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 158, 95, 0.35);
}

.public-content input[type="submit"],
.public-content input[type="button"],
.public-content input[type="reset"],
.public-content button:not(.public-btn) {
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent) !important;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.public-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.public-content th,
.public-content td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.public-content .hlavicka td {
  background: var(--forest-2);
  color: #fff;
  font-weight: 700;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.public-help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.public-help-nav a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  text-decoration: none;
  color: var(--accent-soft);
  font-size: 0.95rem;
}

.public-help-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.public-table-wrap,
.public-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.public-table-wrap table,
.public-table-scroll table {
  min-width: 480px;
}

.public-form table {
  width: 100%;
  border-collapse: collapse;
}

.public-form td {
  padding: 0.45rem 0;
  vertical-align: top;
}

.public-form td:first-child {
  padding-right: 0.75rem;
  width: 40%;
  font-weight: 700;
}

@media (max-width: 639px) {
  .public-form table,
  .public-form tbody,
  .public-form tr,
  .public-form td {
    display: block;
    width: 100%;
  }

  .public-form td:first-child {
    padding-bottom: 0.15rem;
  }
}

/* Footer */
.public-footer {
  background: var(--surface);
  color: var(--muted);
  padding: 2rem 0;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.public-footer a {
  color: var(--muted);
  text-decoration: none;
}

.public-footer a:hover {
  color: var(--accent-soft);
}

.public-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.public-footer__copy {
  opacity: 0.9;
  margin: 0;
}

body.public-body #page,
body.public-body #content,
body.public-body #container {
  width: auto;
  max-width: none;
  float: none;
  background: transparent;
  margin: 0;
  padding: 0;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .public-btn {
    transition: none;
  }
}
