/* ==========================================================================
   Vais – Truhlářství Vidonice
   ========================================================================== */

:root {
  --paper: #f2eee7;
  --paper-tint: #e8e2d7;
  --ink: #1b1c19;
  --ink-soft: #55554d;
  --rule: #d4ccbf;
  --pine: #1e2721;
  --pine-2: #27322b;
  --on-pine: #ece6da;
  --on-pine-soft: #a7aea2;
  --accent: #a86f34;
  --accent-ink: #8a5524;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1360px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
}

/* ---------- základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.is-locked { overflow: hidden; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (min-width: 900px) {
  body { font-size: 1.0625rem; }
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--pine); color: var(--on-pine); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--pine); color: var(--on-pine); padding: .75rem 1rem;
}
.skip:focus { top: 1rem; }

/* ---------- typografie ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 1.2rem + .6vw, 1.75rem); }
h4 { font-size: 1.3rem; }
em { font-style: italic; }
p { text-wrap: pretty; }

.lead {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem);
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.kicker,
.sec-head__label,
.card__meta,
.field label,
.detail__crumb,
.site-footer__h {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- tlačítka a odkazy ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: 1.05rem 1.5rem 1.05rem 1.6rem;
  background: var(--pine);
  color: var(--on-pine);
  border: 1px solid var(--pine);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background-color .3s ease, color .3s ease;
}
.btn svg { transition: transform .4s var(--ease); }
.btn:hover { background: var(--ink); }
.btn:hover svg { transform: translateX(4px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: .3rem;
}
.text-link svg { transition: transform .4s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }

.close-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .9rem;
  font-weight: 500;
  padding: .6rem 0 .6rem .6rem;
}
.close-btn svg { transition: transform .4s var(--ease); }
.close-btn:hover svg { transform: rotate(90deg); }

/* ---------- hlavička ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}
.brand__name {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-left: -.02em;
}
.brand__sub {
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: .38rem;
}
.brand--light .brand__sub { color: var(--on-pine-soft); }

.nav, .header-phone { display: none; }
.nav ul { list-style: none; padding: 0; display: flex; gap: 2.4rem; }
.nav a, .header-phone {
  text-decoration: none;
  font-size: .95rem;
  position: relative;
  padding-block: .4rem;
}
.nav a::after, .header-phone::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after, .header-phone:hover::after { transform: scaleX(1); }
.header-phone { font-weight: 500; font-variant-numeric: tabular-nums; }

.header-mobile { display: flex; align-items: center; gap: .5rem; margin-right: -.6rem; }
.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
}
.menu-btn {
  display: inline-flex; align-items: center; gap: .65rem;
  height: 44px; padding: 0 .6rem;
  font-size: .9rem; font-weight: 500;
}
.menu-btn__icon { width: 20px; height: 9px; position: relative; }
.menu-btn__icon i {
  position: absolute; left: 0; right: 0; height: 1.25px; background: currentColor;
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.menu-btn__icon i:first-child { top: 0; }
.menu-btn__icon i:last-child { top: 8px; }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:first-child { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:last-child { top: 4px; transform: rotate(-45deg); }

@media (min-width: 900px) {
  .nav { display: block; margin-left: auto; }
  .header-phone { display: inline-block; }
  .header-mobile { display: none; }
}

/* mobilní menu */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 39;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 2rem var(--gutter) 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; padding: 0; }
.mobile-menu li { border-bottom: 1px solid var(--rule); }
.mobile-menu nav a {
  display: block;
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1.1;
  padding: .85rem 0;
  text-decoration: none;
}
.mobile-menu__contact { display: grid; gap: .35rem; padding-top: 2rem; color: var(--ink-soft); }
.mobile-menu__contact a { text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.mobile-menu__contact a:first-child { font-family: var(--serif); font-size: 1.6rem; }
html.js .mobile-menu.is-open { animation: menuIn .45s var(--ease); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- úvod ---------- */
.hero {
  display: grid;
}
.hero__media {
  order: -1;
  position: relative;
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
  background: var(--paper-tint);
}
.hero__media picture { height: 100%; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
html.js .hero__media img { animation: heroImg 1.6s var(--ease) both; }
@keyframes heroImg { from { transform: scale(1.05); opacity: .2; } }
@media (min-width: 620px) and (max-width: 899px) {
  .hero__media { aspect-ratio: 16 / 10; }
}
.hero__media figcaption {
  position: absolute; right: var(--gutter); bottom: 1rem;
  font-size: .75rem; letter-spacing: .04em;
  color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.35);
  display: none;
}
.hero__text {
  padding: 2.25rem var(--gutter) 3.5rem;
}
.kicker { color: var(--ink-soft); margin-bottom: 1.25rem; }
.hero__title {
  font-size: clamp(2.9rem, 1.6rem + 6vw, 6.1rem);
  line-height: .98;
  letter-spacing: -0.028em;
  font-weight: 380;
}
.hero__title em { font-weight: 330; color: var(--accent-ink); }
.hero__lead {
  margin-top: 1.5rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.hero__actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}
.hero__call {
  text-decoration: none;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.hero__call span { color: var(--ink-soft); font-weight: 400; margin-right: .3rem; }
.hero__call:hover { text-decoration: underline; text-underline-offset: .25em; }

html.js .hero__text > * { animation: rise 1s var(--ease) both; }
html.js .hero__text > :nth-child(2) { animation-delay: .08s; }
html.js .hero__text > :nth-child(3) { animation-delay: .16s; }
html.js .hero__text > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    min-height: min(calc(100svh - var(--header-h)), 900px);
  }
  .hero__media { order: 0; aspect-ratio: auto; }
  .hero__media figcaption { display: block; }
  .hero__text {
    align-self: center;
    padding-block: 4rem 5rem;
    padding-left: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
    padding-right: clamp(2rem, 4vw, 5rem);
  }
  .hero__lead { font-size: 1.125rem; margin-top: 2rem; }
  .hero__actions { margin-top: 2.5rem; }
}

/* ---------- sekce ---------- */
.section { padding-block: clamp(4.5rem, 3rem + 6vw, 9rem); }
.section--dark { background: var(--pine); color: var(--on-pine); }
.section--tint { background: var(--paper-tint); }

.sec-head {
  display: grid;
  gap: 1.1rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
  margin-bottom: clamp(2.5rem, 2rem + 3vw, 5rem);
}
.section--dark .sec-head { border-top-color: rgba(236, 230, 218, .2); }
.sec-head__label { color: var(--ink-soft); padding-top: .55rem; }
.section--dark .sec-head__label { color: var(--on-pine-soft); }
.sec-head__body { max-width: 52rem; }
.sec-head__body .lead { margin-top: 1.4rem; color: var(--ink-soft); }
/* společná 12sloupcová mřížka, aby texty ve všech sekcích lícovaly */
@media (min-width: 900px) {
  .sec-head, .restore, .about, .contact, .detail__content {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
  }
  .sec-head__label { grid-column: 1 / span 3; }
  .sec-head__body { grid-column: 4 / span 9; }
}

/* ---------- výroba ---------- */
.group + .group { margin-top: clamp(3.5rem, 3rem + 3vw, 6rem); }
.group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .9rem;
  margin-bottom: 1.5rem;
}
.group__head h3 { font-size: clamp(1.5rem, 1.3rem + .8vw, 2.1rem); font-style: italic; font-weight: 350; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem .9rem;
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 1.5rem; }
}
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.card__media {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-tint);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter .6s ease;
}
.card:hover .card__media img { transform: scale(1.045); }
.card__title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-top: .95rem;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + .6vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.card__title svg {
  flex: none; width: 20px; height: 20px; margin-top: .2em;
  transition: transform .45s var(--ease);
}
.card:hover .card__title svg { transform: translateX(5px); }
.card__text {
  display: none;
  margin-top: .45rem;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.5;
}
.card__meta { margin-top: .7rem; color: var(--accent-ink); font-size: .7rem; }
@media (min-width: 620px) {
  .card__text { display: block; }
}

