/* ==========================================================================
   Camppy marketing site
   Static CSS — no build step, no external requests (GDPR-safe by default).
   Naming: BEM blocks + `.is-` state modifiers, matching the app convention.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

/* Reset u :where() → specificity 0, pa ga svaka klasa komponente nadjača. */
:where(ul[class], ol[class]) { list-style: none; margin: 0; padding: 0; }

img, svg { max-width: 100%; display: block; }

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

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* --------------------------------------------------------------------------
   2. Design tokens — mirrored from the app (src/styles/base/_variables.scss)
   -------------------------------------------------------------------------- */
:root {
  /* Brand — Ocean Blue */
  --brand-25:  #F0F9FF;
  --brand-50:  #E0F2FE;
  --brand-100: #BAE6FD;
  --brand-200: #7DD3FC;
  --brand-300: #38BDF8;
  --brand-400: #0EA5E9;
  --brand-500: #0284C7;
  --brand-600: #0369A1;
  --brand-700: #075985;
  --brand-800: #0C4A6E;
  --brand-900: #0A3A56;

  /* Neutrals */
  --gray-25:  #FCFCFD;
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D2D6DB;
  --gray-400: #9DA4AE;
  --gray-500: #6C737F;
  --gray-600: #4D5761;
  --gray-700: #384250;
  --gray-800: #1F2A37;
  --gray-900: #111927;

  /* Status */
  --success-50:  #F3FEE7;
  --success-500: #66C61C;
  --success-700: #3B7C0F;
  --warning-50:  #FEF6EE;
  --warning-500: #EF6820;
  --warning-700: #B93815;

  /* Booking situation — mirrored from the app (src/assets/global.css).
     On :root because the hero board and the "How it works" mini crops share
     them; colour always travels with a text label, never alone. */
  --turnover: #7A5AF8;
  --checkout: #F79009;
  --checkin:  #2E90FA;
  --problem:  #F63D68;

  /* Semantic surfaces */
  --bg:            #FFFFFF;
  --bg-subtle:     var(--gray-50);
  --bg-raised:     #FFFFFF;
  --text:          var(--gray-900);
  --text-soft:     var(--gray-600);
  --text-muted:    var(--gray-500);
  --border:        var(--gray-200);
  --border-strong: var(--gray-300);

  /* Type */
  --font: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 22px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, .1), 0 2px 4px -2px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, .08), 0 4px 6px -2px rgba(16, 24, 40, .03);
  --shadow-xl: 0 24px 48px -12px rgba(16, 24, 40, .18);

  /* Layout */
  --container: 1140px;
  --gutter: 24px;
}

/* --------------------------------------------------------------------------
   2b. Dark theme — BACKUP ONLY, opt-in.
   Light is the design. Dark does NOT follow the OS setting on purpose:
   it activates only when <html data-theme="dark"> is set explicitly.
   To bring back automatic OS switching, wrap this block in
   @media (prefers-color-scheme: dark) and target :root instead.
   -------------------------------------------------------------------------- */
:root[data-theme="dark"] {
  --bg:            #0B1220;
  --bg-subtle:     #0F172A;
  --bg-raised:     #131C2E;
  --text:          #F3F6FB;
  --text-soft:     #A9B4C6;
  --text-muted:    #8592A6;
  --border:        #223049;
  --border-strong: #2E3E5A;
  --shadow-lg: 0 12px 24px -6px rgba(0, 0, 0, .5);
  --shadow-xl: 0 28px 56px -16px rgba(0, 0, 0, .65);
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -.025em; font-weight: 700; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: var(--brand-100); color: var(--brand-900); }

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: 88px 0; }
.section--tight { padding: 64px 0; }
.section--subtle { background: var(--bg-subtle); }

.section__head { max-width: 780px; margin: 0 auto 48px; text-align: center; }
.section__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 14px;
}
.section__title { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 16px; }
.section__lead { font-size: 18px; color: var(--text-soft); }

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

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease,
              transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--brand-700); border-color: var(--brand-700); }

.btn--ghost {
  background: var(--bg-raised);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--brand-400); color: var(--brand-600); }

