/* =====================================================================
   PROJEKTOVNÍK – DESIGN SYSTEM
   ---------------------------------------------------------------------
   Barvy z brandu:
     --c-primary    #D35400  (oranžová)
     --c-secondary  #E6A817  (žlutá)
     --c-ink        #2C3C4B  (tmavá modrošedá z loga)
     --c-bg         #FBF9F4  (téměř bílá s teplým nádechem – ne čistá bílá)
   ===================================================================== */

:root {
  /* Brand */
  --c-primary:        #D35400;
  --c-primary-600:    #B8470B;
  --c-primary-700:    #9A3B07;
  --c-primary-50:     #FCEFE3;
  --c-secondary:      #E6A817;
  --c-secondary-600:  #C28A0C;
  --c-secondary-50:   #FBF1D6;

  --c-ink:            #2C3C4B;
  --c-ink-soft:       #4B5C6B;
  --c-muted:          #6E7B89;
  --c-muted-soft:     #9AA5B1;

  --c-bg:             #FBF9F4;
  --c-surface:        #FFFFFF;
  --c-surface-2:      #F4F1EA;
  --c-line:           #E6E1D6;
  --c-line-soft:      #EFEAE0;

  --c-success:        #2F8F4F;
  --c-success-50:     #E2F4E8;
  --c-danger:         #C8302F;
  --c-danger-50:      #FBE6E5;
  --c-warning:        #C28A0C;
  --c-info:           #2F6FB6;

  /* Typografie */
  --font-sans: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Sora', 'Inter', sans-serif;

  --fs-100: 0.75rem;    /* 12 */
  --fs-200: 0.875rem;   /* 14 */
  --fs-300: 1rem;       /* 16 */
  --fs-400: 1.125rem;   /* 18 */
  --fs-500: 1.375rem;   /* 22 */
  --fs-600: 1.75rem;    /* 28 */
  --fs-700: 2.25rem;    /* 36 */
  --fs-800: 3rem;       /* 48 */
  --fs-900: 4rem;       /* 64 */

  /* Spacing (8px grid) */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  /* Radius */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 16px;
  --r-4: 24px;
  --r-pill: 999px;

  /* Shadow (jemné, ne AI-typické) */
  --sh-1: 0 1px 2px rgba(44,60,75,.04), 0 1px 1px rgba(44,60,75,.03);
  --sh-2: 0 6px 18px -8px rgba(44,60,75,.10), 0 2px 4px rgba(44,60,75,.04);
  --sh-3: 0 18px 40px -16px rgba(44,60,75,.18), 0 4px 12px rgba(44,60,75,.06);
  --sh-glow-primary: 0 8px 30px -10px rgba(211,84,0,.35);

  /* Layout */
  --container: 1240px;
  --container-wide: 1480px;
  --container-narrow: 880px;
  --header-h: 72px;
  --footer-h: auto;

  --t-fast: 150ms cubic-bezier(.4,0,.2,1);
  --t: 250ms cubic-bezier(.4,0,.2,1);
  --t-slow: 450ms cubic-bezier(.4,0,.2,1);
}

@media (max-width: 768px) {
  :root {
    --fs-700: 1.875rem;
    --fs-800: 2.25rem;
    --fs-900: 2.75rem;
    --header-h: 64px;
  }
}

/* =====================================================================
   RESET / BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-300);
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-primary-700); }
ul, ol { padding-left: 1.25em; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; border-radius: 4px; }

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-800); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-500); }
h4 { font-size: var(--fs-400); }
p { margin: 0 0 var(--s-4); }

/* =====================================================================
   LAYOUT
   ===================================================================== */
.container       { width: 100%; max-width: var(--container);        margin: 0 auto; padding: 0 var(--s-5); }
.container-wide  { width: 100%; max-width: var(--container-wide);   margin: 0 auto; padding: 0 var(--s-6); }
.container-narrow{ width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--s-5); }
@media (min-width: 1600px) {
  .container { max-width: 1480px; }
  .container-wide { max-width: 1720px; }
}
@media (min-width: 2200px) {
  .container { max-width: 1720px; }
  .container-wide { max-width: 2000px; }
}

.section { padding: var(--s-9) 0; }
.section-sm { padding: var(--s-7) 0; }
@media (max-width: 768px) {
  .section    { padding: var(--s-7) 0; }
  .section-sm { padding: var(--s-6) 0; }
}

/* Eyebrow text nad nadpisem */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-200); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--c-primary);
  padding: 6px 14px; background: var(--c-primary-50);
  border-radius: var(--r-pill); margin-bottom: var(--s-4);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-primary); }