.card--text .card__media {
  background: var(--pine);
  color: var(--on-pine);
  display: flex;
  align-items: flex-end;
  padding: 1.1rem;
  transition: background-color .5s ease;
}
.card--text:hover .card__media { background: var(--pine-2); }
.card__list {
  display: grid;
  gap: .15rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, .9rem + .7vw, 1.55rem);
  line-height: 1.25;
}
@media (min-width: 1000px) {
  .card--text .card__media { padding: 1.75rem; }
}

/* ---------- restaurování ---------- */
.restore {
  display: grid;
  gap: 3.5rem;
}
.restore__text .lead { color: var(--on-pine); }
.restore__text > p + p { margin-top: 1.25rem; color: var(--on-pine-soft); }
.steps {
  list-style: none;
  padding: 0;
  margin: 2.25rem 0 2.5rem;
  border-top: 1px solid rgba(236, 230, 218, .2);
}
.steps li {
  font-family: var(--serif);
  font-size: 1.15rem;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(236, 230, 218, .2);
}
.restore__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
  align-items: start;
}
.restore__pair img { width: 100%; aspect-ratio: 9 / 14; object-fit: cover; }
.restore__pair img:last-child { margin-top: 3rem; }
.restore__media figcaption,
.about__media figcaption,
.band figcaption {
  margin-top: .9rem;
  font-size: .82rem;
  color: var(--ink-soft);
}
.restore__media figcaption { color: var(--on-pine-soft); }
@media (min-width: 900px) {
  .restore__text { grid-column: 4 / span 5; }
  .restore__media { grid-column: 9 / span 4; padding-left: clamp(0rem, 2vw, 2rem); }
}