.btn--lg { padding: 14px 26px; font-size: 16px; }
.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand__mark { width: 32px; height: 32px; border-radius: var(--r-md); flex-shrink: 0; }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  transition: color .15s ease;
}
.site-nav__link:hover { color: var(--text); }

.site-header__actions { display: flex; align-items: center; gap: 12px; }

/* Language switcher — EN / HR */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-subtle);
}
.lang__link {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--r-pill);
  transition: color .15s ease, background-color .15s ease;
}
.lang__link:hover { color: var(--text); }
.lang__link.is-active {
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.nav-toggle {
  display: none;
  padding: 8px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
/* Compact on purpose: the copy answers "what is this", the board underneath
   is the proof — it has to be meaningfully visible in the first viewport.
   The second radial sits behind the board and lifts it off the page. */
.hero {
  position: relative;
  padding: 56px 0 76px;
  overflow: hidden;
  background:
    radial-gradient(920px 520px at 50% -12%,
      color-mix(in srgb, var(--brand-400) 18%, transparent), transparent 72%),
    radial-gradient(1100px 480px at 50% 106%,
      color-mix(in srgb, var(--brand-300) 9%, transparent), transparent 70%),
    var(--bg);
}

/* Entrance: copy first, board right behind. Opacity + transform only (no
   layout shift); section 14 collapses it for prefers-reduced-motion. */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero__copy { animation: hero-rise .5s ease both; }
.hero .board { animation: hero-rise .55s ease .1s both; }

.hero__copy { margin: 0 auto; text-align: center; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--brand-700);
  background: color-mix(in srgb, var(--brand-100) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-300) 45%, transparent);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 20px;
}
[data-theme="dark"] .hero__eyebrow { color: var(--brand-200); background: color-mix(in srgb, var(--brand-400) 15%, transparent); border-color: color-mix(in srgb, var(--brand-400) 34%, transparent); }

/* Smaller than a typical SaaS hero on purpose — the H1 must not push the
   product below the fold. */
.hero__title {
  font-size: clamp(31px, 4.5vw, 50px);
  font-weight: 800;
  letter-spacing: -.035em;
  margin-bottom: 18px;
}
.hero__title-accent {
  /* Vlastiti redak: lom naslova je uvijek na crtici, nikad usred fraze. */
  display: block;
  background: linear-gradient(115deg, var(--brand-400), var(--brand-700));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
[data-theme="dark"] .hero__title-accent { background: linear-gradient(115deg, var(--brand-200), var(--brand-400)); -webkit-background-clip: text; background-clip: text; }

.hero__lead {
  font-size: clamp(16.5px, 1.9vw, 19px);
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto 26px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero__note { font-size: 14px; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   8. Board — the live schedule in the hero (real DOM, not a screenshot)
   -------------------------------------------------------------------------- */
.board {
  margin-top: 42px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  /* Brand-tinted halo under the elevation — the product is the one element
     the page lifts off the paper. */
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--brand-600) 7%, transparent),
    var(--shadow-xl),
    0 32px 90px -24px color-mix(in srgb, var(--brand-600) 28%, transparent);
  overflow: hidden;
}

.board__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-wrap: wrap;
}
.board__day {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15px;
}
.board__pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--success-500);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success-500) 60%, transparent);
  animation: board-pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}
@keyframes board-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success-500) 55%, transparent); }
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.board__meta {
  font-size: 13.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.sched__scroll { overflow-x: auto; scroll-behavior: auto; }

/* The hero schedule mirrors the real Cleaning Board screen: rows are TEAMS,
   the columns are the working day, and the two dashed lines are the camp-wide
   check-out and check-in times every clean has to fit between.
   Colours and labels are taken from the app, not invented: situation tokens
   live on :root (section 2), strings come from cleaning.situation.*. */

/* Column 1 = team label, columns 2..23 = twenty-two 30-minute slots, 07:00–18:00. */
.sched__grid {
  display: grid;
  grid-template-columns: 172px repeat(22, minmax(30px, 1fr));
  grid-template-rows: 40px repeat(4, 80px);
  min-width: 980px;
  position: relative;
}

.sched__corner,
.sched__hour {
  grid-row: 1;
  display: flex;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
}
.sched__corner {
  grid-column: 1;
  padding-left: 22px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  z-index: 8;
  background: var(--bg-subtle);
  position: sticky;
  left: 0;
  border-right: 1px solid var(--border);
}
.sched__head { grid-column: 1 / -1; grid-row: 1; background: var(--bg-subtle); border-bottom: 1px solid var(--border); z-index: 0; }
.sched__hour {
  grid-column: var(--c) / span 2;
  padding-left: 7px;
  font-variant-numeric: tabular-nums;
  z-index: 1;
}

/* Row bands + hour gridlines under everything */
.sched__band { grid-column: 1 / -1; grid-row: var(--r); border-bottom: 1px solid var(--border); z-index: 0; }
.sched__line { grid-column: var(--c); grid-row: 2 / -1; border-left: 1px solid var(--border); z-index: 1; pointer-events: none; }

/* Camp-wide check-out / check-in: a pill in the header and a dashed line down
   the whole day. This is the constraint the board exists to make visible. */
.sched__mark {
  grid-column: var(--c);
  grid-row: 2 / -1;
  border-left: 2px dashed var(--mc);
  z-index: 6;
  pointer-events: none;
}
.sched__pill {
  grid-column: var(--c) / span 3;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  margin-left: 2px;
  white-space: nowrap;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 7px;
  border-radius: var(--r-sm);
  color: var(--mc);
  background: var(--mbg);
  z-index: 9;
}

/* Team label column — stays put while the day scrolls sideways */
.sched__team {
  grid-column: 1;
  grid-row: var(--r);
  z-index: 8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 0 14px 0 22px;
  background: var(--bg-raised);
  position: sticky;
  left: 0;
  border-right: 1px solid var(--border);
}
.sched__teamname { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 14.5px; white-space: nowrap; }
.sched__zone {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  color: var(--brand-700);
  background: color-mix(in srgb, var(--brand-400) 14%, transparent);
}
[data-theme="dark"] .sched__zone { color: var(--brand-200); }
.sched__teammeta { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.sched__load { display: block; height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
.sched__load i { display: block; height: 100%; width: var(--w); background: var(--success-500); border-radius: 2px; }

/* A scheduled cleaning. Left border carries the booking situation colour —
   same rule as the app: colour = situation, never status. */
.sched__card {
  grid-column: var(--c) / var(--e);
  grid-row: var(--r);
  z-index: 5;
  align-self: center;
  margin: 0 3px;
  padding: 8px 10px;
  min-width: 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--sc, var(--border-strong));
  border-radius: var(--r-md);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.sched__card.is-turnover { --sc: var(--turnover); }
.sched__card.is-checkout { --sc: var(--checkout); }
.sched__card.is-checkin  { --sc: var(--checkin); }

/* In-progress work is hatched, exactly like the board */
.sched__card.is-running {
  background-image: repeating-linear-gradient(-45deg,
    transparent 0 6px, color-mix(in srgb, var(--checkin) 9%, transparent) 6px 12px);
}

.sched__cardtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.sched__unit { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.sched__sit { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  color: var(--brand-700);
  background: color-mix(in srgb, var(--brand-400) 12%, transparent);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched__status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
[data-theme="dark"] .sched__status { color: var(--brand-200); }

/* Legend — the board's colour key is the booking situation */
.sched__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 20px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-soft);
}
.sched__key { display: inline-flex; align-items: center; gap: 7px; }
.sched__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--kc); flex-shrink: 0; }

/* The same day, reshaped vertically for narrow screens: time flows downward,
   the check-out/check-in lines become horizontal thresholds and every cleaning
   sits between them. Only one of grid/stack is ever shown (section 13). */
.sched__stack { display: none; padding: 6px 0 10px; }

.sched__stackmark {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--mc);
  white-space: nowrap;
}
.sched__stackmark::before,
.sched__stackmark::after {
  content: '';
  border-top: 2px dashed color-mix(in srgb, var(--mc) 45%, transparent);
}
.sched__stackmark::before { width: 18px; flex-shrink: 0; }
.sched__stackmark::after { flex: 1; }

