/* ============================================================
   U Koblížků — sdílený design system (web + účet)
   Černá, bílá a šedé – podle loga a plakátu s týdenním menu.
   Archivo Black (logo) · Bodoni Moda (nadpisy jako na plakátu) · Figtree (text)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Bodoni+Moda:opsz,wght@6..96,500;6..96,700&family=Figtree:wght@400;500;600;700;800&display=swap');

:root {
  /* Barvy – jen černá, bílá a šedé */
  --ink:        #000000;   /* černá z loga – text, hlavní tlačítka */
  --ink-2:      #2b2b2b;   /* hover tmavých ploch */
  --muted:      #6e6e73;   /* vedlejší text */
  --gray-400:   #8e8e93;
  --gray-300:   #aeaeb2;
  --line:       #d9d9de;   /* linky, rámečky */
  --surface:    #f4f4f6;   /* plochy (košík, polévka) */
  --surface-2:  #ebebef;
  --white:      #ffffff;
  --danger:     #c4161c;   /* jediná barva – jen pro chyby */
  --danger-tint:#fdeced;

  /* Kompatibilita se staršími názvy v JS/HTML */
  --green:      var(--ink);
  --green-dark: var(--ink-2);
  --green-tint: var(--surface-2);
  --primary:    var(--ink);
  --black:      var(--ink);
  --gray-900:   var(--ink);
  --gray-800:   #1c1c1e;
  --gray-700:   #3a3a3c;
  --gray-600:   var(--muted);
  --gray-500:   var(--muted);
  --gray-200:   var(--line);
  --gray-100:   #ececf0;
  --gray-50:    var(--surface);
  --green-100:  var(--surface-2);
  --green-700:  var(--ink);

  /* Typo */
  --font-brand: 'Archivo Black', 'Arial Black', sans-serif;
  --font-serif: 'Bodoni Moda', 'Didot', Georgia, serif;
  --font-sans:  'Figtree', system-ui, -apple-system, sans-serif;

  /* Tvary */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.08);

  --transition: .18s ease;
  --transition-slow: .3s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── Layout ────────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.container--narrow { max-width: 720px; margin: 0 auto; padding: 0 32px; }
.section { padding: 80px 0; }
.section--sm { padding: 56px 0; }

/* ── Typografie ────────────────────────────────────────────── */
.heading-xl {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -0.03em;
  font-optical-sizing: auto;
}
.heading-lg {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.heading-md {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.heading-sm {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.body-lg { font-size: 1.1rem; line-height: 1.65; color: var(--gray-700); }
.body-sm { font-size: .9rem; line-height: 1.55; color: var(--muted); }
.body-sm a, .body-lg a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.rule { border: none; border-top: 1px solid var(--line); }
.rule--dark { border-top-color: var(--gray-800); }

/* ── Tlačítka ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: .98rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform .1s ease-out;
  white-space: nowrap;
  text-decoration: none;
}
.btn--primary, .btn--dark { background: var(--green); color: var(--white); }
.btn--primary:hover, .btn--dark:hover { background: var(--green-dark); }
.btn:active { transform: scale(.97); }
.btn--primary:disabled { background: var(--gray-300); cursor: wait; }
.btn--outline { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn--outline-white:hover { background: var(--white); color: var(--ink); }
.btn--sm { min-height: 38px; padding: 7px 14px; font-size: .88rem; border-radius: var(--radius-sm); }
.btn--block { width: 100%; }

/* ── Formuláře ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231c2420' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--gray-400); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--surface-2);
}
.field textarea { resize: vertical; min-height: 96px; }
.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .9rem; line-height: 1.5; color: var(--gray-700); cursor: pointer;
}
.check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--green); cursor: pointer; }
.check a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ── Navigace ──────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  transition: background var(--transition-slow), border-color var(--transition-slow);
}
.nav--light { background: transparent; }
.nav--scrolled {
  background: rgba(255,255,255,.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav--dark-page { background: transparent; border-bottom: 1px solid transparent; }
.nav--dark-page.nav--scrolled { background: var(--ink); color: var(--white); border-bottom-color: var(--ink-2); }

.nav-brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: inherit;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-size: .95rem; font-weight: 500; color: inherit; opacity: .75; transition: opacity var(--transition); }
.nav-links a:hover { opacity: 1; }
.nav-cta-wrap { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-user span { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--white);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; color: var(--ink); }
.mobile-nav-close { position: absolute; top: 20px; right: 24px; font-size: 1.3rem; color: var(--muted); padding: 8px; }

/* ── Modální okna ──────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  animation: modalIn .28s cubic-bezier(.2,.9,.3,1.1) both;
}
.modal-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  background: var(--green);
  color: var(--white);
}
.modal-icon--light { background: var(--surface-2); color: var(--ink); }
.modal-title { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; margin-bottom: 10px; }
.modal-text { color: var(--muted); font-size: 1rem; line-height: 1.6; margin-bottom: 20px; }
.modal-phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1.2rem; font-weight: 700; color: var(--green);
  margin: 0 0 20px;
}
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 10000;
  max-width: 380px;
  background: var(--ink);
  color: var(--white);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .95rem;
  box-shadow: var(--shadow);
  transform: translateY(16px);
  opacity: 0;
  transition: transform var(--transition), opacity var(--transition);
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Zprávy (profil, login) ────────────────────────────────── */
.msg { display: none; padding: 12px 16px; border-radius: var(--radius-sm); font-size: .95rem; margin-bottom: 16px; }
.msg.success, .msg.ok { display: block; background: var(--surface-2); color: var(--ink); }
.msg.error, .msg.err { display: block; background: var(--danger-tint); color: var(--danger); }

/* ── Responsivita ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .container, .container--narrow { padding: 0 16px; }
  .section { padding: 56px 0; }
  .nav { padding: 0 16px; height: 60px; }
  .nav-brand { font-size: 1.15rem; }
  .nav-links { display: none; }
  .hamburger { display: none; }
  .nav-user span { max-width: 110px; }
  .toast { left: 16px; right: 16px; bottom: 84px; max-width: none; }
}
@media (max-width: 400px) {
  .nav-user span { display: none; }
  .nav-cta-wrap .nav-cta { display: none; }
}

@media (prefers-reduced-transparency: reduce) { .nav--scrolled { background: #fff; backdrop-filter: none; } }