.lead { font-size: var(--fs-400); color: var(--c-ink-soft); max-width: 60ch; }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-weight: 600; font-size: var(--fs-300);
  padding: 14px 24px; border-radius: var(--r-2);
  transition: transform var(--t-fast), box-shadow var(--t), background var(--t), color var(--t);
  white-space: nowrap; user-select: none;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--c-primary); color: #fff;
  box-shadow: var(--sh-glow-primary);
}
.btn-primary:hover { background: var(--c-primary-600); color: #fff; }

.btn-ghost {
  background: transparent; color: var(--c-ink);
  border-color: var(--c-line);
}
.btn-ghost:hover { border-color: var(--c-ink); background: var(--c-surface); color: var(--c-ink); }

.btn-soft {
  background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line);
  box-shadow: var(--sh-1);
}
.btn-soft:hover { background: #fff; border-color: var(--c-primary); color: var(--c-primary); }

.btn-link { color: var(--c-primary); padding: 0; }
.btn-link:hover { color: var(--c-primary-700); text-decoration: underline; }

.btn-lg { padding: 18px 32px; font-size: var(--fs-400); }
.btn-sm { padding: 8px 14px; font-size: var(--fs-200); }
.btn-block { width: 100%; }

/* =====================================================================
   CARD
   ===================================================================== */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  padding: var(--s-6);
  box-shadow: var(--sh-1);
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
}
.card:hover { box-shadow: var(--sh-2); }
.card-pad-lg { padding: var(--s-7); }
.card-pad-sm { padding: var(--s-5); }

