/* ============================================================
   G&T Talent Radar — Layout & components
   Vanilla CSS. No framework, no build step.
   Mobile-first; the few media queries widen, never shrink.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.01em; }

p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

a { color: inherit; }

/* Visible focus for keyboard users only — never remove outlines outright. */
:focus-visible {
  outline: 2px solid var(--slate);
  outline-offset: 3px;
  border-radius: 4px;
}

/* The `hidden` attribute must always win. Several components below set a
   display value, which would otherwise override the UA's [hidden] rule. */
[hidden] { display: none !important; }

/* Screen-reader-only, but still focusable. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100%; left: var(--s-2);
  background: var(--ink); color: var(--white);
  padding: var(--s-1) var(--s-2); z-index: 200;
  border-radius: 0 0 6px 6px; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-3); }
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--s-6); }
@media (min-width: 768px) { .section { padding-block: var(--s-7); } }

.section--paper { background: var(--paper); }
.section--dark  { background: var(--charcoal); color: var(--white); }
.section--dark p { color: var(--muted-dark); }

/* Eyebrow label above section headings. */
.eyebrow {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: var(--s-2);
}
.section--dark .eyebrow { color: var(--muted-dark); }

.section-head { max-width: 720px; margin-bottom: var(--s-5); }
.section-head p { color: var(--muted); font-size: 1.0625rem; margin-top: var(--s-2); }
.section--dark .section-head p { color: var(--muted-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); min-height: 72px;
}
.brand { display: flex; align-items: center; gap: var(--s-1); text-decoration: none; font-weight: 700; letter-spacing: -0.02em; }
.brand__mark { font-size: 1.25rem; }
.brand__sub { color: var(--slate); font-weight: 600; }

.nav { display: none; gap: var(--s-3); align-items: center; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav a {
  text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  color: var(--ink); padding-block: var(--s-1);
  border-bottom: 2px solid transparent; transition: border-color 0.2s var(--ease);
}
.nav a:hover { border-bottom-color: var(--slate); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.875rem 1.75rem;
  border-radius: var(--r-btn);
  font-size: 0.9375rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--btn); color: var(--white); }
.btn--primary:hover { background: var(--btn-hover); }

.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--ink); background: var(--slate-050); }

/* On charcoal, invert. */
.section--dark .btn--primary,
.hero .btn--primary { background: var(--white); color: var(--ink); }
.section--dark .btn--primary:hover,
.hero .btn--primary:hover { background: #e9ecef; }

.section--dark .btn--secondary,
.hero .btn--secondary { color: var(--white); border-color: rgba(255,255,255,0.32); }
.section--dark .btn--secondary:hover,
.hero .btn--secondary:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }

.btn--sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* Quiet tertiary link-with-arrow. */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-weight: 600; font-size: 0.9375rem; text-decoration: none;
  color: var(--ink); border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 2px; transition: border-color 0.2s var(--ease), gap 0.2s var(--ease);
}
.link-arrow:hover { border-bottom-color: var(--ink); gap: 0.7em; }
.link-arrow::after { content: '\2192'; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- Hero ---------- */
.hero {
  background: var(--charcoal); color: var(--white);
  padding-block: var(--s-6) var(--s-7);
  position: relative; overflow: hidden;
}
/* Faint slate wash, top-right. Suggests depth without ornament. */
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 85% 0%, rgba(97,125,161,0.20), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { max-width: 17ch; margin-bottom: var(--s-3); }
.hero__sub {
  max-width: 62ch; font-size: 1.0625rem;
  color: var(--muted-dark); margin-bottom: var(--s-4);
}
@media (min-width: 768px) { .hero__sub { font-size: 1.1875rem; } }

/* Trust strip under the hero CTAs. */
.hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  margin-top: var(--s-5); padding-top: var(--s-3);
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: var(--t-small); color: var(--muted-dark);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.5em; }
.hero__meta span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--slate); }

/* ---------- Grids ---------- */
.grid { display: grid; gap: var(--s-3); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Category card ---------- */
.cat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: var(--s-3);
  display: flex; flex-direction: column; gap: var(--s-2);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.cat:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.cat__num {
  font-size: var(--t-micro); font-weight: 700; letter-spacing: 0.1em;
  color: var(--slate); font-variant-numeric: tabular-nums;
}
.cat h3 { margin-bottom: 0; }
.cat__problem { color: var(--muted); font-size: 0.9375rem; flex-grow: 1; }
.cat__roles {
  font-size: var(--t-small); color: var(--muted);
  padding-top: var(--s-2); border-top: 1px solid var(--line);
}
.cat__roles strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 4px; font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.08em; }
.cat .link-arrow { align-self: flex-start; margin-top: var(--s-1); }

/* ---------- Profile card ---------- */
.profile-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: var(--s-3);
  display: flex; flex-direction: column; gap: var(--s-2);
  text-align: left; width: 100%; cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.profile-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.profile-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.talent-id {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  font-size: var(--t-micro); font-weight: 600; letter-spacing: 0.06em;
  color: var(--slate-700); background: var(--slate-050);
  padding: 4px 10px; border-radius: var(--r-chip);
}
.profile-card h3 { font-size: 1.0625rem; line-height: 1.35; }
.profile-card__desc {
  color: var(--muted); font-size: 0.9375rem; flex-grow: 1;
  /* Clamp to keep the card grid visually even. */
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.profile-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--line);
  font-size: var(--t-small); color: var(--muted);
}
.profile-card--featured { border-color: var(--slate); box-shadow: 0 0 0 1px var(--slate); }

/* Availability dot */
.avail { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 500; }
.avail::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--slate); flex-shrink: 0; }
.avail[data-avail="Odmah otvoren"]::before { background: #00b090; }
.avail[data-avail="Samo za iznimnu priliku"]::before { background: var(--muted); }

/* ---------- Chips (taxonomy pills) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: var(--t-micro); font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-chip);
  background: var(--slate-050); color: var(--slate-700);
  border: 1px solid var(--slate-100);
}
.section--dark .chip { background: rgba(255,255,255,0.08); color: var(--white); border-color: rgba(255,255,255,0.14); }

/* ---------- Filters ---------- */
.filters {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: var(--s-3); margin-bottom: var(--s-4);
}
/* The <summary> is the mobile disclosure control. On desktop the panel is
   always open, so the summary collapses to a plain, non-interactive label. */
.filters__summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-2);
  cursor: pointer; list-style: none;
  font-size: var(--t-micro); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  padding-bottom: var(--s-2); margin-bottom: var(--s-1);
}
.filters__summary::-webkit-details-marker { display: none; }
.filters__summary::after {
  content: '\25BE'; margin-left: auto; font-size: 1rem;
  transition: transform 0.2s var(--ease);
}
details[open] > .filters__summary::after { transform: rotate(180deg); }
.filters__summary-hint {
  text-transform: none; letter-spacing: 0; font-weight: 400;
  color: var(--muted); font-size: var(--t-micro);
}
@media (min-width: 900px) {
  /* Always expanded on desktop — hide the toggle affordance entirely. */
  .filters__summary { cursor: default; pointer-events: none; }
  .filters__summary::after, .filters__summary-hint { display: none; }
}

.filters__grid { display: grid; gap: var(--s-2); grid-template-columns: 1fr; }
@media (min-width: 640px) { .filters__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .filters__grid { grid-template-columns: repeat(3, 1fr); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field__label {
  font-size: var(--t-micro); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.field select, .field input, .field textarea {
  width: 100%; padding: 0.75rem 0.875rem;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--white); color: var(--ink);
  transition: border-color 0.15s var(--ease);
}
.field select { appearance: none; padding-right: 2.25rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235b6672' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.875rem center;
}
.field select:hover, .field input:hover, .field textarea:hover { border-color: var(--muted); }
.field select:focus, .field input:focus, .field textarea:focus { border-color: var(--ink); outline: 2px solid var(--slate); outline-offset: 1px; }
.field textarea { resize: vertical; min-height: 120px; }
.field--full { grid-column: 1 / -1; }

.filters__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-2); margin-top: var(--s-3); padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.filters__count { font-size: var(--t-small); color: var(--muted); }
.filters__count strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Empty state */
.empty {
  grid-column: 1 / -1; text-align: center;
  padding: var(--s-6) var(--s-3);
  border: 1px dashed var(--line-strong); border-radius: var(--r-card);
  color: var(--muted);
}
.empty h3 { color: var(--ink); margin-bottom: var(--s-1); }
.empty p { margin-bottom: var(--s-3); }

/* ---------- Modal (profile detail) ---------- */
dialog.modal {
  padding: 0; border: none; max-width: 720px; width: calc(100% - 2rem);
  border-radius: var(--r-card); box-shadow: var(--shadow-modal);
  color: var(--ink); background: var(--white);
}
dialog.modal::backdrop { background: rgba(13, 20, 26, 0.55); backdrop-filter: blur(3px); }

.modal__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-2);
  padding: var(--s-3); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--white); border-radius: var(--r-card) var(--r-card) 0 0;
}
.modal__close {
  background: none; border: 1px solid var(--line); border-radius: 50%;
  width: 36px; height: 36px; flex-shrink: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--muted);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.modal__close:hover { border-color: var(--ink); color: var(--ink); }
