/* Северный замок — демонстрационная концепция. Тимофей. */

:root {
  --ink:       #17110e;
  --brown:     #2e211a;
  --brown-2:   #3d2c22;
  --terra:     #c0503a;
  --terra-2:   #a8402c;
  --cream:     #f5efe6;
  --cream-2:   #ece3d6;
  --stone:     #8b7d70;
  --line:      rgba(23, 17, 14, .12);
  --line-dark: rgba(245, 239, 230, .16);

  --wrap: 1180px;
  --r: 2px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 7.2vw, 78px); }
h2 { font-size: clamp(27px, 3.6vw, 44px); }
h3 { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.25; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: var(--terra); text-underline-offset: 3px; }
a:hover { color: var(--terra-2); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
  border-radius: var(--r);
}

/* ---------- Хедер ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 239, 230, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark { color: var(--terra); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.brand__text em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stone);
}

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 15px;
}
.nav a { text-decoration: none; color: var(--brown); position: relative; padding-block: 6px; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--terra);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

.topbar__phone {
  display: flex;
  flex-direction: column;
  text-align: right;
  text-decoration: none;
  line-height: 1.2;
  flex-shrink: 0;
}
.topbar__phone span { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--stone); }
.topbar__phone strong { font-size: 19px; font-weight: 600; letter-spacing: .01em; }

.burger {
  display: none;
  width: 44px; height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--r);
  cursor: pointer;
  padding: 12px 10px;
  flex-direction: column;
  justify-content: space-between;
}
.burger span { display: block; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  font-family: inherit;
}
.btn--primary { background: var(--terra); color: #fff; }
.btn--primary:hover { background: var(--terra-2); color: #fff; transform: translateY(-1px); }
.btn--ghost { border-color: currentColor; color: var(--brown); }
.btn--ghost:hover { background: var(--brown); color: var(--cream); border-color: var(--brown); }
.btn--wide { width: 100%; }

.section--dark .btn--ghost { color: var(--cream); border-color: var(--line-dark); }
.section--dark .btn--ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ---------- Герой ---------- */

.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 116px) clamp(48px, 7vw, 88px);
  overflow: hidden;
}

.hero__art { position: absolute; inset: 0; pointer-events: none; }

.arch {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 999px 999px 0 0;
  border-bottom: 0;
}
.arch--1 { width: 46vw; height: 62vh; right: -6vw; top: 8vh; opacity: .55; }
.arch--2 { width: 30vw; height: 44vh; right: 16vw; top: 22vh; opacity: .8; border-color: rgba(192, 80, 58, .22); }
.arch--3 { width: 13vw; height: 22vh; right: 40vw; top: 46vh; opacity: .5; }

.hero__inner { position: relative; }

.eyebrow {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stars { color: var(--terra); letter-spacing: .12em; font-size: 13px; }

.hero__title { max-width: 15ch; }
.hero__title .accent { color: var(--terra); font-style: italic; }

.hero__lead {
  max-width: 52ch;
  margin-top: 28px;
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--brown-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 64px);
  margin: clamp(44px, 6vw, 72px) 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); margin-top: 6px; }
.stats dd {
  margin: 0;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

/* ---------- Секции ---------- */

.section { padding-block: clamp(58px, 8vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }

.section--dark {
  background: var(--brown);
  color: var(--cream);
}
.section--dark .eyebrow { color: rgba(245, 239, 230, .55); }
.section--dark a { color: var(--cream); }
.section--dark a:hover { color: var(--terra); }

.section__head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 52px); }
.section__lead { margin-top: 20px; color: var(--brown-2); font-size: 17.5px; }
.section--dark .section__lead { color: rgba(245, 239, 230, .78); }

/* ---------- Номера ---------- */

.rooms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.room {
  background: var(--cream);
  padding: 0 0 26px;
  display: flex;
  flex-direction: column;
}
.room h3, .room p { padding-inline: 24px; }
.room h3 { margin-top: 22px; }
.room p { color: var(--brown-2); font-size: 15px; margin-top: 10px; }

