/* Pradienko — domáci rozpočet | skeinworks.digital
   Paleta: ľan, mosadz, šalvia, atrament */

:root {
  --ivory: #f7f2e7;
  --paper: #fffcf6;
  --paper-2: #fdf9f0;
  --ink: #241f1a;
  --muted: #6b6157;
  --flax: #8c6a3f;
  --flax-dark: #6f5230;
  --sage: #59684f;
  --line: #e4dacA;
  --rule: rgba(36, 31, 26, 0.12);
  --shadow: 0 1px 2px rgba(36, 31, 26, .04), 0 12px 28px -18px rgba(36, 31, 26, .35);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: Georgia, "Times New Roman", Times, serif;
  --ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --gap: clamp(2.5rem, 6vw, 5.5rem);
  --radius: 4px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--ivory);
  background-image:
    repeating-linear-gradient(0deg, rgba(36, 31, 26, .016) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(36, 31, 26, .012) 0 1px, transparent 1px 6px);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.72;
}

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

a { color: var(--flax-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

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

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1.1em; }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.2rem; z-index: 200; font-family: var(--ui);
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Hlavička ---------- */

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 252, 246, .93);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: .85rem 0;
}

.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand__name { font-family: var(--serif); font-size: 1.32rem; letter-spacing: .01em; line-height: 1; }
.brand__tag {
  display: block; font-family: var(--ui); font-size: .62rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted); margin-top: .3rem;
}

.nav { display: flex; align-items: center; gap: 1.15rem; flex-wrap: wrap; }
.nav a {
  font-family: var(--ui); font-size: .84rem; letter-spacing: .01em;
  color: var(--muted); text-decoration: none; padding: .35rem 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--flax); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--flax); }

.burger {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--radius); padding: .5rem .75rem; cursor: pointer;
  font-family: var(--ui); font-size: .8rem; color: var(--ink);
}

/* ---------- Tlačidlá ---------- */

.btn {
  display: inline-block; font-family: var(--ui); font-size: .88rem; letter-spacing: .02em;
  padding: .8rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
  transition: transform .16s ease, background-color .16s ease;
}
.btn:hover { background: var(--flax-dark); border-color: var(--flax-dark); color: var(--paper); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--flax); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---------- Sekcie a niť (signature) ---------- */

.section { padding: var(--gap) 0; border-top: 1px solid var(--rule); }
.section--plain { border-top: 0; }
.section--paper { background: var(--paper); }

.eyebrow {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--ui); font-size: .68rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--flax); margin: 0 0 1rem;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; flex: none;
  background: var(--flax); transform: rotate(45deg);
}
.eyebrow::after {
  content: ""; height: 1px; flex: 1;
  background-image: linear-gradient(90deg, var(--flax) 0 6px, transparent 6px 12px);
  background-size: 12px 1px; opacity: .5;
}

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

/* ---------- Hero ---------- */

.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--gap); }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__figure { position: relative; }
.hero__figure img { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero__stitch {
  position: absolute; inset: 10px 10px auto auto; width: 1px; height: calc(100% - 20px);
  background-image: linear-gradient(180deg, var(--flax) 0 5px, transparent 5px 11px);
  background-size: 1px 11px; opacity: .45;
}

.stat-row {
  display: flex; flex-wrap: wrap; gap: 2.2rem; margin-top: 2.2rem;
  padding-top: 1.6rem; border-top: 1px dashed var(--line);
}
.stat__num { font-family: var(--serif); font-size: 1.75rem; display: block; }
.stat__label { font-family: var(--ui); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Karty ---------- */

.grid { display: grid; gap: 1.4rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card img { border-radius: var(--radius); margin-bottom: 1.1rem; }
.card__num {
  font-family: var(--ui); font-size: .7rem; letter-spacing: .18em; color: var(--flax);
  display: block; margin-bottom: .7rem;
}

.media {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
}
.media--flip .media__text { order: 2; }
.media img { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 1.6rem; margin-bottom: .55rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 8px; background: var(--sage); transform: rotate(45deg);
}

/* ---------- Kroky s niťou ---------- */

.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 15px; top: 12px; bottom: 12px; width: 1px;
  background-image: linear-gradient(180deg, var(--flax) 0 5px, transparent 5px 12px);
  background-size: 1px 12px; opacity: .55;
}
.steps li { position: relative; padding: 0 0 2rem 3.4rem; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: ""; position: absolute; left: 8px; top: .5em; width: 15px; height: 15px;
  background: var(--paper); border: 1px solid var(--flax); transform: rotate(45deg);
}
.steps h3 { margin-bottom: .35rem; }
.steps p:last-child { margin-bottom: 0; }

/* ---------- Cenník ---------- */

.toggle {
  display: inline-flex; align-items: center; gap: .35rem; padding: .3rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-family: var(--ui);
}
.toggle button {
  border: 0; background: none; cursor: pointer; font: inherit; font-size: .82rem;
  padding: .5rem 1.1rem; border-radius: 999px; color: var(--muted);
}
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.plan {
  display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow);
}
.plan--featured { border-color: var(--flax); box-shadow: 0 14px 34px -20px rgba(140, 106, 63, .55); }
.plan__badge {
  font-family: var(--ui); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--flax); margin-bottom: .6rem; display: block;
}
.plan__price { font-family: var(--serif); font-size: 2.5rem; line-height: 1; display: block; margin: .4rem 0 .2rem; }
.plan__period { font-family: var(--ui); font-size: .78rem; color: var(--muted); letter-spacing: .04em; }
.plan .ticks { margin: 1.3rem 0 1.7rem; font-size: .95rem; }
.plan .btn { margin-top: auto; text-align: center; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-family: var(--ui); font-size: .9rem; }
caption { text-align: left; padding: 1rem 1.2rem .4rem; color: var(--muted); font-family: var(--ui); font-size: .82rem; }
th, td { padding: .85rem 1.2rem; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; letter-spacing: .04em; background: var(--paper-2); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- Otázky ---------- */

.qa { border-bottom: 1px solid var(--rule); }
.qa summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: var(--serif); font-size: 1.12rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: .4rem; top: 1rem;
  font-family: var(--ui); color: var(--flax); font-size: 1.3rem; line-height: 1;
}
.qa[open] summary::after { content: "\2013"; }
.qa__body { padding: 0 2.5rem 1.3rem 0; color: var(--muted); }
.qa__body p:last-child { margin-bottom: 0; }

