/* ============================================================
   Pohřební služba Tichý — dignified calm
   ============================================================ */

:root {
  /* Warm neutrals */
  --paper:      #f7f5f0;
  --paper-2:    #f1ede5;
  --paper-3:    #e9e4d9;
  --line:       rgba(46, 52, 47, 0.12);
  --line-soft:  rgba(46, 52, 47, 0.07);

  /* Ink */
  --ink:        #2b2f2b;
  --ink-soft:   #545a53;
  --ink-mute:   #797e76;

  /* Muted sage */
  --sage-900:   #2c352e;
  --sage-800:   #38443b;
  --sage-700:   #47574c;
  --sage-600:   #566a5b;
  --sage-500:   #6a7d6d;
  --sage-300:   #9caf9f;
  --sage-100:   #dde3db;
  --sage-050:   #eceee7;

  --shadow-sm:  0 1px 2px rgba(43, 47, 43, 0.04);
  --shadow-md:  0 10px 30px -18px rgba(43, 47, 43, 0.30);

  --radius:     14px;
  --radius-lg:  20px;

  --maxw:       1120px;
  --gap:        clamp(1.5rem, 4vw, 3rem);

  --ease:       cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--sage-700); text-decoration: none; }
a:hover { color: var(--sage-900); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; color: var(--sage-900); line-height: 1.15; letter-spacing: 0.005em; }

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

.skip-link {
  position: absolute; left: 1rem; top: -3.5rem;
  background: var(--sage-800); color: #fff; padding: 0.6rem 1rem;
  border-radius: 8px; z-index: 200; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; text-decoration: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 2.5rem); }
.narrow { max-width: 780px; }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tint { background: var(--paper-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { margin: 0.4rem 0 0.75rem; }
.section-lead { color: var(--ink-soft); margin: 0; }

.eyebrow {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--sage-600); font-weight: 600; margin: 0;
}

h1 { font-size: clamp(2.3rem, 5.5vw, 3.7rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.28rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.grid-2--media { align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 245, 240, 0.85);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); background: rgba(247, 245, 240, 0.95); }

.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--sage-900); }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--sage-600); display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-serif); font-size: 1.32rem; font-weight: 600; }
.brand-sub { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute); }

.main-nav { margin-left: auto; }
.nav-list { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: var(--ink-soft); font-size: 0.96rem; font-weight: 500; padding: 0.4rem 0; position: relative; }
.nav-list a:hover { color: var(--sage-900); text-decoration: none; }
.nav-list a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--sage-600); transition: width 0.3s var(--ease);
}
.nav-list a:hover::after { width: 100%; }

.nav-toggle { display: none; }

.nonstop-btn {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  gap: 0.05rem; padding: 0.5rem 1.1rem; border-radius: 12px;
  background: var(--sage-800); color: #fff; line-height: 1.15;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.nonstop-btn:hover { background: var(--sage-900); color: #fff; text-decoration: none; transform: translateY(-1px); }
.nonstop-btn__label { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.82; }
.nonstop-btn__num { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 1.02rem; font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-family: var(--font-sans); font-weight: 500; font-size: 1rem;
  padding: 0.85rem 1.5rem; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: all 0.25s var(--ease); text-align: center;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--sage-700); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--sage-900); color: #fff; transform: translateY(-1px); }
