/*
  Путешествие под ключ.
  Идея: язык аэропортовой навигации — жёлтые указатели, чёрные таблички выходов,
  табло вылетов. Табло на первом экране — единственный «громкий» элемент,
  остальная страница спокойная.
*/

:root {
  --signal: #ffcc00;      /* жёлтый аэропортовых указателей */
  --ink: #16181b;         /* текст и таблички */
  --paper: #f3f4f1;       /* фон страницы */
  --card: #fdfdfb;        /* поля формы, строки цен */
  --muted: #56625f;       /* второстепенный текст, с оттенком фона */
  --rule: #d5d8d3;        /* линии и рамки */
  --runway: #1f4fbf;      /* ссылки */
  --board: #1c1f23;       /* табло */
  --board-cell: #2a2e34;  /* ячейка табло */
  --board-text: #f5f1e4;  /* буквы на табло */
  --sign: #16181b;        /* табличка выхода */
  --cta-bg: #16181b;      /* главная кнопка вне первого экрана */
  --cta-fg: #ffcc00;
  --cta-shadow: #ffcc00;  /* «тень-табличка» главной кнопки при наведении */
  --hero-bg: #111716;     /* тёмно-зелёный первый экран, как в первой версии */
  --hero-fg: #e8eeed;     /* текст и рамки на первом экране */
  --radius: 6px;          /* один радиус на всю страницу */
  --main-row-bg: color-mix(in srgb, #ffcc00 14%, #fdfdfb);
  --ease-out: var(--ease-out);

  --font: "Golos Text", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Модульная шкала 1.25 */
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.3rem;
  --fs-lg: 1.65rem;
  --fs-xl: clamp(2rem, 4vw, 2.75rem);
  --fs-hero: clamp(2.2rem, 5vw, 4.2rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111716;
    --card: #182120;
    --ink: #e8eeed;
    --muted: #9aa8a6;
    --rule: #2a3533;
    --runway: #8fb0ff;
    --sign: #22302d;
    --cta-bg: #ffcc00;
    --cta-fg: #16181b;
    --cta-shadow: #e8eeed;
    --main-row-bg: transparent;
  }
}

:root[data-theme="dark"] {
  --paper: #111716;
  --card: #182120;
  --ink: #e8eeed;
  --muted: #9aa8a6;
  --rule: #2a3533;
  --runway: #8fb0ff;
  --sign: #22302d;
  --cta-bg: #ffcc00;
  --cta-fg: #16181b;
  --cta-shadow: #e8eeed;
  --main-row-bg: transparent;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* чтобы закреплённая верхняя строка не закрывала заголовки */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  font-weight: 800;
  overflow-wrap: break-word;
}

h2 {
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

h3 {
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--runway);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--runway);
  outline-offset: 3px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.wrap--narrow {
  max-width: 760px;
}

.section-lead {
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 40px;
}

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

.btn {
  display: inline-block;
  padding: 15px 26px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  --lift-shadow: #16181b;
  transition: transform 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out),
              background-color 0.18s ease-out,
              color 0.18s ease-out;
}

/*
  Наведение: кнопка приподнимается, а под ней появляется жёсткая «тень»,
  как у объёмной таблички-указателя. При нажатии кнопка «вдавливается» обратно.
*/
@media (hover: hover) and (pointer: fine) {
  .btn:hover,
  .price-row__pick:hover {
    transform: translate(-3px, -3px);
    box-shadow: 4px 4px 0 var(--lift-shadow);
  }

  .btn--line:hover {
    background: var(--hero-fg);
    color: var(--hero-bg);
  }

  .topbar__links a:hover {
    color: var(--hero-fg);
  }

  .topbar__cta:hover {
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--lift-shadow);
  }

  .cal__nav:hover:not(:disabled) {
    background: var(--signal);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--lift-shadow);
  }

  .cal__day:hover:not(:disabled) {
    background: var(--signal);
  }

  .price-row__pick:hover {
    background: var(--paper);
  }

  .price-row--main .price-row__pick:hover {
    background: var(--cta-bg);
  }
}

.btn:active,
.price-row__pick:active {
  transform: translate(0, 0);
  box-shadow: 0 0 0 var(--lift-shadow);
  transition-duration: 0.06s;
}

.btn--ink {
  background: var(--signal);
  border-color: var(--signal);
  color: #16181b;
  --lift-shadow: var(--hero-fg);
}

.btn--line {
  background: transparent;
  color: var(--hero-fg);
  border-color: var(--hero-fg);
  --lift-shadow: var(--signal);
}

.btn--wide {
  width: 100%;
}