/* ---------- Kalkulačka ---------- */

.calc {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow);
}
.calc__row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; }
.calc__out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.6rem; }
.calc__cell { border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem; background: var(--paper-2); }
.calc__cell b { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; display: block; }
.calc__cell span { font-family: var(--ui); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.calc__note { font-family: var(--ui); font-size: .8rem; color: var(--muted); margin: 1.1rem 0 0; }

/* ---------- Formulár ---------- */

.field { margin-bottom: 1.2rem; }
label { display: block; font-family: var(--ui); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .75rem .9rem;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--flax); outline: none; box-shadow: 0 0 0 3px rgba(140, 106, 63, .14); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-family: var(--ui); font-size: .84rem; text-transform: none; letter-spacing: 0; color: var(--muted); }
.check input { width: auto; margin-top: .25rem; flex: none; }
.error { display: block; font-family: var(--ui); font-size: .78rem; color: #a03a28; margin-top: .35rem; min-height: 1em; }
.form-status {
  font-family: var(--ui); font-size: .9rem; margin-top: 1.2rem; padding: .9rem 1.1rem;
  border-left: 3px solid var(--sage); background: var(--paper-2); display: none;
}
.form-status.is-visible { display: block; }

/* ---------- Recenzie ---------- */

.quote { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem 1.6rem; margin: 0; box-shadow: var(--shadow); }
.quote p { font-family: var(--serif); font-size: 1.06rem; }
.quote footer { font-family: var(--ui); font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.quote .stars { color: var(--flax); letter-spacing: .18em; font-size: .85rem; display: block; margin-bottom: .8rem; }

/* ---------- Články ---------- */

.post { border-top: 1px solid var(--rule); padding-top: 2rem; margin-top: 2rem; }
.post:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.post__meta { font-family: var(--ui); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.toc { list-style: none; margin: 0; padding: 0; font-family: var(--ui); font-size: .9rem; }
.toc li { border-bottom: 1px dashed var(--line); padding: .6rem 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- Právne ---------- */

.legal h3 { margin-top: 2.2rem; }
.legal .steps h3 { margin-top: 0; }
.legal .steps { margin-top: 1.2rem; }
.legal h2 { padding-top: 1rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }

/* ---------- CTA pás ---------- */

.band { background: var(--ink); color: var(--paper); }
.band h2 { color: var(--paper); }
.band p { color: rgba(255, 252, 246, .78); }
.band .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.band .btn:hover { background: var(--flax); border-color: var(--flax); color: var(--paper); }
.band .eyebrow { color: #d8b98a; }
.band .eyebrow::before { background: #d8b98a; }
.band .eyebrow::after { background-image: linear-gradient(90deg, #d8b98a 0 6px, transparent 6px 12px); }

/* ---------- Päta ---------- */

.footer { background: var(--paper); border-top: 1px solid var(--rule); padding: var(--gap) 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer h4 { font-family: var(--ui); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .45rem; }
.footer a { text-decoration: none; color: var(--ink); font-size: .95rem; }
.footer a:hover { color: var(--flax-dark); text-decoration: underline; }
.footer address { font-style: normal; color: var(--muted); font-size: .95rem; }
.footer__bottom {
  margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-family: var(--ui); font-size: .78rem; color: var(--muted);
}

/* ---------- Cookies ---------- */

.cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 120;
  max-width: 560px; margin-inline: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; box-shadow: 0 18px 44px -18px rgba(36, 31, 26, .5);
  display: none;
}
.cookie.is-open { display: block; }
.cookie h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.cookie p { font-size: .92rem; color: var(--muted); }
.cookie__row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.cookie .btn { padding: .6rem 1.15rem; font-size: .82rem; }

/* ---------- Responzívne ---------- */

@media (max-width: 1040px) {
  .nav { gap: .9rem; }
  .nav a { font-size: .8rem; }
}

@media (max-width: 900px) {
  body { font-size: 16.5px; }
  .burger { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: .5rem 1.25rem 1.2rem;
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
  .masthead__inner { position: relative; }
  .hero__grid, .media, .grid--2, .grid--3, .grid--4, .footer__grid { grid-template-columns: 1fr; }
  .media--flip .media__text { order: 0; }
  .calc__out { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .calc__row { grid-template-columns: 1fr; }
  .calc__row .btn { width: 100%; }
  .stat-row { gap: 1.4rem; }
}

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