/*
 * SPDX-FileCopyrightText: 2026 Ján Letko / LTK Solutions
 * SPDX-License-Identifier: CC-BY-4.0
 *
 * Inventario marketing site — shared styles.
 * Konzistentnosť s Inventario app mockupmi (docs/design/screens/).
 * SportUp brand identity: Navy + Blue + Paper + Poppins.
 */

:root {
  --brand-primary: #1a2d47; /* Navy */
  --brand-accent: #388fc3; /* Blue */
  --brand-bg: #f8f6f1; /* Paper */
  --brand-muted: #6b7a8d; /* Muted */
  --brand-white: #ffffff;

  /* Semantic */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  /* Typography */
  --font-sans: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--brand-primary);
  background: var(--brand-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ──────────────────────────────────────────────────────────────
 * Utility classes (lightweight Tailwind-like helpers).
 * Marketing pages used inline styles in screen mockupy, but for
 * multi-page consistency we prefer CSS classes.
 * ─────────────────────────────────────────────────────────── */
.wordmark {
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
}

.brand-primary {
  color: var(--brand-primary);
}
.brand-accent {
  color: var(--brand-accent);
}
.brand-muted {
  color: var(--brand-muted);
}
.brand-bg-primary {
  background: var(--brand-primary);
  color: white;
}
.brand-bg-accent {
  background: var(--brand-accent);
  color: white;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1;
}
.btn-primary {
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand-primary) 25%, transparent);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--brand-primary) 90%, white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--brand-primary) 30%, transparent);
}
.btn-secondary {
  background: white;
  color: var(--brand-primary);
  border: 1.5px solid #e5e7eb;
}
.btn-secondary:hover {
  border-color: var(--brand-primary);
  background: #fafafa;
}
.btn-ghost {
  background: transparent;
  color: var(--brand-primary);
}
.btn-ghost:hover {
  background: color-mix(in srgb, var(--brand-primary) 6%, transparent);
}

/* Cards */
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.2s ease;
}
.card:hover {
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(26, 45, 71, 0.12);
}

/* Trust badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: color-mix(in srgb, var(--brand-primary) 6%, white);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 15%, transparent);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand-primary);
}
.badge-white {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

/* Mono text */
.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-muted);
}

/* Hero gradient background (rovnaký ako Login screen) */
.hero-gradient {
  background: linear-gradient(
    135deg,
    var(--brand-primary) 0%,
    color-mix(in oklch, var(--brand-primary) 75%, var(--brand-accent) 25%) 100%
  );
  position: relative;
  overflow: hidden;
  color: white;
}
.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'><path d='M0,200 L0,140 L100,90 L220,130 L350,60 L480,110 L600,70 L730,120 L860,80 L980,130 L1100,90 L1200,140 L1200,200 Z' fill='white' opacity='0.06'/><path d='M0,200 L0,160 L120,120 L260,150 L400,100 L540,130 L680,110 L820,140 L960,120 L1080,150 L1200,130 L1200,200 Z' fill='white' opacity='0.09'/></svg>");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% 55%;
  pointer-events: none;
}
/*
 * Logo-pattern overlay (::after).
 * Repetícia loga ako brand mark cez celý hero. Veľmi nízka opacity (~7%)
 * aby nerušila text, ale prinášala identitu. Tento istý pattern použijeme
 * neskôr aj na print materiáloch a iných miestach — viď BRAND.md.
 */
.hero-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='white' opacity='0.07'><rect x='15' y='25' width='80' height='12' rx='3'/><rect x='15' y='50' width='62' height='12' rx='3'/><rect x='15' y='75' width='44' height='12' rx='3'/><circle cx='92' cy='81' r='7' fill='%23388fc3' opacity='0.5'/></g></svg>");
  background-repeat: repeat;
  background-size: 180px 180px;
  background-position: 0 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.85;
}
.hero-gradient > * {
  position: relative;
  z-index: 1;
}

/*
 * Brand pattern utility — logo repetition na any background.
 * Použitie: pridaj triedu .pattern-bg na lubovoľný kontajner.
 * Pre tmavé pozadia funguje aut-of-the-box (biele logo motif).
 * Pre svetlé pozadia použi .pattern-bg.pattern-dark (navy logo motif).
 */
