/* Travel Radar — trojmiasto.online logo palette (navy / teal / gold) */
:root {
  --bg: #eef3f7;
  --bg-deep: #d9e4ee;
  --ink: #0e3056;
  --ink-soft: #3d566e;
  --line: rgba(14, 48, 86, 0.14);
  --teal: #48a6a8;
  --teal-deep: #2f8588;
  --gold: #dab771;
  --gold-deep: #b8923f;
  --cyan: var(--teal);
  --cyan-deep: var(--teal-deep);
  --coral: var(--gold-deep);
  --coral-soft: var(--gold);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #f5f8fb;
  --shadow: 0 24px 60px rgba(14, 48, 86, 0.12);
  --radius: 18px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-board: "Share Tech Mono", "Chakra Petch", ui-monospace, monospace;
  --font-ui-num: "Chakra Petch", "Share Tech Mono", system-ui, sans-serif;
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(72, 166, 168, 0.2), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(218, 183, 113, 0.18), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--cyan-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--coral); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  backdrop-filter: blur(14px);
  background: rgba(231, 238, 243, 0.78);
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.pulse-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(218, 183, 113, 0.55);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(218, 183, 113, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(218, 183, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(218, 183, 113, 0); }
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  align-items: center;
}
.top-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.top-nav a:hover { color: var(--ink); }
.top-nav .ext { color: var(--cyan-deep); }

/* —— Hero: one composition —— */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: clamp(2rem, 6vw, 5rem) 1.25rem 4rem;
  overflow: hidden;
}

.hero-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  inset: 10% 5% auto;
  height: 55%;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(0, 194, 184, 0.28), transparent 55%),
    radial-gradient(ellipse at 70% 50%, rgba(255, 90, 54, 0.18), transparent 50%);
  filter: blur(8px);
  animation: glowShift 10s ease-in-out infinite alternate;
}

@keyframes glowShift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.05); }
}

.routes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.route {
  fill: none;
  stroke: url(#routeGrad);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 12 18;
  animation: dash 18s linear infinite;
}

.r2 { animation-duration: 22s; animation-direction: reverse; opacity: 0.75; }
.r3 { animation-duration: 26s; opacity: 0.55; stroke-width: 1.6; }

@keyframes dash {
  to { stroke-dashoffset: -420; }
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.brand-hero {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--ink);
  text-wrap: balance;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
  max-width: 22ch;
}

.lede {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 38ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: var(--ink);
  color: #fff;
}
.btn.primary:hover { background: #14233a; color: #fff; }
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn.small { padding: 0.45rem 0.9rem; font-size: 0.9rem; font-weight: 600; }

section {
  padding: 3.5rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}
.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  letter-spacing: -0.03em;
}
.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

/* —— Radar —— */
.radar-section { max-width: none; padding-left: 0; padding-right: 0; }
.radar-section .section-head { padding: 0 1.25rem; margin-left: auto; margin-right: auto; max-width: var(--max); }

.radar-stage {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .radar-stage { grid-template-columns: 1fr 180px; align-items: stretch; }
}

.europe-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  min-height: 280px;
  border-radius: var(--radius);
  background: #9eb8cc;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-grid path {
  fill: none;
  stroke: rgba(14, 48, 86, 0.08);
  stroke-width: 1;
}

.land-base {
  fill: #d7e2ec;
  stroke: rgba(14, 48, 86, 0.28);
  stroke-width: 0.9;
  stroke-linejoin: round;
  pointer-events: none;
}

.land-mute {
  fill: none;
  stroke: rgba(14, 48, 86, 0.14);
  stroke-width: 0.55;
  stroke-linejoin: round;
  pointer-events: none;
}

