/* BusFlow landing — tokeni, osnova i zajedničke komponente
   Paleta: bijela podloga + tri navy tona (#010736, #0D1C42, #22396F); krem (#FCF1D0) samo na navy površinama. */

:root {
  --ground: #FFFFFF;
  --ground-2: #EEF1F7;
  --ground-3: #F5F7FB;
  --surface: #FFFFFF;
  --surface-2: #F9FAFD;
  --on-ink: #FCF1D0;
  --on-ink-2: #C9CFE3;
  --on-ink-3: #E3E7F2;
  --muted-fill: #D9DEEA;
  --text: #010736;
  --text-2: #22396F;
  --text-3: #0D1C42;
  --text-muted: #7C89AD;
  --placeholder: #6B7AA3;
  --ink: #0D1C42;
  --ink-900: #010736;
  --ink-rgb: 13, 28, 66;
  --ink900-rgb: 1, 7, 54;
  --accent: #FCF1D0;
  --accent-rgb: 252, 241, 208;
  --accent-ink: #22396F;
  --accent-tint: #E3E7F2;
  --accent-strong: #22396F;
  --line-f: #5A6C99;
  --line-b: #22396F;
  --danger: #B3261E;
  --border: 1px solid rgba(var(--ink-rgb), 0.14);
  --shadow-card: 0 30px 60px -36px rgba(var(--ink900-rgb), 0.5);
  --font-display: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --font-body: 'Barlow', 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius: 16px;
  --header-h: 88px;
  --dur: 14s;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
html, body { overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid rgba(34, 57, 111, 0.45);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Složenice s crticom koje se ne smiju prelomiti (E-Mail, Go-live, Kick-off) */
.nobr { white-space: nowrap; }

.skip {
  position: absolute;
  left: 16px; top: -80px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s;
}
.skip:focus { top: 16px; }

.wrap {
  width: min(1200px, 100% - 32px);
  margin-inline: auto;
}

/* Tipografija */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--text);
}
.mono { font-family: var(--font-mono); }

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--light { background: var(--on-ink); color: var(--ink-900); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* Gumbi */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn svg { flex-shrink: 0; }
.btn--navy { background: var(--ink); color: var(--on-ink); }
.btn--navy:hover { background: var(--ink-900); }
.btn--cream { background: var(--on-ink); color: var(--ink-900); font-weight: 700; }
.btn--cream:hover { background: #FFFFFF; }
.btn--ghost { border-color: rgba(var(--ink-rgb), 0.14); background: var(--surface); color: var(--text); }
.btn--ghost:hover { background: var(--ground-2); }
.btn--ghost-dark { border-color: rgba(var(--accent-rgb), 0.35); color: var(--on-ink); }
.btn--ghost-dark:hover { background: rgba(var(--accent-rgb), 0.08); }
.btn--sm { height: 44px; padding: 0 18px; }
.btn--lg { height: 52px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* Kartice i pločice */
.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
}
.icon-tile {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ground-2);
  display: grid;
  place-items: center;
  color: var(--ink);
  flex-shrink: 0;
}
.icon-tile--sm { width: 36px; height: 36px; border-radius: 10px; }

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  text-decoration: none;
  color: inherit;
}
.logo__mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo__mark--sm { width: 34px; height: 34px; }
.logo__wm {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Čipovi statusa (crtež sučelja) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--ground-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.chip--warn { background: var(--ink); color: var(--on-ink); }
.chip--warn::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.chip--muted { background: transparent; color: var(--text-2); padding: 0; }

/* Polja obrasca (kratki upit: putna karta na početnim stranicama i upit.html) */
.q { display: flex; flex-direction: column; gap: 10px; }
.q__label, .q > legend { font-size: 16px; font-weight: 700; display: block; margin-bottom: 0; }
.q__label .opt, .q > legend .opt { font-weight: 400; color: var(--text-2); }
.q__hint { font-size: 13px; color: var(--text-2); }
.q__err { display: none; font-size: 13px; color: var(--danger); font-weight: 600; }
.q.is-invalid .q__err { display: block; }
.field {
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(var(--ink-rgb), 0.22);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.field::placeholder { color: var(--placeholder); }
.field:focus { border-color: var(--ink); outline: 3px solid rgba(34, 57, 111, 0.25); outline-offset: 1px; }
.field--area { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
select.field {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230D1C42' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.q.is-invalid .field { border-color: var(--danger); }
.form-status { font-size: 14px; font-weight: 600; color: var(--danger); }
/* prazan ostaje u stablu pristupačnosti (role=alert), samo bez razmaka koji bi dodao flex gap */
.form-status:empty { margin-top: -18px; }

/* Čipovi (radio kao gumbi: broj vozila) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(var(--ink-rgb), 0.22);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.chips span::before {
  content: "";
  width: 0; height: 14px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FCF1D0' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: width 0.12s;
}
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 600; padding-left: 10px; }
.chips input:checked + span::before { width: 14px; }
.chips input:focus-visible + span { outline: 3px solid rgba(34, 57, 111, 0.45); outline-offset: 2px; }
.chips span:hover { border-color: rgba(var(--ink-rgb), 0.5); }
.q.is-invalid .chips span { border-color: var(--danger); }

/* Kratki upit: polja, zamka za robote, gumb za termin ispod obrasca i potvrda nakon slanja */
.upit-fields { display: flex; flex-direction: column; gap: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.upit-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ground-2);
}
.upit-alt__text { flex: 1 1 240px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.upit-alt__text strong { color: var(--text); }
.upit-done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.upit-done__title:focus { outline: none; }
.upit-done__title { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.05; }
.upit-done__text { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.upit-done__buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.upit-done__status { font-size: 13px; color: var(--text-2); }
.upit-done__pre {
  align-self: stretch;
  margin: 4px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.upit-done__edit {
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.upit-done__edit:hover { color: var(--text); }
.tag--warn { background: var(--danger); color: #FFFFFF; }

@media (max-width: 560px) {
  .upit-done__buttons { align-self: stretch; flex-direction: column; align-items: stretch; }
  .upit-done__buttons .btn, .upit-alt__btn { width: 100%; }
}
