/* =============================================================
   PERIBACA — стили лендинга.
   Палитра тёплая, из самой Каппадокии: розовый туф Долины роз,
   рассветное небо, марена турецких килимов, шафран и умбра.

   Порядок: токены → база → общие блоки (контейнер, секции, кнопки)
   → шапка → первый экран → маршруты → программы → регион → кухня
   → фото → отзывы → вопросы → контакты и формы → подвал → модалка
   → лайтбокс → адаптив → уменьшенное движение.
   ============================================================= */

/* ---------- Токены ---------- */
:root {
    --tuff: #F4E1CE;          /* фон: розовый туф Долины роз */
    --ash: #EBCFB6;           /* второй фон: туф в тени */
    --dawn: #F3C7AA;          /* небо на рассвете */
    --madder: #962A1D;        /* марена килимов: заголовки, кнопки, тёмные секции */
    --umber: #3A1C14;         /* умбра: подземный ярус, фото, подвал */
    --basalt: #2D1B14;        /* основной текст */
    --muted: #6B4E40;         /* второстепенный текст на светлом */
    --saffron: #F2A93B;       /* шафран: на марене — только крупным кеглем (3,97:1) */
    --on-dark: #F4E1CE;
    --on-dark-muted: #E8C7AF;
    --error: #B42318;
    --field: #FBF2E9;
    --field-border: #9A7B6B;
    --line: rgba(45, 27, 20, .16);
    --line-dark: rgba(244, 225, 206, .2);
    --focus: var(--madder);

    --font-text: 'Literata', Georgia, 'Times New Roman', serif;
    /* У Sofia Sans по умолчанию болгарские формы кириллицы (д, п, т как g, n, m);
       русские включает только lang="ru" — без него заголовки рисуются чужими буквами */
    --font-display: 'Sofia Sans Extra Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;

    --container: 1240px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 76px;
    --radius: 4px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- База ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-text);
    font-size: 18px;
    line-height: 1.65;
    color: var(--basalt);
    background-color: var(--tuff);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
}

body.is-locked {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

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

img {
    height: auto;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

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

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 200;
    padding: 12px 18px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--tuff);
    background-color: var(--madder);
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 16px;
}

/* ---------- Контейнер и секции ---------- */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: clamp(72px, 10vw, 136px) 0;
}

.section--madder {
    --focus: var(--saffron);
    color: var(--on-dark);
    background-color: var(--madder);
}

.section--umber {
    --focus: var(--saffron);
    color: var(--on-dark);
    background-color: var(--umber);
}

.section__head {
    margin-bottom: clamp(40px, 5vw, 64px);
}

.section__head--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.h2 {
    font-family: var(--font-display);
    font-size: clamp(48px, 7.2vw, 104px);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.005em;
    color: var(--madder);
    text-wrap: balance;
}

.section--madder .h2,
.section--umber .h2 {
    color: var(--tuff);
}

.h3 {
    font-family: var(--font-display);
    font-size: clamp(32px, 3.4vw, 46px);
    font-weight: 700;
    line-height: 1;
    color: var(--madder);
}

.lead {
    max-width: 60ch;
    margin-top: 20px;
    font-size: clamp(17px, 1.4vw, 20px);
    color: var(--muted);
}

.section--umber .lead {
    color: var(--on-dark-muted);
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 24px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    color: var(--tuff);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    background-color: var(--madder);
    border: 2px solid var(--madder);
    border-radius: 3px;
    transition: background-color .2s, color .2s, border-color .2s;
}

.btn:disabled {
    cursor: progress;
    opacity: .6;
}

.btn--light {
    color: var(--madder);
    background-color: var(--tuff);
    border-color: var(--tuff);
}

.btn--line {
    color: var(--tuff);
    background-color: transparent;
    border-color: rgba(244, 225, 206, .75);
}

.btn--line-dark {
    color: var(--madder);
    background-color: transparent;
    border-color: var(--madder);
}

.btn--sm {
    min-height: 40px;
    padding: 6px 18px;
    font-size: 19px;
}

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

@media (hover: hover) {
    .btn:hover {
        background-color: var(--umber);
        border-color: var(--umber);
    }

    .btn--light:hover {
        color: var(--umber);
        background-color: #fff;
        border-color: #fff;
    }

    .btn--line:hover {
        color: var(--madder);
        background-color: var(--tuff);
        border-color: var(--tuff);
    }

    .btn--line-dark:hover {
        color: var(--tuff);
        background-color: var(--madder);
        border-color: var(--madder);
    }
}

