/* ===== Starko Hostels — стили ===== */

:root {
  --bg:        #252525;
  --surface:   #2f2f2f;
  --surface-2: #353535;
  --line:      #414141;
  --text:      #dadada;
  --text-dim:  #a3a3a3;
  --white:     #ffffff;
  --accent:    #66af31;
  --accent-hi: #7cc93d;
  --radius:    16px;
  --container: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
svg { fill: currentColor; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.accent { color: var(--accent); }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s, transform .15s;
}
.btn:active { transform: translateY(1px); }

.btn--accent {
  background: var(--accent);
  color: #12200a;
}
.btn--accent:hover { background: var(--accent-hi); }

.btn--ghost {
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover {
  background: var(--text);
  border-color: var(--text);
  color: #1a1a1a;
}

.btn--link {
  padding: 0 8px;
  height: 56px;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--line);
}
.btn--link:hover { color: var(--accent); text-decoration-color: var(--accent); }

.btn--sm { height: 44px; padding: 0 22px; font-size: 14px; }
.btn--wide { width: 100%; }

/* ===== Шапка ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(37, 37, 37, .92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}
.header__logo img { height: 58px; width: auto; margin-bottom: -8px; }
.header__right { display: flex; align-items: center; gap: 20px; }
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--white);
  font-weight: 600;
  font-size: 17px;
  transition: color .2s;
}
.header__phone:hover { color: var(--accent); }
.header__phone svg { width: 19px; height: 19px; flex: none; }

/* ===== Главный экран ===== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: 120px 0 90px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  background-color: #1a1a1a;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(20,20,20,.92) 0%, rgba(20,20,20,.72) 45%, rgba(20,20,20,.45) 100%),
    linear-gradient(to top, var(--bg) 2%, transparent 40%);
}
.hero__inner { position: relative; z-index: 1; max-width: 900px; }

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 22px;
  padding: 7px 16px;
  border: 1px solid rgba(102, 175, 49, .45);
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero__title {
  color: var(--white);
  font-size: clamp(32px, 5.6vw, 66px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.hero__text {
  max-width: 620px;
  margin-top: 26px;
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--text);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-dim);
  animation: bob 2.4s ease-in-out infinite;
}
.hero__scroll svg { width: 22px; height: 22px; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ===== Преимущества ===== */
.perks { padding: 72px 0; border-bottom: 1px solid var(--line); }
.perks__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.perk {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.perk svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 14px; }
.perk h3 { color: var(--white); font-size: 17px; font-weight: 700; margin-bottom: 5px; }
.perk p  { color: var(--text-dim); font-size: 14px; line-height: 1.5; }

/* ===== Секции ===== */
.hostels { padding: 90px 0 20px; }

.section-head { margin-bottom: 54px; }
.section-head__eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head__title {
  color: var(--white);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}

/* ===== Карточка хостела ===== */
.hostel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0;
  margin-bottom: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.hostel--reverse .hostel__media { order: 2; }

.hostel__media { position: relative; min-height: 340px; }
.hostel__media img { width: 100%; height: 100%; object-fit: cover; }
.hostel__badge {
  position: absolute;
  left: 20px;
  top: 20px;
  padding: 8px 16px;
  background: var(--accent);
  border-radius: 999px;
  color: #12200a;
  font-size: 13px;
  font-weight: 700;
}

.hostel__body { padding: clamp(24px, 3.4vw, 46px); }
.hostel__name {
  color: var(--white);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.2;
}
.hostel__lead { margin-top: 8px; color: var(--text-dim); font-size: 16px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}
.tags li {
  padding: 7px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
}

.prices {
  display: grid;
  gap: 1px;
  margin: 22px 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.prices li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: var(--surface-2);
}
.prices__beds { color: var(--text); font-size: 15px; }
.prices__val  { color: var(--accent); font-size: 21px; font-weight: 800; }
.prices__val i { color: var(--text-dim); font-size: 13px; font-weight: 500; font-style: normal; }

.hostel__desc { margin-bottom: 14px; font-size: 15px; color: var(--text); }
.hostel__desc strong { color: var(--white); }

.hostel__address {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 24px;
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
}
.hostel__address svg { width: 19px; height: 19px; color: var(--accent); flex: none; }

.hostel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ===== Призыв ===== */
.cta { padding: 90px 0; }
.cta__inner {
  padding: clamp(36px, 5vw, 70px) clamp(24px, 4vw, 60px);
  background: linear-gradient(135deg, #2f3a24, var(--surface-2));
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
}
.cta h2 {
  color: var(--white);
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
}
.cta p { margin-top: 12px; color: var(--text); font-size: 17px; }
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

/* ===== Подвал ===== */
.footer { border-top: 1px solid var(--line); padding: 66px 0 40px; }
.footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer__logo  { height: 120px; width: auto; margin-bottom: -6px; }
.footer__label { color: var(--text-dim); font-size: 15px; letter-spacing: .05em; }
.footer__phone {
  margin-top: 6px;
  color: var(--white);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -.01em;
  transition: color .2s;
}
.footer__phone:hover { color: var(--accent); }
.footer__role { color: var(--accent); font-size: 16px; font-weight: 600; }
.footer__copy {
  max-width: 720px;
  margin-top: 44px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
}

/* ===== Модалка ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(4px);
  animation: fade .25s ease;
}
.modal__window {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  animation: pop .25s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop  { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.modal__close {
  position: absolute;
  right: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.modal__close svg { width: 20px; height: 20px; }
.modal__close:hover { background: var(--line); color: var(--white); }

.modal__title {
  color: var(--white);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.01em;
  padding-right: 40px;
}
.modal__sub { margin-top: 6px; margin-bottom: 26px; color: var(--text-dim); font-size: 14px; }

/* ===== Форма ===== */
.form { display: flex; flex-direction: column; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13px; color: var(--text-dim); }
.field__label b { color: var(--accent); }

.field input,
.field select {
  height: 50px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--white);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.field select { appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239a9a9a'%3E%3Cpath d='M12 16 5 9l1.4-1.4L12 13.2l5.6-5.6L19 9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
}
.field option { background: var(--surface-2); color: var(--white); }
.field input::placeholder { color: var(--text-dim); }
.field input:focus,
.field select:focus { border-color: var(--accent); }
.field input.is-error { border-color: #d9534f; }

.form__msg {
  margin: 0;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
}
.form__msg[hidden] { display: none; }
.form__msg.is-error   { background: rgba(217, 83, 79, .12); color: #f08a86; }
.form__msg.is-success { background: rgba(102, 175, 49, .14); color: var(--accent-hi); }

.form__note { text-align: center; font-size: 13px; color: var(--text-dim); }
.form__note a { color: var(--accent); font-weight: 600; }

#submit-btn[disabled] { opacity: .6; cursor: default; }

/* ===== Страница «Спасибо» ===== */
.thanks {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 40px 20px;
  text-align: center;
}
.thanks__icon {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: rgba(102, 175, 49, .14);
  color: var(--accent);
}
.thanks__icon svg { width: 46px; height: 46px; }
.thanks h1 {
  color: var(--white);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.thanks p { max-width: 520px; margin: 16px auto 34px; color: var(--text); font-size: 17px; }
.thanks__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ===== Адаптив ===== */
@media (max-width: 1024px) {
  .perks__grid { grid-template-columns: repeat(2, 1fr); }
  .hostel { grid-template-columns: 1fr; }
  .hostel--reverse .hostel__media { order: 0; }
  .hostel__media { min-height: 260px; max-height: 380px; }
}

@media (max-width: 720px) {
  .header__inner { height: 66px; }
  .header__logo img { height: 46px; }
  .header__phone span { display: none; }
  .header__phone svg { width: 22px; height: 22px; }
  .header__right { gap: 14px; }

  .hero { padding: 100px 0 80px; }
  .hero__actions .btn,
  .cta__actions .btn { flex: 1 1 160px; }

  .perks { padding: 54px 0; }
  .hostels { padding: 64px 0 10px; }
  .cta { padding: 64px 0; }

  .btn { height: 52px; padding: 0 24px; }
  .hostel__actions { width: 100%; }
  .hostel__actions .btn--accent,
  .hostel__actions .btn--ghost { flex: 1 1 140px; }
  .hostel__actions .btn--link { flex: 1 1 100%; }
}

@media (max-width: 520px) {
  .perks__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .prices li { flex-direction: column; align-items: flex-start; gap: 2px; }
}

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

/* ===== Доступность: видимый фокус с клавиатуры ===== */
:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
}
.modal__window:focus,
.modal__window:focus-visible { outline: none; }

.skip-link {
  position: absolute;
  left: 20px;
  top: -60px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent);
  color: #12200a;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ===== <picture> внутри карточки хостела ===== */
.hostel__media picture { display: block; width: 100%; height: 100%; }

/* ===== Honeypot: скрыто от людей, видно ботам ===== */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ===== Согласие на обработку данных ===== */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ===== Ссылки в подвале ===== */
.footer__links { margin-top: 18px; font-size: 14px; }
.footer__links a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color .2s;
}
.footer__links a:hover { color: var(--accent); }

/* ===== Юридическая страница ===== */
.legal { padding: 60px 0 80px; }
.legal__inner { max-width: 760px; }
.legal__back { color: var(--accent); font-weight: 600; }
.legal__back:hover { text-decoration: underline; text-underline-offset: 4px; }
.legal h1 {
  margin-top: 24px;
  color: var(--white);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.legal h2 {
  margin: 36px 0 10px;
  color: var(--white);
  font-size: 19px;
  font-weight: 700;
}
.legal p { font-size: 15px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal__meta { margin-top: 10px; color: var(--text-dim); font-size: 14px; }
.legal__footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
}