/* ---------- o nás ---------- */
.about {
  display: grid;
  gap: 3rem;
}
.about__text p + p { margin-top: 1.1rem; color: var(--ink-soft); }
.about__text .lead + p { margin-top: 1.5rem; }
.about__media img { width: 100%; }
@media (min-width: 900px) {
  .about__text { grid-column: 4 / span 5; }
  .about__media { grid-column: 9 / span 4; padding-left: clamp(0rem, 2vw, 2rem); }
}

.facts {
  display: grid;
  gap: 0;
  margin-top: clamp(3.5rem, 3rem + 3vw, 6rem);
}
.facts > div {
  border-top: 1px solid var(--rule);
  padding: 1.2rem 0 1.6rem;
  display: grid;
  gap: .35rem;
}
.facts dt {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.facts dd { color: var(--ink-soft); }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

.process { margin-top: clamp(3.5rem, 3rem + 3vw, 6rem); }
.process__title { font-style: italic; font-weight: 350; margin-bottom: 1.5rem; }
.process__list {
  list-style: none;
  padding: 0;
  display: grid;
}
.process__list li {
  border-top: 1px solid var(--rule);
  padding: 1.1rem 0 1.5rem;
}
.process__list h4 { margin-bottom: .45rem; }
.process__list p { color: var(--ink-soft); font-size: .97rem; }
@media (min-width: 760px) {
  .process__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
}
@media (min-width: 1100px) {
  .process__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .process__list li { padding-right: 1rem; }
}

/* ---------- fotografický pás ---------- */
.band { margin: 0; }
.band img {
  width: 100%;
  height: clamp(280px, 45vw, 600px);
  object-fit: cover;
  object-position: 50% 60%;
}
.band figcaption { margin-bottom: 0; padding-bottom: 0; }
.band + .section { margin-top: clamp(3rem, 2rem + 4vw, 6rem); }

/* ---------- kontakt ---------- */
.contact {
  display: grid;
  gap: 3.5rem;
}
.contact__phone {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 1.4rem + 2.2vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
  font-variant-numeric: lining-nums;
}
.contact__mail {
  display: inline-block;
  margin-top: .9rem;
  font-size: 1.1rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
  word-break: break-word;
}
.contact__phone:hover { color: var(--accent-ink); }
.contact__list {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.4rem;
}
.contact__list > div {
  display: grid;
  gap: .25rem;
  border-top: 1px solid var(--rule);
  padding-top: .9rem;
}
.contact__list dt {
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  color: var(--ink-soft);
}
.contact__list dd a { text-underline-offset: .25em; text-decoration-thickness: 1px; }
.contact__legal { margin-top: 2.5rem; font-size: .82rem; color: var(--ink-soft); line-height: 1.7; }
.contact__info { display: flex; flex-direction: column; align-items: flex-start; }
.contact__list { align-self: stretch; }

@media (min-width: 900px) {
  .contact__info { grid-column: 4 / span 4; }
  .contact .form { grid-column: 8 / span 5; }
}

/* formulář */
.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem 1.25rem;
  align-content: start;
  background: #faf8f4;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--pine);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}
.form__head, .field--full, .form__foot, .form__status { grid-column: 1 / -1; }
.form__head h3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.form__head p { margin-top: .4rem; color: var(--ink-soft); font-size: .95rem; }
@media (min-width: 620px) and (max-width: 899px), (min-width: 1200px) {
  .form { grid-template-columns: 1fr 1fr; }
}
.field { display: grid; gap: .45rem; }
.field label {
  color: var(--ink);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(27, 28, 25, .3);
  border-radius: 0;
  background: #fff;
  padding: .85rem 1rem;
  font-size: 1.05rem;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.field textarea { resize: vertical; min-height: 10rem; line-height: 1.5; }
.field input:hover,
.field textarea:hover { border-color: rgba(27, 28, 25, .55); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 1px var(--pine);
}
.field.is-invalid input,
.field.is-invalid textarea { border-color: #a33a1f; box-shadow: 0 0 0 1px #a33a1f; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: .5rem;
}
.form__note { font-size: .85rem; color: var(--ink-soft); max-width: 22rem; }
.form__note a { text-underline-offset: .2em; }
.form__status { font-size: .95rem; min-height: 1.5em; }
.form__status.is-error { color: #a33a1f; }
.form__status.is-ok { color: var(--pine); }

/* ---------- patička ---------- */
.site-footer {
  background: var(--pine);
  color: var(--on-pine);
  padding-top: clamp(3.5rem, 3rem + 3vw, 6rem);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.site-footer__grid {
  display: grid;
  gap: 2.25rem;
  padding-bottom: 3rem;
}
.site-footer__grid p { color: var(--on-pine-soft); font-size: .95rem; line-height: 1.75; }
.site-footer__grid p a { color: var(--on-pine); }
.site-footer__brand .brand { margin-bottom: 1.1rem; }
.site-footer__h { color: var(--on-pine-soft); margin-bottom: .7rem; font-size: .7rem; }
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem 1.6rem;
  border-top: 1px solid rgba(236, 230, 218, .16);
  font-size: .82rem;
  color: var(--on-pine-soft);
}
.site-footer--slim { padding-top: 0; }
.site-footer--slim .site-footer__bottom { border-top: 0; }
@media (min-width: 760px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .site-footer__grid { grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 3fr)); gap: 2rem; }
}

/* ---------- detail výroby ---------- */
.detail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.detail::backdrop { background: rgba(20, 22, 19, .4); }
.detail[open] { display: flex; flex-direction: column; animation: detailIn .55s var(--ease); }
@keyframes detailIn { from { opacity: 0; transform: translateY(28px); } }
.detail__bar {
  flex: none;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.detail__crumb { color: var(--ink-soft); }
.detail__crumb span[aria-hidden] { margin-inline: .35rem; color: var(--rule); }
.detail__scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.detail__content {
  display: grid;
  gap: 1.75rem;
  padding-block: clamp(2.5rem, 2rem + 3vw, 5rem) clamp(3rem, 2rem + 3vw, 5rem);
}
.detail__head h2 {
  font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.025em;
}
.detail__head .btn { margin-top: 2rem; }
.detail__text { max-width: 44rem; }
.detail__text > * + * { margin-top: 1.1rem; }
.detail__text p:not(.lead) { color: var(--ink-soft); }
.detail__text h3 { margin-top: 2.5rem; font-size: 1.5rem; }
.detail__text .lead + h3 { margin-top: 2rem; }
.detail__text .note { font-size: .92rem; }
.detail__text .note a { color: var(--ink); text-underline-offset: .2em; }
.plain-list { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.plain-list li { padding: .6rem 0; border-bottom: 1px solid var(--rule); }

.spec-list { display: grid; border-top: 1px solid var(--rule); margin-top: 1.5rem; }
.spec-list > div {
  display: grid;
  gap: .15rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--rule);
}
.spec-list dt { font-weight: 500; font-size: .92rem; }
.spec-list dd { color: var(--ink-soft); font-size: .95rem; }
@media (min-width: 620px) {
  .spec-list > div { grid-template-columns: 11rem 1fr; gap: 1.5rem; }
}

.spec { border-top: 1px solid var(--ink); margin-top: 2rem; }
.spec + .spec { margin-top: 0; }
.spec:last-of-type { border-bottom: 1px solid var(--ink); }
.spec summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 0;
  font-family: var(--serif);
  font-size: 1.25rem;
}
.spec summary::-webkit-details-marker { display: none; }
.spec__toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.spec__toggle svg { transition: transform .4s var(--ease); }
.spec summary:hover .spec__toggle,
.spec summary:focus-visible .spec__toggle,
.spec[open] .spec__toggle {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--on-pine);
}
.spec[open] .spec__toggle svg { transform: rotate(180deg); }
.spec summary:focus-visible { outline: none; }
.spec .spec-list { margin-top: 0; margin-bottom: 1.5rem; }