/* ---------- Шапка ---------- */
.header {
    --focus: var(--saffron);
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    height: var(--header-h);
    color: var(--tuff);
    transition: background-color .3s, color .3s, box-shadow .3s;
}

.header--scrolled {
    --focus: var(--madder);
    color: var(--madder);
    background-color: var(--tuff);
    box-shadow: 0 1px 0 var(--line);
}

.header__container {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 100%;
}

.logo {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.logo__mark {
    width: 24px;
    height: 32px;
}

.logo__text {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .06em;
}

.nav {
    margin-left: auto;
}

.nav__list {
    display: flex;
    gap: 26px;
}

.nav__link {
    position: relative;
    display: block;
    padding: 8px 0;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .02em;
    color: inherit;
    text-decoration: none;
}

.nav__link::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s var(--ease);
}

.nav__link.is-active::after {
    transform: scaleX(1);
}

@media (hover: hover) {
    .nav__link:hover::after {
        transform: scaleX(1);
    }
}

.header__cta {
    flex-shrink: 0;
    color: var(--madder);
    background-color: var(--tuff);
    border-color: var(--tuff);
}

.header--scrolled .header__cta {
    color: var(--tuff);
    background-color: var(--madder);
    border-color: var(--madder);
}

.burger {
    position: relative;
    display: none;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    color: inherit;
    cursor: pointer;
    background: none;
    border: 0;
}

.burger__line,
.burger__line::before {
    position: absolute;
    left: 10px;
    width: 24px;
    height: 2px;
    background-color: currentColor;
    transition: transform .25s var(--ease), top .25s var(--ease);
}

.burger__line {
    top: 17px;
}

.burger__line::before {
    content: '';
    top: 8px;
    left: 0;
}

.burger.is-open .burger__line {
    top: 21px;
    transform: rotate(45deg);
}

.burger.is-open .burger__line::before {
    top: 0;
    transform: rotate(-90deg);
}

/* ---------- Первый экран ---------- */
.hero {
    --focus: var(--saffron);
    position: relative;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    color: var(--on-dark);
    background-color: var(--umber);
}

.hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
}

/* Затемнение в цвет подземного яруса: сверху — под шапку, снизу — под текст */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(58, 28, 20, .55), rgba(58, 28, 20, 0) 24%),
        linear-gradient(to top, rgba(58, 28, 20, .94), rgba(58, 28, 20, .7) 40%, rgba(58, 28, 20, .38) 66%, rgba(58, 28, 20, 0) 88%);
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: clamp(28px, 5vh, 56px);
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(50px, 10.4vw, 164px);
    font-weight: 800;
    line-height: .86;
    letter-spacing: -.01em;
}

.hero__line {
    display: block;
}

.hero__foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 28px 64px;
    align-items: end;
    margin-top: clamp(24px, 4vh, 40px);
    padding-top: 24px;
    border-top: 1px solid rgba(244, 225, 206, .3);
}

.hero__text {
    max-width: 52ch;
    color: rgba(244, 225, 206, .92);
}

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

.sunrise__icon {
    margin-bottom: 12px;
    color: var(--saffron);
}

.sunrise__time {
    font-family: var(--font-display);
    font-size: clamp(26px, 2.4vw, 32px);
    font-weight: 700;
    line-height: 1.05;
}

.sunrise__time time {
    font-weight: 800;
    color: var(--saffron);
}

.sunrise__note {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--on-dark-muted);
}

/* Одна сцена при загрузке: кадр оседает, строки заголовка поднимаются по очереди */
@media (prefers-reduced-motion: no-preference) {
    .hero__media img {
        animation: hero-settle 2.6s var(--ease) both;
    }

    .hero__line {
        animation: hero-rise .9s var(--ease) both;
    }

    .hero__line:nth-child(2) {
        animation-delay: .12s;
    }

    .hero__line:nth-child(3) {
        animation-delay: .24s;
    }

    .hero__foot {
        animation: hero-fade .9s .45s both;
    }
}

@keyframes hero-settle {
    from {
        transform: scale(1.06);
    }
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(.3em);
    }
}

