:root {
  --plaster: #f6f1e8;
  --plaster-deep: #ebe3d4;
  --ink: #241c16;
  --ink-soft: rgba(36, 28, 22, 0.72);
  --line: rgba(36, 28, 22, 0.14);
  --wood: #6a4e3d;
  --wood-dark: #2c221c;
  --board: #161616;
  --letter: #f4ecdf;
  --bulb: #e2a23a;
  --berry: #e2166a;
  --shadow: 0 24px 50px rgba(36, 28, 22, 0.16);
  --header: 64px;
  --glass: rgba(255, 255, 255, 0.42);
  --glass-edge: rgba(255, 255, 255, 0.62);
  --glass-blur: blur(22px) saturate(1.7);
  --content: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

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

a { color: inherit; }

h1, h2, h3, .logo-name, .visit-hours {
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

h1, h2, h3, p { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--berry);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content), calc(100% - 32px));
  height: var(--header);
  padding: 0 22px 0 16px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--glass);
  box-shadow:
    0 12px 32px rgba(20, 14, 10, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transform: translateX(-50%);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  transition: transform 0.35s ease;
}

.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }

.logo-text { display: flex; flex-direction: column; gap: 2px; }

.logo-name {
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}

.logo-kind {
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 26px;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--berry);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.site-nav a:hover { color: var(--berry); }

.site-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-toggle-lines { position: relative; margin: 0 auto; }

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-lines::before { top: -7px; }
.nav-toggle-lines::after { top: 7px; }

main {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
}

section { scroll-margin-top: calc(var(--header) + 36px); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);
  padding: 128px max(24px, calc((100vw - var(--content)) / 2)) 64px;
  overflow: hidden;
  color: var(--letter);
  perspective: 1200px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 62%;
  transition: transform 1.1s ease;
}

.hero:hover .hero-bg { transform: scale(1.05); }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(20, 14, 10, 0.78) 0%,
    rgba(20, 14, 10, 0.55) 46%,
    rgba(20, 14, 10, 0.28) 100%
  );
}

.hero h1 {
  font-size: clamp(4.4rem, 9vw, 7.4rem);
  text-transform: uppercase;
}

.lead {
  max-width: 28rem;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 1.2rem;
}

.hero .lead { color: rgba(244, 236, 223, 0.88); }

.hero .text-link { border-bottom-color: var(--letter); }

.hero .text-link:hover { color: white; border-bottom-color: white; }

.hours-chip {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: var(--letter);
  font-weight: 600;
  font-size: 0.95rem;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 28px;
}

.button,
.text-link {
  text-decoration: none;
  font-weight: 700;
}

.button {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--plaster);
  transition: background 0.25s ease, transform 0.25s ease;
}

.button:hover {
  background: var(--berry);
  transform: translateY(-3px);
}

.text-link {
  border-bottom: 1px solid var(--ink);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.text-link:hover { color: var(--berry); border-bottom-color: var(--berry); }

.hero-photo img,
.about-photo img,
.visit-photo img,
.gallery-grid img {
  width: 100%;
  object-fit: cover;
}

.hero-photo img,
.visit-photo img {
  height: 100%;
}

.hero-photo {
  margin: 0;
  height: min(78vh, 760px);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-photo img { object-position: center 72%; }

.frame {
  overflow: hidden;
  border-radius: 22px;
}

.about-photo .frame {
  position: relative;
  z-index: 1;
  border-radius: 28px;
}

.hero-photo img,
.visit-photo img,
.frame img {
  transition: transform 0.7s ease;
}

.hero-photo:hover img,
.visit-photo:hover img,
.frame:hover img {
  transform: scale(1.06);
}

/* Картка лишається свого розміру і лише нахиляється.
   --px і --py ставить main.js: від −0.5 до 0.5, де курсор відносно центра.
   perspective на .hero перетворює цей нахил на об’єм, а не на плоский зсув. */
.parallax {
  transform: rotateX(calc(var(--py, 0) * 8deg)) rotateY(calc(var(--px, 0) * -8deg));
  transition: transform 0.18s ease-out;
}

.parallax:hover img {
  transform: none;
}

.about {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  padding: 24px 0 88px;
}

.about-copy h2,
.section-heading h2,
.visit-copy h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  max-width: 12ch;
}

.about-copy p + p { margin-top: 16px; }

.about-copy .eyebrow + h2 { margin-bottom: 22px; }

.about-photo {
  position: relative;
  margin: 18px 16px 0 0;
}

.about-photo::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 22px -18px 36px 22px;
  border-radius: 28px;
  background: var(--berry);
  transition: transform 0.45s ease;
}

