:root {
  --bg: #f3ede2;
  --surface: #fbf7ef;
  --surface-2: #efe4d2;
  --text: #2b1f18;
  --text-soft: #5a493c;
  --text-on-dark: #f5e9d2;
  --brown: #6f4932;
  --brown-strong: #563726;
  --green: #3a2a22;
  --green-strong: #2b1f19;
  --gold: #b89463;
  --line: rgba(92, 62, 41, 0.26);
  --shadow: 0 10px 24px rgba(33, 21, 14, 0.14);
  --ease-soft: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Literata", serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  font-size: 18px;
}

main {
  overflow: hidden;
}

[id] {
  scroll-margin-top: 94px;
}

a {
  color: inherit;
}

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

.container {
  width: min(100% - 1.5rem, 1200px);
  margin-inline: auto;
}

.section {
  padding: clamp(1.9rem, 3.2vw, 2.8rem) 0;
  background: var(--surface);
}

.section-alt {
  background: var(--surface-2);
}

.reveal {
  opacity: 1;
  transform: none;
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.38s var(--ease-soft),
    transform 0.38s var(--ease-soft);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-text {
  opacity: 1;
  transform: none;
}

.js-ready .reveal-text {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.46s var(--ease-soft),
    transform 0.46s var(--ease-soft);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-ready .reveal-text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.14;
  letter-spacing: 0.035em;
  font-family: "Cormorant SC", serif;
}

h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.35rem);
  color: var(--text-on-dark);
  letter-spacing: 0.045em;
}

h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.35rem);
  margin-bottom: 0.9rem;
  display: inline-block;
}

h2::after {
  content: "";
  display: block;
  width: 66px;
  height: 2px;
  margin-top: 0.35rem;
  background: var(--gold);
}

h3 {
  font-size: clamp(1.14rem, 2.4vw, 1.38rem);
}

p {
  margin: 0 0 0.86rem;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.54rem 0.95rem;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--ease-soft), opacity 0.25s var(--ease-soft);
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-secondary {
  background: var(--green-strong);
  border-color: rgba(245, 231, 201, 0.42);
  color: #f7edd8;
  box-shadow: 0 8px 16px rgba(33, 21, 14, 0.22);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(184, 148, 99, 0.28);
  background: rgba(34, 27, 22, 0.93);
  backdrop-filter: blur(8px);
}

.header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  padding: 0.55rem 0;
}

.brand {
  font-size: 2rem;
  color: #f3e3c3;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  text-decoration: none;
  color: rgba(243, 227, 195, 0.9);
  font-family: "Manrope", sans-serif;
  font-size: 1.18rem;
  letter-spacing: 0.03em;
  padding: 0.14rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease-soft), border-color 0.25s var(--ease-soft), transform 0.25s var(--ease-soft);
}

.site-nav a:hover {
  color: #ffd9a0;
  border-bottom-color: rgba(255, 217, 160, 0.62);
  transform: translateY(-1px);
}

.header-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero {
  position: relative;
  margin-top: 74px;
  min-height: clamp(440px, 64vh, 620px);
  display: flex;
  align-items: center;
  background: url("../images/castle.jpg") center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(25, 20, 16, 0.7);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(184, 148, 99, 0.22);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 1.9rem 0;
}

.hero-content h1 {
  max-width: 100%;
}

.hero-subtitle {
  max-width: 700px;
  font-size: clamp(1.15rem, 2.45vw, 1.38rem);
  color: rgba(245, 233, 210, 0.92);
}

.project-warning {
  margin-top: 0.9rem;
  padding: 0.86rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(245, 231, 201, 0.48);
  background: rgba(56, 39, 30, 0.92);
  color: #fff3db;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  font-weight: 700;
  line-height: 1.45;
  box-shadow: var(--shadow);
}

#activities.section {
  background: #2b231d;
}

#activities h2,
#gallery h2 {
  color: var(--text-on-dark);
}

#activities p,
#gallery p {
  color: rgba(245, 233, 210, 0.9);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.68rem;
  margin-top: 0.9rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.78rem;
  border-radius: 12px;
  border: 1px solid rgba(184, 148, 99, 0.34);
  background: rgba(39, 31, 25, 0.92);
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease-soft), border-color 0.25s var(--ease-soft), box-shadow 0.25s var(--ease-soft);
}

.feature-item:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 177, 122, 0.5);
  box-shadow: 0 14px 26px rgba(33, 21, 14, 0.2);
}

