/* ══════════════════════════════════════════════════════════
   Base — Reset, Typography, Container
   Shared across all Groteska sites.
   ══════════════════════════════════════════════════════════ */

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  cursor: crosshair;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-md); }

p { margin: 0 0 var(--space-8) 0; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}
a:hover { color: var(--color-primary-hover); }

section { scroll-margin-top: 80px; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-9);
}

/* ── Technical Note ── */
.tech-note {
  position: fixed;
  bottom: 12px;
  left: 32px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-family-mono);
  font-size: 8px;
  font-weight: 400;
  color: rgba(59, 130, 196, 0.18);
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeIn 0.8s var(--ease-standard) 2.4s forwards;
}

/* ── Focus & Cursor ── */
:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }

a, button, [role="button"], input, select, textarea, label[for] {
  cursor: pointer;
}
textarea { cursor: text; }
input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]) { cursor: text; }

/* ── Utilities ── */
.hidden { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* ── Language visibility ── */
.lang-sk, .lang-en { display: block; }
html[lang='sk'] .lang-en { display: none; }
html[lang='en'] .lang-sk { display: none; }

/* ── Animations ── */
.anim-draw {
  opacity: 0;
  transform: translateY(16px);
  animation: drawOn 0.8s var(--ease-standard) var(--delay, 0s) forwards;
}
@keyframes drawOn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* Scroll-triggered reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-standard), transform 0.6s var(--ease-standard);
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Notifications ── */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 2001;
  max-width: 300px;
  padding: var(--space-7) var(--space-8);
  border-radius: var(--radius-base);
  font-size: var(--font-size-sm);
  box-shadow: var(--shadow-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.notification.status--error {
  border-color: var(--color-error);
  color: var(--color-error);
}

/* ── Modals ── */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-10);
  max-width: 400px;
  width: 90%;
  position: relative;
  z-index: 1;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.modal-content h3 { color: var(--color-text); margin-bottom: var(--space-6); }
.modal-content p { color: var(--color-text-secondary); margin-bottom: var(--space-8); }
.modal-content .modal-body { max-height: 60vh; overflow: auto; text-align: left; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-5); margin-top: var(--space-8); }
.modal.legal-modal .modal-content { max-width: 720px; width: 95%; }

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 1500;
}
.cookie-banner__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--space-7) 0;
}
.cookie-banner__content p { margin: 0; color: var(--color-text-secondary); font-size: var(--font-size-sm); }
.cookie-banner__actions { display: flex; gap: var(--space-5); flex-shrink: 0; }
body.has-cookie-banner { padding-bottom: 80px; }

/* ── Loading Overlay ── */
#loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  z-index: 5000;
}
#loading-overlay p { color: var(--color-text); margin-top: var(--space-5); font-size: var(--font-size-md); }

.loader {
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }
[data-app-ready="true"] #loading-overlay { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .cookie-banner__content { flex-direction: column; align-items: stretch; }
  .cookie-banner__actions { justify-content: flex-end; }
  .tech-note { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-7); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .anim-draw { opacity: 1; transform: none; animation: none; }
  .scroll-reveal { opacity: 1; transform: none; transition: none; }
  .tech-note { opacity: 1; animation: none; }
}

/* ── Print ── */
@media print {
  .modal, .cookie-banner { display: none; }
}
