/* ---------- base ---------- */

:root {
  --bg: #07070a;
  --text: #f4f4f7;
  --muted: #8d8d9e;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 18px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* ovládané myší (script.js) */
  --mx: 0;
  --my: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(167, 139, 250, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- dýchající pozadí ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, 0.045), transparent 60%),
    var(--bg);
}

.blob {
  position: absolute;
  width: min(72vmax, 940px);
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform;
  transform: translate3d(
    calc(var(--mx) * var(--depth, 26px)),
    calc(var(--my) * var(--depth, 26px)),
    0
  );
}

.blob::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glow);
  filter: blur(30px);
  opacity: 0.85;
  animation: breathe var(--dur, 26s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.blob--a {
  top: -22%;
  left: -12%;
  --glow: radial-gradient(circle at 50% 50%, rgba(124, 92, 255, 0.5), rgba(124, 92, 255, 0) 68%);
  --dur: 24s;
  --depth: 34px;
}

.blob--b {
  right: -16%;
  bottom: -26%;
  width: min(64vmax, 820px);
  --glow: radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.42), rgba(20, 184, 166, 0) 68%);
  --dur: 31s;
  --delay: -8s;
  --depth: 48px;
}

.blob--c {
  top: 30%;
  left: 46%;
  width: min(48vmax, 620px);
  --glow: radial-gradient(circle at 50% 50%, rgba(251, 113, 133, 0.26), rgba(251, 113, 133, 0) 68%);
  --dur: 37s;
  --delay: -16s;
  --depth: 60px;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1) translate(0, 0);
    opacity: 0.7;
  }
  33% {
    transform: scale(1.12) translate(2.5%, -3%);
    opacity: 1;
  }
  66% {
    transform: scale(0.94) translate(-2%, 2.5%);
    opacity: 0.62;
  }
}

/* zrno pro matnější, filmový dojem */
.bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(52px, 10vh, 104px) clamp(20px, 5vw, 40px) 40px;
}

/* ---------- hero ---------- */

.hero {
  max-width: 640px;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 14px 1px rgba(167, 139, 250, 0.7);
  animation: pulse 4.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

h1 {
  margin: 0.55em 0 0.35em;
  font-size: clamp(2.7rem, 8vw, 4.5rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
  background: linear-gradient(180deg, #ffffff 25%, #a9a7bd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (background-clip: text) {
  h1 {
    background: none;
    color: var(--text);
  }
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- sekce ---------- */

.group {
  margin-top: clamp(48px, 7vh, 68px);
}

.group__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.group__head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.group__head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}

.group__num {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.28);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid--apps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--sites {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------- karta ---------- */

.card {
  --accent: #a78bfa;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 0.3s ease,
    background-color 0.3s ease;
  animation: rise 0.7s calc(var(--i, 0) * 70ms + 140ms) cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

/* matný svit sledující kurzor */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    280px circle at var(--hx, 50%) var(--hy, 0%),
    color-mix(in srgb, var(--accent) 18%, transparent),
    transparent 72%
  );
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.1));
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.card__icon svg {
  width: 21px;
  height: 21px;
}

/* ikona převzatá přímo z webu */
.card__icon--brand {
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.card__icon--brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card__label {
  display: grid;
  gap: 5px;
  margin-top: auto;
}

.card__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.card__arrow {
  width: 15px;
  height: 15px;
  margin-left: auto;
  flex: none;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  color: var(--muted);
}

.card:hover .card__arrow {
  opacity: 0.8;
  transform: translate(0, 0);
}

.card__url {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.015em;
  color: rgba(255, 255, 255, 0.36);
  transition: color 0.3s ease;
}

a.card:hover .card__url {
  color: color-mix(in srgb, var(--accent) 65%, #ffffff);
}

/* karta "v přípravě" */
.card--soon,
.card--soon:hover {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.014);
  transform: none;
  cursor: default;
}

.card--soon::before {
  display: none;
}

.card--soon .card__icon {
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.09);
}

.card--soon .card__name {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
}

.card--soon .card__url {
  font-family: var(--font);
  font-size: 12.5px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.3);
}

.badge {
  margin-left: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

/* ---------- patička ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(56px, 9vh, 88px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.32);
}

.footer__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer__contact a:hover {
  color: var(--text);
}

.footer__contact svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

/* ---------- animace ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- responzivita ---------- */

@media (max-width: 900px) {
  .grid--apps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .grid--sites {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--sites .card--soon {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .grid--sites .card--soon .card__label {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .grid--apps,
  .grid--sites {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .grid--sites .card--soon {
    grid-column: auto;
  }

  .card {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 16px;
  }

  .card__icon {
    width: 40px;
    height: 40px;
    flex: none;
  }

  .card__label {
    margin-top: 0;
    gap: 3px;
    flex: 1;
    min-width: 0;
  }

  .card__name {
    flex-wrap: wrap;
    row-gap: 6px;
    font-size: 15.5px;
  }

  .card__arrow {
    margin-left: 0;
    opacity: 0.35;
    transform: none;
  }

  .footer {
    font-size: 12px;
  }
}

/* ---------- omezení pohybu ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .blob {
    transform: none;
  }
}
