/* ==========================================================================
   Domivo — domácí finance. Základní styl.
   Paleta: teplá béžová základna, mechová zeleň, medová žlutá.
   ========================================================================== */

:root {
  --sand: #F6EEE3;
  --sand-deep: #EFE2D0;
  --cream: #FFFBF6;
  --ink: #33291F;
  --muted: #7C6B5B;
  --moss: #4E6B4F;
  --moss-dark: #3C543D;
  --honey: #E3A93C;
  --honey-soft: #F7E4BC;
  --line: #E3D5C2;
  --danger: #A5462F;

  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 32px;

  --shadow-s: 0 2px 8px rgba(80, 60, 40, .06);
  --shadow-m: 0 10px 28px rgba(80, 60, 40, .09);
  --shadow-l: 0 20px 48px rgba(80, 60, 40, .12);

  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --num: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --wrap: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--moss-dark); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.eyebrow {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 700;
  margin-bottom: .8rem;
  display: block;
}

.lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }

.section { padding: 5rem 0; }
.section--tight { padding: 3.5rem 0; }
.section--cream { background: var(--cream); }
.section-head { max-width: 60ch; margin-bottom: 2.75rem; }

/* --- Tlačítka ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.6rem;
  font: 600 1rem/1 var(--body);
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn--primary { background: var(--moss); color: #fff; box-shadow: var(--shadow-m); }
.btn--primary:hover { background: var(--moss-dark); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--moss-dark); border: 1.5px solid var(--line); }
.btn--ghost:hover { background: var(--sand-deep); border-color: var(--moss); }
.btn--honey { background: var(--honey); color: #3A2C12; }
.btn--honey:hover { background: #D69A2C; transform: translateY(-2px); }
.btn--wide { width: 100%; }

:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- Hlavička ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 238, 227, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.brand img { width: 36px; height: 36px; }
.brand span small {
  display: block;
  font: 500 .68rem/1 var(--body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}
.nav { margin-left: auto; }
.nav ul {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: .96rem;
  font-weight: 500;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--honey); }
.header-cta { display: inline-flex; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: .55rem .7rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-toggle span + span { margin-top: 5px; }

@media (max-width: 940px) {
  .nav {
    position: absolute;
    inset: 76px 0 auto;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    display: none;
    box-shadow: var(--shadow-m);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav a { display: block; padding: .9rem 0; }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero { padding: 4rem 0 4.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3.5rem;
  align-items: center;
}
.hero p.lead { margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero-note {
  font-size: .9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
}
.hero-badge {
  position: absolute;
  left: -22px;
  bottom: 34px;
  background: var(--cream);
  border-radius: var(--radius-m);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-m);
  border: 1px solid var(--line);
  max-width: 232px;
}
.hero-badge strong {
  font-family: var(--num);
  font-size: 1.5rem;
  color: var(--moss-dark);
  display: block;
}
.hero-badge span { font-size: .84rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero-media img { height: 330px; }
  .hero-badge { left: 12px; bottom: 12px; }
}

/* --- Pásek s čísly ------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
}
.stat { background: var(--cream); padding: 1.5rem 1.4rem; }
.stat b {
  font-family: var(--num);
  font-size: 1.6rem;
  color: var(--moss-dark);
  display: block;
}
.stat span { font-size: .88rem; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* --- Karty --------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.6rem;
  box-shadow: var(--shadow-s);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .96rem; margin-bottom: 0; }
.card img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  border-radius: var(--radius-s);
  margin-bottom: 1.1rem;
}
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--honey-soft);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  font-family: var(--num);
  font-weight: 700;
  color: var(--moss-dark);
}
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

/* --- Postup -------------------------------------------------------------- */
.steps { counter-reset: krok; display: grid; gap: 1.25rem; }
.step {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 1.4rem;
  align-items: start;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.5rem 1.6rem;
}
.step::before {
  counter-increment: krok;
  content: counter(krok, decimal-leading-zero);
  font-family: var(--num);
  font-size: 1.15rem;
  color: var(--moss);
  background: var(--sand-deep);
  border-radius: 999px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.step h3 { margin-bottom: .25rem; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 620px) {
  .step { grid-template-columns: 1fr; gap: .8rem; }
  .step::before { width: 48px; height: 48px; font-size: 1rem; }
}

/* --- Kalkulačka ---------------------------------------------------------- */
.calc {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 2.25rem;
  box-shadow: var(--shadow-m);
}
.calc-field { margin-bottom: 1.15rem; }
.calc-field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: .45rem;
}
.calc-field output {
  font-family: var(--num);
  color: var(--moss-dark);
  background: var(--honey-soft);
  border-radius: 999px;
  padding: .15rem .65rem;
  font-size: .9rem;
}
input[type="range"] {
  width: 100%;
  height: 8px;
  appearance: none;
  background: var(--sand-deep);
  border-radius: 999px;
  outline-offset: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--moss);
  border: 4px solid var(--cream);
  box-shadow: var(--shadow-s);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 4px solid var(--cream);
  border-radius: 50%;
  background: var(--moss);
  cursor: pointer;
}
.calc-result {
  background: var(--sand);
  border-radius: var(--radius-m);
  padding: 1.6rem;
  text-align: center;
  border: 1px solid var(--line);
}
.donut { width: 190px; height: 190px; margin: 0 auto .75rem; }
.donut circle { fill: none; stroke-width: 16; stroke-linecap: round; }
.donut-value {
  font-family: var(--num);
  font-size: 1.55rem;
  font-weight: 700;
  fill: var(--moss-dark);
}
.donut-label { font-size: .62rem; fill: var(--muted); letter-spacing: .12em; }
.calc-msg {
  font-size: .95rem;
  color: var(--muted);
  min-height: 3.2em;
  margin-bottom: 1rem;
}
.calc-legend {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: grid;
  gap: .4rem;
  font-size: .9rem;
  text-align: left;
}
.calc-legend li { display: flex; align-items: center; gap: .55rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.calc-legend b { margin-left: auto; font-family: var(--num); }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; padding: 1.5rem; } }

