/* ==========================================================================
   Ing. David Pustka, hypotéky a rodinné finance
   Tokeny převzaté 1:1 z návrhu „Pustka Web.dc.html“ (Claude Design).
   ========================================================================== */

:root {
  --paper: #F7F3EC; --surface: #FFFDF8; --band: #F1EBE0;
  --ink: #16261F; --muted: #4A5A51; --faint: #8A9990;
  --line: rgba(22,38,31,0.12); --line-strong: rgba(22,38,31,0.22);
  --green: #1F4436; --on-green: #F7F3EC; --green-panel: #1F4436; --on-panel: #F7F3EC;
  --gold: #B08A45; --gold-ink: #7A5A24; --gold-soft: rgba(176,138,69,0.14);
  --hero-grad: linear-gradient(96deg, #F7F3EC 0%, #F7F3EC 46%, rgba(247,243,236,0.8) 58%, rgba(247,243,236,0.45) 70%, rgba(247,243,236,0.15) 82%, rgba(247,243,236,0) 92%);
  --photo-fade: linear-gradient(180deg, rgba(247,243,236,0) 45%, rgba(247,243,236,0.55) 78%, #F7F3EC 100%);
  --field: #FFFDF8;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 1200px;
  --gutter: 40px;
}

html[data-theme="dark"] {
  --paper: #101613; --surface: #161E1A; --band: #131A16;
  --ink: #EFEBE1; --muted: #A6B3AA; --faint: #7C8B82;
  --line: rgba(239,235,225,0.13); --line-strong: rgba(239,235,225,0.26);
  --green: #C9992F; --on-green: #17130A; --green-panel: #17231D; --on-panel: #EFEBE1;
  --gold: #D8A94B; --gold-ink: #E2B75E; --gold-soft: rgba(216,169,75,0.16);
  --hero-grad: linear-gradient(96deg, #101613 0%, #101613 46%, rgba(16,22,19,0.8) 58%, rgba(16,22,19,0.45) 70%, rgba(16,22,19,0.15) 82%, rgba(16,22,19,0) 92%);
  --photo-fade: linear-gradient(180deg, rgba(16,22,19,0) 45%, rgba(16,22,19,0.6) 78%, #101613 100%);
  --field: #101613;
}

/* --------------------------------------------------------------- základ -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.75; }
/* Musí přebít `display` nastavený na konkrétních blocích (.form-success apod.). */
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
input, textarea, button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green); color: var(--on-green);
  padding: 12px 20px; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.gold { color: var(--gold); }
.muted { color: var(--muted); }

/* Obsah, který se liší mezi desktopovým a mobilním návrhem. */
.m-only { display: none !important; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.eyebrow-on-dark { color: inherit; opacity: 0.6; }

.section { padding: 104px 0; }
.section-band {
  background: var(--band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* -------------------------------------------------------------- tlačítka -- */

.btn {
  display: inline-block;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--green);
  color: var(--on-green);
  padding: 16px 28px;
  font-size: 15.5px;
}
.btn-ghost {
  border-color: var(--line-strong);
  padding: 16px 28px;
  font-size: 15.5px;
}
.btn-invert {
  align-self: flex-start;
  background: var(--on-panel);
  color: var(--green-panel);
  padding: 13px 22px;
  font-size: 14.5px;
}
.link-gold {
  font-size: 15px;
  color: var(--gold-ink);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 3px;
}

/* --------------------------------------------------------------- hlavička -- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  padding-top: 20px; padding-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand .dot { color: var(--gold); }

.nav { display: flex; gap: 30px; font-size: 14.5px; color: var(--muted); }
.header-cta { padding: 12px 22px; font-size: 14.5px; }

.header-mobile { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  width: 46px; height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: var(--ink);
  transition: transform .22s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(2.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-2.75px) rotate(-45deg); }

/* ------------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  /* Výška roste se šířkou okna. Čím nižší pás, tím víc se 16:9 fotka ořízne
     na výšku a tím blíž objekt působí. Na 2560 px je teď vidět 71 % výšky
     snímku místo 60 %. */
  min-height: clamp(640px, 40vw, 1020px);
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-photo { position: absolute; inset: 0; }
/* Tři vrstvy nad sebou: rozostřené pozadí, přechod do papíru a nad ním
   výřez postavy. Díky tomu gradient nikdy nebledí obličej a může sahat
   dál doprava, než by šlo u jednolité fotky. Obě vrstvy mají shodné
   `object-*`, takže postava přesně sedí do pozadí. */
.hero-bg, .hero-person {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 55% 0%;
}
/* Na desktopu je hero široký nízký pás. `cover` by 16:9 fotku ořízl na
   výšku a z postavy by zbyla hlava s rameny. `contain` ji proto vejde
   celou: výšku určí pás, takže na širokém okně vyjde menší a působí,
   že stojí dál v prostoru. Pozadí zůstává na `cover`, aby plochu vyplnilo.
   Na mobilu se ořezává vodorovně, tam `cover` sedí a zůstává. */
@media (min-width: 941px) {
  .hero-person {
    object-fit: contain;
    object-position: 78% 100%;
    /* Při plné výšce se postava dotýkala horní hrany pásu. Vrstva je proto
       o kus nižší a ukotvená dole, čímž nad hlavou vznikne volný prostor
       a postava se posune níž. */
    top: auto;
    height: 88%;
  }
}
.hero-veil {
  position: absolute; inset: 0;
  background: var(--hero-grad);
}
.hero-inner {
  position: relative;
  width: 100%;
  padding-top: 96px; padding-bottom: 96px;
}
.hero-copy {
  max-width: 440px;
  display: flex; flex-direction: column; gap: 22px;
}
.rule { width: 56px; height: 2px; background: var(--gold); }
.hero h1 {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-sub {
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding-top: 6px;
}

/* ----------------------------------------------------------------- čísla -- */

.stats {
  background: var(--band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-left: 0; padding-right: 0;
}
.stat {
  padding: 44px var(--gutter);
  display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--serif);
  font-size: 50px;
  line-height: 1;
}
.stat-unit { font-size: 27px; }
.stat-label { font-size: 14.5px; color: var(--muted); }

/* ---------------------------------------------------------------- o mně -- */

.section#o-mne { scroll-margin-top: 100px; }
.about { display: flex; flex-direction: column; gap: 64px; }
.about-head {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px;
  align-items: start;
}
.about-head .eyebrow { padding-top: 10px; }
.about-text {
  display: flex; flex-direction: column; gap: 30px;
  max-width: 660px;
}
.about-text h2 {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.22;
  text-wrap: pretty;
}
.about-text .lead {
  font-size: 19px;
  line-height: 1.75;
  text-wrap: pretty;
}
.about-text .muted {
  font-size: 17px;
  line-height: 1.8;
  text-wrap: pretty;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.fact {
  padding: 26px 28px 0 0;
  display: flex; flex-direction: column; gap: 6px;
}
.fact + .fact { border-left: 1px solid var(--line); padding-left: 28px; }
.fact:last-child { padding-right: 0; }
.fact-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.fact-value { font-size: 16.5px; line-height: 1.5; }

/* --------------------------------------------------------------- služby -- */

.section#sluzby { scroll-margin-top: 100px; }
.services { display: flex; flex-direction: column; gap: 44px; }
.services-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
}
.services-title {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 620px;
}
.services-title h2 {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.15;
  text-wrap: pretty;
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.card {
  background: var(--surface);
  padding: 38px 36px;
  display: flex; flex-direction: column; gap: 12px;
}
.card-num { font-family: var(--mono); font-size: 12px; color: var(--gold-ink); }
.card h3 { font-family: var(--serif); font-size: 27px; }
.card p {
  font-size: 15.5px; line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

/* -------------------------------------------------------------- postup -- */

.section#postup { scroll-margin-top: 100px; }
.process {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: start;
}
.process-intro {
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 110px;
}
.process-intro h2 {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.15;
  text-wrap: pretty;
}
.process-intro .muted {
  font-size: 16.5px; line-height: 1.7;
  text-wrap: pretty;
}

.steps { display: flex; flex-direction: column; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }
.step-num { font-family: var(--serif); font-size: 30px; color: var(--gold); }
.step-title { font-size: 20px; margin-bottom: 7px; }
.step-desc { font-size: 15.5px; line-height: 1.65; color: var(--muted); }

/* ------------------------------------------------------------ reference -- */

.section-refs {
  scroll-margin-top: 100px;
  background: var(--green-panel);
  color: var(--on-panel);
  overflow: hidden;
}
.refs-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 72px;
  padding-top: 96px;
  padding-bottom: 56px;
}
.refs-main {
  display: flex; flex-direction: column; gap: 22px;
  min-height: 320px;
}
.refs-quote-wrap {
  display: flex; flex-direction: column; gap: 18px;
  flex: 1;
}
.stars {
  font-size: 19px;
  letter-spacing: 0.12em;
  color: var(--gold);
}
#refQuote {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 34px;
  line-height: 1.35;
  text-wrap: pretty;
  /* Rezerva na nejdelší citaci, aby sekce při střídání neposkakovala. */
  min-height: 232px;
}
.quote-in { animation: om-quote-in .5s ease both; }
@keyframes om-quote-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.refs-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.refs-author { font-size: 14.5px; opacity: 0.72; }
.refs-nav { display: flex; gap: 10px; }
.round-btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.round-btn:hover { background: rgba(255,255,255,0.08); }

.refs-side {
  display: flex; flex-direction: column; gap: 20px;
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 44px;
}
.rating { display: flex; align-items: baseline; gap: 12px; }
.rating-num { font-family: var(--serif); font-size: 46px; color: var(--gold); }
.rating-of { font-size: 14.5px; opacity: 0.72; }
.refs-note {
  font-size: 15.5px; line-height: 1.7;
  opacity: 0.82;
  text-wrap: pretty;
}

.marquee {
  padding-bottom: 72px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: om-marquee 60s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes om-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.strip-card {
  width: 320px; flex: 0 0 320px;
  margin-right: 20px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.strip-stars { font-size: 13px; letter-spacing: 0.1em; color: var(--gold); }
.strip-q { font-size: 15.5px; line-height: 1.6; opacity: 0.9; }
.strip-a { font-size: 13px; opacity: 0.6; }

/* -------------------------------------------------------------- kontakt -- */

.section#kontakt { scroll-margin-top: 100px; }
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 22px; }
.contact-info h2 {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.12;
  text-wrap: pretty;
}
.contact-lead {
  max-width: 440px;
  font-size: 17px; line-height: 1.7;
  text-wrap: pretty;
}
.contact-rows { display: flex; flex-direction: column; margin-top: 10px; }
.contact-row {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px;
}
.contact-row-last { border-bottom: 1px solid var(--line); }
.contact-value { font-family: var(--serif); font-size: 24px; }

.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 40px 36px;
}
.form-success {
  display: flex; flex-direction: column; gap: 12px;
  padding: 40px 0;
}
.form-success-title { font-family: var(--serif); font-size: 30px; color: var(--gold); }
.form-success-text { font-size: 16px; line-height: 1.65; color: var(--muted); }

#contactForm { display: flex; flex-direction: column; gap: 20px; }
.form-title { font-family: var(--serif); font-size: 26px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 13.5px; color: var(--muted);
}
.field input, .field textarea {
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 13px 14px;
  font-size: 15.5px;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #B4462F;
}
html[data-theme="dark"] .field input[aria-invalid="true"],
html[data-theme="dark"] .field textarea[aria-invalid="true"] {
  border-color: #E08A72;
}
.field-error {
  font-style: normal;
  font-size: 12.5px;
  color: #B4462F;
  min-height: 0;
}
html[data-theme="dark"] .field-error { color: #E08A72; }
.field-error:empty { display: none; }

/* Honeypot proti robotům, mimo obrazovku, ne display:none (to některé boty přeskočí). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-submit { border: none; font-size: 16px; }
.btn-submit[disabled] { opacity: 0.6; cursor: default; }
.form-note { font-size: 13px; line-height: 1.6; color: var(--faint); }
.form-fail {
  font-size: 13.5px; line-height: 1.6;
  color: #B4462F;
}
html[data-theme="dark"] .form-fail { color: #E08A72; }

/* ------------------------------------------------------- právní stránka -- */

.legal { max-width: 720px; display: flex; flex-direction: column; gap: 6px; }
.legal-title {
  font-family: var(--serif);
  font-size: 40px; line-height: 1.15;
  margin: 14px 0 6px;
  text-wrap: pretty;
}
.legal-lead {
  font-size: 18px; line-height: 1.7;
  color: var(--muted);
  margin-bottom: 18px;
  text-wrap: pretty;
}
.legal h2 {
  font-family: var(--serif);
  font-size: 24px; line-height: 1.3;
  margin: 30px 0 10px;
}
.legal p { font-size: 16.5px; line-height: 1.75; color: var(--muted); margin-bottom: 12px; text-wrap: pretty; }
.legal strong { color: var(--ink); font-weight: 500; }
.legal a { color: var(--gold-ink); border-bottom: 1px solid var(--gold); }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { font-size: 16.5px; line-height: 1.75; color: var(--muted); margin-bottom: 7px; }
.legal-updated {
  margin-top: 30px; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--faint);
}
.legal-back a { border-bottom: none; }
.form-note-link { color: var(--gold-ink); border-bottom: 1px solid var(--gold); }

/* --------------------------------------------------------------- patička -- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--band);
}
.footer-inner {
  padding-top: var(--gutter); padding-bottom: var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted);
}
.footer-name { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.footer-links { display: flex; align-items: center; gap: 24px; }
.theme-btn {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
}

/* ========================================================== responzivita == */

@media (max-width: 1080px) {
  .refs-grid { gap: 48px; }
  .process { gap: 48px; }
  .contact { gap: 48px; }
}

/* ---- Mobil: 1:1 podle návrhu „Pustka Web - mobil.dc.html“ (390 px). ----
   Platí od bodu, kde se rozpadá desktopová navigace. Tablety dostávají
   stejné rozvržení s o něco širším okrajem. */
@media (max-width: 940px) {
  :root { --gutter: 20px; }
  .m-only { display: revert !important; }
  .d-only { display: none !important; }

  /* hlavička */
  .header-inner { padding-top: 14px; padding-bottom: 14px; gap: 12px; position: relative; }
  .brand { font-size: 19px; }
  .header-cta { display: none; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--band);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    color: var(--ink);
  }
  .nav.open { display: flex; }
  .nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav .nav-cta {
    margin-top: 14px;
    border-bottom: none;
    padding: 15px 20px;
    font-size: 16px;
  }
  .m-only.btn { display: inline-block !important; }
  .header-mobile.m-only { display: flex !important; }

  /* hero, fotka nahoře, přechod do papíru, text pod ní */
  .hero { min-height: 0; display: block; }
  .hero-photo { position: relative; height: 420px; }
  .hero-bg, .hero-person { object-position: 76% 18%; }
  .hero-veil { background: var(--photo-fade); }
  /* Postava je nad přechodem, takže by ji nezasáhl a dole by končila ostrou
     hranou. Maska ji proto rozpustí, ale až v posledních 18 % výšky.
     Kopírovat průběh `--photo-fade` nešlo: ten začíná ve 45 %, což je uprostřed
     trupu, a postava pak prosvítala. Pozadí smí blednout dřív, postava ne. */
  .hero-person {
    -webkit-mask-image: linear-gradient(180deg, #000 82%, rgba(0,0,0,0.55) 93%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 82%, rgba(0,0,0,0.55) 93%, transparent 100%);
  }
  .hero-inner { padding: 4px var(--gutter) 40px; }
  .hero-copy { max-width: 100%; gap: 20px; }
  .rule { width: 48px; }
  .hero h1 { font-size: 42px; line-height: 1.05; }
  .hero-sub { font-size: 17px; line-height: 1.6; }
  .hero-actions { flex-direction: column; gap: 10px; padding-top: 0; }
  .hero-actions .btn { padding: 17px 20px; font-size: 16px; }

  /* čísla, číslo vlevo, popisek vpravo */
  .stats-grid { grid-template-columns: 1fr; }
  .stat {
    /* Návrh počítal s `baseline`, to ale sedí jen u jednořádkového popisku.
       Jakmile se text zalomí, číslo zůstane nahoře a popisek visí pod ním. */
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 16px;
    padding: 24px var(--gutter);
    border-right: none;
    border-top: 1px solid var(--line);
  }
  .stat:first-child { border-top: none; }
  .stat-num { font-size: 40px; }
  .stat-unit { font-size: 22px; }
  .stat-label { text-align: right; max-width: 190px; }

  .section { padding: 56px 0; }

  /* o mně */
  .about { gap: 24px; }
  .about-head { grid-template-columns: 1fr; gap: 24px; }
  .about-head .eyebrow { padding-top: 0; font-size: 11px; }
  .about-text { gap: 24px; }
  .about-text h2 { font-size: 29px; line-height: 1.25; }
  .about-text .lead { font-size: 17px; line-height: 1.7; }
  .about-text .muted { font-size: 16px; line-height: 1.75; }
  .facts { grid-template-columns: 1fr; border-top: none; margin-top: 4px; }
  .fact { padding: 16px 0; border-top: 1px solid var(--line); gap: 4px; }
  .fact + .fact { border-left: none; padding-left: 0; }
  .fact:last-child { border-bottom: 1px solid var(--line); }
  .fact-label { font-size: 10.5px; }
  .fact-value { font-size: 16px; }

  /* služby */
  .services { gap: 28px; }
  .services-title { gap: 12px; }
  .services-title .eyebrow { font-size: 11px; }
  .services-title h2 { font-size: 29px; line-height: 1.2; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 26px 22px; gap: 9px; }
  .card-num { font-size: 11.5px; }
  .card h3 { font-size: 24px; }
  .card p { line-height: 1.6; }

  /* postup */
  .process { grid-template-columns: 1fr; gap: 24px; }
  .process-intro { position: static; gap: 12px; }
  .process-intro .eyebrow { font-size: 11px; }
  .process-intro h2 { font-size: 29px; line-height: 1.2; }
  .process-intro .muted { font-size: 16px; }
  .step {
    grid-template-columns: 42px 1fr;
    gap: 14px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: none;
  }
  .step:last-child { border-bottom: 1px solid var(--line); }
  .step-num { font-size: 24px; }
  .step-title { font-size: 18px; margin-bottom: 5px; }
  .step-desc { font-size: 15px; line-height: 1.6; }

  /* reference, citace, pás, hodnocení (v tomto pořadí) */
  .section-refs { padding: 52px 0; display: flex; flex-direction: column; gap: 32px; }
  .refs-grid { display: contents; }
  .refs-main { order: 1; min-height: 0; gap: 18px; padding: 0 var(--gutter); }
  .refs-main .eyebrow { font-size: 11px; }
  .refs-quote-wrap { gap: 18px; flex: none; }
  .stars { font-size: 17px; }
  #refQuote { font-size: 27px; min-height: 190px; }
  .refs-foot { gap: 16px; flex-wrap: nowrap; }
  .refs-author { font-size: 13.5px; }
  .refs-nav { gap: 8px; }
  .round-btn { width: 46px; height: 46px; }
  .marquee { order: 2; padding-bottom: 0;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  }
  .marquee-track { animation-duration: 48s; }
  .strip-card { width: 250px; flex-basis: 250px; margin-right: 14px; padding: 18px 20px; gap: 8px; }
  .strip-stars { font-size: 12px; }
  .strip-q { font-size: 14.5px; line-height: 1.55; }
  .strip-a { font-size: 12.5px; }
  .refs-side { order: 3; border-left: none; padding: 0 var(--gutter); gap: 14px; }
  .rating { gap: 10px; }
  .rating-num { font-size: 36px; }
  .rating-of { font-size: 13.5px; }
  .btn-invert { align-self: stretch; font-size: 15px; padding: 15px 20px; }

  /* kontakt */
  .contact { grid-template-columns: 1fr; gap: 26px; }
  .contact-info { gap: 14px; }
  .contact-info .eyebrow { font-size: 11px; }
  .contact-info h2 { font-size: 31px; line-height: 1.15; }
  .contact-lead { font-size: 16px; max-width: none; }
  .contact-rows { margin-top: 12px; }
  .contact-row { padding: 16px 0; gap: 14px; }
  .contact-row .fact-label { font-size: 10.5px; }
  .contact-value { font-size: 20px; }
  .form-panel { padding: 24px 20px; }
  #contactForm { gap: 16px; }
  .form-title { font-size: 23px; }
  .field-row { grid-template-columns: 1fr; gap: 16px; }
  .field { gap: 6px; font-size: 13px; }
  .field input, .field textarea { padding: 14px; font-size: 16px; }
  .btn-submit { padding: 17px 20px; }
  .form-note { font-size: 12.5px; line-height: 1.55; }
  .form-success { padding: 24px 0; gap: 10px; }
  .form-success-title { font-size: 26px; }
  .form-success-text { font-size: 15.5px; line-height: 1.6; }

  /* právní stránka */
  .legal-title { font-size: 30px; }
  .legal-lead { font-size: 16.5px; }
  .legal h2 { font-size: 21px; }

  /* patička */
  .footer-inner {
    padding: 28px var(--gutter) 108px; /* místo pro fixní spodní lištu */
    flex-direction: column; align-items: flex-start;
    gap: 14px;
  }
  .footer-name { font-size: 17px; }
  .footer-inner > div:nth-child(2) { font-size: 13.5px; }
  .theme-btn { font-size: 13.5px; padding: 12px 18px; }

  /* spodní lišta, fixní, zobrazí se až po odscrollování hera (scrollY > 620) */
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 12px var(--gutter);
    display: flex !important;
    gap: 10px;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
  }
  .action-bar.visible {
    transform: none;
    visibility: visible;
    transition: transform .2s ease;
  }
  .action-bar .btn { font-size: 15.5px; padding: 15px 20px; }
  .action-bar-main { flex: 1; padding: 15px 16px; }
}

@media (min-width: 701px) and (max-width: 940px) {
  :root { --gutter: 28px; }
}

/* Na tabletu by řádek s číslem roztáhl popisek až k pravému okraji a mezi
   nimi zůstala stovky pixelů široká díra. Řádek proto dostane strop a střed. */
@media (min-width: 600px) and (max-width: 940px) {
  .stat {
    max-width: 560px;
    margin-left: auto; margin-right: auto;
    width: 100%;
    padding-left: 0; padding-right: 0;
  }
  .stats-grid { padding-left: var(--gutter); padding-right: var(--gutter); }
  .stat-label { max-width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .quote-in { animation: none; }
  * { transition: none !important; }
}