.feature-item h3 {
  color: #f4e6ca;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  color: #f9e9ca;
  background: rgba(111, 73, 50, 0.55);
  border: 1px solid rgba(245, 231, 201, 0.35);
}

.about-grid {
  display: grid;
  gap: 1rem;
}

.about-grid p {
  color: #49382d;
}

.about-images {
  display: grid;
  gap: 0.52rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-images img {
  height: 160px;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(44, 28, 18, 0.12);
  transition: transform 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}

.about-images img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(44, 28, 18, 0.18);
}

.about-images img:nth-child(3) {
  grid-column: 1 / -1;
  height: 248px;
}

#gallery.section {
  background: #2b231d;
}

.gallery-marquee {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(184, 148, 99, 0.34);
  border-radius: 14px;
  padding: 0.82rem;
  background: rgba(34, 28, 23, 0.92);
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.gallery-marquee::-webkit-scrollbar {
  display: none;
}

.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.gallery-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(245, 231, 201, 0.35);
  background: rgba(43, 31, 25, 0.92);
  color: #f5e7ca;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s var(--ease-soft), background-color 0.2s var(--ease-soft);
}

.gallery-arrow:hover {
  transform: translateY(-1px);
  background: rgba(69, 49, 39, 0.95);
}

.gallery-track {
  display: flex;
  gap: 0.7rem;
  width: max-content;
}

.gallery-track img {
  width: clamp(250px, 25vw, 350px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 11px;
  border: 1px solid rgba(245, 231, 201, 0.35);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.32);
  transition: transform 0.35s var(--ease-soft);
}

.gallery-track img:hover {
  transform: translateY(-3px) scale(1.01);
}

.gallery-note {
  margin: 0;
  margin-right: auto;
  padding-right: 0.5rem;
  font-size: 1rem;
  color: rgba(245, 233, 210, 0.9);
}

#contacts.section {
  background: var(--surface-2);
}

.contacts-grid {
  display: grid;
  gap: 0.95rem;
}

.contacts-grid p,
.contacts-grid strong {
  color: #3f2f24;
}

.contacts-socials {
  margin-top: 0.58rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.map-wrap {
  min-height: 260px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(46, 30, 19, 0.16);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: 0;
}

.site-footer {
  padding: 0.9rem 0;
  border-top: 1px solid rgba(184, 148, 99, 0.24);
  background: #1e1814;
}

.site-footer p {
  margin: 0;
  text-align: center;
  color: rgba(245, 233, 210, 0.8);
  font-family: "Manrope", sans-serif;
  font-size: 0.98rem;
}

@media (max-width: 639px) {
  .header-inner {
    min-height: 58px;
    gap: 0.2rem;
    padding: 0.35rem 0;
    padding-right: 72px;
    position: relative;
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "nav";
    align-items: center;
  }

  .brand {
    grid-area: brand;
    font-size: 1.3rem;
  }

  .site-nav {
    grid-area: nav;
    gap: 0.5rem;
  }

  .site-nav a {
    font-size: 0.9rem;
    letter-spacing: 0.01em;
  }

  .header-cta {
    position: absolute;
    top: 0.34rem;
    right: 0;
    gap: 0.22rem;
    margin-left: 0;
    flex-direction: column;
    align-items: flex-end;
  }

  .header-cta .btn {
    font-size: 0.78rem;
    padding: 0.28rem 0.52rem;
    opacity: 0.8;
  }

  .header-cta .btn:first-child {
    order: 2;
  }

  .header-cta .btn:last-child {
    order: 1;
  }

  .hero {
    margin-top: 58px;
  }

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

  .about-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-images img {
    height: 128px;
  }

  .about-images img:nth-child(3) {
    grid-column: 1 / -1;
    height: 210px;
  }

  .gallery-track {
    gap: 0.55rem;
  }

  .gallery-track img {
    width: clamp(220px, 66vw, 282px);
  }

  .gallery-controls {
    gap: 0.32rem;
    margin-top: 0.45rem;
  }

  .gallery-note {
    flex-basis: 100%;
    margin-bottom: 0.25rem;
    padding-right: 0;
  }

  .gallery-arrow {
    width: 32px;
    height: 32px;
    font-size: 1.05rem;
  }
}

@media (min-width: 820px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.95rem;
  }

  .site-nav {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .contacts-grid {
    grid-template-columns: 1fr 1.1fr;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .gallery-marquee {
    scroll-behavior: auto;
  }
}

@media (min-width: 1200px) {
  .gallery-track img {
    width: 340px;
  }
}