.pattern-bg {
  position: relative;
}
.pattern-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='white' opacity='0.06'><rect x='15' y='25' width='80' height='12' rx='3'/><rect x='15' y='50' width='62' height='12' rx='3'/><rect x='15' y='75' width='44' height='12' rx='3'/><circle cx='92' cy='81' r='7' fill='%23388fc3' opacity='0.5'/></g></svg>");
  background-repeat: repeat;
  background-size: 180px 180px;
  pointer-events: none;
}
.pattern-bg.pattern-dark::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='%231a2d47' opacity='0.04'><rect x='15' y='25' width='80' height='12' rx='3'/><rect x='15' y='50' width='62' height='12' rx='3'/><rect x='15' y='75' width='44' height='12' rx='3'/><circle cx='92' cy='81' r='7' fill='%23388fc3' opacity='0.6'/></g></svg>");
}
.pattern-bg > * {
  position: relative;
  z-index: 1;
}

/* Section */
.section {
  padding: var(--space-xl) var(--space-md);
}
.container {
  max-width: 1180px;
  margin: 0 auto;
}
.container-narrow {
  max-width: 880px;
  margin: 0 auto;
}

/* ──────────────────────────────────────────────────────────────
 * Navigation (top bar)
 * ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-primary) 10%, transparent);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--brand-primary);
}
.nav-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(26, 45, 71, 0.2);
}
.nav-brand-icon svg {
  width: 70%;
  height: 70%;
}
.nav-brand-text {
  line-height: 1;
}
.nav-brand-name {
  font-weight: 800;
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.nav-brand-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-muted);
  margin-top: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--brand-primary);
  font-weight: 500;
  font-size: 0.88rem;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-link:hover {
  background: color-mix(in srgb, var(--brand-primary) 6%, transparent);
}
.nav-link.active {
  background: color-mix(in srgb, var(--brand-primary) 10%, transparent);
  font-weight: 600;
}

/* Disabled nav-link (e.g. "Dokumentácia — Čoskoro") */
.nav-link-disabled {
  color: var(--brand-muted);
  cursor: not-allowed;
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-link-disabled:hover {
  background: transparent;
}
.nav-soon-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-accent) 15%, transparent);
  color: var(--brand-accent);
  border: 1px solid color-mix(in srgb, var(--brand-accent) 30%, transparent);
  vertical-align: middle;
}
.footer-link-disabled {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: not-allowed;
}
.footer-link-disabled .nav-soon-badge {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 15%, transparent);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
}

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.5rem 1.5rem;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.nav-mobile-menu .nav-link {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  white-space: normal;
}
.nav-mobile-menu .nav-link.active {
  background: color-mix(in srgb, var(--brand-primary) 10%, transparent);
}

/* Language switcher */
.lang-switch {
  display: inline-flex;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 600;
}
.lang-switch button {
  background: none;
  border: none;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  color: var(--brand-muted);
  font-family: inherit;
  transition: all 0.15s;
}
.lang-switch button.active {
  background: var(--brand-primary);
  color: white;
}
.lang-switch button:not(.active):hover {
  background: #f3f4f6;
  color: var(--brand-primary);
}
.lang-switch button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ──────────────────────────────────────────────────────────────
 * Footer
 * ─────────────────────────────────────────────────────────── */
.footer {
  background: var(--brand-primary);
  color: white;
  padding: 3.5rem 1.5rem 2rem;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand .wordmark {
  font-size: 1.5rem;
}
.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
  max-width: 320px;
}
.footer-heading {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
  margin-top: 0;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.footer-links a:hover {
  color: white;
}
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-license {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
}
.footer-ecosystem {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-ecosystem a {
  color: var(--brand-accent);
  text-decoration: none;
  font-weight: 600;
}
.footer-ecosystem a:hover {
  text-decoration: underline;
}

/* ──────────────────────────────────────────────────────────────
 * Headings + text utilities
 * ─────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
}
h4 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}
p.lead {
  font-size: 1.1rem;
  color: var(--brand-muted);
}
p.lead-white {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
}

a {
  color: var(--brand-accent);
}

ul.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.checklist li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.6rem;
  color: var(--brand-primary);
}
ul.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-success);
  font-weight: 700;
}

/* ──────────────────────────────────────────────────────────────
 * Grid helpers
 * ─────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 1rem;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-gap-lg {
  gap: 1.5rem;
}

/* ──────────────────────────────────────────────────────────────
 * Responsive (mobile-first via media queries scaling DOWN)
 * ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  /* Desktop nav-links would overflow with brand + lang switch + buttons — switch to hamburger menu */
  .nav-links {
    display: none;
  }
  .nav-mobile-toggle {
    display: inline-flex;
  }
  .nav.mobile-open .nav-mobile-menu {
    display: flex;
  }
}

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 3rem 1rem;
  }

  /* Hide non-essential nav-right items on small mobile */
  .nav-right .nav-link-disabled {
    display: none;
  }
  .nav-right .btn {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav-brand-tag {
    display: none;
  }
}

/* Focus states (a11y) */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(26, 45, 71, 0.15);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 45, 71, 0.25);
}