.btn--phone strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.btn--ghost { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.4); backdrop-filter: blur(2px); }
.btn--ghost:hover { background: rgba(255,255,255,0.24); color: #fff; }
.btn--outline { background: transparent; color: var(--sage-800); border-color: var(--sage-300); }
.btn--outline:hover { background: var(--sage-050); color: var(--sage-900); }
.btn--full { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
  transform: scale(1.04); animation: heroDrift 24s ease-out forwards;
}
@keyframes heroDrift { to { transform: scale(1); } }
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(30,38,32,0.55) 0%, rgba(30,38,32,0.45) 45%, rgba(28,34,29,0.72) 100%),
    linear-gradient(90deg, rgba(28,34,29,0.55) 0%, rgba(28,34,29,0.10) 70%);
}
.hero__inner { padding-block: clamp(5rem, 15vh, 9rem) clamp(4rem, 10vh, 6.5rem); max-width: 800px; }
.hero__eyebrow { color: rgba(255,255,255,0.86); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 600; margin: 0 0 1.2rem; }
.hero h1 { color: #fff; margin: 0 0 1.4rem; font-weight: 500; text-shadow: 0 1px 30px rgba(0,0,0,0.25); }
.hero__lead { font-size: clamp(1.08rem, 2vw, 1.28rem); color: rgba(255,255,255,0.92); max-width: 620px; margin: 0 0 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.6rem; }
.hero__note { font-size: 0.94rem; color: rgba(255,255,255,0.82); margin: 0; display: flex; align-items: baseline; gap: 0.6rem; }
.hero__note::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--sage-300); box-shadow: 0 0 0 4px rgba(156,175,159,0.28); transform: translateY(-1px); }

/* ---------- Steps (Co dělat) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.step {
  display: flex; gap: 1.2rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--shadow-sm);
}
.step__num {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 600; color: var(--sage-700);
  background: var(--sage-050); border: 1px solid var(--sage-100);
}
.step h3 { margin: 0.2rem 0 0.4rem; }
.step p { margin: 0; color: var(--ink-soft); }

.callout {
  margin-top: 1.6rem; padding: 1.25rem 1.5rem;
  background: var(--sage-050); border: 1px solid var(--sage-100);
  border-radius: var(--radius); text-align: center;
}
.callout p { margin: 0; color: var(--ink-soft); }

/* ---------- Cards (Služby) ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 1.9rem); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.section--tint .card { background: #fff; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--sage-100); }
.card__icon { display: inline-flex; width: 48px; height: 48px; margin-bottom: 1rem; color: var(--sage-600); }
.card__icon svg { width: 100%; height: 100%; }
.card h3 { margin: 0 0 0.5rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Flow (Jak pomůžeme) ---------- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.flow__item {
  padding: 1.15rem 1.35rem; border-left: 2px solid var(--sage-100);
  background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0;
  transition: border-color 0.3s var(--ease);
}
.flow__item:hover { border-left-color: var(--sage-500); }
.flow__item h3 { margin: 0 0 0.3rem; font-size: 1.12rem; color: var(--sage-800); }
.flow__item p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Quiet band ---------- */
.quiet-band { position: relative; overflow: hidden; isolation: isolate; }
.quiet-band__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.quiet-band__veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(24,22,20,0.72), rgba(24,22,20,0.78)); }
.quiet-band__inner { padding-block: clamp(4rem, 10vw, 7rem); max-width: 800px; }
.quiet-band__text {
  font-family: var(--font-serif); font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.4; color: #f4efe6; margin: 0; font-weight: 500;
}

/* ---------- Media figure ---------- */
.media { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 5 / 4; }

.values { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.values li { position: relative; padding-left: 1.7rem; color: var(--ink-soft); }
.values li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px;
  border-radius: 50%; background: transparent; border: 1.5px solid var(--sage-500);
}

