/* ==========================================================================
   Harrowline — rodinné financie
   Paleta: pôda, brázda, pšenica, výhonok, ľan
   ========================================================================== */

:root {
  --soil: #12150E;
  --loam: #1A1E14;
  --panel: #212619;
  --furrow: #333A27;
  --wheat: #D9A63C;
  --wheat-soft: #EFC873;
  --sprout: #93AC6E;
  --linen: #ECE9DE;
  --muted: #A2A692;
  --danger: #C9694B;

  --ff-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --ff-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ff-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --maxw: 1180px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --radius: 4px;
  --line: 1px solid var(--furrow);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--soil);
  background-image:
    radial-gradient(ellipse at 15% -10%, rgba(217, 166, 60, .10), transparent 55%),
    radial-gradient(ellipse at 90% 5%, rgba(147, 172, 110, .08), transparent 50%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .016) 0 1px, transparent 1px 46px);
  color: var(--linen);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--wheat-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--wheat);
  color: var(--soil);
  padding: .6rem 1rem;
  z-index: 200;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Typografia ---------- */

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

h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--ff-mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--wheat);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--furrow), transparent);
}

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

.num { font-family: var(--ff-mono); font-variant-numeric: tabular-nums; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(18, 21, 14, .92);
  backdrop-filter: blur(9px);
  border-bottom: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--linen);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.brand-name {
  font-family: var(--ff-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
}
.brand-tag {
  display: block;
  font-family: var(--ff-mono);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  color: var(--linen);
  font-size: .93rem;
  padding: .3rem 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--wheat-soft); border-bottom-color: var(--wheat); text-decoration: none; }

.header-cta { display: flex; align-items: center; gap: 1rem; }

.tel {
  font-family: var(--ff-mono);
  font-size: .92rem;
  color: var(--wheat-soft);
  white-space: nowrap;
}

.burger {
  display: none;
  background: none;
  border: var(--line);
  border-radius: var(--radius);
  width: 44px;
  height: 40px;
  cursor: pointer;
  padding: 0;
  color: var(--linen);
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  transition: transform .25s, opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--ff-body);
  font-size: .95rem;
  font-weight: 600;
  padding: .78rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--wheat); color: #17190F; }
.btn-primary:hover { background: var(--wheat-soft); }
.btn-ghost { border-color: var(--furrow); color: var(--linen); background: transparent; }
.btn-ghost:hover { border-color: var(--wheat); color: var(--wheat-soft); }
.btn-block { width: 100%; }

/* ---------- Sekcie ---------- */

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-top: var(--line); }
.section-head { max-width: 68ch; margin-bottom: clamp(2rem, 4vw, 3rem); }

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

.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); border-top: 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.hero h1 span { color: var(--wheat); font-style: italic; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1.6rem; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  padding-top: 1.4rem;
  border-top: var(--line);
}
.hero-facts div { min-width: 110px; }
.hero-facts b {
  display: block;
  font-family: var(--ff-mono);
  font-size: 1.5rem;
  color: var(--wheat-soft);
  font-weight: 500;
}
.hero-facts small { color: var(--muted); font-size: .82rem; }