/* Вне первого экрана главная кнопка следует теме */
main .btn--ink {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-fg);
}

main .btn--ink {
  --lift-shadow: var(--cta-shadow);
}

.btn:disabled,
.btn:disabled:hover {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(calc(100svh - 64px), 860px);
  padding: 64px 0;
  background: var(--hero-bg);
  color: var(--hero-fg);
}

/* Светлое фото во всю ширину */
.hero__bg,
.hero__bg img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero__bg img {
  object-fit: cover;
  object-position: 62% 50%;
}

/* Подложка только там, где текст: слева тёмно-зелёная, справа фото остаётся ярким */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    rgba(17, 23, 22, 0.92) 0%,
    rgba(17, 23, 22, 0.78) 34%,
    rgba(17, 23, 22, 0.25) 56%,
    rgba(17, 23, 22, 0) 70%);
}

.hero__inner {
  width: 100%;
}

.hero__copy {
  max-width: 600px;
}

/* ---------- Куда и когда ---------- */

.when {
  padding: 72px 0 80px;
  background: var(--hero-bg);
  color: var(--hero-fg);
}

.when__lead {
  max-width: 60ch;
  color: rgba(232, 238, 237, 0.78);
}

.when__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 32px;
  align-items: start;
  margin-top: 32px;
}

.when {
  position: relative;
  isolation: isolate;
}

/* Лёгкое зерно (4%), чтобы тёмный фон не выглядел плоской заливкой */
.when::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero a:focus-visible,
.hero .btn:focus-visible {
  outline-color: var(--signal);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--hero-bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(232, 238, 237, 0.14);
  color: var(--hero-fg);
}

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

.topbar a:focus-visible {
  outline-color: var(--signal);
}

.logo {
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--hero-fg);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo span {
  color: var(--signal);
}

.topbar__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.topbar__links a {
  white-space: nowrap;
  color: rgba(232, 238, 237, 0.75);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease-out;
}

/* Кнопка «Оставить заявку» ведёт к анкете */
.topbar__cta {
  display: inline-block;
  padding: 8px 16px;
  border: 2px solid var(--signal);
  border-radius: var(--radius);
  background: var(--signal);
  color: #16181b;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  --lift-shadow: var(--hero-fg);
  transition: transform 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out);
}

.topbar__cta:active {
  transform: none;
  box-shadow: none;
  transition-duration: 0.06s;
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
  max-width: 13ch;
  text-shadow: 0 2px 24px rgba(17, 23, 22, 0.35);
  text-wrap: balance;
}

.hero__lead {
  margin-top: 28px;
  font-size: 1.15rem;
  max-width: 44ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* Три главных факта под кнопками: то, что сильнее всего вызывает доверие */
.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}

.hero__facts li {
  padding: 2px 20px;
  border-left: 1px solid rgba(232, 238, 237, 0.28);
  max-width: 12em;
  line-height: 1.35;
}

.hero__facts li:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero__facts strong {
  display: block;
  color: var(--signal);
  font-size: var(--fs-md);
  font-weight: 800;
}

/* ---------- Календарь поездки ---------- */

/* Календарь — бумажная карточка на тёмном экране, табло под ним остаётся главным */
.cal {
  background: #fffdf2;
  color: #16181b;
  border: 2px solid #16181b;
  border-radius: var(--radius);
  padding: 16px 18px 14px;
}

.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cal__title {
  font-size: var(--fs-md);
  font-weight: 800;
  margin: 0;
}

.cal__nav {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid #16181b;
  border-radius: var(--radius);
  background: transparent;
  color: #16181b;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  --lift-shadow: #16181b;
  transition: transform 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out),
              background-color 0.18s ease-out;
}

.cal__nav:active:not(:disabled) {
  transform: none;
  box-shadow: none;
}

.cal__nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.cal__week,
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.cal__week {
  margin: 12px 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #45494f;
  text-align: center;
}

.cal__day {
  aspect-ratio: 1.7;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #16181b;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}

.cal__day:disabled {
  color: #b4b7bb;
  cursor: default;
}

.cal__day--weekend:not(:disabled) {
  color: #b3261e;
}

.cal__day--today {
  box-shadow: inset 0 0 0 2px #16181b;
}

/* Дни между вылетом и возвращением */
.cal__day--range {
  background: #ffe680;
  border-radius: 0;
}

.cal__day--start,
.cal__day--end {
  background: #16181b;
  color: var(--signal);
  font-weight: 800;
}

.cal__day--start:hover,
.cal__day--end:hover {
  background: #16181b;
}

.cal__day--start.cal__day--weekend,
.cal__day--end.cal__day--weekend {
  color: var(--signal);
}

.cal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e3dfcc;
  font-size: 0.95rem;
}