.modal__body { padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-3); max-height: 60vh; overflow-y: auto; }
.modal__foot {
  padding: var(--s-3); border-top: 1px solid var(--line); background: var(--paper);
  border-radius: 0 0 var(--r-card) var(--r-card);
  display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; justify-content: space-between;
}

.dl { display: flex; flex-direction: column; gap: var(--s-3); }
.dl__row { display: grid; gap: 4px; }
.dl__row dt {
  font-size: var(--t-micro); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate);
}
.dl__row dd { margin: 0; color: var(--ink); }
.dl__row dd.muted { color: var(--muted); }

/* ---------- Pricing / engagement tiers ---------- */
.tier {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: var(--s-4) var(--s-3); display: flex; flex-direction: column; gap: var(--s-2);
}
.tier--highlight { border-color: var(--ink); box-shadow: var(--shadow-card); }
.tier__badge {
  align-self: flex-start; font-size: var(--t-micro); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--ink); color: var(--white); padding: 4px 10px; border-radius: var(--r-chip);
}
.tier h3 { margin-top: var(--s-1); }
.tier p { color: var(--muted); font-size: 0.9375rem; flex-grow: 1; }
.tier__price { font-size: var(--t-small); color: var(--muted); font-style: italic; }
.tier .btn { margin-top: var(--s-2); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: var(--s-3);
}
@media (min-width: 768px) { .form-card { padding: var(--s-4); } }
.form-grid { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }

.req { color: #c62828; margin-left: 2px; }

/* GDPR consent block — deliberately prominent, never pre-checked. */
.consent {
  grid-column: 1 / -1;
  display: flex; gap: var(--s-2); align-items: flex-start;
  background: var(--slate-050); border: 1px solid var(--slate-100);
  border-radius: 8px; padding: var(--s-2);
}
.consent input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0;
  accent-color: var(--ink); cursor: pointer;
}
.consent label { font-size: var(--t-small); color: var(--muted); line-height: 1.55; cursor: pointer; }

.form-note { font-size: var(--t-small); color: var(--muted); margin-top: var(--s-2); }

.form-status { grid-column: 1 / -1; padding: var(--s-2); border-radius: 8px; font-size: 0.9375rem; }
.form-status[data-state="ok"]  { background: #def4f0; color: #00674f; border: 1px solid #00b090; }
.form-status[data-state="err"] { background: #ffe8ef; color: #a3204b; border: 1px solid #fc5185; }
.form-status[hidden] { display: none; }

/* File input: style the label as a button, hide the native control. */
.file-field input[type="file"] { border: 1px dashed var(--line-strong); background: var(--paper); padding: var(--s-2); cursor: pointer; }

/* ---------- Candidate CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band p { max-width: 58ch; margin: var(--s-3) auto var(--s-4); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: var(--muted-dark); padding-block: var(--s-5); font-size: var(--t-small); }
.site-footer a { color: var(--white); text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover { border-bottom-color: var(--slate); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; align-items: center; }
.site-footer__legal { max-width: 62ch; margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid rgba(255,255,255,0.12); line-height: 1.6; }

/* ---------- Print (a company may print a shortlist) ---------- */
@media print {
  .site-header, .site-footer, .filters, .btn, .modal__foot { display: none !important; }
  .profile-card { break-inside: avoid; border: 1px solid #999; }
}