@keyframes hero-fade {
    from {
        opacity: 0;
    }
}

/* ---------- Маршруты: разрез долины ----------
   Три яруса — небо, долины, подземный город. Слева у каждого шкала высот
   (.level__inner::before) и отметка яруса; шкала идёт поверх силуэта скал,
   поэтому у контейнера z-index выше, чем у .level__ground. */
.tours {
    background-color: var(--dawn);
}

.tours__head {
    padding-top: clamp(72px, 10vw, 136px);
}

.level {
    position: relative;
}

.level__inner {
    position: relative;
    z-index: 1;
    padding-top: 56px;
    padding-bottom: 80px;
    padding-left: calc(var(--gutter) + 176px);
}

.level__inner::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--gutter);
    width: 10px;
    border-left: 2px solid currentColor;
    background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 16px);
    opacity: .3;
}

.level__mark {
    position: absolute;
    top: 52px;
    left: var(--gutter);
    width: 168px;
    padding-left: 26px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--muted);
}

.level__mark::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 0;
    width: 18px;
    height: 2px;
    background-color: currentColor;
}

.level__alt {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    color: var(--madder);
    white-space: nowrap;
}

.level__title {
    margin-bottom: 28px;
    font-family: var(--font-display);
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 800;
    line-height: 1;
    color: var(--madder);
}

.level--sky .level__inner {
    padding-bottom: clamp(140px, 15vw, 236px);
}

.level__ground {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: clamp(84px, 11vw, 168px);
    fill: var(--tuff);
}

.level--ground {
    background-color: var(--tuff);
}

.level--under {
    --focus: var(--saffron);
    color: var(--on-dark);
    background-color: var(--umber);
    border-top: 6px solid #5A2A1E;
}

.level--under .level__mark {
    color: var(--on-dark-muted);
}

.level--under .level__alt,
.level--under .level__title {
    color: var(--tuff);
}

.tour {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 180px;
    gap: 32px;
    align-items: start;
}

.tour-list > li {
    padding: 32px 0;
    border-top: 1px solid var(--line);
}

.tour-list > li:first-child {
    padding-top: 4px;
    border-top: 0;
}

.tour__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
}

.tour__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 2.6vw, 36px);
    font-weight: 700;
    line-height: 1.02;
}

.tour__text {
    max-width: 58ch;
    margin-top: 10px;
    font-size: 17px;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 36px;
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.35;
}

.facts dt {
    font-size: 13px;
    color: var(--muted);
}

.facts dd {
    font-weight: 600;
}

.tour__buy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.price {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    color: var(--madder);
}

.price__unit {
    display: block;
    margin-top: 4px;
    font-family: var(--font-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--muted);
}

.tour--feature {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.tour--feature .tour__title {
    font-size: clamp(36px, 3.6vw, 52px);
    color: var(--basalt);
}

.tour--feature .facts {
    gap: 10px 28px;
}

.tour--feature .tour__buy {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    margin-top: 28px;
}

.level--under .facts dt,
.level--under .price__unit {
    color: var(--on-dark-muted);
}

.level--under .price {
    color: var(--tuff);
}

/* ---------- Программы ---------- */
.plans-wrap {
    overflow-x: auto;
}

.plans {
    width: 100%;
    font-size: 16px;
    border-collapse: collapse;
}

.plans thead > tr > :first-child {
    width: 34%;
}

.plans thead th {
    width: 22%;
    padding: 24px 20px 22px;
    font-weight: 400;
    text-align: left;
    vertical-align: top;
}

.plans__name {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 700;
    line-height: 1;
}

.plans__price {
    display: block;
    margin-top: 10px;
    font-family: var(--font-display);
    font-size: clamp(36px, 3.6vw, 52px);
    font-weight: 800;
    line-height: 1;
    color: var(--madder);
}

.plans__term {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--muted);
}

.plans tbody tr {
    border-top: 1px solid var(--line);
}

.plans tbody tr:last-child {
    border-bottom: 1px solid var(--line);
}

.plans tbody th {
    padding: 14px 20px 14px 0;
    font-weight: 400;
    text-align: left;
}

.plans tbody td {
    padding: 14px 20px;
}

.plans tfoot td {
    padding: 24px 20px 0;
}

.plans tfoot .btn {
    width: 100%;
}

