/* ===== Truhlářství TMM – návrh webu ===== */
:root {
  --paper: #f7f2eb;
  --paper-2: #efe6da;
  --card: #fffdf9;
  --ink: #24201b;
  --ink-2: #5b5248;
  --muted: #857a6d;
  --line: #e2d6c6;
  --oak: #b9804a;
  --oak-dark: #8f5d2f;
  --oak-light: #e9cfae;
  --forest: #2c3a31;
  --forest-2: #3a4b40;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 18px 40px -22px rgba(36, 32, 27, .45);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--oak-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, .h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 4.6vw + .5rem, 4rem); }
h2 { font-size: clamp(1.85rem, 2.6vw + .6rem, 2.8rem); }
h3, .h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--oak); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 16px; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--oak-dark); margin-bottom: .9rem; }
.eyebrow-light { color: var(--oak-light); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ----- Buttons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: 15px 26px; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn-oak { background: var(--oak); color: #fff; }
.btn-oak:hover { background: var(--oak-dark); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 10px 18px; font-size: .92rem; }
.btn-block { width: 100%; }

/* ----- Lišta ukázky (před spuštěním odstranit) ----- */
.demo-bar { background: var(--oak-light); color: var(--ink); text-align: center; font-size: .85rem; line-height: 1.4; padding: 8px 16px; border-bottom: 1px solid var(--oak); }
.demo-bar strong { color: var(--oak-dark); }

/* ----- Header ----- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 242, 235, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgba(0,0,0,.4); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: var(--oak); display: grid; place-items: center; }
.logo-mark svg { width: 26px; height: 26px; }
.logo-text { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; line-height: 1; display: flex; flex-direction: column; }
.logo-text small { font-family: var(--font-body); font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .96rem; }
.main-nav a:hover { color: var(--ink); }
.header-phone { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-weight: 700; white-space: nowrap; }
.header-phone svg { width: 18px; height: 18px; color: var(--oak); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); transition: transform .25s, top .25s; }
.nav-toggle span:first-child { top: 17px; } .nav-toggle span:last-child { top: 26px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.mobile-menu { position: fixed; inset: var(--header-h) 0 0 0; background: var(--paper); z-index: 49; padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; overflow-y: auto; }
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { font-family: var(--font-display); font-size: 1.6rem; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.mobile-menu-contact { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }

/* ----- Hero ----- */
.hero { padding: clamp(40px, 6vw, 84px) 0 clamp(56px, 7vw, 100px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: italic; color: var(--oak-dark); }
.lead { font-size: 1.18rem; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 36px; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; gap: clamp(20px, 4vw, 44px); border-top: 1px solid var(--line); padding-top: 22px; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.hero-facts span { color: var(--muted); font-size: .9rem; }
.hero-media { position: relative; padding: 0 0 70px 40px; }
.hero-img { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-main { aspect-ratio: 4 / 3.3; }
.hero-img-small { position: absolute; left: 0; bottom: 0; width: 44%; aspect-ratio: 1; border: 6px solid var(--paper); }
.hero-badge { position: absolute; right: 18px; bottom: 22px; background: var(--forest); color: #f1ebe2; border-radius: var(--radius-sm); padding: 14px 18px; max-width: 230px; font-size: .88rem; line-height: 1.35; box-shadow: var(--shadow); }
.hero-badge-num { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--oak-light); margin-bottom: 2px; }

/* ----- Sections ----- */
.section { padding: clamp(64px, 8vw, 112px) 0; }
.section-tint { background: var(--paper-2); }
.section-dark { background: var(--forest); color: #e8e1d6; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p:last-child { color: var(--ink-2); font-size: 1.08rem; }

/* ----- Services ----- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-img { aspect-ratio: 4 / 3; overflow: hidden; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.service:hover .service-img img { transform: scale(1.04); }
.service-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.service-body p { color: var(--ink-2); font-size: .98rem; }
.service-price { margin: auto 0 0; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--ink) !important; }
.service-price strong { color: var(--oak-dark); }

/* ----- Gallery ----- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { font: inherit; font-weight: 600; font-size: .92rem; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; }
.filter:hover { border-color: var(--oak); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 14px; }
.gallery li.g-wide { grid-column: span 2; }
.gallery li.g-tall { grid-row: span 2; }
.gallery li[hidden] { display: none; }
.g-item { all: unset; cursor: zoom-in; position: relative; display: block; width: 100%; height: 100%; border-radius: var(--radius-sm); overflow: hidden; background: var(--line); }
.g-item:focus-visible { outline: 3px solid var(--oak); outline-offset: 3px; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.g-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; color: #fff; font-weight: 600; font-size: .92rem; background: linear-gradient(transparent, rgba(20, 16, 12, .75)); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.g-item:hover img, .g-item:focus-visible img { transform: scale(1.05); }
.g-item:hover span, .g-item:focus-visible span { opacity: 1; transform: none; }

/* ----- Steps ----- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li { position: relative; padding: 28px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.step-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--oak-light); color: var(--oak-dark); font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin-bottom: 16px; }
.steps h3 { font-size: 1.2rem; }
.steps p { color: var(--ink-2); font-size: .97rem; margin: 0; }

/* ----- Ceník + kalkulačka ----- */
.cenik-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.price-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.price-table th, .price-table td { text-align: left; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.14); vertical-align: top; }
.price-table th { font-weight: 500; color: #cfc6b8; padding-right: 16px; }
.price-table td { font-weight: 700; color: #fff; text-align: right; }
.calc { background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 30px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.calc h3 { color: var(--ink) !important; }
.calc-type { border: 0; padding: 0; margin: 0 0 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.calc-type legend { font-weight: 600; margin-bottom: 10px; font-size: .95rem; }
.calc-type label { flex: 1; min-width: 140px; position: relative; }
.calc-type input { position: absolute; opacity: 0; }
.calc-type label { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; text-align: center; font-size: .95rem; }
.calc-type label:has(input:checked) { border-color: var(--oak); background: #fbf3e8; color: var(--oak-dark); }
.calc-type label:has(input:focus-visible) { outline: 3px solid var(--oak); outline-offset: 2px; }
.calc-range { display: block; font-weight: 600; font-size: .95rem; }
.calc-range input { width: 100%; margin: 14px 0 6px; accent-color: var(--oak); height: 28px; }
.calc-result { font-size: 1.05rem; margin: 16px 0 20px; padding: 16px; background: var(--paper); border-radius: var(--radius-sm); text-align: center; }
.calc-result strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--oak-dark); margin-top: 2px; }

/* ----- Dílna ----- */
.dilna-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.dilna-text p { color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.ticks li { padding-left: 32px; position: relative; font-weight: 500; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--oak-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%238f5d2f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.dilna-photos { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.dilna-photos img { border-radius: var(--radius-sm); width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.dilna-photos img:first-child { grid-column: span 2; aspect-ratio: 16 / 8; }

/* ----- Poptávka ----- */
.poptavka-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.big-phone { display: inline-block; font-family: var(--font-display); font-size: clamp(2rem, 3vw + 1rem, 2.8rem); font-weight: 600; color: var(--ink); text-decoration: none; margin: 8px 0 2px; }
.big-phone:hover { color: var(--oak-dark); }
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--oak); box-shadow: 0 0 0 3px rgba(185, 128, 74, .2); }
.form [aria-invalid="true"] { border-color: #b3412e; }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }
.form-status { margin: 0; font-weight: 600; font-size: .95rem; }
.form-status.ok { color: #2f6b3d; } .form-status.err { color: #b3412e; }

/* ----- EU ----- */
.section-eu { padding: 48px 0; background: var(--card); border-top: 1px solid var(--line); }
.eu-grid { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: start; }
.eu-flag svg { width: 120px; height: 80px; display: block; }
.section-eu p { font-size: .95rem; color: var(--ink-2); }
.section-eu p:last-child { margin: 0; }

/* ----- Footer ----- */
.site-footer { background: var(--ink); color: #cbc2b5; padding: 64px 0 28px; font-size: .95rem; }
.site-footer a { color: #f1e6d6; }
.site-footer a:hover { color: var(--oak-light); }
.site-footer h3 { color: #fff; font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.logo-light { color: #fff; margin-bottom: 14px; }
.logo-light .logo-mark { background: var(--oak); color: var(--ink); }
.logo-light .logo-text small { color: #a89d8f; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #9b9083; }

/* ----- Lightbox ----- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(18, 15, 12, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; max-width: min(1000px, 92vw); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { color: #e8e1d6; text-align: center; margin-top: 12px; }
.lightbox button { position: fixed; border: 0; background: rgba(255,255,255,.1); color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

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

/* ----- Responsive ----- */
@media (max-width: 1080px) {
  .main-nav, .header-cta { display: none; }
  .header-phone { margin-left: auto; }
  .nav-toggle { display: block; margin-left: 4px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .hero-grid, .cenik-grid, .dilna-grid, .poptavka-grid { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; max-width: 560px; }
  .hero-media { padding: 0 0 56px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  :root { --header-h: 64px; }
  .header-phone { font-size: .95rem; }
  .header-phone svg { display: none; }
  .logo-text { font-size: 1.25rem; }
  .hero-actions .btn { width: 100%; }
  .hero-facts { gap: 18px; justify-content: space-between; }
  .hero-facts strong { font-size: 1.35rem; }
  .hero-badge { right: 10px; bottom: 10px; max-width: 170px; padding: 10px 12px; font-size: .78rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 10px; }
  .g-item span { opacity: 1; transform: none; font-size: .8rem; padding: 24px 10px 8px; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .calc { padding: 22px; }
  .price-table th, .price-table td { display: block; text-align: left; padding: 4px 0; border: 0; }
  .price-table tr { display: block; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .eu-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .lightbox button.lb-prev, .lightbox button.lb-next { top: auto; bottom: 20px; transform: none; }
}