.cal__go {
  color: #16181b;
  font-weight: 700;
}

/* Направления не в сезоне в выбранном месяце приглушаются */
.board__table tbody tr {
  transition: opacity 0.25s ease-out;
}

.board__table tbody tr.is-off {
  opacity: 0.6;
}

/* Подпись «не сезон» — чтобы было понятно, почему строка приглушена */
.board__off {
  display: none;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--board-text);
}

.board__table tr.is-off .board__off {
  display: block;
}

/* ---------- Табло ---------- */

.board {
  margin: 0;
  border: 1px solid #34413e;
  background: var(--board);
  color: var(--board-text);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: 0 30px 60px -30px rgba(22, 24, 27, 0.7);
}

.board__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid #3a3f46;
  font-weight: 700;
  font-size: var(--fs-md);
}

.board__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.board__table th {
  text-align: left;
  font-weight: 500;
  font-size: var(--fs-sm);
  color: #c3c8ce;
  padding: 10px 8px 8px 0;
}

.board__table td {
  padding: 7px 8px 7px 0;
  border-top: 1px solid #2f343a;
  font-size: 0.95rem;
  vertical-align: middle;
}

.board__table td:not(.flap) {
  color: var(--signal);
}

/* Буквы-«шторки» разделённого табло */
.flap {
  font-family: var(--mono);
  font-weight: 700;
  white-space: nowrap;
}

.flap__char {
  position: relative;
  display: inline-block;
  width: 1.2em;
  margin-right: 2px;
  padding: 3px 0;
  text-align: center;
  background: var(--board-cell);
  border-radius: 3px;
  line-height: 1.2;
}

.flap__char::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.55);
}

.board__foot {
  margin-top: 14px;
  font-size: 0.95rem;
  color: #dde1e5;
}

/* ---------- Форматы: таблички выходов ---------- */

.formats {
  padding: 80px 0 64px;
}

.gates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.gate__sign {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--sign);
  color: var(--hero-fg);
  padding: 14px 18px;
  border-radius: var(--radius);
}

.gate__letter {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  background: var(--signal);
  color: #16181b;
  font-weight: 900;
  font-size: 1.6rem;
  border-radius: var(--radius);
}

.gate__sign h3 {
  font-size: var(--fs-lg);
  hyphens: auto;
}

.gate__body {
  padding: 24px 4px 0;
}

.gate__body > p:first-child {
  color: var(--muted);
  max-width: 50ch;
}

.gate__body ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.gate__body li {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}

.gate__body li:last-child {
  border-bottom: 1px solid var(--rule);
}

.gate__price {
  margin-top: 20px;
  font-weight: 800;
  font-size: var(--fs-md);
}

/* Фото направления: как световой короб у выхода на посадку */
.gate__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;    /* низкий кадр: секция помещается в экран 1920×1080 */
  object-fit: cover;
  object-position: 50% 65%;
  margin-top: 8px;
  border-radius: var(--radius);
  background: var(--rule);
}

/* ---------- Маршрут работы ---------- */

.route {
  padding: 80px 0;
  border-top: 2px solid var(--ink);
}

.route__line {
  list-style: none;
  counter-reset: stop;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

/* Линия маршрута, соединяющая остановки */
.route__line::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: var(--ink);
}

.route__line li {
  counter-increment: stop;
  position: relative;
}

.route__line li::before {
  content: counter(stop);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--signal);
  color: #16181b;
  border: 3px solid var(--ink);
  font-weight: 800;
  position: relative;
}

.route__line p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 30ch;
}

/* ---------- Цены ---------- */

.prices {
  padding: 80px 0;
  background: var(--card);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.price-list {
  border-top: 2px solid var(--ink);
}

.price-row {
  display: grid;
  grid-template-columns: 1.1fr 2fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.price-row p {
  color: var(--muted);
  max-width: 60ch;
}

.price-row__sum {
  font-size: var(--fs-lg);
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
}

.price-row__pick {
  display: inline-block;
  font-weight: 700;
  color: var(--ink);
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  --lift-shadow: var(--ink);
  transition: transform 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out),
              background-color 0.18s ease-out,
              color 0.18s ease-out;
}

/* Основная услуга выделена тонкой жёлтой рамкой (и лёгкой подложкой в светлой теме) */
.price-row--main {
  background: var(--main-row-bg);
  border: 1px solid var(--signal);
  padding-left: 16px;
  padding-right: 16px;
  margin: 0 -16px;
  border-radius: var(--radius);
}

.price-row--main .price-row__pick {
  --lift-shadow: var(--cta-shadow);
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-fg);
}