/* Средняя программа выделена тоном колонки — цветом неба, без значков «хит» */
.plans tr > :nth-child(3) {
    background-color: rgba(243, 199, 170, .55);
}

.yes {
    font-size: 18px;
    font-weight: 700;
    color: var(--madder);
}

.no {
    color: var(--muted);
}

.plans__any {
    font-style: italic;
    color: var(--muted);
}

/* ---------- Регион ---------- */
.story__intro {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
    align-items: center;
}

.story__text p {
    max-width: 56ch;
    margin-top: 22px;
    color: rgba(244, 225, 206, .92);
}

.story__text p:first-of-type {
    margin-top: 32px;
}

.story__collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.story__img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
}

/* Высокий кадр — в форме входа в пещерное жилище */
.story__img--arch {
    grid-row: span 2;
    aspect-ratio: auto;
    border-radius: 999px 999px var(--radius) var(--radius);
}

.story__subtitle {
    margin-top: clamp(72px, 9vw, 112px);
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: var(--on-dark-muted);
}

.timeline__item {
    display: grid;
    grid-template-columns: 210px minmax(0, 300px) minmax(0, 1fr);
    gap: 24px;
    align-items: baseline;
    padding: 22px 0;
    border-top: 1px solid var(--line-dark);
}

.timeline__date {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: var(--saffron);
}

.timeline__title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

.timeline__text {
    max-width: 60ch;
    font-size: 16px;
    line-height: 1.6;
    color: var(--on-dark-muted);
}

/* ---------- Кухня и ремёсла ---------- */
.taste__feature {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: center;
}

.taste__feature img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--radius);
}

.taste__feature-body p {
    max-width: 44ch;
    margin-top: 18px;
}

.taste__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
    margin-top: clamp(64px, 8vw, 96px);
}

.taste__col-title {
    padding-bottom: 14px;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--madder);
    border-bottom: 2px solid var(--madder);
}

.dish {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.dish img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: var(--radius);
}

.dish__name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.05;
}

.dish__text {
    margin-top: 4px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

.seasons div {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.seasons dt {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--madder);
}

.seasons dd {
    font-size: 16px;
    line-height: 1.5;
}

/* ---------- Фото ----------
   Мозаика 4 колонки × 3 ряда держится на спанах 1-го и 6-го снимка:
   добавление или перестановка снимков требует пересчёта на всех брейкпоинтах. */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: clamp(150px, 16vw, 230px);
    gap: 12px;
}

.gallery__item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery__item:nth-child(6) {
    grid-column: span 2;
}

.gallery__btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    cursor: zoom-in;
    background: none;
    border: 0;
    border-radius: var(--radius);
}

.gallery__btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter .3s;
}

@media (hover: hover) {
    .gallery__btn:hover img {
        filter: brightness(1.1);
    }
}

/* ---------- Отзывы ----------
   Карусели нужен и padding, и scroll-padding: без scroll-padding snap
   притягивает первую карточку к нулю прокрутки и прячет её под отступ. */
.reviews__nav {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.reviews__arrow {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    color: var(--madder);
    cursor: pointer;
    background: none;
    border: 2px solid var(--madder);
    border-radius: 3px;
    transition: background-color .2s, color .2s, opacity .2s;
}

.reviews__arrow:disabled {
    cursor: default;
    opacity: .3;
}

@media (hover: hover) {
    .reviews__arrow:not(:disabled):hover {
        color: var(--tuff);
        background-color: var(--madder);
    }
}

.reviews__track {
    --track-pad: max(var(--gutter), calc((100vw - var(--container)) / 2));
    display: grid;
    grid-auto-columns: min(380px, 80vw);
    grid-auto-flow: column;
    gap: 48px;
    padding: 4px var(--track-pad) 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--track-pad);
    scrollbar-width: none;
}

.reviews__track::-webkit-scrollbar {
    display: none;
}

.review {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding-top: 24px;
    border-top: 3px solid var(--madder);
    scroll-snap-align: start;
}

.review__text {
    font-size: 20px;
    font-style: italic;
    line-height: 1.55;
}

.review__author {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 15px;
    line-height: 1.45;
}

.review__name {
    font-weight: 600;
}

.review__meta,
.review__rating {
    color: var(--muted);
}

/* ---------- Вопросы ---------- */
.faq {
    background-color: var(--ash);
}

.faq__container {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 64px;
    align-items: start;
}

.faq__list {
    border-top: 2px solid var(--madder);
}

.faq__item {
    border-bottom: 1px solid var(--line);
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    padding: 22px 0;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    background: none;
    border: 0;
}

.faq__icon {
    position: relative;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--madder);
}

.faq__icon::before,
.faq__icon::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    transition: transform .25s var(--ease);
}

.faq__icon::after {
    transform: rotate(90deg);
}

.faq__question[aria-expanded="true"] .faq__icon::after {
    transform: rotate(0);
}

.faq__answer p {
    max-width: 62ch;
    padding-bottom: 24px;
}

/* ---------- Контакты и формы ---------- */
.contacts__container {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 72px;
    align-items: start;
}

.contacts__lead {
    max-width: 46ch;
    margin-top: 24px;
    color: rgba(244, 225, 206, .92);
}

.contacts__list {
    margin-top: 40px;
}

.contacts__list div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--line-dark);
}

.contacts__list dt {
    font-size: 15px;
    color: var(--on-dark-muted);
}

.contacts__list a {
    text-decoration-color: rgba(244, 225, 206, .45);
    text-underline-offset: 3px;
}

.contacts__form {
    --focus: var(--madder);
    padding: clamp(24px, 4vw, 48px);
    color: var(--basalt);
    background-color: var(--tuff);
    border-radius: var(--radius);
}

.form__title {
    margin-bottom: 24px;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    color: var(--madder);
}

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

.form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form__label {
    font-size: 14px;
    font-weight: 600;
}

/* line-height задан явно: из font: inherit пришёл бы 1.65, и каретка в Safari на iOS
   съезжала бы вниз. appearance убирает внутренние стили iOS у полей. */
.form__input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    line-height: 1.35;
    color: var(--basalt);
    background-color: var(--field);
    border: 1.5px solid var(--field-border);
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, box-shadow .2s;
}

.form__input::placeholder {
    color: #7E6254;
}

.form__input:focus {
    outline: none;
    border-color: var(--madder);
    box-shadow: 0 0 0 3px rgba(150, 42, 29, .25);
}

.form__input.is-invalid {
    border-color: var(--error);
}

select.form__input {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23962A1D' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form__input--textarea {
    min-height: 96px;
    resize: vertical;
}

.form__error {
    display: none;
    font-size: 13px;
    line-height: 1.4;
    color: var(--error);
}

.form__error.is-visible {
    display: block;
}

.form__note {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.form__status {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.5;
    background-color: rgba(150, 42, 29, .08);
    border-left: 3px solid var(--madder);
}

.form__status.is-visible {
    display: block;
}

.form__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Подвал ---------- */
.footer {
    --focus: var(--saffron);
    padding: 64px 0 28px;
    font-size: 15px;
    color: var(--on-dark-muted);
    background-color: var(--umber);
}

.footer__container {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, .6fr);
    gap: 40px;
}

.footer .logo {
    color: var(--tuff);
}

.footer__tagline {
    max-width: 28ch;
    margin-top: 14px;
}

.footer__nav ul {
    columns: 2;
    column-gap: 32px;
}

.footer__nav li,
.footer__social li {
    margin-bottom: 10px;
}

.footer__nav a,
.footer__social a {
    color: var(--tuff);
    text-decoration: none;
}

.footer__bottom {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 48px;
    padding-top: 24px;
    font-size: 13px;
}

/* Линия по ширине текста, а не контейнера с полями */
.footer__bottom::before {
    content: '';
    position: absolute;
    top: 0;
    right: var(--gutter);
    left: var(--gutter);
    height: 1px;
    background-color: var(--line-dark);
}

.footer__bottom a {
    color: var(--tuff);
    text-underline-offset: 3px;
}

@media (hover: hover) {

    .footer__nav a:hover,
    .footer__social a:hover {
        text-decoration: underline;
        text-underline-offset: 3px;
    }
}

