/* Pivnice U Tří karafiátů
   Barvy z domu: tmavé dřevo lokálu, vápenná bílá fasády, zelená skály, červený karafiát. */

:root {
  --wood: #1c1612;
  --wood-2: #2b221c;
  --wood-3: #3a2f27;
  --lime: #ecebe6;
  --lime-2: #dfddd5;
  --moss: #2f3a2a;
  --moss-2: #3b4835;
  --ink-on-dark: #eeeeea;
  --soft-on-dark: #c2b9af;
  --ink-on-light: #1c1612;
  --soft-on-light: #574d45;
  --accent: #ef5a4c;
  --accent-ink: #1c1612;
  --ph: #f2d04b;
  --ph-ink: #1c1612;

  --font: "Archivo", "Arial Narrow", sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-sub: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);

  --margin: clamp(16px, 2.2vw, 32px);
  --gap-section: clamp(96px, 12vw, 200px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--wood);
  color: var(--ink-on-dark);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  font-kerning: normal;
  overflow-x: clip;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, p, ul, figure, table, address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -100px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; }
.skip:focus { top: 12px; }

/* Placeholders: viditelně označené hodnoty, které je potřeba doplnit */
.ph { background: var(--ph); color: var(--ph-ink); padding: 0 0.2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Display: Archivo v nejužším řezu */
.display, .hero__title, .giant, .foot__name, .contact__mail {
  font-family: var(--font);
  font-weight: 800;
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.86;
}

/* Tlačítka: hranatá, jedna plná barva */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: var(--step-small); }
.btn--light { background: var(--lime); color: var(--ink-on-light); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #ff7062; }
  .btn--light:hover { background: #ffffff; }
}

/* ---------- Horní lišta ---------- */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 16px var(--margin);
  color: var(--ink-on-light);
}
.bar__mark { font-weight: 700; font-size: var(--step-small); text-decoration: none; margin-right: auto; }
.bar__nav { display: flex; gap: 22px; font-size: var(--step-small); font-weight: 500; }
.bar__nav a { text-decoration: none; padding: 8px 0; position: relative; }
.bar__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .bar__nav a:hover::after { transform: scaleX(1); } }
.bar__toggle { display: none; }

@media (max-width: 760px) {
  .bar { padding: 12px var(--margin); }
  .bar__cta { display: none; }
  .bar__nav { flex-wrap: wrap; gap: 4px 16px; width: 100%; }
  .bar { flex-wrap: wrap; }
  .js .bar { flex-wrap: nowrap; }
  .js .bar__toggle {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
    background: var(--wood); color: var(--ink-on-dark); border: 0; font: 600 15px/1 var(--font);
    transition: transform 160ms var(--ease-out);
  }
  .js .bar__toggle:active { transform: scale(0.97); }
  .js .bar__nav {
    position: absolute; top: 64px; right: var(--margin); width: auto; min-width: 200px;
    flex-direction: column; gap: 0; padding: 8px 0;
    background: var(--wood); color: var(--ink-on-dark);
    box-shadow: 0 18px 40px rgba(28, 22, 18, 0.35); /* taste-skill-ignore: rozbalené menu je překryv */
    transform-origin: top right;
    opacity: 0; transform: scale(0.96) translateY(-4px); visibility: hidden;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s linear 180ms;
  }
  .js .bar__nav a { padding: 12px 20px; font-size: 17px; }
  .js .bar__nav a::after { display: none; }
  .js .bar.is-open .bar__nav { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
}

/* ---------- Hero: jméno jako vývěsní štít ---------- */
.hero { position: relative; background: var(--lime); color: var(--ink-on-light); }
.js .hero { height: 280svh; }
.hero__stage {
  position: sticky; top: 0; height: 100svh; min-height: 620px; overflow: hidden;
  display: grid;
}
.hero__title {
  position: absolute; z-index: 3; left: 0; right: 0; top: 104px;
  display: flex; justify-content: center; gap: 0.22em;
  padding: 0 var(--margin);
  font-size: 13.6vw; /* script.js dorovná na šířku okna */
  white-space: nowrap; pointer-events: none;
}
.hero__line { display: block; }
.hero__frames {
  position: absolute; z-index: 1;
  left: 50%; bottom: 0;
  width: min(calc((100svh - 92px) * 2 / 3), 44vw);
  aspect-ratio: 2 / 3; transform: translateX(-50%);
}
.frame { position: absolute; inset: 0; background: var(--frame-bg); }
.frame__art { width: 100%; height: 100%; object-fit: cover; }
.hero__caption {
  position: absolute; left: calc(100% + 16px); bottom: 32px; width: 14ch;
  font-size: var(--step-small); color: var(--soft-on-light);
}
.js .frame { clip-path: inset(100% 0 0 0); transition: clip-path 760ms var(--ease-in-out); }
.js .frame.is-active { clip-path: inset(0 0 0 0); z-index: 2; }
@media (prefers-reduced-motion: no-preference) {
  .hero__caption.is-swapping { opacity: 0; transform: translateY(6px); }
  .hero__caption { transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
}
.js .frame.was-active { clip-path: inset(0 0 0 0); z-index: 1; }

.hero__foot {
  position: absolute; z-index: 3; left: var(--margin); bottom: 32px;
  width: min(30ch, 26vw);
}
.hero__lead { font-weight: 700; font-size: var(--step-body); line-height: 1.35; }
.hero__status { margin-top: 10px; font-size: var(--step-small); color: var(--soft-on-light); }
.hero__status b { color: var(--ink-on-light); font-weight: 600; }
.hero__cta { position: absolute; z-index: 3; right: var(--margin); bottom: 32px; }

.sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 6s ease-in-out infinite alternate; }
.sway--2 { animation-duration: 7.2s; animation-delay: -2s; }
.sway--3 { animation-duration: 5.4s; animation-delay: -4s; }
@keyframes sway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }

@media (max-width: 760px) {
  .js .hero { height: 240svh; }
  .hero__stage { min-height: 600px; }
  .hero__title { flex-direction: column; align-items: flex-start; top: 72px; gap: 0; font-size: 24vw; }
  .hero__frames { left: var(--margin); right: var(--margin); top: auto; bottom: 150px; width: auto; transform: none; aspect-ratio: auto; }
  .hero__frames { height: min(calc((100vw - 2 * var(--margin)) * 1.1), calc(100svh - 300px)); }
  .frame__art { object-fit: cover; }
  .hero__caption { display: none; }
  .hero__foot { bottom: 24px; width: calc(100% - 2 * var(--margin) - 150px); }
  .hero__lead { font-size: 16px; }
  .hero__cta { bottom: 24px; }
}

/* Úvodní sekvence */
@media (prefers-reduced-motion: no-preference) {
  .hero__line { animation: rise 900ms var(--ease-out) both; }
  .hero__line + .hero__line { animation-delay: 90ms; }
  .hero__frames { animation: settle 1100ms var(--ease-out) 160ms both; }
  .bar { animation: fade 600ms var(--ease-out) 420ms both; }
  .hero__lead { animation: up 700ms var(--ease-out) 520ms both; }
  .hero__status { animation: up 700ms var(--ease-out) 600ms both; }
  .hero__cta { animation: up 700ms var(--ease-out) 680ms both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(0.35em); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; scale: 0.96; } to { opacity: 1; scale: 1; } }
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Na čepu + Kuchyně ---------- */
.menu {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 6vw, 112px);
  padding: var(--gap-section) var(--margin);
  background: var(--wood);
}
.menu__col { container-type: inline-size; scroll-margin-top: 24px; }
.giant { font-size: 50cqw; color: var(--ink-on-dark); white-space: nowrap; }
.giant--long { font-size: 27cqw; }
.giant__word { display: inline-block; }
.menu__note { margin-top: 28px; max-width: 46ch; color: var(--soft-on-dark); }
.bars { margin-top: 28px; display: grid; gap: 6px; }
.bars details { background: var(--wood-2); }
.bars summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 0 18px; cursor: pointer;
  font-weight: 500; list-style: none;
  transition: background-color 200ms var(--ease-out);
}
.bars summary::-webkit-details-marker { display: none; }
.bars summary::after {
  content: "+"; font-size: 26px; font-weight: 400; line-height: 1;
  transition: transform 220ms var(--ease-out);
}
.bars details[open] summary::after { transform: rotate(45deg); }
@media (hover: hover) and (pointer: fine) { .bars summary:hover { background: var(--wood-3); } }
.items { padding: 4px 18px 20px; display: grid; gap: 14px; }
.items li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.items small { display: block; margin-top: 4px; font-size: var(--step-small); color: var(--soft-on-dark); }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.price small { display: inline; }
.items__text { padding: 4px 18px 20px; }
@media (prefers-reduced-motion: no-preference) {
  .bars details[open] .items, .bars details[open] .items__text { animation: up 260ms var(--ease-out); }
}