.sched__stacklist { display: grid; gap: 10px; padding: 2px 16px; }
.sched__stackrow {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--sc, var(--border-strong));
  border-radius: var(--r-md);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}
.sched__stackrow.is-turnover { --sc: var(--turnover); }
.sched__stackrow.is-checkout { --sc: var(--checkout); }
.sched__stackrow.is-checkin  { --sc: var(--checkin); }
.sched__stackrow.is-running {
  background-image: repeating-linear-gradient(-45deg,
    transparent 0 6px, color-mix(in srgb, var(--checkin) 9%, transparent) 6px 12px);
}

.sched__stacktime {
  min-width: 84px;
  padding-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sched__stackbody { display: grid; gap: 7px; justify-items: start; min-width: 0; }
.sched__stacktop { display: flex; align-items: baseline; gap: 8px 10px; flex-wrap: wrap; min-width: 0; }
.sched__stackteam { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.board__foot {
  padding: 15px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 13.5px;
  color: var(--text-soft);
}
.board__foot strong { color: var(--text); font-weight: 650; }

/* --------------------------------------------------------------------------
   9. Cards / grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card__icon {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--brand-400) 13%, transparent);
  color: var(--brand-600);
  margin-bottom: 16px;
}
[data-theme="dark"] .card__icon { color: var(--brand-300); }
.card__title { font-size: 18px; margin-bottom: 8px; }
.card__body { font-size: 15px; color: var(--text-soft); }

/* Before → after: one panel, three transformations. The left side is the grey
   world without a system, the right the one with Camppy; the middle carries
   the threshold — the same dashed line as check-out/check-in on the board. */
.ba {
  max-width: 960px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--bg-raised);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.ba__row { display: grid; grid-template-columns: 1fr 64px 1fr; }
.ba__row + .ba__row { border-top: 1px solid var(--border); }

.ba__cell {
  padding: 24px 28px;
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: start;
}
.ba__cell--before { background: var(--bg-subtle); }
.ba__cell--after { background: color-mix(in srgb, var(--brand-400) 7%, transparent); }

/* Sides are labelled with text on every row — never colour alone. */
.ba__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--r-pill);
}
.ba__tag--before { color: var(--text-muted); background: var(--bg-raised); border: 1px solid var(--border); }
.ba__tag--after { color: var(--brand-700); background: color-mix(in srgb, var(--brand-400) 14%, transparent); }
[data-theme="dark"] .ba__tag--after { color: var(--brand-200); }

.ba__text { font-size: 16px; line-height: 1.5; }
.ba__cell--before .ba__text { color: var(--text-soft); }
.ba__cell--after .ba__text { color: var(--text); font-weight: 500; }

.ba__bridge { position: relative; display: flex; align-items: center; justify-content: center; }
.ba__bridge::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 calc(50% - 1px);
  border-left: 2px dashed color-mix(in srgb, var(--brand-400) 38%, transparent);
}
.ba__arrow {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-md);
}

/* How it works: three steps on one shared line, each proven by a small crop
   of the product. Crops reuse the board's tokens and strings (section 8). */
.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px;
  position: relative;
  max-width: 1040px;
  margin-inline: auto;
}
.flow::before {
  content: '';
  position: absolute;
  top: 20px;
  left: calc((100% - 56px) / 6);
  right: calc((100% - 56px) / 6);
  height: 2px;
  background: color-mix(in srgb, var(--brand-400) 26%, transparent);
}
.flow__step { position: relative; display: flex; flex-direction: column; }
.flow__num {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-600);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  /* Ring in the page colour so the shared line passes behind, not through. */
  box-shadow: 0 0 0 6px var(--bg);
}
.flow__title { font-size: 18px; margin-bottom: 8px; }
.flow__body { font-size: 15px; color: var(--text-soft); margin-bottom: 18px; }

