/* =========================================================================
   PATAGONIA WANTED — design system
   National Geographic × экспедиционный журнал
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* — Тёмный лес — */
  --forest-900: #080f0b;   /* footer / самый тёмный */
  --forest-800: #0c1810;
  --forest-700: #122018;
  --forest-600: #1a3023;

  /* — Пергамент — */
  --parch-100: #faf8f3;
  --parch-200: #f5f1e8;
  --parch-300: #ece5d6;

  /* — Зелёные акценты — */
  --fern:   #568b68;
  --sage:   #3d6b4f;
  --lichen: #7aab8e;

  /* — Тёплый / песок — */
  --sand:   #b8956a;

  /* — Текст — */
  --ink:        #1c241e;   /* текст на пергаменте */
  --ink-soft:   #4a5650;
  --cream:      #e4dece;   /* текст на тёмном */
  --cream-soft: #a9b0a4;

  /* — Линии — */
  --line-dark:  rgba(228, 222, 206, 0.16);
  --line-light: rgba(28, 36, 30, 0.14);

  /* — Типографика — */
  --display: 'Playfair Display', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* — Раскладка — */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--parch-200);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

/* ============================ TYPOGRAPHY ================================= */

.display {
  font-family: var(--display);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.1; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 0;
}

.eyebrow--dark { color: var(--sage); }

.lede {
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.55;
  font-weight: 300;
}

.measure { max-width: 62ch; }
.measure-sm { max-width: 46ch; }

/* ============================ LAYOUT ===================================== */

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(72px, 11vh, 140px); }
.section--tight { padding-block: clamp(56px, 8vh, 96px); }

.section--dark  { background: var(--forest-800); color: var(--cream); }
.section--dark .eyebrow { color: var(--sand); }
.section--darker { background: var(--forest-900); color: var(--cream); }
.section--light { background: var(--parch-200); color: var(--ink); }
.section--cream { background: var(--parch-100); color: var(--ink); }

.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--parch-100); }

/* thin top rule used to open editorial sections */
.rule { height: 1px; background: var(--line-light); border: 0; margin: 0; }
.section--dark .rule { background: var(--line-dark); }

/* ============================ NAV ======================================= */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.nav__inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.nav.scrolled,
.nav--solid {
  background: rgba(8, 15, 11, 0.86);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-dark);
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--parch-100); }
.brand__mark {
  width: 30px; height: 30px; flex: 0 0 auto;
  border: 1.5px solid var(--lichen); border-radius: 50%;
  display: grid; place-items: center;
  position: relative;
}
.brand__mark::after {
  content: ""; width: 9px; height: 9px;
  background: var(--fern); border-radius: 50%;
}
.brand__name {
  font-family: var(--display); font-weight: 800; font-size: 18px;
  letter-spacing: 0.01em; line-height: 1;
}
.brand__name small {
  display: block; font-family: var(--mono); font-weight: 400;
  font-size: 9.5px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--lichen); margin-top: 3px;
}

.nav__links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-size: 14px; font-weight: 500; color: var(--cream);
  letter-spacing: 0.01em; position: relative; padding-block: 4px;
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--parch-100); }
.nav__links a.active { color: var(--lichen); }
.nav__links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--lichen);
}

.nav__cta { display: flex; align-items: center; gap: 14px; }

/* burger (mobile) */
.burger {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line-dark);
  background: transparent; border-radius: 6px; cursor: pointer;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.burger span { width: 18px; height: 1.5px; background: var(--cream); transition: .25s; }

/* ============================ BUTTONS =================================== */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 600; font-size: 14.5px;
  letter-spacing: 0.01em; line-height: 1;
  padding: 14px 26px; border-radius: 2px; cursor: pointer;
  border: 1px solid transparent; transition: all .22s ease; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }

.btn--primary { background: var(--fern); color: #fff; }
.btn--primary:hover { background: #4f8260; transform: translateY(-1px); box-shadow: 0 10px 26px -12px rgba(86,139,104,.8); }

.btn--ghost { background: transparent; color: var(--cream); border-color: var(--line-dark); }
.btn--ghost:hover { border-color: var(--lichen); color: var(--parch-100); }

.btn--ghost-dark { background: transparent; color: var(--ink); border-color: var(--line-light); }
.btn--ghost-dark:hover { border-color: var(--sage); color: var(--sage); }

.btn--lg { padding: 17px 34px; font-size: 15.5px; }

/* text link with arrow */
.tlink {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--sage); transition: gap .22s ease, color .22s ease;
}
.section--dark .tlink, .tlink--light { color: var(--lichen); }
.tlink:hover { gap: 15px; }
.tlink svg { width: 15px; height: 15px; }

/* ============================ PLACEHOLDERS ============================== */
/* Заглушки под реальные фото. Заменяются на <img> или background-image. */

.ph {
  position: relative; overflow: hidden;
  background-color: var(--forest-700);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(122,171,142,0.07) 0 2px,
      transparent 2px 16px);
  display: grid; place-items: center;
}
.ph--light {
  background-color: var(--parch-300);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(61,107,79,0.10) 0 2px,
      transparent 2px 16px);
}
.ph__tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--lichen);
  border: 1px dashed rgba(122,171,142,0.4); border-radius: 3px;
  padding: 7px 12px; background: rgba(8,15,11,0.35);
  text-align: center; max-width: 80%;
}
.ph--light .ph__tag {
  color: var(--sage); border-color: rgba(61,107,79,0.4);
  background: rgba(255,255,255,0.4);
}

/* ============================ HERO ===================================== */

.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--cream); overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media .ph { width: 100%; height: 100%; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top,
    rgba(8,15,11,0.97) 0%,
    rgba(8,15,11,0.74) 26%,
    rgba(8,15,11,0.40) 58%,
    rgba(8,15,11,0.18) 100%);
}
.hero__inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(56px, 9vh, 110px); padding-top: calc(var(--nav-h) + 40px); }
.hero h1 {
  font-weight: 900; color: var(--parch-100);
  font-size: clamp(42px, 7.2vw, 104px); line-height: 0.98; letter-spacing: -0.015em;
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
  max-width: 17ch;
}
.hero p.lede { color: var(--cream); margin-top: 26px; max-width: 54ch; text-shadow: 0 1px 20px rgba(0,0,0,0.5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 0;
  margin-top: 54px; border-top: 1px solid var(--line-dark);
}
.hero__meta .mi {
  padding: 18px 34px 0 0; margin-right: 34px;
  border-right: 1px solid var(--line-dark);
}
.hero__meta .mi:last-child { border-right: 0; }
.hero__meta .mi b {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: 26px; color: var(--parch-100); line-height: 1;
}
.hero__meta .mi span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cream-soft); margin-top: 7px; display: block;
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 3; font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--cream-soft);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--lichen), transparent);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { 0%,100%{opacity:.3; transform:scaleY(.6); transform-origin:top} 50%{opacity:1; transform:scaleY(1)} }

/* ============================ EXPEDITION CARDS ========================= */

.cards { display: grid; gap: 26px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }

.xcard {
  background: var(--forest-700); color: var(--cream);
  border: 1px solid var(--line-dark); border-radius: 4px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.xcard:hover { transform: translateY(-5px); border-color: rgba(122,171,142,0.4); box-shadow: 0 26px 50px -28px rgba(0,0,0,0.7); }
.xcard__media { aspect-ratio: 4/3; position: relative; }
.xcard__media .ph { position: absolute; inset: 0; }
.xcard__flag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  background: var(--sand); color: var(--forest-900); padding: 6px 11px; border-radius: 2px; font-weight: 500;
}
.xcard__body { padding: 28px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.xcard__tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--lichen); }
.xcard h3 { color: var(--parch-100); font-size: 26px; margin-top: 12px; line-height: 1.08; }
.xcard p { color: var(--cream-soft); font-size: 15px; line-height: 1.6; margin: 14px 0 0; }
.xcard__details { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-dark); }
.xcard__details span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--cream-soft); display: inline-flex; align-items: center; gap: 7px; }
.xcard__details span b { color: var(--lichen); font-weight: 500; }
.xcard__foot { margin-top: auto; padding-top: 22px; }

/* ============================ TOUR ROWS ================================ */

.trow { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.trow + .trow { margin-top: clamp(56px, 9vh, 120px); }
.trow--flip .trow__media { order: 2; }
.trow__media { aspect-ratio: 5/4; border-radius: 4px; overflow: hidden; }
.trow__media .ph { width: 100%; height: 100%; }
.trow__num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--sand); }
.trow h3 { font-size: clamp(28px, 3.4vw, 44px); margin-top: 16px; }
.trow p { margin-top: 18px; }