/* ---------- Модальное окно ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 16px;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(58, 28, 20, .72);
}

.modal__window {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100vh - 32px);
    max-height: calc(100svh - 32px);
    padding: 40px 36px 32px;
    overflow-y: auto;
    background-color: var(--tuff);
    border-top: 6px solid var(--madder);
    border-radius: var(--radius);
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    background: none;
    border: 0;
}

.modal__title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    color: var(--madder);
}

.modal__subtitle {
    margin: 8px 0 24px;
    font-size: 16px;
    color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
    .modal:not([hidden]) .modal__window {
        animation: modal-in .25s var(--ease) both;
    }

    .modal:not([hidden]) .modal__overlay {
        animation: hero-fade .25s both;
    }
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

/* ---------- Лайтбокс ---------- */
.lightbox {
    --focus: var(--saffron);
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 88px;
    color: var(--tuff);
    background-color: rgba(36, 16, 11, .96);
}

.lightbox__figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}

.lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 170px);
    max-height: calc(100svh - 170px);
    object-fit: contain;
}

.lightbox__caption {
    margin-top: 14px;
    font-size: 15px;
    color: var(--on-dark-muted);
    text-align: center;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    display: grid;
    place-items: center;
    padding: 0;
    color: inherit;
    cursor: pointer;
    background: rgba(244, 225, 206, .08);
    border: 0;
    border-radius: 3px;
}

.lightbox__close {
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
}

.lightbox__nav {
    top: 50%;
    width: 56px;
    height: 56px;
    transform: translateY(-50%);
}

.lightbox__nav--prev {
    left: 16px;
}

.lightbox__nav--next {
    right: 16px;
}

@media (hover: hover) {

    .lightbox__close:hover,
    .lightbox__nav:hover {
        background-color: rgba(244, 225, 206, .18);
    }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .header__container {
        gap: 24px;
    }

    .nav__list {
        gap: 18px;
    }

    .tour {
        grid-template-columns: 220px minmax(0, 1fr) 160px;
        gap: 24px;
    }

    .timeline__item {
        grid-template-columns: 170px minmax(0, 240px) minmax(0, 1fr);
    }
}