/* Product crop next to a step — the board's visual language in miniature:
   the card's left edge carries the situation, status is always also text. */
.crop {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}
.crop__cap {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.crop__event {
  display: block;
  padding: 8px 11px;
  font-size: 12.5px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ec);
  border-radius: var(--r-md);
  background: var(--bg-raised);
}
.crop__unit { font-weight: 700; font-size: 14.5px; letter-spacing: -.01em; }
.crop__sit { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.crop__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  color: var(--brand-700);
  background: color-mix(in srgb, var(--brand-400) 12%, transparent);
  white-space: nowrap;
}
.crop__status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
[data-theme="dark"] .crop__status { color: var(--brand-200); }

/* Step 2: a cleaning card between the check-out and check-in lines. */
.crop__marks { display: flex; justify-content: space-between; gap: 8px; }
.crop__pill {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 7px;
  border-radius: var(--r-sm);
  color: var(--mc);
  background: color-mix(in srgb, var(--mc) 14%, transparent);
  white-space: nowrap;
}
.crop__lane { position: relative; display: block; padding: 10px 26px 4px 18px; }
.crop__lane::before,
.crop__lane::after {
  content: '';
  position: absolute;
  top: -4px;
  bottom: 0;
}
.crop__lane::before { left: 7px; border-left: 2px dashed color-mix(in srgb, var(--checkout) 55%, transparent); }
.crop__lane::after { right: 13px; border-left: 2px dashed color-mix(in srgb, var(--checkin) 55%, transparent); }
.crop__team {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.crop__zone {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--r-sm);
  color: var(--brand-700);
  background: color-mix(in srgb, var(--brand-400) 14%, transparent);
}
[data-theme="dark"] .crop__zone { color: var(--brand-200); }
.crop__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--sc, var(--border-strong));
  border-radius: var(--r-md);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}
.crop__card.is-checkout { --sc: var(--checkout); }
.crop__cardtop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

