/* ==========================================================================
   Truhlářství Verner — Labětín, Řečany nad Labem
   style.css
   ========================================================================== */

/* --------------------------------------------------------------- Tokens -- */
:root {
  --bone:     #f9f4f1;
  --clay:     #ebe4e0;
  --sand:     #dad2c9;
  --ink:      #342616;
  --ink-90:   rgba(52, 38, 22, .9);
  --ink-62:   rgba(52, 38, 22, .62);
  --ink-40:   rgba(52, 38, 22, .4);
  --line:     rgba(52, 38, 22, .15);
  --line-soft:rgba(52, 38, 22, .08);

  --h-header: 78px;
  --pad-x:    clamp(20px, 5.2vw, 96px);
  --sec-y:    clamp(64px, 9vw, 150px);
  --gap:      clamp(26px, 3.6vw, 54px);

  --f-display: "Newsreader", "Times New Roman", Georgia, serif;
  --f-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------------------------------------------------------------- Reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.72;
  color: var(--ink-90);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; }

/* ------------------------------------------------------------ Typografie -- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 .6em;
  text-wrap: balance;
}
.t-hero    { font-size: clamp(1.7rem, 4.2vw, 3.1rem); line-height: 1.1; }
.t-section { font-size: clamp(1.32rem, 2.5vw, 2.05rem); }
.t-sub     { font-size: clamp(1.05rem, 1.5vw, 1.28rem); }
.t-card    { font-size: clamp(.95rem, 1.15vw, 1.08rem); letter-spacing: .05em; }

.kicker {
  font-family: var(--f-body);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin: 0 0 22px;
}
.lead { font-size: clamp(.98rem, 1.15vw, 1.08rem); color: var(--ink-90); max-width: 64ch; }
.small { font-size: .84rem; color: var(--ink-62); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ------------------------------------------------------------- Utilities -- */
.wrap { width: 100%; margin-inline: auto; padding-inline: var(--pad-x); max-width: 1600px; }
.wrap--mid { max-width: 1120px; }
.wrap--narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: var(--bone); padding: 12px 20px; }
.skip:focus { left: 0; }

.section { padding-block: var(--sec-y); }
.section--tight { padding-block: clamp(46px, 6vw, 92px); }
.section--clay { background: var(--clay); }
.section--line { border-top: 1px solid var(--line); }

/* headline blok se vzduchem kolem, jako na předloze */
.headline { margin: 0 auto clamp(34px, 5vw, 76px); max-width: 24ch; text-align: center; }
.headline--wide { max-width: 36ch; }
.headline p { margin-top: 18px; }

/* ----------------------------------------------------------------- Odkaz -- */
.link {
  display: inline-block;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--ink-40);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.link:hover { border-bottom-color: var(--ink); }

.btn {
  display: inline-block;
  font-size: .72rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  padding: 16px 34px;
  border: 1px solid var(--ink);
  color: var(--ink); background: transparent;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--bone); }
.btn--solid { background: var(--ink); color: var(--bone); }
.btn--solid:hover { background: transparent; color: var(--ink); }

/* ---------------------------------------------------------------- Header -- */
.header {
  position: sticky; top: 0; z-index: 90;
  height: var(--h-header);
  display: flex; align-items: center;
  background: rgba(249, 244, 241, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .35s var(--ease);
}
.header.is-stuck { border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }

/* Značka — modernizované logo: „Truhlářství" nad jménem, pod jménem tah
   štětcem z původního loga, jen v hnědé místo červené. */
.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand__top {
  font-size: .54rem; letter-spacing: .36em; text-transform: uppercase;
  color: var(--ink-40); margin-bottom: 7px; padding-left: .12em;
  transition: color .3s var(--ease);
}
.brand__name {
  position: relative; display: inline-block;
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink);
  padding-bottom: 9px;
}
.brand__swoosh {
  position: absolute; left: -1%; bottom: 0; width: 102%; height: 7px;
  fill: var(--ink); opacity: .42;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  transform-origin: left center;
}
.brand:hover .brand__swoosh { opacity: .7; transform: scaleX(1.02); }
.brand:hover .brand__top { color: var(--ink-62); }
.brand__sub {
  font-size: .56rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-40); margin-top: 8px;
}
@media (max-width: 520px) { .brand__sub { display: none; } }

.nav { display: none; align-items: center; gap: clamp(20px, 2.6vw, 44px); }
@media (min-width: 940px) { .nav { display: flex; } }
.nav__link {
  font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-62); padding-block: 6px;
  transition: color .25s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); }
.nav__tel { font-size: .76rem; letter-spacing: .08em; color: var(--ink); white-space: nowrap; }
.nav__tel:hover { color: var(--ink-62); }

