:root {
  --white: #fff;
  --paper: #fff;
  --ink: #22242a;
  --muted: #65676b;
  --barile-red: #d43b4a;
  --rust: #69493e;
  --topbar: rgba(92, 71, 64, 0.54);
  --shadow: -3px 0 6px rgba(0, 0, 0, 0.51);
  --rail-width: 224px;
  --rail-right: 70px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--white);
  font-family: century-gothic, "Century Gothic", "Trebuchet MS", Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  background-color: var(--rust);
  background-image: url("../images/barile-bg.webp");
  background-position: top center;
  background-repeat: repeat;
  background-size: contain;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: rgba(52, 34, 28, 0.08);
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  color: var(--white);
}

button,
select {
  font: inherit;
}

button,
a,
select {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: 4px;
}

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 70px;
  padding: 0 48px;
  background: var(--topbar);
  backdrop-filter: brightness(80%) blur(3px);
  -webkit-backdrop-filter: brightness(80%) blur(3px);
}

.brand-link {
  display: block;
  min-width: 44px;
  min-height: 44px;
}

.menu-toggle {
  position: relative;
  z-index: 60;
  display: grid;
  gap: 7px;
  width: 70px;
  min-height: 58px;
  padding: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
  transition: transform 220ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(14px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-14px) rotate(-45deg);
}

.menu-panel {
  position: fixed;
  top: 70px;
  right: 32px;
  display: grid;
  min-width: 250px;
  padding: 16px 0;
  background: rgba(69, 48, 41, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.menu-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 24px;
  font-size: 1.25rem;
  text-shadow: var(--shadow);
}

.menu-panel a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.reservation-rail {
  position: fixed;
  top: 116px;
  right: var(--rail-right);
  z-index: 30;
  width: var(--rail-width);
  text-align: center;
}

.booking-note {
  display: grid;
  gap: 5px;
  margin: 0 0 52px;
  font-size: 0.95rem;
  line-height: 1.08;
  text-shadow: var(--shadow);
}

.booking-note strong {
  font-size: 0.98rem;
  line-height: 1.05;
}

.booking-note span {
  display: block;
}

.reservation-card {
  width: 100%;
  margin: 0 auto;
  padding: 18px 16px 16px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
}

.reservation-card h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.reserve-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 50px;
  border: 1px solid #d9dce1;
  border-bottom: 0;
  background: #fff;
}

.reserve-field:first-of-type {
  border-radius: 4px 4px 0 0;
}

.reserve-field select {
  width: 100%;
  min-height: 50px;
  padding: 0 34px 0 46px;
  color: #333840;
  border: 0;
  background: transparent;
  font-size: 0.9rem;
  appearance: auto;
  cursor: pointer;
}

.field-icon {
  position: absolute;
  left: 13px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #24272c;
  pointer-events: none;
}

.field-icon svg,
.instagram-link svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reserve-submit {
  width: 100%;
  min-height: 55px;
  color: var(--white);
  border: 0;
  border-radius: 0 0 4px 4px;
  background: var(--barile-red);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.reserve-submit:hover {
  background: #bd3040;
}

.reserve-submit:active {
  transform: translateY(1px);
}

.choice-badge {
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
  margin: 92px auto 0;
  color: var(--white);
  background: #e31148;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  text-align: center;
  text-shadow: none;
}

.badge-source {
  align-self: end;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-source::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -2px;
  border: 5px solid currentColor;
  border-radius: 50%;
}

.badge-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 0.94;
}

.badge-year {
  align-self: start;
  font-size: 1.05rem;
  font-weight: 700;
}

.site-main {
  width: 100%;
  min-height: 100dvh;
  padding-top: 70px;
}

.section-block {
  display: grid;
  justify-items: center;
  width: min(100%, 1020px);
  margin: 0 auto;
  padding-inline: 32px;
  text-align: center;
  text-shadow: var(--shadow);
}

.hero {
  min-height: 92dvh;
  align-content: start;
  padding-top: 170px;
  padding-bottom: 90px;
}

.logo-mark {
  width: min(760px, 70vw);
  height: auto;
  margin: 0 auto 70px;
  filter: drop-shadow(-3px 0 6px rgba(0, 0, 0, 0.16));
}

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

