:root {
  --bg: #f4f6fb;
  --tx: #121826;
  --mu: #5a6580;
  --intro: #2b3550;
  --card: #ffffff;
  --line: #12182622;
  --lab: #5a6580;
  --g1: #15803d;
  --g2: #0284c7;
  --g3: #7c3aed;
  --c1: #16a34a;
  --c2: #0284c7;
  --c3: #7c3aed;
  --cta1: #15803d;
  --cta2: #0369a1;
  --cta3: #7c3aed;
  --ga1: rgba(34, 197, 94, .22);
  --ga2: rgba(59, 130, 246, .22);
  --ga3: rgba(168, 85, 247, .22);
  --shadow: 0 18px 40px -22px #1e293b66;
  --gold: #c9a22799;
}

:root[data-theme="dark"] {
  --bg: #070b16;
  --tx: #e8ecf6;
  --mu: #aeb8d0;
  --intro: #c7d0e6;
  --card: #0f1630cc;
  --line: #ffffff1a;
  --lab: #7f8aa6;
  --g1: #4ade80;
  --g2: #38bdf8;
  --g3: #a78bfa;
  --c1: #4ade80;
  --c2: #38bdf8;
  --c3: #a78bfa;
  --cta1: #4ade80;
  --cta2: #38bdf8;
  --cta3: #a78bfa;
  --ga1: rgba(34, 197, 94, .33);
  --ga2: rgba(59, 130, 246, .33);
  --ga3: rgba(168, 85, 247, .33);
  --shadow: 0 0 0 0 #0000;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  background:
    radial-gradient(600px 400px at 15% 10%, var(--ga1), transparent),
    radial-gradient(700px 500px at 90% 30%, var(--ga2), transparent),
    radial-gradient(600px 400px at 50% 100%, var(--ga3), transparent),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--tx);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { position: relative; max-width: 1040px; width: 100%; margin: 0 auto; padding: 24px 24px 40px; flex: 1; }

.bar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 20px; }

.btn, .lang select {
  font: inherit; font-size: 14px; color: var(--tx);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 12px; cursor: pointer;
}
.btn { width: 44px; font-size: 18px; line-height: 1; }
.btn:focus-visible, .lang select:focus-visible { outline: 3px solid var(--g2); outline-offset: 2px; }

.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: center;
  margin-bottom: 44px;
}

h1 { margin: 0 0 10px; font-size: clamp(3rem, 10vw, 6.5rem); line-height: 1.15; letter-spacing: -.04em; font-weight: 800; }
.grad {
  background: linear-gradient(90deg, var(--g1), var(--g2), var(--g3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle { margin: 0; font-size: 1.2rem; color: var(--mu); }
.intro { margin: 18px 0 0; max-width: 56ch; font-size: 1.1rem; color: var(--intro); }

.photo {
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--g1), var(--g2), var(--g3));
  box-shadow: 0 24px 50px -24px var(--g2);
}
.photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
  object-fit: cover; object-position: 37% 0; border-radius: 50%;
}

h2 { margin: 0 0 14px; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--lab); font-weight: 700; }
section + section { margin-top: 48px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.tile {
  --c: var(--c1);
  display: flex; flex-direction: column; gap: 8px; min-height: 220px;
  padding: 26px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 0 0 1px var(--c) inset, var(--shadow), 0 0 40px -10px var(--c);
  color: inherit; text-decoration: none;
  transition: transform .15s ease;
}
.tile:hover, .tile:focus-visible { transform: translateY(-3px); }
.tile:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; }
.tile-bt { --c: var(--c1); --cta: var(--cta1); }
.tile-mr { --c: var(--c2); --cta: var(--cta2); }
.tile-more { --c: var(--c3); --cta: var(--cta3); }

.ic-img { display: block; width: 48px; height: 48px; border-radius: 12px; object-fit: cover; border: 1px solid var(--gold); }
.tile-name { font-size: 1.6rem; font-weight: 700; overflow-wrap: anywhere; }
.tile-desc { color: var(--mu); flex: 1; overflow-wrap: anywhere; }
.tile-cta { color: var(--cta, var(--c)); font-weight: 700; }