.country-shape {
  fill: #edf4f8;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.15s ease, stroke-width 0.15s ease;
}
.country-shape:hover { fill: #d7eef0; }
.country-shape.has-deals { fill: #cfe8ea; }
.country-shape.hot { fill: #e8d9b4; }
.country-shape.active {
  fill: var(--teal);
  stroke-width: 1.8;
}

.country-node { cursor: pointer; pointer-events: auto; }
.country-node .node-core {
  fill: var(--ink);
  stroke: #fff;
  stroke-width: 1.5;
}
.country-node.active .node-core,
.country-node:hover .node-core {
  fill: var(--teal-deep);
  stroke: #fff;
}
.country-node.hot .node-core { fill: var(--gold-deep); }
.country-node .node-label {
  fill: var(--ink);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  pointer-events: none;
  paint-order: stroke fill;
  stroke: rgba(238, 243, 247, 0.9);
  stroke-width: 3px;
}
.country-node .node-count {
  fill: #fff;
  font-family: var(--font-board);
  font-size: 11px;
  font-weight: 400;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.radar-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}
@media (min-width: 900px) {
  .radar-stats { grid-template-columns: 1fr; }
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  backdrop-filter: blur(8px);
}
.stat span {
  display: block;
  font-family: var(--font-board);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-transform: lowercase;
}
.stat.accent span { color: var(--gold-deep); }

/* —— Board —— */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.mode-toggle {
  display: inline-flex;
  padding: 0.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  gap: 0.15rem;
}

.mode {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}
.mode.on {
  background: var(--ink);
  color: #fff;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.search input {
  width: min(260px, 70vw);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  color: var(--ink);
}
.search input:focus {
  outline: 2px solid rgba(72, 166, 168, 0.45);
  outline-offset: 1px;
}

.active-country {
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--cyan-deep);
}

.deal-board {
  display: grid;
  gap: 0.65rem;
}

.deal-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 0.95rem 1.05rem;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
  animation: rowIn 0.35s ease both;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.deal-row:hover {
  border-color: rgba(72, 166, 168, 0.55);
  transform: translateX(2px);
}
.deal-row:nth-child(odd) { animation-delay: 0.02s; }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.deal-mode {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  background: rgba(72, 166, 168, 0.14);
}
.deal-mode.rail { background: rgba(10, 22, 40, 0.08); }
.deal-mode.bus { background: rgba(218, 183, 113, 0.22); }

.deal-main { min-width: 0; }
.deal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.deal-meta {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deal-side {
  text-align: right;
  display: grid;
  gap: 0.25rem;
  justify-items: end;
}
.deal-price {
  font-family: var(--font-board);
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.deal-price small { font-size: 0.78rem; font-weight: 400; opacity: 0.75; letter-spacing: 0.02em; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(218, 183, 113, 0.22);
  color: var(--gold-deep);
}
.badge.tricity {
  background: rgba(72, 166, 168, 0.16);
  color: var(--teal-deep);
}
.badge.ok {
  background: rgba(10, 22, 40, 0.06);
  color: var(--ink-soft);
}

.empty { color: var(--ink-soft); }

@media (max-width: 640px) {
  .deal-row { grid-template-columns: auto 1fr; }
  .deal-side { grid-column: 2; text-align: left; justify-items: start; }
}

/* —— Tip —— */
.tip-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}
.tip-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.tip-form .wide { grid-column: 1 / -1; }
.tip-form input,
.tip-form textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.tip-form input:focus,
.tip-form textarea:focus {
  outline: 2px solid rgba(72, 166, 168, 0.4);
  outline-offset: 1px;
}
.tip-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.tip-status { grid-column: 1 / -1; margin: 0; min-height: 1.25em; font-weight: 600; }
.tip-status.ok { color: var(--cyan-deep); }
.tip-status.err { color: var(--coral); }

@media (max-width: 640px) {
  .tip-form { grid-template-columns: 1fr; }
  .top-nav .ext { display: none; }
}

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.foot a { color: var(--ink); text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--coral); }
.foot-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.fine { margin: 0; font-size: 0.82rem; opacity: 0.85; }

/* —— Dialog —— */
.deal-dialog {
  border: 0;
  border-radius: 20px;
  padding: 0;
  max-width: min(520px, calc(100vw - 2rem));
  width: 100%;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.deal-dialog::backdrop {
  background: rgba(10, 22, 40, 0.45);
  backdrop-filter: blur(4px);
}
.dialog-inner { margin: 0; padding: 1.35rem 1.35rem 1.5rem; position: relative; }
.dialog-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}
.dialog-body h3 {
  margin: 0 1.5rem 0.5rem 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}
.dialog-summary { margin: 0 0 1rem; color: var(--ink-soft); }
.dialog-price {
  font-family: var(--font-board);
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0 0 0.25rem;
  font-variant-numeric: tabular-nums;
}
.dialog-until { margin: 0 0 1.1rem; font-size: 0.9rem; color: var(--ink-soft); }
.score-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(10, 22, 40, 0.08);
  overflow: hidden;
  margin: 0 0 1.1rem;
}
.score-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius: inherit;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