.about-photo:hover::before { transform: translate(8px, 8px); }

.about-photo img {
  aspect-ratio: 4 / 5;
  object-position: center 20%;
}

.about-photo figcaption {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.menu {
  padding: 72px 0;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
  background:
    linear-gradient(180deg, transparent, rgba(36, 28, 22, 0.03) 12px, transparent 12px),
    var(--plaster-deep);
  border-radius: 32px;
}

.section-heading { max-width: 38rem; margin-bottom: 28px; }

.section-heading h2,
.visit-copy h2 { margin-bottom: 14px; }

.section-note { color: var(--ink-soft); }

.board-frame {
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, #7a5b48, #3c2c24 42%, #2a201b);
  box-shadow: var(--shadow);
}

.board {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 28px 36px;
  padding: 36px 34px 32px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 80px),
    repeating-linear-gradient(
      180deg,
      #1a1a1a 0 28px,
      #141414 28px 29px
    );
  color: var(--letter);
}

.screw {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #d9d0c4, #8d8680 45%, #4e4944 70%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.screw-tl { top: 12px; left: 12px; }
.screw-tr { top: 12px; right: 12px; }
.screw-bl { bottom: 12px; left: 12px; }
.screw-br { bottom: 12px; right: 12px; }

.board-group h3 {
  margin-bottom: 16px;
  color: var(--bulb);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.board ul {
  display: grid;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.board li {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
  transition: color 0.25s ease, transform 0.25s ease;
}

.board li:hover {
  color: var(--bulb);
  transform: translateX(6px);
}

.gallery { padding: 88px 0; }

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 18px;
}

.gallery-grid figure { margin: 0; }

.gallery-grid img {
  aspect-ratio: 1 / 1;
  object-position: center;
}

.gallery-grid figure:nth-child(2) img { object-position: center bottom; }

.visit {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 88px;
}

.visit-hours {
  font-size: clamp(3rem, 6vw, 4.6rem);
  margin: 8px 0 10px;
}

.visit-days { color: var(--ink-soft); }

.facts {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
}

.facts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.facts dd { margin: 0; font-weight: 700; }

.facts a {
  text-underline-offset: 3px;
  transition: color 0.25s ease;
}

.facts a:hover { color: var(--berry); }

.is-empty {
  color: var(--ink-soft);
  font-weight: 500;
}

.visit-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.visit-photo img {
  aspect-ratio: 4 / 5;
  object-position: center 30%;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 28px 28px;
  background: var(--wood-dark);
  color: var(--letter);
  font-size: 0.95rem;
}

.site-footer p:last-child { color: rgba(244, 236, 223, 0.72); }

:focus-visible {
  outline: 3px solid var(--berry);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    padding: 0 12px 0 10px;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 14px;
    border: 1px solid var(--glass-edge);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow:
      0 12px 32px rgba(20, 14, 10, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }

  .site-header.is-open .site-nav {
    display: flex;
    box-shadow: 0 16px 30px rgba(36, 28, 22, 0.08);
  }

  .site-nav a { padding: 12px 4px; }

  main { width: min(var(--content), calc(100% - 32px)); }

  .hero,
  .about,
  .visit,
  .board {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    min-height: 0;
    padding-top: 112px;
    padding-bottom: 28px;
  }

  .hero::after {
    background: linear-gradient(
      180deg,
      rgba(20, 14, 10, 0.82) 0%,
      rgba(20, 14, 10, 0.62) 48%,
      rgba(20, 14, 10, 0.35) 100%
    );
  }

  .hero-photo { height: auto; aspect-ratio: 5 / 4; }
  .hero-photo img { object-position: center 72%; }

  .about { gap: 36px; }

  .about-photo { margin-right: 16px; }

  .menu { margin: 0; border-radius: 24px; }

  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 16px 10px; }

  .site-footer { flex-direction: column; padding: 22px 16px 28px; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 3.6rem; }

  .gallery-grid { grid-template-columns: 1fr; }

  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition: none;
  }
}