/* ---------- Ceny ---------- */
.price-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 2rem; }
.price-note { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.price-note h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.price-note p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.price-cta { text-align: center; color: var(--ink-soft); margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.75rem; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 1.15rem 1.4rem; font-weight: 500;
  color: var(--sage-900); font-size: 1.06rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; transition: background 0.2s var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { background: var(--paper-2); }
.faq__item summary::after {
  content: ""; flex: none; width: 11px; height: 11px; border-right: 1.5px solid var(--sage-500);
  border-bottom: 1.5px solid var(--sage-500); transform: rotate(45deg); margin-top: -4px;
  transition: transform 0.3s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: 2px; }
.faq__body { padding: 0 1.4rem 1.25rem; }
.faq__body p { margin: 0; color: var(--ink-soft); }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.contact-info { display: grid; gap: 0.9rem; }
.contact-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.contact-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contact-card__label { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-mute); margin-bottom: 0.3rem; }
.contact-card__value { display: block; font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600; color: var(--sage-900); font-variant-numeric: tabular-nums; font-style: normal; line-height: 1.2; }
.contact-card__value--sm { font-size: 1.18rem; word-break: break-word; }
.contact-card__hint { display: block; font-size: 0.9rem; color: var(--ink-mute); margin-top: 0.35rem; }
.contact-card--accent { background: var(--sage-800); border-color: var(--sage-800); }
.contact-card--accent .contact-card__label { color: rgba(255,255,255,0.72); }
.contact-card--accent .contact-card__value { color: #fff; }
.contact-card--accent .contact-card__hint { color: rgba(255,255,255,0.78); }
.contact-card--plain:hover { transform: none; box-shadow: var(--shadow-sm); }

/* ---------- Form ---------- */
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.25rem); box-shadow: var(--shadow-sm); }
.form-intro { margin: 0 0 1.4rem; color: var(--ink-soft); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.92rem; font-weight: 500; color: var(--ink); margin-bottom: 0.4rem; }
.field__opt { color: var(--ink-mute); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sage-500); box-shadow: 0 0 0 3px rgba(106,125,109,0.15); background: #fff; }
.field textarea { resize: vertical; min-height: 110px; }
.field.has-error input, .field.has-error textarea { border-color: #a6564b; box-shadow: 0 0 0 3px rgba(166,86,75,0.12); }
.field__error { display: block; font-size: 0.85rem; color: #a6564b; margin-top: 0.35rem; min-height: 0; }
.form-note { margin: 1rem 0 0; font-size: 0.98rem; min-height: 0; }
.form-note.is-success { color: var(--sage-700); }
.form-note.is-error { color: #a6564b; }
.form-fineprint { margin: 1rem 0 0; font-size: 0.9rem; color: var(--ink-mute); }

/* ---------- Map ---------- */
.map { margin-top: 2rem; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); line-height: 0; }
.map iframe { display: block; filter: grayscale(0.25) saturate(0.9); }

/* ---------- Footer ---------- */
.site-footer { background: var(--sage-900); color: rgba(255,255,255,0.82); padding: clamp(3rem, 6vw, 4rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.footer-brand { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 600; color: #fff; margin: 0 0 0.6rem; }
.footer-head { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: rgba(255,255,255,0.6); margin: 0 0 0.7rem; }
.footer-muted { margin: 0; color: rgba(255,255,255,0.78); font-size: 0.96rem; line-height: 1.9; }
.footer-muted a { color: rgba(255,255,255,0.92); }
.footer-muted a:hover { color: #fff; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12); }
.footer-bottom p { margin: 0; font-size: 0.88rem; color: rgba(255,255,255,0.6); }

/* ---------- Floating call (mobile) ---------- */
.float-call {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 90;
  display: none; align-items: center; gap: 0.5rem;
  background: var(--sage-800); color: #fff; padding: 0.85rem 1.15rem;
  border-radius: 999px; box-shadow: 0 8px 24px -6px rgba(28,34,29,0.5);
  font-weight: 600; font-size: 0.95rem;
}
.float-call:hover { color: #fff; text-decoration: none; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 940px) {
  .cards, .price-notes { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
  .grid-2--media { grid-template-columns: 1fr; }
  .grid-2--media .media { order: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 10px; margin-left: auto;
    background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--sage-800); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .main-nav { margin-left: auto; }
  .nav-list {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
    clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none;
    transition: clip-path 0.35s var(--ease), opacity 0.25s var(--ease);
  }
  .nav-list.is-open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav-list li { width: 100%; }
  .nav-list a { display: block; padding: 0.85rem clamp(1.25rem, 5vw, 2.5rem); font-size: 1.05rem; }
  .nav-list a::after { display: none; }

  .nonstop-btn { display: none; }
  .float-call { display: inline-flex; }

  .cards, .price-notes { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .header-inner { min-height: 64px; gap: 0.75rem; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 400px) {
  .contact-card__value { font-size: 1.45rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__bg { transform: none; animation: none; }
}

@media print {
  .site-header, .float-call, .hero__bg, .quiet-band__bg, .map { display: none; }
}