/* ---------- Подарок: колода путеводителей ---------- */

/* Тёмно-зелёный «стол», как первый экран: на нём рассыпаны страницы */
.gift {
  position: relative;
  isolation: isolate;
  padding: 88px 0 72px;
  background: var(--hero-bg);
  color: var(--hero-fg);
}

.gift::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.gift__text {
  max-width: 60ch;
}

.gift__text p {
  margin-top: 12px;
  color: rgba(232, 238, 237, 0.78);
}

.gift__text .gift__hint {
  color: var(--signal);
  font-weight: 600;
}

.deck {
  position: relative;
  height: 540px;
  margin-top: 32px;
}

.card {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #fdfdfb;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.3);
  /* до «раздачи» все карточки лежат стопкой в центре */
  transform: translate(var(--x0), var(--y0)) rotate(0deg);
  transition: transform 0.6s var(--ease-out) var(--d);
}

.card img {
  display: block;
  width: 100%;
  height: auto;
}

.card--page {
  width: 150px;
}

.card--slide {
  width: 232px;
}

.deck.is-dealt .card {
  transform: translate(var(--x), var(--y)) rotate(var(--r));
}

/* после раздачи карточки реагируют на наведение быстро и без задержки */
.deck.is-settled .card {
  transition: transform 0.18s var(--ease-out);
}

.deck.is-settled .card:focus-visible {
  z-index: 40;
  outline: 3px solid var(--signal);
  outline-offset: 2px;
  transform: translate(var(--x), var(--y)) rotate(0deg) scale(1.12);
}

@media (hover: hover) and (pointer: fine) {
  .deck.is-settled .card:hover {
    z-index: 40;
    transform: translate(var(--x), var(--y)) rotate(0deg) scale(1.12);
  }
}

/* Просмотр страницы крупно */
.viewer {
  max-width: min(94vw, 1200px);
  max-height: 94vh;
  padding: 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--hero-bg);
  color: var(--hero-fg);
}

.viewer::backdrop {
  background: rgba(8, 12, 11, 0.82);
}

.viewer__frame {
  margin: 0;
  text-align: center;
}

.viewer__frame img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 130px);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
}

.viewer__frame figcaption {
  margin-top: 10px;
  font-weight: 600;
}

.viewer__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  color: rgba(232, 238, 237, 0.75);
}

.viewer__btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 2px solid var(--hero-fg);
  border-radius: var(--radius);
  background: transparent;
  color: var(--hero-fg);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.viewer__close {
  margin-left: 12px;
  font-size: 0.95rem;
  background: var(--signal);
  border-color: var(--signal);
  color: #16181b;
}

.viewer__btn:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

/* ---------- Гидам ---------- */

.guides {
  padding: 88px 0;
  border-top: 2px solid var(--ink);
}

.guides__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.guides__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--rule);
}

.guides__text > p {
  color: var(--muted);
  max-width: 52ch;
}

.guides__list {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
}

.guides__list li {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}

.guides__list li:last-child {
  border-bottom: 1px solid var(--rule);
}

/* ---------- Кто я ---------- */

.about {
  padding: 88px 0;
  border-top: 2px solid var(--ink);
}

.about[hidden] {
  display: none;
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.about__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
  background: var(--card);
}

.about__name {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: 12px;
}

.about__text > p:not(.about__name) {
  max-width: 60ch;
}

.about__facts {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  max-width: 60ch;
}

.about__facts li {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}

.about__facts li:last-child {
  border-bottom: 1px solid var(--rule);
}

/* Сертификат: миниатюра, по клику открывается крупно */
.about__cert {
  display: inline-block;
  margin-top: 28px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.about__cert img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s var(--ease-out);
}

.about__cert span {
  display: inline-block;
  margin-top: 10px;
  color: var(--runway);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .about__cert:hover img {
    transform: translateY(-3px);
  }
}

.about__reviews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.about__reviews blockquote {
  margin: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.about__reviews cite {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

/* ---------- Анкета ---------- */

.brief__photo {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-top: 32px;
  border-radius: var(--radius);
  background: var(--rule);
}

.brief {
  padding: 72px 0;
}

.brief__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: start;
}

.brief__intro p {
  color: var(--muted);
  margin-top: 12px;
  max-width: 36ch;
}

.form {
  display: grid;
  gap: 18px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-weight: 600;
  font-size: 1rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--signal);
}

.form__honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form__status {
  min-height: 1.6em;
  font-weight: 600;
}

.form__status--error {
  color: #c62828;
}