.hero-media { position: relative; }
.frame {
  position: relative;
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  filter: saturate(.85) contrast(1.03) brightness(.82);
}
.frame.is-missing { background: linear-gradient(150deg, #23291B, #12150E 70%); min-height: 260px; }
.frame.is-missing img { display: none; }

.ledger-card {
  position: absolute;
  right: -8px;
  bottom: -22px;
  width: min(300px, 86%);
  background: rgba(26, 30, 20, .96);
  border: var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.ledger-card h4 {
  font-family: var(--ff-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .88rem;
  padding: .3rem 0;
  border-bottom: 1px dashed var(--furrow);
}
.ledger-row:last-child { border-bottom: 0; padding-top: .6rem; color: var(--wheat-soft); }
.ledger-row span:last-child { font-family: var(--ff-mono); }

/* ---------- Karty / mriežky ---------- */

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

.card {
  background: var(--loam);
  border: var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  position: relative;
}
.card-mark {
  font-family: var(--ff-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--wheat);
  display: block;
  margin-bottom: .9rem;
}
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .95rem; }
.card ul li { margin-bottom: .35rem; }

.feature { overflow: hidden; padding: 0; }
.feature .frame { border: 0; border-bottom: var(--line); border-radius: 0; }
.feature .frame img { aspect-ratio: 16 / 10; }
.feature-body { padding: 1.4rem 1.5rem 1.6rem; }

/* ---------- Kroky ---------- */

.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: var(--line);
  align-items: start;
}
.step:first-child { border-top: var(--line); }
.step-no {
  font-family: var(--ff-mono);
  font-size: 1.6rem;
  color: var(--wheat);
  line-height: 1;
  padding-top: .2rem;
}
.step h3 { margin-bottom: .35rem; }
.step p { margin: 0; color: var(--muted); }

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

.calc {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: var(--gap);
  align-items: start;
}
.calc-panel {
  background: var(--loam);
  border: var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
}
.field { margin-bottom: 1.3rem; }
.field label {
  display: block;
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: .4rem;
}
.input, .field input[type="number"], .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%;
  background: var(--soil);
  border: var(--line);
  border-radius: var(--radius);
  color: var(--linen);
  font-family: var(--ff-mono);
  font-size: 1rem;
  padding: .7rem .85rem;
}
.field textarea { font-family: var(--ff-body); resize: vertical; min-height: 120px; }
.field select { font-family: var(--ff-body); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--wheat); outline: none; }

.slider-row { margin-bottom: 1.15rem; }
.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .9rem;
  margin-bottom: .35rem;
}
.slider-head b { font-family: var(--ff-mono); font-weight: 500; color: var(--wheat-soft); }
input[type="range"] {
  width: 100%;
  appearance: none;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sprout) 0%, var(--sprout) var(--fill, 30%), var(--furrow) var(--fill, 30%), var(--furrow) 100%);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--wheat);
  border: 3px solid var(--soil);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border: 3px solid var(--soil);
  border-radius: 50%;
  background: var(--wheat);
}

.result {
  background: var(--panel);
  border: var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  position: sticky;
  top: 96px;
}
.result-value {
  font-family: var(--ff-mono);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--wheat);
  line-height: 1.1;
  margin: .2rem 0 .1rem;
}
.result.warn .result-value { color: var(--danger); }
.result-note { font-size: .9rem; color: var(--muted); min-height: 3.2em; }
.result-list { list-style: none; margin: 1.2rem 0 0; padding: 1.2rem 0 0; border-top: var(--line); }
.result-list li {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  padding: .3rem 0;
}
.result-list span:last-child { font-family: var(--ff-mono); color: var(--linen); }

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

.billing-toggle {
  display: inline-flex;
  border: var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 2rem;
  background: var(--loam);
}
.billing-toggle button {
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--ff-body);
  font-size: .88rem;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
}
.billing-toggle button[aria-pressed="true"] { background: var(--wheat); color: #17190F; font-weight: 600; }

.plan { display: flex; flex-direction: column; }
.plan.is-featured { border-color: var(--wheat); background: var(--panel); }
.plan-flag {
  position: absolute;
  top: -11px; left: 1.5rem;
  background: var(--wheat);
  color: #17190F;
  font-family: var(--ff-mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 2px;
}
.plan h3 { margin-bottom: .2rem; }
.plan-for { color: var(--muted); font-size: .9rem; margin-bottom: 1.1rem; }
.price {
  font-family: var(--ff-mono);
  font-size: 2.4rem;
  color: var(--linen);
  line-height: 1;
}
.price small { font-size: .95rem; color: var(--muted); }
.price-sub { font-size: .82rem; color: var(--muted); margin: .45rem 0 1.2rem; min-height: 2.4em; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.6rem; flex: 1; }
.plan ul li {
  font-size: .93rem;
  padding: .42rem 0 .42rem 1.5rem;
  position: relative;
  border-bottom: 1px dashed var(--furrow);
  color: var(--linen);
}
.plan ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--wheat);
  font-family: var(--ff-mono);
}