/* Здесь меню уезжает в бургер: семь пунктов и кнопка уже не помещаются */
@media (max-width: 900px) {
    :root {
        --header-h: 64px;
    }

    .burger {
        display: block;
    }

    .header__cta {
        margin-left: auto;
    }

    /* z-index: -1 внутри контекста шапки: панель ложится поверх её фона,
       но под логотип, кнопку и бургер */
    .nav {
        position: fixed;
        inset: 0;
        z-index: -1;
        margin: 0;
        padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
        overflow-y: auto;
        color: var(--tuff);
        visibility: hidden;
        background-color: var(--umber);
        opacity: 0;
        transition: opacity .25s, visibility 0s .25s;
    }

    .nav.is-open {
        visibility: visible;
        opacity: 1;
        transition: opacity .25s;
    }

    .nav__list {
        flex-direction: column;
        gap: 2px;
    }

    .nav__link {
        padding: 6px 0;
        font-size: 44px;
        font-weight: 700;
    }

    .nav__link::after {
        display: none;
    }

    .nav__link.is-active {
        color: var(--saffron);
    }

    .header--menu-open {
        --focus: var(--saffron);
        color: var(--tuff);
        background-color: var(--umber);
        box-shadow: none;
    }

    .header--menu-open .header__cta {
        color: var(--madder);
        background-color: var(--tuff);
        border-color: var(--tuff);
    }

    .tour {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .tour__buy {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }

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

    .tour--feature .tour__buy {
        grid-column: auto;
    }

    .story__intro,
    .taste__feature,
    .contacts__container {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

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

    .taste__col:last-child {
        grid-column: 1 / -1;
    }

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

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

    .footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 17px;
    }

    .hero__title {
        font-size: clamp(50px, 14.5vw, 110px);
    }

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

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

    .sunrise__icon {
        grid-row: span 2;
        margin: 0;
    }

    .sunrise__time {
        font-size: 24px;
    }

    .sunrise__note {
        margin-top: 2px;
        font-size: 14px;
    }

    /* Шкала высот на телефоне не помещается: отметка встаёт строкой над названием яруса */
    .level__inner {
        padding-top: 40px;
        padding-bottom: 56px;
        padding-left: var(--gutter);
    }

    .level__inner::before {
        display: none;
    }

    .level__mark {
        position: static;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px 10px;
        width: auto;
        margin-bottom: 6px;
        padding: 0;
    }

    .level__mark::before {
        display: none;
    }

    .level__alt {
        margin: 0;
        font-size: 30px;
    }

    .tour,
    .tour--feature {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .tour__img {
        aspect-ratio: 16 / 10;
    }

    .tour__buy,
    .tour--feature .tour__buy {
        grid-column: auto;
        justify-content: space-between;
        margin-top: 4px;
    }

    .tour-list > li {
        padding: 36px 0;
    }

    .facts {
        gap: 10px 24px;
    }

    .plans {
        font-size: 14px;
    }

    .plans thead > tr > :first-child {
        width: 31%;
    }

    .plans thead th {
        padding: 0 8px 16px;
    }

    .plans tbody th {
        padding: 12px 8px 12px 0;
    }

    .plans tbody td,
    .plans tfoot td {
        padding-right: 8px;
        padding-left: 8px;
    }

    .plans__term {
        font-size: 12px;
    }

    .plans tfoot .btn {
        min-height: 44px;
        padding: 8px 4px;
        font-size: 17px;
        white-space: normal;
    }

    .story__collage {
        gap: 10px;
    }

    .timeline__item {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 20px 0;
    }

    .timeline__date {
        font-size: 26px;
    }

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

    .gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: clamp(120px, 34vw, 200px);
        gap: 8px;
    }

    .reviews__arrow {
        width: 46px;
        height: 46px;
    }

    .reviews__track {
        gap: 28px;
    }

    .review__text {
        font-size: 18px;
    }

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

    .contacts__list div {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .modal__window {
        padding: 36px 22px 24px;
    }

    .lightbox {
        padding: 64px 12px 96px;
    }

    .lightbox__nav {
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .lightbox__nav--prev {
        left: calc(50% - 64px);
    }

    .lightbox__nav--next {
        right: calc(50% - 64px);
    }
}

@media (max-width: 600px) {
    .section__head--row {
        align-items: flex-end;
    }

    /* Таблица программ на телефоне: название строки сверху, три значения под ним
       в тех же колонках, что и шапка с ценами. Роли ARIA в разметке сохраняют
       семантику таблицы при смене display. */
    .plans-wrap {
        overflow: visible;
    }

    .plans,
    .plans thead,
    .plans tbody,
    .plans tfoot {
        display: block;
    }

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

    .plans thead > tr > :first-child,
    .plans tfoot > tr > :first-child {
        display: none;
    }

    .plans thead th {
        width: auto;
        padding: 16px 8px;
    }

    .plans thead > tr > th:nth-child(2) {
        padding-left: 0;
    }

    .plans__name {
        font-size: 22px;
    }

    .plans__price {
        font-size: 30px;
    }

    .plans tbody th {
        grid-column: 1 / -1;
        padding: 14px 0 4px;
        font-weight: 600;
    }

    .plans tbody td {
        padding: 4px 8px 14px;
    }

    .plans tbody td:nth-child(2) {
        padding-left: 0;
    }

    .plans tfoot td {
        padding: 20px 4px 0;
    }

    .plans tfoot td:nth-child(2) {
        padding-left: 0;
    }

    .plans tfoot td:last-child {
        padding-right: 0;
    }

    .hero__actions .btn {
        flex: 1 1 auto;
    }

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

@media (max-width: 400px) {
    .header__container {
        gap: 8px;
    }

    .logo {
        gap: 8px;
    }

    .logo__text {
        font-size: 24px;
    }

    .header__cta {
        padding: 6px 12px;
        font-size: 17px;
    }

    .burger {
        margin-right: -8px;
    }
}

/* Невысокие телефоны (SE, mini, альбомная ориентация): первый экран ужимается,
   иначе кнопки и строка с рассветом уходят под нижнюю панель Safari */
@media (max-width: 900px) and (max-height: 700px) {
    .hero__inner {
        padding-top: calc(var(--header-h) + 16px);
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .hero__title {
        font-size: clamp(42px, 11vw, 72px);
    }

    .hero__foot {
        gap: 16px;
        margin-top: 16px;
        padding-top: 16px;
    }

    .hero__text {
        font-size: 15px;
        line-height: 1.5;
    }

    .hero__actions {
        margin-top: 14px;
    }

    /* Без JS строки со временем нет — тогда пояснение остаётся единственным текстом */
    .sunrise__time:not([hidden]) + .sunrise__note {
        display: none;
    }
}

/* ---------- Уменьшенное движение ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
    }
}
