/* putnik.watch/archive/ — «Пройденные маршруты»: распроданные серии «Путника».
   Каждая серия — глава со свечением цвета циферблата, штамп «Распродано», шкала тиража. */
.arch {
  --sand: #cfb089;
  --sand-l: #e6d2b3;
  --muted: #a99d8c;
  position: relative;
  overflow-x: clip;
  margin-top: calc(-1 * clamp(1.25rem, 0.6818181818rem + 2.8409090909vw, 2.8125rem));
}
.arch-kicker {
  display: flex; align-items: center; gap: .75rem;
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sand);
}
.arch-kicker::before { content: ""; width: 2.5rem; height: 1px; background: currentColor; }

/* первый экран */
.arch-hero {
  position: relative;
  padding: clamp(1.5rem, 3vw, 3rem) 0 clamp(1rem, 2vw, 2rem);
}
.arch-hero__kicker::before { content: none; }
/* карта России справа от заголовка, края растворяются */
.arch-hero__geo {
  position: absolute; z-index: -1; right: -4%; top: 44%;
  width: min(1180px, 86%); aspect-ratio: 2870 / 1618;
  transform: translateY(-50%);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 60%, transparent 100%);
}
.arch-hero__map {
  position: absolute; inset: 0;
  background: url(../img/dunes/rus.webp) center / 100% 100% no-repeat;
  opacity: .22; filter: grayscale(1) brightness(1.4);
}
.arch-hero__title {
  margin: 1.5rem 0 0;
  font-family: "Bahnschrift", sans-serif; font-weight: 700;
  font-size: clamp(42px, 8.4vw, 132px); line-height: .92; text-transform: uppercase; color: #fff;
}
.arch-hero__title span { display: block; color: var(--sand-l); }
.arch-hero__lead { max-width: 34em; margin-top: clamp(1.25rem, 2vw, 2rem); font-size: clamp(1rem, .9rem + .3vw, 1.25rem); line-height: 1.5; color: #d8d0c4; }
.arch-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: clamp(2rem, 4vw, 3.5rem); }
.arch-stats__item { padding-right: clamp(1.25rem, 3vw, 3rem); margin-right: clamp(1.25rem, 3vw, 3rem); border-right: 1px solid rgba(207, 176, 137, .3); }
.arch-stats__item:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.arch-stats__num { display: block; font-family: "Bahnschrift", sans-serif; font-weight: 700; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.75rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.arch-stats__label { display: block; margin-top: .5rem; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* лента-оглавление серий */
.arch-strip { display: flex; gap: clamp(.5rem, 1.5vw, 1rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.arch-strip__item {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem .875rem .625rem .625rem;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 4px;
  color: #fff; text-decoration: none;
  transition: border-color .3s ease, background-color .3s ease;
}
.arch-strip__item:hover, .arch-strip__item:focus-visible { border-color: var(--accent); background: rgba(255, 255, 255, .04); outline: none; }
.arch-strip__dot { flex: 0 0 auto; width: .75rem; height: .75rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.arch-strip__name { font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* глава серии */
.arch-model {
  position: relative;
  padding: clamp(2rem, 4.5vw, 4rem) 0;
  scroll-margin-top: 4rem;
}
.arch-model::before {   /* свечение цвета циферблата — разгорается, когда глава на экране */
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: 50%; width: min(1400px, 140vw); height: 100%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 50% 45% at var(--glow-x, 30%) 50%, var(--accent), transparent 70%);
  opacity: 0; transition: opacity 1.4s ease;
  pointer-events: none;
}
.arch-model.is-on::before { opacity: var(--glow, .22); }
.arch-model + .arch-model { border-top: 1px solid rgba(255, 255, 255, .06); }
.arch-hero + .arch-model { padding-top: clamp(1rem, 2vw, 2rem); }   /* первая глава — сразу под лентой серий */
.arch-model__row { display: flex; align-items: center; gap: clamp(2rem, 6vw, 7rem); }
.arch-model_rev .arch-model__row { flex-direction: row-reverse; }
.arch-model_rev { --glow-x: 70%; }

.arch-model__media { position: relative; flex: 0 0 46%; }
.arch-model__media img {
  display: block; width: 100%; height: auto;
  transform: translateY(24px) scale(.97); opacity: 0;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1), opacity 1.2s ease;
  /* у студийных фото тёмно-серый фон с краем — растворяем его в чёрном */
  -webkit-mask-image: radial-gradient(ellipse 58% 58% at 50% 50%, black 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 58% 58% at 50% 50%, black 62%, transparent 100%);
}
.arch-model.is-seen .arch-model__media img { transform: none; opacity: 1; }

/* штамп «Распродано» — отметка в паспорте путешественника */
.arch-stamp {
  position: absolute; right: 2%; bottom: 14%; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .25rem;
  padding: .75rem 1.25rem .625rem;
  border: 3px double var(--stamp, var(--accent));
  border-radius: 6px;
  color: var(--stamp, var(--accent));
  font-family: "Bahnschrift", sans-serif; text-transform: uppercase; text-align: center;
  transform: rotate(-12deg) scale(1.8); opacity: 0;
  filter: url(#arch-ink);
  mix-blend-mode: screen;
  pointer-events: none;
}
.arch-stamp__main { font-weight: 700; font-size: clamp(1.25rem, .9rem + 1.2vw, 2rem); letter-spacing: .12em; line-height: 1; }
.arch-stamp__sub { font-size: .6875rem; letter-spacing: .2em; opacity: .85; }
.arch-model.is-seen .arch-stamp { animation: arch-stamp .45s cubic-bezier(.3, 1.6, .5, 1) .9s forwards; }
@keyframes arch-stamp {
  0% { transform: rotate(-12deg) scale(1.8); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: rotate(-12deg) scale(1); opacity: .92; }
}

.arch-model__text { flex: 1 1 auto; min-width: 0; max-width: 34rem; }
.arch-model__theme { color: var(--accent-text, var(--accent)); }
.arch-model__theme::before { content: none; }
.arch-model__name {
  margin: 1rem 0 0;
  font-family: "Bahnschrift", sans-serif; font-weight: 700;
  font-size: clamp(40px, 5.6vw, 88px); line-height: .95; text-transform: uppercase; color: #fff;
}
.arch-model__descr { margin-top: 1.5rem; font-size: 1rem; line-height: 1.6; color: #cfc6b9; }
.arch-model__facts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.arch-model__fact {
  padding: .4rem .75rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 50px;
  font-size: .75rem; letter-spacing: .06em; color: #e7e1d8;
}

/* шкала тиража: заполняется при появлении */
.arch-count { margin-top: 2.25rem; }
.arch-count__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.arch-count__num { font-family: "Bahnschrift", sans-serif; font-weight: 700; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.arch-count__num small { font-size: .5em; font-weight: 400; color: var(--muted); }
.arch-count__label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: right; }
.arch-count__bar { position: relative; height: 2px; margin-top: .875rem; background: rgba(255, 255, 255, .1); overflow: hidden; }
.arch-count__bar::after {
  content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(0);
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  transition: transform 1.6s cubic-bezier(.3, .7, .2, 1) .3s;
}
.arch-model.is-seen .arch-count__bar::after { transform: scaleX(1); }

/* следующий маршрут */
.arch-next { position: relative; isolation: isolate; overflow: hidden; padding: clamp(2rem, 4.5vw, 4rem) 0 clamp(4rem, 8vw, 7rem); text-align: center; }
.arch-next__dunes {   /* живые дюны с /putnik1/ (js/dunes-bg.js); сверху растворяются в чёрном */
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.6s ease; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 30%);
          mask-image: linear-gradient(to bottom, transparent 0, black 30%);
}
.arch-next__dunes.is-ready { opacity: 1; }
.arch-next__dunes.dunes-storm { background: transparent; }
.arch-next .arch-kicker { justify-content: center; }
.arch-next .arch-kicker::after { content: ""; width: 2.5rem; height: 1px; background: currentColor; }
.arch-next__title { margin: 1rem 0 0; font-family: "Bahnschrift", sans-serif; font-weight: 700; font-size: clamp(40px, 6.6vw, 104px); line-height: .95; text-transform: uppercase; color: #fff; }
.arch-next__text { max-width: 32em; margin: 1.25rem auto 0; color: #d8d0c4; line-height: 1.55; }
.arch-next__watch { width: min(300px, 62vw); margin: clamp(1.5rem, 3vw, 2.5rem) auto 0; }   /* идущие часы: include/dunes-watch.php */
.arch-next__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: clamp(2rem, 4vw, 3rem); }
.arch-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3.25rem; padding: 0 2.5rem; min-width: 15rem;
  border-radius: 4px; border: 1px solid var(--sand);
  font-size: .875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.arch-btn_full { background: var(--sand); color: #16110b; }
.arch-btn_full:hover { background: #dcc29e; border-color: #dcc29e; color: #16110b; }

/* планшет и телефон: главы в одну колонку */
@media only screen and (max-width: 820px) {
  .arch-strip { flex-wrap: wrap; }
  .arch-strip__item { flex: 1 1 calc(50% - .5rem); }
  .arch-model__row, .arch-model_rev .arch-model__row { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .arch-model__media { flex-basis: auto; width: min(100%, 520px); margin: 0 auto; }
  .arch-model, .arch-model_rev { --glow-x: 50%; }
  .arch-model::before { top: 30%; height: 70%; }
  .arch-stamp { right: 0; bottom: 8%; }
}

/* телефон */
@media only screen and (max-width: 576px) {
  .arch-stats { flex-wrap: nowrap; }
  .arch-stats__item { flex: 1 1 0; min-width: 0; padding-right: .75rem; margin-right: .75rem; }
  .arch-stats__label { font-size: .625rem; letter-spacing: .08em; }
  .arch-strip__name { white-space: normal; font-size: .6875rem; letter-spacing: .04em; }
  .arch-btn { width: 100%; min-width: 0; }
  /* карта за заголовком, шире экрана */
  .arch-hero__geo { right: -45%; top: 30%; width: 150%; }
}

@media (prefers-reduced-motion: reduce) {
  .arch-model__media img { transform: none; opacity: 1; transition: none; }
  .arch-model .arch-stamp { animation: none; transform: rotate(-12deg); opacity: .92; }
  .arch-count__bar::after { transition: none; transform: scaleX(1); }
}