.kennel {
  display: inline-flex; gap: 14px; align-items: center;
  padding: 12px 22px; border-radius: 20px;
  border: 1px solid var(--gold); background: var(--card); box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
}
.kennel:focus-visible { outline: 3px solid #c9a227; outline-offset: 3px; }
.kennel b { display: block; }
.kd { color: var(--mu); font-size: .92rem; }
.ic-kennel { display: block; width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--gold); }

.foot {
  position: relative;
  max-width: 1040px; width: 100%; margin: 0 auto;
  padding: 22px 24px 32px; border-top: 1px solid var(--line);
  color: var(--mu); font-size: .95rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
}
.foot a { color: var(--tx); }
.foot .copy { margin: 0 0 0 auto; font-size: .85rem; }

.foot .btn-mail {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 12px;
  background: linear-gradient(90deg, #15803d, #0369a1);
  color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none;
  transition: filter .15s ease;
}
.btn-mail::before { content: "\2709\FE0F"; }
.foot .btn-mail:hover, .foot .btn-mail:focus-visible { filter: brightness(1.12); }
.foot .btn-mail:focus-visible { outline: 3px solid var(--g2); outline-offset: 2px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .tile, .kennel { animation: rise .45s ease-out backwards; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
  .tile-bt { --i: 0; }
  .tile-mr { --i: 1; }
  .tile-more { --i: 2; }
  .kennel { --i: 3; }
}

@media (max-width: 820px) {
  body {
    background:
      radial-gradient(600px 400px at 15% 10%, var(--ga1), transparent),
      radial-gradient(700px 500px at 90% 30%, var(--ga2), transparent),
      radial-gradient(600px 300px at 50% calc(100% - 300px), var(--ga3), transparent),
      var(--bg);
    background-repeat: no-repeat;
  }
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .photo { order: -1; width: 100%; max-width: 280px; }
  /* Dotykové plochy: aspoň 44 px na výšku */
  .btn, .lang select { min-height: 44px; }
  .foot a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot .btn-mail { padding-top: 0; padding-bottom: 0; }
}

@media (max-width: 720px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot .copy { margin: 6px 0 0; }
}

/* Velký displej: vše na jednu obrazovku, velikosti se řídí výškou okna */
@media (min-width: 821px) {
  .wrap { padding-top: 12px; padding-bottom: 8px; }
  .bar { margin-bottom: 10px; }
  .hero { grid-template-columns: 1fr auto; gap: 40px; margin-bottom: clamp(12px, 2.6vh, 30px); }
  .photo { width: clamp(170px, 31vh, 320px); }
  h1 { font-size: clamp(2.6rem, 9vh, 5.5rem); margin-bottom: 0; }
  .subtitle { font-size: clamp(1rem, 2.4vh, 1.2rem); }
  .intro { margin-top: clamp(8px, 2vh, 18px); font-size: clamp(.95rem, 2.2vh, 1.1rem); }
  section + section { margin-top: clamp(12px, 2.4vh, 28px); }
  h2 { margin-bottom: 8px; }
  .tile { padding: clamp(14px, 2.6vh, 24px); min-height: 0; gap: 4px; }
  .ic-img, .ic-kennel { width: clamp(30px, 4.8vh, 48px); height: clamp(30px, 4.8vh, 48px); }
  .tile-name { font-size: clamp(1.25rem, 3vh, 1.6rem); }
  .tile-desc { font-size: .95rem; }
  .kennel { padding: 10px 18px; }
  .foot { padding: 8px 24px 10px; gap: 6px 16px; }
}

@media (min-width: 821px) and (max-height: 720px) {
  .photo { width: clamp(150px, 27vh, 320px); }
  .tile-desc { font-size: .9rem; }
  .tile-cta { font-size: .9rem; }
  .tile { padding: 12px 16px; }
  .ic-img, .ic-kennel { width: 30px; height: 30px; border-radius: 8px; }
  .kennel { padding: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
  .tile:hover, .tile:focus-visible { transform: none; }
}
