/* Unite Developments - rozcestník. Barvy, rádiusy a motivy podle UnitePilot (apps/panel/src/app/globals.css). */
:root {
  --purple-200: #dccde0;
  --purple-300: #c3a8c6;
  --purple-400: #ad8cb1;
  --purple-500: #98719c;
  --purple-600: #83608a;
  --purple-700: #6d4f73;
  --radius-md: 10px;
  --radius-lg: 18px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* tmavý motiv (výchozí, stejně jako UnitePilot) */
  --bg: #121015;
  --bg-glow: rgba(152, 113, 156, 0.18);
  --surface: #1b181f;
  --surface-2: #231f28;
  --border: #322d39;
  --border-strong: #4a4452;
  --text: #ece9ef;
  --text-muted: #a69fae;
  --accent: var(--purple-500);
  --accent-text: var(--purple-300);
  --accent-soft: rgba(152, 113, 156, 0.16);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 18px 40px -18px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(173, 140, 177, 0.35), 0 10px 40px -20px rgba(152, 113, 156, 0.55);
  --ok: #3fb984;
  --ok-soft: rgba(63, 185, 132, 0.14);
  --warn: #e8973a;
  --warn-soft: rgba(232, 151, 58, 0.14);
  --info: #8fb3ff;
  --info-soft: rgba(143, 179, 255, 0.14);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--purple-400);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f5f8;
  --bg-glow: rgba(152, 113, 156, 0.16);
  --surface: #ffffff;
  --surface-2: #f1eef3;
  --border: #e3dde6;
  --border-strong: #c9c0ce;
  --text: #1d1a21;
  --text-muted: #5f5866;
  --accent: var(--purple-600);
  --accent-text: var(--purple-700);
  --accent-soft: rgba(131, 96, 138, 0.1);
  --card-shadow: 0 1px 2px rgba(29, 26, 33, 0.06);
  --card-shadow-hover: 0 18px 40px -20px rgba(29, 26, 33, 0.28), 0 0 0 1px rgba(131, 96, 138, 0.35), 0 10px 40px -22px rgba(131, 96, 138, 0.5);
  --ok: #1f7a52;
  --ok-soft: rgba(31, 122, 82, 0.1);
  --warn: #9a5a12;
  --warn-soft: rgba(154, 90, 18, 0.1);
  --info: #2f5bb7;
  --info-soft: rgba(47, 91, 183, 0.1);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--purple-600);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(1200px 520px at 50% -180px, var(--bg-glow), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.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 {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  text-decoration: none;
}
.skip:focus {
  left: 16px;
}
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
}

/* --- navbar --- */
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 2px;
}
.brand img {
  width: 34px;
  height: 34px;
  display: block;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn,
.lang summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  transition:
    background-color 0.15s var(--ease),
    color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}
.icon-btn:hover,
.lang summary:hover,
.lang[open] summary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
html:not(.js) .theme-toggle {
  display: none;
}
:root[data-theme="light"] .theme-toggle .i-sun,
:root:not([data-theme="light"]) .theme-toggle .i-moon {
  display: none;
}
.lang {
  position: relative;
}
.lang summary {
  list-style: none;
}
.lang summary::-webkit-details-marker {
  display: none;
}
.chev {
  width: 14px;
  height: 14px;
  transition: transform 0.15s var(--ease);
}
.lang[open] .chev {
  transform: rotate(180deg);
}
.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.6);
}
.lang li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}
.lang li a:hover {
  background: var(--surface-2);
}
.lang li a[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

/* --- hero --- */
main {
  display: flex;
  align-items: center;
  padding: clamp(16px, 4vh, 48px) 0 clamp(16px, 3vh, 32px);
}
.hero {
  text-align: center;
}
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 750;
}
.hero h1 .accent {
  color: var(--accent-text);
}
.lead {
  max-width: 640px;
  margin: clamp(10px, 1.8vh, 16px) auto 0;
  color: var(--text-muted);
  font-size: clamp(16px, 1.6vw, 19px);
}

/* --- produkty --- */
.cards {
  list-style: none;
  margin: clamp(22px, 4.5vh, 48px) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(14px, 1.8vw, 22px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  text-align: left;
}
.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: clamp(230px, 34vh, 300px);
  padding: clamp(20px, 2.2vw, 28px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease),
    border-color 0.22s var(--ease);
}
/* jemné fialové světlo v rohu karty, viditelné jen při hoveru/focusu */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: radial-gradient(420px 220px at 0% 0%, var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
a.card {
  cursor: pointer;
}
a.card:focus-visible {
  box-shadow: var(--focus), var(--card-shadow-hover);
}
a.card:focus-visible::before {
  opacity: 1;
}
@media (hover: hover) {
  a.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--card-shadow-hover);
  }
  a.card:hover::before {
    opacity: 1;
  }
  a.card:hover .card-icon {
    transform: translateY(-2px) scale(1.04);
  }
  a.card:hover .card-arrow {
    transform: translateX(3px);
    color: var(--accent-text);
  }
}
/* dotyková zařízení: krátká odezva při stisku */
a.card:active {
  transform: translateY(-1px) scale(0.995);
}
.card.is-unavailable {
  cursor: default;
}
.card.is-unavailable .card-icon {
  filter: saturate(0.6);
  opacity: 0.85;
}
.card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  transition: transform 0.25s var(--ease);
}
.card-icon svg {
  width: 28px;
  height: 28px;
}
.card-title {
  display: block;
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-sub {
  display: block;
  margin-top: 2px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
}
.card-desc {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 15px;
}
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status-live {
  background: var(--ok-soft);
  color: var(--ok);
}
.status-maintenance {
  background: var(--warn-soft);
  color: var(--warn);
}
.status-soon {
  background: var(--info-soft);
  color: var(--info);
}
.card-arrow {
  display: inline-flex;
  color: var(--text-muted);
  transition:
    transform 0.22s var(--ease),
    color 0.22s var(--ease);
}
.card-arrow svg {
  width: 20px;
  height: 20px;
}

/* --- patička --- */
footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  text-decoration: none;
  border-radius: 6px;
}
footer a:hover {
  color: var(--text);
}
footer svg {
  width: 16px;
  height: 16px;
}

/* --- 404 --- */
.notfound {
  text-align: center;
}
.notfound .btn {
  display: inline-flex;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

/* --- menší obrazovky --- */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 0;
  }
}
@media (max-width: 900px) and (min-width: 600px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
@media (max-height: 760px) and (min-width: 901px) {
  .card {
    min-height: 210px;
  }
  .card-desc {
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  a.card:hover,
  a.card:active,
  a.card:hover .card-icon,
  a.card:hover .card-arrow {
    transform: none !important;
  }
}

/* vlajky: lokální SVG, stejná velikost všude; jemný okraj kvůli bílým částem na světlém i tmavém pozadí */
img.flag {
  display: block;
  flex: none;
  width: 21px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border-strong);
}