@media (min-width: 900px) {
  .detail__head { grid-column: 1 / span 5; position: sticky; top: 3rem; align-self: start; }
  .detail__text { grid-column: 6 / span 7; }
}

.detail__gallery { padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.detail__gallery[hidden] { display: none; }
.detail__gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-bottom: 1.5rem;
}
.detail__gallery-head h3 { font-style: italic; font-weight: 350; }
.detail__gallery-head p { color: var(--ink-soft); font-size: .9rem; }

.masonry { columns: 2; column-gap: .6rem; }
@media (min-width: 700px) { .masonry { columns: 3; column-gap: .9rem; } }
@media (min-width: 1200px) { .masonry { columns: 4; } }
.masonry button {
  display: block;
  width: 100%;
  margin-bottom: .6rem;
  break-inside: avoid;
  background: var(--paper-tint);
  overflow: hidden;
}
@media (min-width: 700px) { .masonry button { margin-bottom: .9rem; } }
.masonry img { width: 100%; height: auto; transition: transform 1s var(--ease), opacity .6s ease; }
.masonry button:hover img { transform: scale(1.03); }
html.js .masonry img { opacity: 0; }
html.js .masonry img.is-loaded { opacity: 1; }

/* ---------- prohlížeč fotek ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #121410;
  color: var(--on-pine);
  overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: fadeIn .35s ease; }
.lightbox::backdrop { background: #121410; }
@keyframes fadeIn { from { opacity: 0; } }
.lightbox__close {
  position: absolute;
  top: .6rem; right: var(--gutter);
  z-index: 2;
}
.lightbox__stage {
  position: relative;
  min-height: 0;
  touch-action: pan-y;
}
.lightbox__img {
  position: absolute;
  top: 3.75rem;
  left: var(--gutter);
  width: calc(100% - 2 * var(--gutter));
  height: calc(100% - 3.75rem);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity .25s ease;
}
.lightbox__img.is-loading { opacity: .25; }
.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem var(--gutter) 1rem;
}
.lightbox__count { font-size: .85rem; color: var(--on-pine-soft); font-variant-numeric: tabular-nums; }
.lightbox__nav { display: flex; gap: .25rem; margin-right: -.75rem; }
.lightbox__nav button {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  transition: transform .3s var(--ease);
}
.lightbox__nav button:hover { transform: translateX(var(--nudge, 0)); }
.lightbox__nav [data-lb-prev] { --nudge: -3px; }
.lightbox__nav [data-lb-next] { --nudge: 3px; }
.close-btn--light { color: var(--on-pine); }

/* ---------- postupné odkrývání ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- podstránka ---------- */
.page { padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(4rem, 3rem + 4vw, 8rem); }
.page h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.4rem); line-height: 1.02; letter-spacing: -0.025em; }
.page__body { max-width: 44rem; margin-top: 2.5rem; }
.page__body > * + * { margin-top: 1.1rem; }
.page__body h2 { font-size: 1.6rem; margin-top: 2.5rem; }
.page__body p, .page__body li { color: var(--ink-soft); }
.page__body ul { padding-left: 1.1rem; }
.page__body a:not(.btn) { color: var(--ink); text-underline-offset: .2em; }
.page__back { margin-top: 3rem; padding-left: 1.4rem; padding-right: 1.6rem; }
.btn--back:hover svg { transform: translateX(-4px); }