@media (max-width: 760px) {
  .menu { grid-template-columns: 1fr; gap: 152px; }
  .bars summary { min-height: 54px; }
}

/* ---------- Hospoda ---------- */
.about {
  background: var(--lime); color: var(--ink-on-light);
  padding: var(--gap-section) var(--margin);
}
.about__grid {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
}
.about__h { grid-column: 1 / 10; font-size: var(--step-sub); line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; }
.about__facts { grid-column: 10 / 13; grid-row: 1 / 3; align-self: start; padding-top: 0.4em; font-size: var(--step-lead); line-height: 1.3; line-height: 1.45; display: grid; gap: 10px; padding-top: 8px; color: var(--soft-on-light); }
.about__facts li:first-child { color: var(--ink-on-light); }
.about__text { grid-column: 1 / 10; grid-row: 2; margin-top: 32px; }
.about__statement { font-size: var(--step-sub); line-height: 1.2; max-width: 44ch; }
.about__statement strong { font-weight: 600; }
.about__cap { float: left; width: 3.6em; height: 3.6em; margin: 0.12em 0.5em 0 0; }
.about__more { clear: both; padding-top: 1.2em; max-width: 60ch; font-size: var(--step-lead); line-height: 1.4; color: var(--soft-on-light); }

.gallery__h { margin-top: var(--gap-section); font-size: var(--step-sub); line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; margin-top: 48px; }
.shot figcaption { margin-top: 10px; font-size: var(--step-small); color: var(--soft-on-light); }
.shot--a { grid-column: 1 / 5; grid-row: 1; }
.shot--b { grid-column: 7 / 13; grid-row: 1; margin-top: 22vh; }
.shot--c { grid-column: 6 / 12; grid-row: 2; margin-top: 14vh; }
.shot--d { grid-column: 2 / 5; grid-row: 2; margin-top: 30vh; }
.shot__ph {
  display: grid; place-items: center; align-content: center; gap: 18px;
  background: var(--lime-2); overflow: hidden;
}
.shot__ph svg { width: 18%; min-width: 48px; height: auto; transition: transform 500ms var(--ease-out); }
.shot__ph span { background: var(--ph); color: var(--ph-ink); padding: 2px 8px; font-size: var(--step-small); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .shot:hover .shot__ph svg { transform: rotate(-4deg) scale(1.04); } }

@media (max-width: 1100px) {
  .about__h, .about__text { grid-column: 1 / -1; }
  .about__facts { grid-column: 1 / -1; grid-row: 3; margin-top: 40px; grid-template-columns: repeat(3, 1fr); gap: 12px; font-size: var(--step-small); }
}
@media (max-width: 760px) {
  .about__text { grid-row: 2; }
  .about__facts { grid-column: 1 / -1; grid-row: 3; margin-top: 40px; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .about__statement { font-size: 22px; line-height: 1.25; }
  .about__cap { width: 4.9em; height: 4.9em; }
  .gallery { display: flex; flex-direction: column; gap: 64px; }
  .shot { margin: 0 !important; }
  .shot--a { width: 70%; }
  .shot--b { width: 84%; align-self: flex-end; }
  .shot--c { width: 56%; }
  .shot--d { width: calc(100% + 2 * var(--margin)); margin-left: calc(-1 * var(--margin)) !important; }
  .shot--d figcaption { padding-left: var(--margin); }
}

/* ---------- Návštěva ---------- */
.visit {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  padding: var(--gap-section) var(--margin);
  background: var(--moss); color: var(--ink-on-dark);
}
.visit__info { grid-column: 1 / 6; display: flex; flex-direction: column; align-items: flex-start; }
.visit__h { font-size: var(--step-head); }
.visit__h { font-weight: 800; font-stretch: 62%; font-variation-settings: "wdth" 62; text-transform: uppercase; line-height: 0.9; }
.visit__now { margin-top: 28px; font-size: var(--step-lead); line-height: 1.3; max-width: 22ch; }
.visit__now b { font-weight: 600; }
.hours { margin-top: 36px; width: 100%; max-width: 420px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 9px 12px; text-align: left; font-weight: 400; }
.hours td { text-align: right; }
.hours tr.is-today { background: var(--moss-2); }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; }
.visit__addr { margin: 36px 0 24px; line-height: 1.5; }
.visit__map { grid-column: 7 / 13; min-height: 70vh; background: var(--moss-2); }
.visit__map iframe { width: 100%; height: 100%; min-height: 70vh; border: 0; filter: grayscale(0.35) contrast(1.05); }