.room__figure {
  height: 150px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.room__figure span {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 60px;
  color: rgba(245, 239, 230, .5);
  position: relative;
  z-index: 1;
}
.room__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 22px);
}
.room__figure--a { background: linear-gradient(140deg, #4a3529, #2e211a); }
.room__figure--b { background: linear-gradient(140deg, #8c4532, #552a20); }
.room__figure--c { background: linear-gradient(140deg, #5c4a3d, #372a22); }
.room__figure--d { background: linear-gradient(140deg, #a85a41, #6d3225); }

.note {
  margin-top: 26px;
  font-size: 14.5px;
  color: var(--stone);
  max-width: 60ch;
}

/* ---------- Сплит ---------- */

.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split__text h2 { margin-bottom: 22px; }
.split__text p { color: rgba(245, 239, 230, .8); max-width: 46ch; }
.split__cta { margin-top: 30px; font-size: 17px; }
.split__cta a { font-weight: 600; }
.split__small { font-size: 14.5px; color: rgba(245, 239, 230, .6); margin-top: 18px; }

.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 11px; }
.ticks li { position: relative; padding-left: 24px; font-size: 16px; color: rgba(245, 239, 230, .9); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 10px; height: 1px;
  background: var(--terra);
}

.hall {
  position: relative;
  aspect-ratio: 4 / 3.4;
  background: linear-gradient(160deg, #4a3529, #241a15);
  border: 1px solid var(--line-dark);
  display: grid;
  place-content: center;
  gap: 10px;
  overflow: hidden;
}
.hall__row {
  position: absolute;
  left: 12%; right: 12%;
  height: 1px;
  background: rgba(245, 239, 230, .1);
}
.hall__row:nth-child(1) { top: 24%; }
.hall__row:nth-child(2) { top: 40%; }
.hall__row:nth-child(3) { top: 56%; }
.hall__row:nth-child(4) { top: 72%; }
.hall__label {
  position: relative;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: clamp(72px, 9vw, 120px);
  line-height: .9;
  color: var(--terra);
}
.hall__sub {
  position: relative;
  text-align: center;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, .55);
}

/* ---------- Возможности ---------- */

.features {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.features li { background: var(--cream); padding: 26px 24px 30px; }
.features h3 { margin-bottom: 10px; }
.features p { font-size: 15px; color: var(--brown-2); }

/* ---------- Ещё ---------- */

.also {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.also__text { margin-top: 18px; color: var(--brown-2); max-width: 44ch; }
.also__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.also__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.also__list span {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 22px;
}
.also__list em { font-style: normal; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); }

/* ---------- Форма ---------- */

.split--form { align-items: start; }

.form {
  display: grid;
  gap: 16px;
  background: rgba(245, 239, 230, .04);
  border: 1px solid var(--line-dark);
  padding: clamp(20px, 3vw, 32px);
}
.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(245, 239, 230, .55); }

.field input, .field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--cream);
  background: rgba(0, 0, 0, .22);
  border: 1px solid var(--line-dark);
  border-radius: var(--r);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field input::placeholder { color: rgba(245, 239, 230, .35); }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--terra);
  background: rgba(0, 0, 0, .32);
}
.field select option { background: var(--brown); color: var(--cream); }

.form__status { font-size: 14.5px; min-height: 1.4em; margin: 0; color: var(--terra); }
.form__status[data-ok="true"] { color: #9fd3a0; }

/* ---------- Контакты ---------- */

.contacts { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.contacts h2 { margin-bottom: 26px; }

.contact-list { margin: 0; display: grid; gap: 0; }
.contact-list > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list dt { font-size: 12px; letter-spacing: .11em; text-transform: uppercase; color: var(--stone); padding-top: 4px; }
.contact-list dd { margin: 0; font-size: 17px; }
.contact-list a { text-decoration: none; border-bottom: 1px solid rgba(192, 80, 58, .35); }

.contacts__aside { display: grid; gap: 20px; align-content: start; }
.contacts__hint { color: var(--brown-2); font-size: 16px; }

/* ---------- Подвал ---------- */

.footer {
  background: var(--ink);
  color: rgba(245, 239, 230, .72);
  padding-block: 36px 42px;
  font-size: 14.5px;
}
.footer__inner { display: grid; gap: 12px; }
.footer strong { color: var(--cream); font-weight: 600; }
.footer__small { font-size: 13px; color: rgba(245, 239, 230, .45); max-width: 70ch; }

/* ---------- Анимация ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero__inner > * { animation: rise .8s var(--ease) both; }
  .hero__inner > *:nth-child(1) { animation-delay: .05s; }
  .hero__inner > *:nth-child(2) { animation-delay: .12s; }
  .hero__inner > *:nth-child(3) { animation-delay: .2s; }
  .hero__inner > *:nth-child(4) { animation-delay: .28s; }
  .hero__inner > *:nth-child(5) { animation-delay: .36s; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
  .split, .also, .contacts, .split--form { grid-template-columns: 1fr; }
  .split__figure { order: -1; }
  .hall { aspect-ratio: 16 / 9; }
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .topbar__inner { min-height: 64px; gap: 12px; }
  .topbar__phone strong { font-size: 17px; }
  .topbar__phone span { display: none; }

  .burger { display: flex; }

  .nav {
    position: fixed;
    inset: 64px 0 auto 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 20px;
    margin: 0;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }

  .brand__text em { display: none; }

  .hero__title { max-width: none; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .arch--1, .arch--3 { display: none; }
  .arch--2 { width: 70vw; height: 40vh; right: -20vw; top: 10vh; opacity: .28; }

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

  .stats { gap: 24px 32px; }
  .stats div { flex: 1 1 90px; }

  .field-row { grid-template-columns: 1fr; }

  .contact-list > div { grid-template-columns: 1fr; gap: 4px; }
  .contact-list dt { padding-top: 0; }
}

@media (max-width: 390px) {
  .brand__text strong { font-size: 17px; }
  .topbar__phone { display: none; }
  .stats { gap: 18px; }
  .stats dd { font-size: 24px; }
}
