/* Prípadové štúdie – kralovicpk.sk
   Nadväzuje na style.css hlavnej stránky: rovnaké písma, papierové pozadie, tmavá „IT“ karta.
   Každá štúdia si nastaví vlastnú --accent (farba projektu) v <body style>. */
:root {
  --bg: #eef1ed;
  --paper: #f7f8f6;
  --ink: #14181f;
  --text: #2b333c;
  --muted: #56616c;
  --rule: #d5dbd4;
  --dark: #14181f;
  --dark-sub: #aeb8c2;
  --teal: #6fd0cc;
  --gold: #e3b23c;
  --accent: #1f7f7a;
  --head: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 24px 48px -28px rgba(20, 24, 31, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wide { max-width: 1180px; margin: 0 auto; padding-inline: 40px; }
.col  { max-width: 760px;  margin: 0 auto; padding-inline: 40px; }

h1, h2, h3 { font-family: var(--head); color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(40px, 7vw, 68px); line-height: 1.04; letter-spacing: -.015em; }
h2 { font-weight: 700; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
h3 { font-weight: 700; font-size: 19px; line-height: 1.3; }
p { margin: 0; }

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- top bar ---------- */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-block: 22px; border-bottom: 1px solid var(--rule);
}
.top a { text-decoration: none; font-weight: 500; }
.top a:hover { text-decoration: underline; }
.top .home { font-family: var(--head); font-weight: 700; font-size: 18px; }

/* ---------- overview ---------- */
.ov-intro { padding-block: 64px 32px; display: grid; gap: 18px; }
.ov-intro .lead { max-width: 46ch; font-size: 20px; }
.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
  padding-block: 16px 56px;
}
.tile {
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid var(--rule); width: 100%; }
.tile .body { padding: 24px 26px 28px; display: grid; gap: 10px; }
.tile .kicker { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile h2 { font-size: 28px; }
.tile .more { font-weight: 500; color: var(--ink); margin-top: 4px; }
.tile .more::after { content: " →"; }
.tile--wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.tile--wide img { aspect-ratio: auto; height: 100%; border-bottom: 0; border-right: 1px solid var(--rule); }
.tile--wide .body { align-content: center; padding: 36px; }
.tile--wide h2 { font-size: 36px; }

/* ---------- study intro ---------- */
.intro { padding-block: 64px 36px; display: grid; gap: 20px; }
.intro h1 span { color: var(--accent); }
.lede { font-size: clamp(19px, 2vw, 22px); color: var(--muted); max-width: 44ch; }
.status {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--rule);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.meta {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
  padding-block: 26px; margin-top: 12px; border-block: 1px solid var(--rule);
}
.meta div { display: grid; gap: 6px; align-content: start; min-width: 0; }
.meta .eyebrow { font-size: 12px; }
.meta b { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

/* ---------- screenshots ---------- */
.shot { margin: 0; display: grid; gap: 10px; }
.shot img { width: 100%; border-radius: 14px; border: 1px solid var(--rule); box-shadow: var(--shadow); background: #fff; }
.shot figcaption { font-size: 14px; color: var(--muted); }
.hero-shot { padding-block: 20px 72px; }

.spread {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 44px);
  align-items: start; padding-block: 8px 56px;
}
.spread .shot img { box-shadow: none; }
.spread--phones { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; }
.tag {
  justify-self: start; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px; background: var(--paper); border: 1px solid var(--rule); color: var(--muted);
}
.tag.after { background: var(--accent); border-color: var(--accent); color: #fff; }

.trio {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 32px);
  align-items: start; padding-block: 8px 40px;
}

/* ---------- text blocks ---------- */
section.block { padding-block: 52px; display: grid; gap: 20px; }
.text { display: grid; gap: 16px; }
.text p { max-width: 64ch; }

ul.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
ul.points li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: baseline; }
ul.points li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
ul.points b { color: var(--ink); font-weight: 500; }

ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
ol.steps li {
  counter-increment: s; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px;
  padding-block: 22px; border-top: 1px solid var(--rule);
}
ol.steps li::before { content: counter(s, decimal-leading-zero); font: 700 18px/1.4 var(--head); color: var(--accent); }
ol.steps li div { display: grid; gap: 6px; }
ol.steps p { color: var(--muted); }

/* dark callout, echoes the IT card on the home page */
.callout {
  background: var(--dark); color: #f2f4f1; border-radius: 20px; padding: clamp(28px, 4vw, 44px);
  display: grid; gap: 16px;
}
.callout h2, .callout h3 { color: #fff; }
.callout .eyebrow { color: var(--teal); }
.callout p { color: var(--dark-sub); max-width: 62ch; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.flow div { border: 1px solid #2c343f; border-radius: 12px; padding: 16px; display: grid; gap: 4px; align-content: start; }
.flow b { color: var(--teal); font: 700 14px/1 var(--head); letter-spacing: .06em; }
.flow span { color: #e6e9ec; font-size: 15px; }

pre.code {
  margin: 0; background: var(--dark); color: #dfe5ea; border-radius: 14px; padding: 20px 22px;
  font: 400 14px/1.7 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere;
}
pre.code b { color: var(--teal); font-weight: 400; }

/* ---------- numbers ---------- */
.nums {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  padding-block: 28px; border-block: 1px solid var(--rule);
}
.nums div { display: grid; gap: 4px; min-width: 0; }
.nums strong { font: 700 clamp(26px, 3.2vw, 34px)/1 var(--head); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nums span { color: var(--muted); font-size: 15px; }

/* ---------- next steps ---------- */
.next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.next div { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 18px 20px; display: grid; gap: 6px; align-content: start; }
.next p { color: var(--muted); font-size: 15px; }

/* ---------- other studies + cta ---------- */
.others { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.others a {
  display: grid; gap: 4px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--rule);
  background: var(--paper); text-decoration: none;
}
.others a:hover { border-color: var(--ink); }
.others span { color: var(--muted); font-size: 14px; }
.others b { font: 700 19px/1.3 var(--head); color: var(--ink); }

.cta {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  background: var(--dark); border-radius: 20px; padding: clamp(28px, 4vw, 40px); margin-block: 24px 0;
}
.cta h2 { color: #fff; font-size: clamp(26px, 3.4vw, 34px); }
.cta p { color: var(--dark-sub); margin-top: 6px; }
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px; background: var(--teal); color: var(--ink);
  font-weight: 500; text-decoration: none; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn.ghost { background: transparent; color: #fff; border: 1px solid #3a4450; }
.cta .btn:focus-visible { outline-color: #fff; }

footer.foot { padding-block: 28px 56px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .meta, .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid, .others, .next { grid-template-columns: 1fr; }
  .tile--wide { grid-column: auto; display: flex; }
  .tile--wide img { border-right: 0; border-bottom: 1px solid var(--rule); aspect-ratio: 16 / 10; }
  .tile--wide .body { padding: 24px 26px 28px; }
  .tile--wide h2 { font-size: 28px; }
  .spread, .trio { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wide, .col { padding-inline: 16px; }
  body { font-size: 16px; }
  .ov-intro, .intro { padding-block: 44px 24px; }
  section.block { padding-block: 40px; }
  .hero-shot { padding-block: 12px 48px; }
}
@media (max-width: 520px) {
  .spread--phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .flow { grid-template-columns: 1fr; }
  ol.steps li { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .btn { transition: none; }
}
