/* Шрифты лежат рядом с сайтом и работают без подключения к интернету. */
@font-face {
  font-family: Nunito;
  src: url("assets/nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: Caveat;
  src: url("assets/caveat.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #263e30;
  --muted: #536356;
  --forest: #2f4e39;
  --sage: #e9efdc;
  --paper: #fffcf5;
  --pink: #a94663;
  --line: #d7dbc9;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 600 1rem/1.55 Nunito, sans-serif;
}
.container { max-width: 1192px; padding-inline: clamp(20px, 3.4vw, 48px); }
h1, h2, h3 {
  margin: 0;
  font-weight: 900;
  line-height: 1.08;
}
h2 { font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: -.055em; }
h3 { font-size: 1.65rem; letter-spacing: -.035em; }
a { color: var(--forest); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
[hidden] { display: none !important; }
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 5;
  padding: 10px;
  background: white;
}
.skip-link:focus { top: 10px; }
.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Шапка и навигация. */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner, .main-nav, .brand, .account-link, .actions, .hero-hours,
.eyebrow, .section-kicker, .visit-details, .visit-details span, .footer-inner, .footer-inner a {
  display: flex;
  align-items: center;
}
.header-inner {
  min-height: 77px;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  gap: 8px;
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -.065em;
  text-decoration: none;
}
.brand img { transform: rotate(-6deg); }
.main-nav { gap: clamp(16px, 2.6vw, 40px); }
.main-nav a, .account-link {
  color: var(--ink);
  text-decoration: none;
  font-size: .96rem;
  font-weight: 800;
}
.main-nav a { padding: 9px 0; border-bottom: 2px solid transparent; }
.main-nav a[aria-current], .main-nav a:hover { border-color: #d38c9b; }
.account-link {
  gap: 8px;
  padding: 8px 17px;
  border: 1px solid #9ba997;
  border-radius: 32px;
}
.account-link:hover, .account-link[aria-current] { background: var(--sage); }

/* Первый экран. Розовый скотч над фотографией нарисован в CSS. */
.hero, .login-main {
  background-color: var(--sage);
  background-image: radial-gradient(#364c3815 .7px, transparent .9px);
  background-size: 8px 8px;
}
.hero { position: relative; border-bottom: 1px solid #d1dbc5; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(25px, 4vw, 65px);
  padding-block: clamp(48px, 5.1vw, 78px);
}
.hero-copy { max-width: 545px; }
.eyebrow, .section-kicker {
  gap: 10px;
  margin: 0 0 17px;
  color: #455e48;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow-line, .section-kicker span {
  width: 28px;
  height: 2px;
  background: currentColor;
}
.hero h1 {
  font-size: clamp(3.15rem, 5.75vw, 5rem);
  line-height: .99;
  letter-spacing: -.052em;
}
.handwritten, .snap-photo figcaption { font-family: Caveat, cursive; }
.hero-script {
  display: inline-block;
  margin-left: .02em;
  color: var(--pink);
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.04em;
  transform: rotate(-2deg);
}
.hero-intro {
  max-width: 450px;
  margin: 20px 0 23px;
  font-size: 1.13rem;
  line-height: 1.58;
}
.actions { flex-wrap: wrap; gap: 11px; }
.button-primary, .button-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 47px;
  padding: 10px 21px;
  border: 1px solid var(--forest);
  border-radius: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color .18s, transform .18s;
}
.button-primary { color: #fffdf5; background: var(--forest); }
.button-primary .icon { filter: brightness(0) invert(1); }
.button-primary:hover {
  color: white;
  background: #203d2a;
  transform: translateY(-2px);
}
.button-secondary {
  color: var(--forest);
  background: transparent;
  border-color: #a2b29d;
}
.button-secondary:hover { background: #f9fbee; transform: translateY(-2px); }
.hero-hours {
  gap: 7px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .91rem;
}
.hero-hours .icon { width: 16px; height: 16px; }

.snap-photo {
  position: relative;
  margin: 5px 8px 3px;
  padding: 11px 11px 0;
  background: #fffef8;
  border-radius: 3px;
  box-shadow: 0 5px 9px #253a2926, 0 1px 2px #253a292b;
  transform: rotate(2.5deg);
}
.snap-photo::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 112px;
  height: 31px;
  top: -13px;
  left: 38%;
  background: repeating-linear-gradient(105deg, #e9a1af 0 3px, #efafba 3px 6px);
  opacity: .94;
  transform: rotate(-8deg);
  clip-path: polygon(2% 0, 100% 0, 98% 18%, 100% 34%, 98% 52%, 100% 74%, 98% 100%, 0 100%, 2% 78%, 0 55%, 2% 29%, 0 15%);
}
.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.53;
  object-fit: cover;
}
.snap-photo figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 47px;
  padding: 1px 11px 3px;
  font-size: clamp(1.3rem, 2.05vw, 1.72rem);
  font-weight: 600;
}
.snap-photo figcaption img { transform: rotate(-11deg); }

/* Жители и информация о визите. Сами колонки даёт Bootstrap. */
.residents-section, .rules-section { padding-block: 49px 45px; scroll-margin-block: 18px; }
.section-kicker { color: #806047; margin-bottom: 8px; }
.section-kicker span { width: 22px; background: #cc8b97; }
.section-intro {
  margin: 11px 0 25px;
  color: var(--muted);
  font-size: 1.05rem;
}
.resident-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffef9;
  transition: transform .22s, box-shadow .22s;
}
.resident-card:hover { transform: translateY(-3px); box-shadow: 0 5px 16px #263e3010; }
.resident-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.resident-copy { padding: 20px; }
.resident-copy p, .rule-card p { margin: 8px 0 0; color: var(--muted); }
.visit-section { padding-bottom: 55px; }
.visit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(25px, 4vw, 43px);
  border: 1px solid #e7c7c8;
  border-radius: 20px;
  background: #f7e1df;
}
.visit-panel h2 { font-size: clamp(1.85rem, 3vw, 2.5rem); }
.visit-panel p { max-width: 540px; margin: 10px 0 0; }
.visit-panel .button-primary { flex: none; }
.visit-details { flex-wrap: wrap; gap: 8px 22px; }
.visit-details span { gap: 7px; font-weight: 800; }
.visit-details .icon { width: 17px; height: 17px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-block: 20px;
  font-size: .9rem;
  color: var(--muted);
}
.footer-inner a {
  gap: 7px;
  text-underline-offset: 3px;
  font-weight: 800;
}
.footer-inner .icon { width: 17px; height: 17px; }

/* Вторая страница использует тот же шаблон приветствия. */
.about-hero { background-color: #f4e2df; }
.about-hero .snap-photo::before { background: repeating-linear-gradient(105deg, #abbf9c 0 3px, #bfd0b4 3px 6px); }
.rules-row { margin-top: 0; }
.rule-card {
  height: 100%;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.rule-card h3 { font-size: 1.35rem; }
.rule-icon, .result-check {
  width: 44px;
  height: 44px;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 50%;
  background: var(--sage);
}

/* Общие правила для форм входа и бронирования. */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.login-main {
  flex: 1;
  display: grid;
  place-items: center;
  max-width: none;
  padding-block: 45px;
}
.login-card, dialog {
  width: min(100%, 455px);
  padding: clamp(24px, 4vw, 36px);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 6px 22px #20312310;
}
.login-pig {
  display: block;
  margin: 0 auto 12px;
  transform: rotate(-6deg);
}
.login-card h1 {
  text-align: center;
  font-size: 2.3rem;
  letter-spacing: -.05em;
}
.login-card .form-note { text-align: center; }
.demo-details {
  padding: 10px;
  margin: 15px 0 0;
  text-align: center;
  border-radius: 10px;
  background: var(--sage);
  font-size: .93rem;
}
.demo-details code { color: var(--ink); font-weight: 700; }
.demo-details span { padding-inline: 5px; }
.form-label { margin: 14px 0 5px; font-weight: 800; }
.form-control, .form-select {
  min-height: 45px;
  border: 1px solid #aab4a5;
  border-radius: 9px;
  background-color: #fffefa;
  color: var(--ink);
}
.form-control:focus, .form-select:focus { border-color: var(--forest); box-shadow: 0 0 0 3px #637e5c30; }
.form-note { margin: 10px 0; color: var(--muted); }
.form-error { color: #a02b43; margin: 10px 0 0; }
.form-error:empty { margin: 0; }
.form-submit { width: 100%; margin-top: 22px; }
#guest-panel { margin-top: 24px; text-align: center; }
#guest-panel h2 { font-size: 1.55rem; margin-bottom: 12px; }
#guest-panel .button-primary { margin: 10px auto; }
.text-button {
  display: block;
  margin: 2px auto;
  border: 0;
  background: transparent;
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}
dialog {
  width: min(calc(100% - 28px), 455px);
  max-width: none;
  max-height: calc(100% - 28px);
  margin: auto;
}
dialog::backdrop { background: #192b20a6; }
dialog[open] { animation: appear .2s ease-out; }
dialog h2 { padding-right: 26px; font-size: clamp(1.55rem, 5vw, 2rem); }
.close-dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--sage);
}
#booking-result { padding-top: 22px; overflow-wrap: anywhere; }
#booking-result h3 { margin-bottom: 10px; }
#booking-result p { margin-bottom: 12px; }
@keyframes appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* На узком экране фотография переходит под текст, а меню — под логотип. */
@media (max-width: 767px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 1px 12px;
    padding-top: 8px;
    padding-bottom: 4px;
  }
  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: clamp(16px, 5vw, 35px);
  }
  .main-nav a { font-size: .9rem; }
  .brand { font-size: 1.6rem; }
  .brand img { width: 42px; height: 38px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 37px 38px;
  }
  .hero-copy { max-width: 570px; }
  .hero h1 { font-size: clamp(3rem, 9.7vw, 4.3rem); }
  .hero-intro { margin: 14px 0 19px; font-size: 1.05rem; }
  .eyebrow { margin-bottom: 12px; }
  .snap-photo { width: min(calc(100% - 14px), 490px); justify-self: center; }
  .visit-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .residents-section, .rules-section { padding-block: 35px; }
  .visit-section { padding-bottom: 35px; }
}
@media (max-width: 390px) {
  .main-nav { justify-content: space-between; gap: 8px; }
  .main-nav a { font-size: .85rem; }
  .hero h1 { font-size: clamp(2.65rem, 12.7vw, 3rem); }
  .button-primary, .button-secondary { padding-inline: 13px; }
  .account-link { padding: 6px 12px; }
  dialog .form-select { padding-right: 1.5rem; background-position: right .35rem center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.project-download { display: inline-block; margin-top: .55rem; font-size: .9rem; text-underline-offset: .2em; }
@media (max-width: 440px) {
  .main-nav { flex-wrap: wrap; justify-content: flex-start; gap: 0 .9rem; }
}