@media (max-width: 760px) {
  .visit__info, .visit__map { grid-column: 1 / -1; }
  .visit__map { margin-top: 48px; min-height: 0; }
  .visit__map iframe { min-height: 0; height: 380px; }
}

/* ---------- Kontakt ---------- */
.contact {
  min-height: 80svh; display: flex; flex-direction: column;
  padding: clamp(40px, 6vw, 72px) var(--margin) 40px;
  background: var(--lime); color: var(--ink-on-light);
}
.contact__h { max-width: 24ch; font-size: var(--step-lead); font-weight: 600; line-height: 1.3; }
.contact__mail {
  margin-top: auto; padding-top: 8vh; align-self: flex-start;
  font-size: 12vw; font-weight: 500; text-decoration: none; text-transform: none; letter-spacing: -0.02em;
  transition: color 220ms var(--ease-out);
}
.contact__mail .ph { transition: background-color 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .contact__mail:hover .ph { background: var(--accent); } }
.contact__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 8vh; font-size: var(--step-small); }
.contact__left, .contact__right { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.contact__left a, .contact__right a:not(.btn) { padding: 10px 0; }

@media (max-width: 760px) {
  .contact { min-height: 0; }
  .contact__mail { font-size: 20vw; padding-top: 72px; }
  .contact__foot { margin-top: 56px; }
  .contact__foot { flex-direction: column; align-items: flex-start; }
  .contact__left, .contact__right { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contact__right .btn { margin-top: 12px; }
}

/* ---------- Patička ---------- */
.foot { background: var(--wood); color: var(--ink-on-dark); padding: clamp(72px, 8vw, 120px) var(--margin) 0; overflow: hidden; }
.foot__name { margin-top: 64px; margin-bottom: -0.1em; font-size: 15vw; white-space: nowrap; }
.foot__row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.foot__places { grid-column: 1 / 7; display: grid; gap: 6px; font-size: var(--step-sub); line-height: 1.2; }
.foot__places a { color: var(--accent); text-decoration: none; transition: color 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .foot__places a:hover { color: var(--ink-on-dark); } }
.foot__links { grid-column: 8 / 13; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; font-size: var(--step-small); }
.foot__links li + li { margin-top: 8px; }
.foot__links a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot__links a:hover { text-decoration: underline; } }
.foot__legal { display: flex; justify-content: space-between; gap: 16px; margin-top: 96px; font-size: var(--step-small); color: var(--soft-on-dark); }

@media (max-width: 760px) {
  .foot__row { grid-template-columns: 1fr; row-gap: 48px; }
  .foot__places, .foot__links { grid-column: 1 / -1; }
  .foot__links { grid-template-columns: 1fr 1fr; }
  .foot__legal { margin-top: 64px; }
}

/* ---------- Postupné odhalování při scrollu ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shot[data-reveal] .shot__ph { clip-path: inset(100% 0 0 0); transition: clip-path 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms + 80ms); }
  .js .shot[data-reveal].is-in .shot__ph { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js .frame { transition: opacity 200ms linear !important; clip-path: none !important; opacity: 0; }
  .js .frame.is-active { opacity: 1; }
  .js .frame.was-active { opacity: 0; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