/* Step 3: today's order on the field worker's phone. */
.crop__list { display: grid; gap: 8px; }
.crop__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--sc, var(--border-strong));
  border-radius: var(--r-md);
  background: var(--bg-raised);
  min-width: 0;
}
.crop__item.is-checkout { --sc: var(--checkout); }
.crop__item.is-turnover { --sc: var(--turnover); }
.crop__item.is-running {
  background-image: repeating-linear-gradient(-45deg,
    transparent 0 6px, color-mix(in srgb, var(--checkin) 9%, transparent) 6px 12px);
}
.crop__order {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.crop__item .crop__status { margin-left: auto; }

/* Roles */
.roles { display: grid; gap: 14px; }
.role {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
}
.role__name { font-weight: 650; font-size: 16px; }
.role__body { font-size: 15px; color: var(--text-soft); }

/* Trust list */
.trust { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 42px; }
.trust__item {
  padding: 22px;
  border-left: 3px solid var(--brand-500);
  background: var(--bg-raised);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.trust__title { font-size: 16px; font-weight: 650; margin-bottom: 6px; }
.trust__body { font-size: 14.5px; color: var(--text-soft); }

/* --------------------------------------------------------------------------
   10. FAQ
   -------------------------------------------------------------------------- */
.faq { max-width: 800px; margin-inline: auto; display: grid; gap: 12px; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  overflow: hidden;
}
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 16.5px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { padding: 0 22px 20px; font-size: 15.5px; color: var(--text-soft); }

/* --------------------------------------------------------------------------
   11. Final CTA (landing) — dark panel, jedan poziv na demo stranicu
   -------------------------------------------------------------------------- */
.cta {
  border-radius: var(--r-2xl);
  padding: 56px 44px;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff;
  box-shadow: var(--shadow-xl);
}
.cta--center {
  display: grid;
  justify-items: center;
  text-align: center;
}
.cta__title { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 14px; }
.cta__body {
  font-size: 17px;
  color: color-mix(in srgb, #fff 78%, transparent);
  margin-bottom: 26px;
  max-width: 620px;
}
.cta__note { margin-top: 14px; font-size: 13.5px; color: color-mix(in srgb, #fff 66%, transparent); }

.cta .btn--primary {
  background: #fff;
  border-color: #fff;
  color: var(--brand-800);
}
.cta .btn--primary:hover { background: var(--brand-50); border-color: var(--brand-50); }

/* --------------------------------------------------------------------------
   11b. Demo stranica (/demo/, /hr/demo/) + demo forma
   Forma živi na svijetloj podlozi u kartici — ne u tamnom CTA panelu.
   -------------------------------------------------------------------------- */
.demo__section {
  padding: 64px 0 88px;
  background:
    radial-gradient(900px 480px at 88% -10%,
      color-mix(in srgb, var(--brand-400) 12%, transparent), transparent 70%),
    var(--bg);
}
.demo__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: 56px;
  align-items: start;
}
.demo__title {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 14px 0 16px;
}
.demo__lead {
  font-size: 17.5px;
  color: var(--text-soft);
  margin-bottom: 26px;
  max-width: 520px;
}
.demo__benefits { display: grid; gap: 12px; font-size: 15.5px; }
.demo__benefits li { display: flex; gap: 10px; align-items: flex-start; }
.demo__benefits li::before { content: '✓'; color: var(--brand-600); font-weight: 700; }
[data-theme="dark"] .demo__benefits li::before { color: var(--brand-300); }

.demo__panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

/* Sekundarna poveznica u minimalnom headeru demo stranice. */
.site-header__signin {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  padding: 8px 4px;
}
.site-header__signin:hover { color: var(--text); }

/* ------------------------------------------------------------------- forma */
.form { display: grid; gap: 14px; }
.form__row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.field__input,
.field__select,
.field__textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field__input::placeholder,
.field__textarea::placeholder { color: var(--text-muted); }
.field__input:focus,
.field__select:focus,
.field__textarea:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-400) 18%, transparent);
  outline: none;
}
.field__select option { color: var(--gray-900); background: #fff; }
.field__textarea { resize: vertical; min-height: 88px; }
.form__note { font-size: 13px; color: var(--text-muted); }
.form__note a { color: var(--brand-600); }

/* Greške: boja NIKAD sama — uz polje uvijek stoji i tekst poruke. */
.field :is(.field__input, .field__select, .field__textarea)[aria-invalid="true"] {
  border-color: var(--problem);
}
.field__error { font-size: 13px; font-weight: 500; color: #C01048; }
[data-theme="dark"] .field__error { color: #FD6F8E; }

.form__alert {
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--problem) 38%, transparent);
  border-left: 3px solid var(--problem);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--problem) 7%, transparent);
  color: #C01048;
  font-size: 14.5px;
  font-weight: 500;
}
[data-theme="dark"] .form__alert { color: #FD6F8E; }

.form__success {
  display: grid;
  gap: 8px;
  padding: 28px 24px;
  border: 1px solid color-mix(in srgb, var(--success-500) 45%, transparent);
  border-radius: var(--r-lg);
  background: var(--success-50);
}
[data-theme="dark"] .form__success {
  background: color-mix(in srgb, var(--success-500) 10%, transparent);
}
.form__success-title { font-size: 17px; color: var(--text); }
.form__success-body { font-size: 15px; color: var(--text-soft); }

/* Honeypot: izvan ekrana, ne `display:none` — botovi ga tako i dalje vide. */
.form__hp {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}
.consent__box {
  width: 20px; height: 20px;
  margin: 2px 0 0;
  accent-color: var(--brand-600);
  cursor: pointer;
}
.consent__text { font-size: 13.5px; color: var(--text-soft); cursor: pointer; }
.consent__text a { color: var(--brand-600); }
[data-theme="dark"] .consent__text a { color: var(--brand-300); }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 52px 0 36px;
  background: var(--bg-subtle);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.site-footer__about { font-size: 14.5px; color: var(--text-soft); max-width: 320px; margin-top: 14px; }
.site-footer__title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.site-footer__list { display: grid; gap: 9px; font-size: 14.5px; }
.site-footer__list a { color: var(--text-soft); text-decoration: none; }
.site-footer__list a:hover { color: var(--text); }
.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px 24px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-muted);
}
.site-footer__cr { display: inline-flex; align-items: center; gap: 8px; }
.site-footer__flag { font-size: 15px; line-height: 1; }
.site-footer__legal { display: inline-flex; gap: 20px; }
.site-footer__legal a { text-decoration: none; }
.site-footer__legal a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   12b. Legal pages (/privacy/, /terms/)
   -------------------------------------------------------------------------- */