/* --- Ceník --------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
.plan {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-s);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.plan--featured {
  border: 2px solid var(--moss);
  box-shadow: var(--shadow-l);
}
.plan-tag {
  position: absolute;
  top: -14px;
  left: 1.75rem;
  background: var(--honey);
  color: #3A2C12;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 999px;
}
.plan h3 { margin-bottom: .2rem; }
.plan-for { font-size: .92rem; color: var(--muted); margin-bottom: 1.2rem; }
.price {
  font-family: var(--num);
  font-size: 2.35rem;
  font-weight: 700;
  color: var(--moss-dark);
  line-height: 1;
}
.price small { font: 500 .95rem/1 var(--body); color: var(--muted); }
.price-note { font-size: .84rem; color: var(--muted); margin: .5rem 0 1.4rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.75rem; display: grid; gap: .65rem; }
.plan li { display: flex; gap: .6rem; font-size: .95rem; }
.plan li::before { content: "✓"; color: var(--moss); font-weight: 700; }
.plan li.no::before { content: "—"; color: var(--muted); }
.plan .btn { margin-top: auto; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-top: 2rem;
  font-size: .95rem;
}
.price-table caption {
  text-align: left;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  background: var(--sand-deep);
  font-family: var(--display);
  font-size: 1.05rem;
}
.price-table th, .price-table td {
  padding: .85rem 1.25rem;
  text-align: left;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.price-table th { font-weight: 600; width: 55%; }
.price-table td { font-family: var(--num); color: var(--moss-dark); white-space: nowrap; }
@media (max-width: 560px) {
  .price-table th, .price-table td { padding: .7rem .9rem; font-size: .9rem; }
  .price-table td { white-space: normal; }
}

/* --- Recenze ------------------------------------------------------------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.quote {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.75rem;
  box-shadow: var(--shadow-s);
}
.quote p { font-family: var(--display); font-size: 1.05rem; }
.quote-by { display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; }
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--moss);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .95rem;
  flex: none;
}
.quote-by b { display: block; font-size: .95rem; }
.quote-by span { font-size: .85rem; color: var(--muted); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* --- FAQ ----------------------------------------------------------------- */
.faq { display: grid; gap: .85rem; max-width: 860px; }
.faq details {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.1rem 1.4rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.03rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--num);
  font-size: 1.35rem;
  color: var(--moss);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .9rem 0 .2rem; color: var(--muted); }

/* --- Kontakt ------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; }
.form {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 2rem;
  box-shadow: var(--shadow-m);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--sand);
  font: 400 1rem/1.5 var(--body);
  color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--moss);
  background: #fff;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--moss); }
.error-text { color: var(--danger); font-size: .85rem; margin-top: .35rem; display: none; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--danger); }
.field.has-error .error-text { display: block; }
.form-status {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-s);
  background: var(--honey-soft);
  border: 1px solid var(--honey);
  font-size: .95rem;
}
.form-status.is-visible { display: block; }

.contact-info { display: grid; gap: 1.25rem; align-content: start; }
.info-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.4rem 1.5rem;
}
.info-card h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.info-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.info-card a { color: var(--moss-dark); font-weight: 600; }
.contact-info img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* --- Patička ------------------------------------------------------------- */
.site-footer {
  background: var(--moss-dark);
  color: #EFE7DA;
  padding: 3.5rem 0 2rem;
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.site-footer h4 {
  font-family: var(--body);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 1rem;
}
.site-footer p { color: rgba(239, 231, 218, .78); font-size: .93rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.site-footer a { color: #EFE7DA; text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: var(--honey); text-decoration: underline; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--display);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: .9rem;
}
.footer-brand img { width: 34px; height: 34px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: .86rem;
  color: rgba(239, 231, 218, .68);
}
.link-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, .3);
  color: #EFE7DA;
  border-radius: 999px;
  padding: .45rem 1rem;
  font: 500 .86rem/1 var(--body);
  cursor: pointer;
}
.link-btn:hover { border-color: var(--honey); color: var(--honey); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

/* --- Cookie lišta -------------------------------------------------------- */
.cookie {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(140%);
  width: min(100% - 2rem, 900px);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-l);
  padding: 1.4rem 1.6rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
  z-index: 60;
  transition: transform .35s ease;
}
.cookie.is-open { transform: translateX(-50%) translateY(0); }
.cookie p { margin: 0; font-size: .93rem; color: var(--muted); }
.cookie h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.cookie-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
@media (max-width: 720px) {
  .cookie { grid-template-columns: 1fr; }
  .cookie-actions .btn { flex: 1 1 45%; }
}

/* --- Právní stránky ------------------------------------------------------ */
.doc { padding: 3.5rem 0 4.5rem; }
.doc-inner {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-s);
  max-width: 880px;
  margin-inline: auto;
}
.doc-inner h2 { font-size: 1.45rem; margin-top: 2.25rem; }
.doc-inner h2:first-of-type { margin-top: 1.5rem; }
.doc-inner ul { padding-left: 1.2rem; color: var(--muted); }
.doc-inner li { margin-bottom: .5rem; }
.doc-meta { font-size: .88rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