/* ============================ TIMELINE (Carretera) ==================== */

.tline { position: relative; margin-top: 56px; padding-left: 0; }
.tline::before {
  content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px;
  width: 1.5px; background: linear-gradient(var(--fern), var(--sand));
}
.tstop { position: relative; padding: 0 0 clamp(40px,6vh,64px) 56px; }
.tstop:last-child { padding-bottom: 0; }
.tstop::before {
  content: ""; position: absolute; left: 7px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--forest-800); border: 2.5px solid var(--fern);
}
.tstop__day { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sand); }
.tstop h4 { font-size: 24px; margin-top: 8px; color: var(--parch-100); }
.tstop p { color: var(--cream-soft); margin-top: 10px; font-size: 15px; max-width: 56ch; }
.tstop__km { float: right; font-family: var(--mono); font-size: 12px; color: var(--lichen); }

/* ============================ STAT STRIP ============================== */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border-block: 1px solid var(--line-dark); }
.stats .stat { background: var(--forest-800); padding: 38px 28px; text-align: center; }
.stat b { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 5vw, 60px); color: var(--parch-100); line-height: 1; display: block; }
.stat span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream-soft); margin-top: 12px; display: block; }

/* ============================ CTA ===================================== */

.cta {
  position: relative; overflow: hidden; text-align: center;
  color: var(--cream); padding-block: clamp(80px, 13vh, 150px);
}
.cta__media { position: absolute; inset: 0; z-index: 0; }
.cta__media .ph { width: 100%; height: 100%; }
.cta__overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(rgba(8,15,11,0.82), rgba(8,15,11,0.92)); }
.cta__inner { position: relative; z-index: 2; }
.cta h2 { color: var(--parch-100); font-size: clamp(34px, 5vw, 62px); max-width: 18ch; margin-inline: auto; }
.cta p { color: var(--cream); margin: 22px auto 0; max-width: 50ch; }
.cta .btn { margin-top: 38px; }
.cta__note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--cream-soft); margin-top: 18px; text-transform: uppercase; }

/* ============================ FOOTER ================================== */

.foot { background: var(--forest-900); color: var(--cream-soft); padding-block: clamp(56px, 8vh, 84px) 36px; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--lichen); margin: 0 0 18px; font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.foot a { font-size: 14.5px; color: var(--cream-soft); transition: color .2s; }
.foot a:hover { color: var(--parch-100); }
.foot__brand .brand { color: var(--parch-100); margin-bottom: 18px; }
.foot__brand p { font-size: 14.5px; line-height: 1.6; max-width: 34ch; }
.foot__bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: clamp(44px,7vh,72px); padding-top: 26px; border-top: 1px solid var(--line-dark); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--cream-soft); text-transform: uppercase; }

/* ============================ MOBILE ================================== */

.mobile-menu { display: none; }

@media (max-width: 900px) {
  .nav__links, .nav__cta .btn { display: none; }
  .burger { display: flex; }
  .cards--3, .cards--2 { grid-template-columns: 1fr; }
  .trow, .trow--flip .trow__media { grid-template-columns: 1fr; order: 0; }
  .trow__media { order: -1 !important; }
  .stats { grid-template-columns: 1fr 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot__brand { grid-column: 1 / -1; }

  .mobile-menu {
    position: fixed; inset: 0; z-index: 99; background: var(--forest-900);
    display: flex; flex-direction: column; justify-content: center;
    padding: var(--gutter); transform: translateX(100%); transition: transform .4s cubic-bezier(.4,0,.2,1);
  }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-menu a { font-family: var(--display); font-size: 30px; color: var(--parch-100); padding-block: 14px; border-bottom: 1px solid var(--line-dark); }
  .mobile-menu .btn { margin-top: 32px; align-self: flex-start; }
  .mobile-menu__close { position: absolute; top: 22px; right: var(--gutter); background: none; border: 0; color: var(--cream); font-size: 30px; cursor: pointer; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .hero__meta .mi { border-right: 0; padding-right: 0; margin-right: 0; flex: 1 1 45%; }
}