.legal-hero {
  padding: 56px 0 42px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.legal-hero__title { font-size: clamp(27px, 3.4vw, 38px); margin-bottom: 14px; }
.legal-hero__summary { font-size: 17px; color: var(--text-soft); max-width: 660px; }
.legal-hero__meta { margin-top: 20px; font-size: 13.5px; color: var(--text-muted); }

.legal { max-width: 760px; margin-inline: auto; padding: 54px 0 76px; }
.legal section { margin-bottom: 34px; }
.legal h2 { font-size: 19px; margin-bottom: 10px; }
.legal p { color: var(--text-soft); margin-bottom: 12px; }
.legal ul { margin: 0 0 12px; padding-left: 21px; color: var(--text-soft); }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--brand-600); }

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
/* Full header (nav + jezici + CTA) na tablet širini: isti sadržaj, tješnji
   razmaci — inače na 768 px pretječe stranicu vodoravno. */
@media (max-width: 1024px) and (min-width: 768px) {
  .site-header__inner { gap: 14px; }
  .site-nav { gap: 16px; }
  .site-header__actions { gap: 8px; }
}

@media (max-width: 900px) {
  .section { padding: 64px 0; }
  .grid--3, .trust { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .cta { padding: 40px 26px; }
  .demo__grid { grid-template-columns: 1fr; gap: 36px; }
  .demo__panel { padding: 22px 18px; }
  .role { grid-template-columns: 1fr; gap: 4px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 30px; }

  /* Before → after keeps its pairing, only the axis turns: the threshold and
     the arrow now point downward, from the old way to the new one. */
  .ba__row { grid-template-columns: 1fr; }
  .ba__cell { padding: 20px 22px; }
  .ba__bridge { padding: 9px 0; }
  .ba__bridge::before {
    inset: calc(50% - 1px) 0 auto;
    border-left: 0;
    border-top: 2px dashed color-mix(in srgb, var(--brand-400) 38%, transparent);
  }
  .ba__arrow { width: 30px; height: 30px; }
  .ba__arrow svg { transform: rotate(90deg); }

  /* The flow becomes a natural vertical story: numbers on a left rail, one
     line running from step to step. */
  .flow { grid-template-columns: 1fr; gap: 0; max-width: 560px; }
  .flow::before { display: none; }
  .flow__step { padding: 0 0 36px 58px; }
  .flow__step::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 46px;
    bottom: 8px;
    border-left: 2px solid color-mix(in srgb, var(--brand-400) 26%, transparent);
  }
  .flow__step:last-child { padding-bottom: 0; }
  .flow__step:last-child::before { display: none; }
  .flow__num { position: absolute; left: 0; top: 0; margin-bottom: 0; box-shadow: none; }
  .flow__title { padding-top: 7px; }
}

@media (max-width: 767px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px var(--gutter) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .site-nav.is-open { display: flex; }
  .site-nav__link { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: inline-flex; }
  .site-header__actions .btn { display: none; }
  .hero { padding: 44px 0 60px; }
  .board { margin-top: 34px; border-radius: var(--r-xl); }
  .board__bar, .board__foot, .sched__legend { padding-inline: 16px; }

  /* A phone screen gets a deliberate scene, not a shrunken desktop timeline:
     the grid hides and the same day renders vertically (.sched__stack), with
     no sideways scrolling. See ScheduleBoard.vue. */
  .sched__scroll { display: none; }
  .sched__stack { display: block; }

  .form__row { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   14. Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    /* Bez delaya: animacija s `both` inače drži element nevidljivim
       kroz cijelu odgodu, pa bi sadržaj bljesnuo. */
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