.price-note {
  margin-top: 2rem;
  border: var(--line);
  border-left: 3px solid var(--sprout);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  background: var(--loam);
  font-size: .93rem;
  color: var(--muted);
}
.price-note strong { color: var(--linen); }

/* ---------- Tabuľka ---------- */

.table-scroll { overflow-x: auto; border: var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 540px; background: var(--loam); }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: var(--line); font-size: .92rem; }
th { font-family: var(--ff-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wheat); }
tbody tr:last-child td { border-bottom: 0; }
td.num-cell { font-family: var(--ff-mono); color: var(--wheat-soft); white-space: nowrap; }

/* ---------- FAQ ---------- */

.faq details {
  border-bottom: var(--line);
  padding: 1.1rem 0;
}
.faq details:first-of-type { border-top: var(--line); }
.faq summary {
  cursor: pointer;
  font-family: var(--ff-display);
  font-size: 1.1rem;
  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(--ff-mono);
  color: var(--wheat);
  font-size: 1.3rem;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .9rem 0 0; color: var(--muted); max-width: 78ch; }

/* ---------- Kontakt ---------- */

.contact { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--gap); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.contact-list li { padding: .85rem 0; border-bottom: var(--line); }
.contact-list strong {
  display: block;
  font-family: var(--ff-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .2rem;
}
.checkbox {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: .87rem;
  color: var(--muted);
  margin-bottom: 1.3rem;
}
.checkbox input { margin-top: .25rem; accent-color: var(--wheat); width: 18px; height: 18px; flex-shrink: 0; }
.form-msg {
  display: none;
  margin-top: 1rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius);
  font-size: .92rem;
  border: 1px solid var(--sprout);
  background: rgba(147, 172, 110, .12);
  color: var(--linen);
}
.form-msg.is-error { border-color: var(--danger); background: rgba(201, 105, 75, .12); }
.form-msg.is-visible { display: block; }

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

.site-footer {
  border-top: var(--line);
  background: #0E1109;
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  font-size: .92rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--gap); }
.footer-grid h4 {
  font-family: var(--ff-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wheat);
  margin-bottom: 1rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: .5rem; }
.footer-grid a { color: var(--linen); }
.footer-grid p { color: var(--muted); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: var(--line);
  color: var(--muted);
  font-size: .84rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Cookie lišta ---------- */

.cookie {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%) translateY(140%);
  width: min(920px, calc(100% - 2rem));
  background: var(--panel);
  border: 1px solid var(--wheat);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  z-index: 120;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: center;
  transition: transform .35s ease;
}
.cookie.is-open { transform: translateX(-50%) translateY(0); }
.cookie p { margin: 0; font-size: .89rem; color: var(--muted); }
.cookie-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cookie .btn { padding: .6rem 1.1rem; font-size: .88rem; }

/* ---------- Právne stránky ---------- */

.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.legal-inner { max-width: 78ch; }
.legal h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-top: 2.4rem; }
.legal h3 { margin-top: 1.6rem; }
.legal ul { color: var(--muted); padding-left: 1.2rem; }
.legal li { margin-bottom: .45rem; }
.legal .updated {
  font-family: var(--ff-mono);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border: var(--line);
  border-radius: var(--radius);
  padding: .5rem .9rem;
  display: inline-block;
  margin-bottom: 2rem;
}
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 2.5rem 0 0;
  padding-top: 1.6rem;
  border-top: var(--line);
}
.legal-nav a {
  border: var(--line);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .84rem;
  color: var(--linen);
}
.legal-nav a:hover { border-color: var(--wheat); text-decoration: none; color: var(--wheat-soft); }

/* ---------- Animácie ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responzivita ---------- */

@media (max-width: 960px) {
  .hero-grid, .calc, .contact { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .result { position: static; }
  .ledger-card { position: static; width: 100%; margin-top: 1rem; box-shadow: none; }
}

@media (max-width: 780px) {
  .burger { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--loam);
    border-bottom: var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 1rem 1.2rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .75rem 0; border-bottom: 1px dashed var(--furrow); }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .header-cta .tel { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 52px 1fr; gap: 1rem; }
  .cookie { grid-template-columns: 1fr; }
  .cookie-actions .btn { flex: 1; }
}