.burger { width: 40px; height: 40px; position: relative; z-index: 120; display: grid; place-items: center; }
@media (min-width: 940px) { .burger { display: none; } }
.burger span {
  position: absolute; width: 24px; height: 1.4px; background: var(--ink);
  transition: transform .35s var(--ease), opacity .2s var(--ease);
}
.burger span:nth-child(1) { transform: translateY(-6px); }
.burger span:nth-child(3) { transform: translateY(6px); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

/* ------------------------------------------------------------ Mobil menu -- */
.navlayer {
  position: fixed; inset: 0; z-index: 110;
  background: var(--bone);
  padding: calc(var(--h-header) + 24px) var(--pad-x) 40px;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.navlayer.is-open { opacity: 1; visibility: visible; }
.navlayer__group + .navlayer__group { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.navlayer__list { list-style: none; margin: 0; padding: 0; }
.navlayer__list a {
  display: block; padding: 7px 0;
  font-family: var(--f-display); text-transform: uppercase;
  font-size: 1.45rem; letter-spacing: .04em; color: var(--ink);
}
.navlayer__list--sub a { font-family: var(--f-body); font-size: .92rem; letter-spacing: .1em; color: var(--ink-62); }
.navlayer__list a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.navlayer__foot { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-62); }
.navlayer__foot a { color: var(--ink); }

/* ------------------------------------------------------------------ Hero -- */
.hero { position: relative; background: var(--clay); }
.hero__media { position: relative; width: 100%; height: clamp(360px, 74vh, 760px); overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  /* Ilustrační fotky bývají světlé, proto je spodek ztmavený víc — text
     v popisku musí zůstat čitelný na jakékoli fotce. */
  background:
    linear-gradient(180deg, rgba(32,22,12,.38) 0%, rgba(32,22,12,.1) 30%, rgba(32,22,12,.68) 72%, rgba(32,22,12,.88) 100%),
    linear-gradient(90deg, rgba(32,22,12,.55) 0%, rgba(32,22,12,.2) 55%, rgba(32,22,12,0) 82%),
    linear-gradient(rgba(32,22,12,.12), rgba(32,22,12,.12));
}
.hero__caption {
  position: absolute; left: 0; right: 0; bottom: clamp(26px, 4vw, 54px);
  z-index: 2; color: var(--bone);
}
.hero__caption h1, .hero__caption .t-hero { color: var(--bone); }
.hero__caption .kicker { color: rgba(249,244,241,.66); }
.hero__caption p { color: rgba(249,244,241,.86); max-width: 52ch; }
.hero__caption .link { color: var(--bone); border-bottom-color: rgba(249,244,241,.5); margin-top: 22px; }
.hero__caption .link:hover { border-bottom-color: var(--bone); }

.hero--short .hero__media { height: clamp(260px, 46vh, 460px); }

/* stručná statement sekce hned pod herem */
.statement { padding-block: clamp(56px, 8vw, 118px); text-align: center; }
.statement .t-section { max-width: 22ch; margin-inline: auto; }
.statement p { max-width: 58ch; margin-inline: auto; color: var(--ink-90); }

/* ------------------------------------------------------- Mřížka kategorií -- */
.teasers { display: grid; grid-template-columns: 1fr; gap: clamp(30px, 3vw, 46px) clamp(18px, 2vw, 30px); }
@media (min-width: 620px)  { .teasers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .teasers--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .teasers--4 { grid-template-columns: repeat(4, 1fr); } }

.teaser { display: flex; flex-direction: column; }
.teaser__media { overflow: hidden; background: var(--clay); aspect-ratio: 4 / 5; margin-bottom: 20px; }
.teaser__media--wide { aspect-ratio: 4 / 3; }
.teaser__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.teaser:hover .teaser__media img { transform: scale(1.04); }
.teaser__title { margin-bottom: .55em; }
.teaser__text { font-size: .92rem; color: var(--ink-62); margin-bottom: 18px; }
.teaser__link { margin-top: auto; align-self: flex-start; }

/* ------------------------------------------------------------ Split blok -- */
.split { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: center; }
@media (min-width: 940px) {
  .split { grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 5.5vw, 96px); }
  .split--reverse .split__media { order: 2; }
  .split--offset { grid-template-columns: 1.2fr .8fr; align-items: end; }
}
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--clay); }
.split__body { max-width: 56ch; }
.split__body .t-section { margin-bottom: .7em; }

/* ---------------------------------------------------------------- Fakta -- */
.facts { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 700px)  { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { padding: clamp(24px, 2.6vw, 38px) clamp(0px, 2vw, 32px) clamp(24px, 2.6vw, 38px) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .fact { border-right: 1px solid var(--line); padding-left: clamp(18px, 2vw, 32px); } .fact:first-child { padding-left: 0; } }
.fact__t { font-family: var(--f-display); text-transform: uppercase; font-size: 1.02rem; letter-spacing: .05em; color: var(--ink); margin-bottom: .5em; }
.fact__d { font-size: .89rem; color: var(--ink-62); line-height: 1.6; }

/* ------------------------------------------------------------ Seznam bodů -- */
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: .96rem; }
.list li:first-child { border-top: 1px solid var(--line-soft); }
@media (min-width: 780px) { .list--2 { grid-template-columns: 1fr 1fr; column-gap: clamp(30px, 4vw, 66px); } .list--2 li:nth-child(2):first-child { } }

/* --------------------------------------------------------------- Galerie -- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(6px, .8vw, 12px); }
@media (min-width: 680px)  { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1500px) { .gallery { grid-template-columns: repeat(5, 1fr); } }
.gallery figure { margin: 0; overflow: hidden; aspect-ratio: 1 / 1; background: var(--clay); }
.gallery a { display: block; width: 100%; height: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .3s; }
.gallery figure:hover img { transform: scale(1.05); }

.gallery figure.is-more { display: none; }
.gallery.is-expanded figure.is-more { display: block; }
.more-wrap { margin-top: clamp(24px, 3vw, 40px); text-align: center; }

.gallery-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: clamp(22px, 2.6vw, 36px); }
.gallery-head h2 { margin: 0; }

/* ------------------------------------------------------------- Reference -- */
.refs { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .refs { grid-template-columns: repeat(4, 1fr); } }
.ref { padding: clamp(22px, 2.4vw, 34px) 18px clamp(22px, 2.4vw, 34px) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .ref { border-right: 1px solid var(--line); padding-left: clamp(18px, 2vw, 30px); } .ref:first-child { padding-left: 0; } }
.ref__place { font-family: var(--f-display); text-transform: uppercase; font-size: 1.05rem; letter-spacing: .05em; color: var(--ink); }
.ref__what { font-size: .86rem; color: var(--ink-62); margin-top: 6px; }

/* ---------------------------------------------------------------- Kontakt -- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 980px) { .contact-grid { grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 5vw, 90px); } }

.info { list-style: none; margin: 0; padding: 0; }
.info li { padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.info li:first-child { border-top: 1px solid var(--line-soft); }
.info .k { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-40); margin: 0 0 6px; }
.info .v { font-size: 1rem; margin: 0; }
.info a.v:hover { color: var(--ink-62); }
.info .v--lg { font-family: var(--f-display); font-size: clamp(1.2rem, 2.2vw, 1.55rem); letter-spacing: .03em; }

.form { display: grid; gap: 20px; }
.form__row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-40); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .97rem; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 10px 0;
  max-width: 100%;
  transition: border-color .25s var(--ease);
}
.field select { padding-left: 0; }
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--ink); outline: none; }
.field--check { flex-direction: row; align-items: flex-start; gap: 12px; }
.field--check input { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 4px; accent-color: var(--ink); border-bottom: 0; }
.field--check label { font-size: .85rem; letter-spacing: 0; text-transform: none; color: var(--ink-62); line-height: 1.55; }
.hp { position: absolute !important; left: -9999px !important; height: 0; opacity: 0; }
.form__status { display: none; padding: 14px 0; border-top: 1px solid var(--ink); font-size: .93rem; }
.form__status.is-visible { display: block; }
.form__status.is-error { border-top-color: #9c3b25; color: #9c3b25; }

.map { width: 100%; aspect-ratio: 16 / 7; border: 1px solid var(--line); background: var(--clay); }
@media (max-width: 640px) { .map { aspect-ratio: 4 / 3; } }

/* ---------------------------------------------------------------- Footer -- */
.footer { background: var(--clay); padding-block: clamp(52px, 6vw, 96px) 28px; border-top: 1px solid var(--line); }
.footer__top { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 860px) { .footer__top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer__h { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-40); margin: 0 0 18px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer__list a:hover { color: var(--ink); }
.footer__claim { margin-top: 18px; max-width: 36ch; font-size: .92rem; color: var(--ink-62); }
.footer__bottom {
  margin-top: clamp(40px, 5vw, 70px); padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: space-between;
  font-size: .78rem; color: var(--ink-40);
}

/* ----------------------------------------------------- Animace při scrollu -- */
.inview { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.inview.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .inview { opacity: 1; transform: none; }
}

/* --------------------------------------------------- Ochrana před přetečením -- */
.split > *, .teasers > *, .contact-grid > *, .footer__top > *, .facts > *, .refs > * { min-width: 0; }
.info .v, .footer__list li { overflow-wrap: anywhere; }

/* --------------------------------------------------------------- Drobečky -- */
.crumbs { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(249,244,241,.66); margin-bottom: 16px; }
.crumbs a:hover { color: var(--bone); }
.crumbs span { opacity: .5; margin-inline: 8px; }