/* =====================================================================
   FORMS
   ===================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); }
.field label { font-weight: 500; font-size: var(--fs-200); color: var(--c-ink-soft); }
.field-required label::after { content: '*'; color: var(--c-primary); margin-left: 4px; }

.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-2);
  font-size: var(--fs-300); color: var(--c-ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--c-muted-soft); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(211,84,0,.12);
}
.textarea { resize: vertical; min-height: 120px; max-height: 500px;}
.field-error .input, .field-error .textarea, .field-error .select {
  border-color: var(--c-danger); background: var(--c-danger-50);
}
.field-error-msg { font-size: var(--fs-200); color: var(--c-danger); margin-top: 4px; }
.field-help { font-size: var(--fs-200); color: var(--c-muted); margin-top: 2px; }

/* Voucher / sleva ověření */
.voucher-status { margin-top: 6px; font-size: var(--fs-200); min-height: 1.2em; }
.voucher-status--idle { display: none; }
.voucher-status--loading { color: var(--c-muted); }
.voucher-status--ok { color: var(--c-success, #2e7d32); }
.voucher-status--err { color: var(--c-danger, #c0392b); }
.voucher-status .spinner {
  display: inline-block; width: 12px; height: 12px; border: 2px solid var(--c-line);
  border-top-color: var(--c-primary); border-radius: 50%;
  animation: voucher-spin 0.7s linear infinite; vertical-align: middle; margin-right: 6px;
}
@keyframes voucher-spin { to { transform: rotate(360deg); } }
.price-strike { text-decoration: line-through; color: var(--c-muted); margin-right: 6px; font-size: .85em; opacity: .7; }
.price-discount-badge {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  background: var(--c-success, #2e7d32); color: #fff; font-size: .7em;
  font-weight: 700; vertical-align: middle; margin-left: 4px;
}
.price-discount-code {
  display: block; margin-top: 6px; font-size: .85em; color: var(--c-text-muted, #666);
  text-decoration: none; transition: color var(--t-fast);
}
.price-discount-code:hover { color: var(--c-primary); }
.price-discount-code strong { color: var(--c-primary); letter-spacing: .5px; }
.sleva-card--highlight {
  animation: slevaHighlight 2.5s ease;
  box-shadow: 0 0 0 3px var(--c-primary, #D35400), 0 8px 24px rgba(211,84,0,.25);
}
@keyframes slevaHighlight {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.03); }
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* radio + checkbox – elegantní */
.choice { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.choice input[type="radio"], .choice input[type="checkbox"] { display: none; }
.choice .box {
  width: 22px; height: 22px; border: 1.5px solid var(--c-line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-surface); transition: all var(--t-fast);
  flex-shrink: 0;
}
.choice input[type="radio"] + .box { border-radius: 50%; }
.choice:hover .box { border-color: var(--c-primary); }
.choice input:checked + .box {
  background: var(--c-primary); border-color: var(--c-primary);
}
.choice input:checked + .box::after {
  content: ''; width: 12px; height: 12px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="white"><path d="M13.5 4.5l-7 7-3-3 1-1 2 2 6-6z"/></svg>') no-repeat center / contain;
  animation: checkPop var(--t) cubic-bezier(.34,1.56,.64,1);
}
.choice input[type="radio"]:checked + .box::after {
  width: 10px; height: 10px; background: #fff; border-radius: 50%; animation: checkPop var(--t) cubic-bezier(.34,1.56,.64,1);
}
@keyframes checkPop { from { transform: scale(0); } to { transform: scale(1); } }

/* Toggle switch (kompaktní, s plovoucí žlutou bublinou nad Ročně) */
.toggle-switch {
  display: inline-flex; background: var(--c-surface-2); padding: 4px; border-radius: var(--r-pill);
  border: 1px solid var(--c-line); position: relative;
  overflow: visible;
}
.toggle-switch button {
  padding: 10px 22px; font-weight: 600; font-size: var(--fs-200);
  color: var(--c-ink-soft); border-radius: var(--r-pill); transition: color var(--t);
  position: relative; z-index: 1;
  min-width: 120px;
  white-space: nowrap;
}
.toggle-switch button.active { color: #fff; }
.toggle-switch .slider {
  position: absolute; top: 4px; bottom: 4px;
  background: var(--c-primary); border-radius: var(--r-pill);
  transition: transform var(--t), width var(--t);
  box-shadow: var(--sh-glow-primary);
  z-index: 0;
}
.toggle-switch .badge { display: none; }

/* Plovoucí žlutá bublina nad ROČNĚ tlačítkem */
.toggle-switch__hint {
  position: absolute;
  top: -16px; right: -12px;
  background: var(--c-secondary);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--r-pill);
  box-shadow: 0 4px 12px rgba(230,168,23,.35);
  white-space: nowrap;
  pointer-events: none;
  transform: rotate(4deg);
  animation: hintPulse 2.6s ease-in-out infinite;
}
.toggle-switch__hint::after {
  content: ''; position: absolute;
  bottom: -4px; left: 18px;
  width: 8px; height: 8px;
  background: var(--c-secondary);
  transform: rotate(45deg);
}
@keyframes hintPulse {
  0%, 100% { transform: rotate(4deg) translateY(0); }
  50%      { transform: rotate(4deg) translateY(-3px); }
}

/* =====================================================================
   ALERTS / FLASH
   ===================================================================== */
.alert {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-2);
  border: 1px solid transparent;
}
.alert > p { flex: 1; margin: 0; }
.alert > p:only-child { width: 100%; }
.alert-success { background: var(--c-success-50); color: #1d6e3a; border-color: #b9e3c5; }
.alert-danger  { background: var(--c-danger-50);  color: #8a1e1d; border-color: #f0bdbc; }
.alert-info    { background: #e6f0fa; color: #1d4f86; border-color: #bcd6ef; }

/* =====================================================================
   FLASH POPUP (5s auto-dismiss)
   ===================================================================== */
.flash-stack {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 12px; z-index: 10000;
  pointer-events: none; max-width: calc(100vw - 32px);
}
.flash {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--s-3);
  padding: 14px 18px; padding-right: 14px;
  background: var(--c-surface); border-radius: var(--r-3);
  border: 1px solid var(--c-line); box-shadow: var(--sh-3);
  min-width: 280px; max-width: 480px;
  animation: flashIn .4s cubic-bezier(.34,1.56,.64,1);
}
.flash.is-out { animation: flashOut .35s forwards ease-in; }
.flash-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-weight: 700; }
.flash-success .flash-icon { background: var(--c-success); }
.flash-danger  .flash-icon { background: var(--c-danger); }
.flash-info    .flash-icon { background: var(--c-info); }
.flash-text { flex: 1; font-size: var(--fs-200); }
.flash-close { color: var(--c-muted); padding: 6px; border-radius: 6px; }
.flash-close:hover { color: var(--c-ink); background: var(--c-surface-2); }
@keyframes flashIn  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flashOut { to   { opacity: 0; transform: translateY(20px); } }

/* =====================================================================
   UTILITIES
   ===================================================================== */
.text-center { text-align: center; }
.text-muted  { color: var(--c-muted); }
.text-primary{ color: var(--c-primary); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--s-2); } .mb-2 { margin-bottom: var(--s-2); }
.mt-3 { margin-top: var(--s-3); } .mb-3 { margin-bottom: var(--s-3); }
.mt-4 { margin-top: var(--s-4); } .mb-4 { margin-bottom: var(--s-4); }
.mt-5 { margin-top: var(--s-5); } .mb-5 { margin-bottom: var(--s-5); }
.mt-6 { margin-top: var(--s-6); } .mb-6 { margin-bottom: var(--s-6); }
.mt-7 { margin-top: var(--s-7); } .mb-7 { margin-bottom: var(--s-7); }
.mt-8 { margin-top: var(--s-8); } .mb-8 { margin-bottom: var(--s-8); }
.gap-7 { gap: var(--s-7); } .gap-8 { gap: var(--s-8); }

/* legal documents (gdpr) */
.legal-doc h1 { margin-bottom: var(--s-3); }
.legal-doc h2 { margin-top: var(--s-7); margin-bottom: var(--s-3); padding-bottom: var(--s-2); border-bottom: 1px solid var(--c-line); }
.legal-doc h3 { margin-top: var(--s-5); margin-bottom: var(--s-2); }
.legal-doc p, .legal-doc li { line-height: 1.7; }
.legal-doc ul { padding-left: 1.4em; margin: var(--s-3) 0; }
.legal-doc li { margin-bottom: var(--s-2); }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); } .gap-5 { gap: var(--s-5); } .gap-6 { gap: var(--s-6); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =====================================================================
   ANIMACE pro reveal-on-scroll
   ===================================================================== */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.4,0,.2,1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }
