/* Opakovane použiteľné prvky: logo, tlačidlá, karty, štítky, formulár. */

/* Logo – nápis. V malých veľkostiach bez čiary v „s“. */
.wordmark { font-weight: 700; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; color: var(--ink); text-decoration: none; }
.wordmark__io { color: var(--amber); }

/* Logo – značka s čiarou cesty (čiarka = I, krúžok = O); raz sa nakreslí pri načítaní. */
.mark { width: 100%; height: auto; display: block; }
.mark__glyph { fill: var(--ink); } /* „s“ z Figtree 700 prevedené na krivky (assets/img/mark.svg) */
.mark__lane path { fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 2.8 7.76; }
.mark__lane circle { fill: none; stroke: var(--amber); stroke-width: 0.8; }
.mark__eraser { fill: none; stroke: var(--bg); stroke-width: 15; stroke-dasharray: 100 100; stroke-dashoffset: -100; }
.js .mark__eraser { animation: mark-draw 1s cubic-bezier(.45, 0, .25, 1) .2s both; }
.js .mark__lane { animation: mark-lane 1s cubic-bezier(.2, .7, .3, 1) 1.1s both; }
@keyframes mark-draw { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
@keyframes mark-lane { from { opacity: 0; stroke-dashoffset: 13.5; } to { opacity: 1; stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .js .mark__eraser, .js .mark__lane { animation: none; } }

/* Ikony */
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--accent, .card > .icon { stroke: var(--amber); }
.card > .icon { width: 28px; height: 28px; }

/* Tlačidlá */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: 12px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn--primary, .btn--primary:hover { background: var(--cta-bg); color: var(--cta-fg); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--header, .btn--header:hover {
  min-height: 44px; padding: 0 18px; font-size: 15px;
  background: var(--header-cta-bg); color: var(--header-cta-fg); border-color: var(--header-cta-border);
}
.btn--banner, .btn--banner:hover { background: var(--banner-btn-bg); color: var(--banner-btn-fg); }
.btn--block { width: 100%; }

.icon-button {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
}
.icon-button .icon { width: 20px; height: 20px; }

/* Štítky */
.badge {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-alt); font-size: 15px; font-weight: 600;
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.tag { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 12px; border-radius: var(--radius-sm); background: var(--bg-alt);
  border: 1px solid var(--line); font-size: 14px; font-weight: 500;
}

/* Karty */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.card--media { padding: 0; overflow: hidden; gap: 0; }
.card__media {
  height: 168px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }

/* Formulár */
.form { gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }
.field input, .field textarea {
  min-height: 48px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--input-bg); color: var(--ink); font: inherit;
}
.field textarea { resize: vertical; }

/* Zástupné ikony, kým nie sú skutočné snímky a fotka. */
.card__media-icon { width: 56px; height: 56px; stroke: var(--muted); stroke-width: 1.2; opacity: .6; }

/* Ilustrácie v kartách referencií (štylizované, nie snímky). */
.card__media img { width: 100%; height: 100%; object-fit: contain; padding: 10px 0; }

/* Stav po odoslaní formulára (text do neho vkladá main.js). */
.form__status { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-weight: 600; }
.form__status--ok { background: var(--bg-alt); border-color: var(--amber); }
.form__status--error { background: var(--bg-alt); border-color: #C2410C; }