/* Переключатель «Для путешественников / Для гидов» */
.mode {
  display: inline-flex;
  justify-self: start;
  margin: 0;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.mode__opt {
  position: relative;
  display: flex;
  cursor: pointer;
}

.mode__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode__opt span {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-weight: 700;
  color: var(--ink);
  transition: background-color 0.18s ease-out, color 0.18s ease-out;
}

.mode__opt input:checked + span {
  background: var(--cta-bg);
  color: var(--cta-fg);
}

.mode__opt input:focus-visible + span {
  outline: 3px solid var(--runway);
  outline-offset: -5px;
}

/* скрытые в режиме гида поля и абзацы не должны занимать место */
#brief [hidden] {
  display: none !important;
}

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

/* ---------- FAQ ---------- */

.faq {
  padding: 80px 0 96px;
  border-top: 2px solid var(--ink);
}

.faq h2 {
  margin-bottom: 24px;
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-weight: 700;
  font-size: 1.1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  color: var(--muted);
  padding-bottom: 20px;
  max-width: 64ch;
}

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

.footer {
  background: #16181b;
  color: #c9ccd1;
  padding: 28px 0;
  font-size: var(--fs-sm);
}

.footer a {
  color: var(--signal);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__note {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 12px;
  color: #8a8f96;
}

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

@media (max-width: 960px) {
  .when__grid,
  .brief__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

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

  .route__line::before {
    display: none;
  }

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

  .price-row p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .price-row__pick {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 1180px) {
  .topbar__links {
    display: none;
  }

  .topbar__cta {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  /* на телефоне фото – яркая картинка сверху, текст под ней на тёмно-зелёном */
  .hero {
    display: block;
    min-height: 0;
    padding: calc(min(100vw, 52svh) - 48px) 0 36px;
  }

  .hero__bg,
  .hero__bg img {
    bottom: auto;
    height: min(100vw, 52svh);
  }

  .hero__bg img {
    object-position: 50% 40%;
  }

  .hero__scrim {
    bottom: auto;
    height: min(100vw, 52svh);
    background: linear-gradient(0deg, var(--hero-bg) 0%, rgba(17, 23, 22, 0) 38%);
  }

  .board__table th {
    font-size: 0.75rem;
  }

  .board__table td {
    font-size: 0.8rem;
    padding-right: 6px;
  }

  .when {
    padding: 56px 0;
  }

  .flap {
    font-size: 0.72rem;
  }

  .board {
    padding: 16px 14px 14px;
  }

  .board__season {
    display: none;
  }

  .cal {
    padding: 14px 12px 12px;
  }

  .cal__day {
    aspect-ratio: 1.25;
  }

  .flap__char {
    width: 1.05em;
    margin-right: 1px;
  }

  .formats,
  .route,
  .prices,
  .brief,
  .faq {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .about {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .gift,
  .guides {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .deck {
    height: 600px;
    margin-top: 24px;
  }

  .card--page {
    width: 104px;
  }

  .card--slide {
    width: 160px;
  }

  .guides__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .mode {
    display: flex;
  }

  .mode__opt {
    flex: 1;
    text-align: center;
  }

  .mode__opt span {
    padding: 10px 6px;
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .gates,
  .form__row,
  .about__grid,
  .about__reviews {
    grid-template-columns: minmax(0, 1fr);
  }

  .about__grid {
    gap: 28px;
  }

  .about__photo {
    max-width: 260px;
  }

  .hero__facts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 28px;
  }

  .price-row--main {
    margin: 0;
  }

  /* на телефоне анкета важнее картинки */
  .brief__photo {
    display: none;
  }

  .hero__facts li,
  .hero__facts li:first-child {
    padding: 0 0 0 14px;
    border-left: 1px solid rgba(232, 238, 237, 0.28);
    max-width: none;
  }

  .hero__facts strong {
    display: inline;
    font-size: inherit;
  }

  .gate__sign h3 {
    font-size: var(--fs-md);
  }

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

@media (max-width: 480px) {
  .topbar__inner {
    gap: 12px;
  }

  .logo {
    font-size: 0.95rem;
    white-space: normal;
    line-height: 1.15;
    min-width: 0;
  }

  .topbar__cta {
    padding: 7px 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 0.9rem;
  }

  .board__table td {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Без движения: при наведении остаётся только смена цвета */
  .btn,
  .price-row__pick,
  .topbar__cta {
    transition: background-color 0.18s ease-out, color 0.18s ease-out;
  }

  .btn:hover,
  .price-row__pick:hover,
  .topbar__cta:hover,
  .btn:active,
  .price-row__pick:active,
  .topbar__cta:active {
    transform: none;
    box-shadow: none;
  }
}