h1 {
  font-size: clamp(2.5rem, 4.4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.18;
}

.subline {
  margin-top: 44px;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 300;
}

.intro-lines {
  display: grid;
  gap: 40px;
  margin-top: 128px;
  font-size: clamp(1.6rem, 3.2vw, 2.55rem);
  line-height: 1.2;
}

.details {
  gap: 34px;
  padding-top: 36px;
  padding-bottom: 92px;
  font-size: clamp(1.6rem, 3.2vw, 2.45rem);
  line-height: 1.12;
}

.details h2,
.contact h2,
.social h2 {
  font-size: clamp(1.5rem, 3.1vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
}

.contact {
  gap: 22px;
  padding-top: 42px;
  padding-bottom: 84px;
  font-size: clamp(1.6rem, 3.1vw, 2.4rem);
  line-height: 1.18;
}

.contact address {
  margin-top: 22px;
  font-style: normal;
}

.social {
  gap: 28px;
  padding-top: 54px;
  padding-bottom: 120px;
  font-size: clamp(1.35rem, 2.6vw, 2.15rem);
  line-height: 1.25;
}

.instagram-link {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-top: 16px;
  color: var(--white);
  border: 0;
  transition: transform 180ms ease;
}

.instagram-link:hover {
  transform: scale(1.06);
}

.gallery-wrap {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto 82px;
}

.gallery {
  column-count: 3;
  column-gap: 10px;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 10px;
  break-inside: avoid;
  background: rgba(255, 255, 255, 0.12);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 120px;
  padding: 32px;
  font-size: 1.15rem;
  text-align: center;
  text-shadow: var(--shadow);
}

.legal-page .topbar {
  position: sticky;
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  width: 100%;
  min-height: 70px;
  font-size: 1.05rem;
  text-shadow: var(--shadow);
}

.legal-main {
  width: min(980px, calc(100% - 40px));
  margin: 56px auto 96px;
  padding: 46px;
  color: #202020;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
}

.legal-main h1,
.legal-main h2,
.legal-main h3,
.legal-main p,
.legal-main address,
.legal-main li {
  color: #202020;
  text-shadow: none;
}

.legal-main h1 {
  margin-bottom: 28px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

.legal-main h2 {
  margin: 32px 0 12px;
  font-size: 1.45rem;
}

.legal-main h3 {
  margin: 24px 0 8px;
  font-size: 1.18rem;
}

.legal-main p,
.legal-main li,
.legal-main address {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.6;
}

.legal-main a {
  color: #5f3328;
}

@media (max-width: 1180px) {
  :root {
    --rail-right: 34px;
    --rail-width: 224px;
  }

  .choice-badge {
    width: 190px;
    height: 190px;
    margin-top: 58px;
  }

  .badge-title {
    font-size: 1.72rem;
  }
}

@media (max-width: 900px) {
  body {
    background-size: auto 760px;
    background-attachment: scroll;
  }

  .topbar {
    height: 70px;
    padding: 0 48px 0 16px;
  }

  .menu-toggle {
    width: 56px;
  }

  .menu-toggle span {
    height: 5px;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
  }

  .menu-panel {
    right: 14px;
  }

  .reservation-rail {
    position: relative;
    top: auto;
    right: auto;
    width: min(100% - 40px, 360px);
    margin: 0 auto;
    padding-top: 28px;
  }

  .booking-note {
    margin-bottom: 18px;
    font-size: 1rem;
  }

  .choice-badge {
    display: none;
  }

  .site-main,
  .site-footer {
    width: 100%;
  }

  .site-main {
    padding-top: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 72px;
  }

  .logo-mark {
    order: -2;
    width: min(100vw, 520px);
    margin-bottom: 42px;
  }

  h1 {
    margin-top: 10px;
    font-size: clamp(1.8rem, 8vw, 2.7rem);
  }

  .subline {
    margin-top: 28px;
    font-size: clamp(1.45rem, 6.2vw, 2.1rem);
  }

  .intro-lines {
    gap: 28px;
    margin-top: 66px;
    font-size: clamp(1.15rem, 4.9vw, 1.85rem);
  }

  .section-block {
    padding-inline: 18px;
  }

  .details {
    gap: 24px;
    padding-top: 12px;
    padding-bottom: 70px;
    font-size: clamp(1.15rem, 5.5vw, 1.9rem);
  }

  .contact {
    gap: 18px;
    padding-top: 16px;
    padding-bottom: 68px;
    font-size: clamp(1.15rem, 5.2vw, 1.85rem);
  }

  .social {
    gap: 22px;
    padding-top: 30px;
    padding-bottom: 78px;
    font-size: clamp(1.1rem, 5vw, 1.7rem);
  }

  .gallery-wrap {
    width: min(100% - 32px, 680px);
  }

  .gallery {
    column-count: 2;
    column-gap: 8px;
  }

  .gallery img {
    margin-bottom: 8px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 18px;
    background-size: auto 690px;
  }

  .reservation-rail {
    width: min(100% - 32px, 330px);
  }

  .reservation-card {
    padding-inline: 14px;
  }

  .hero {
    padding-top: 120px;
  }

  .logo-mark {
    width: calc(100vw - 20px);
  }

  .gallery-wrap {
    width: calc(100% - 24px);
  }

  .legal-main {
    width: calc(100% - 24px);
    margin-top: 32px;
    padding: 28px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
