/* =========================================================
   MONTERRA GROUP — stile
   Palette: #1f1f1f · #6e6e6e · #c7b79c · #f4f1eb · #314238 · #9a6a3a
   ========================================================= */

@font-face {
  font-family: "Bastaman";
  src: url("../assets/fonts/Bastaman.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #1f1f1f;
  --grey: #6e6e6e;
  --sand: #c7b79c;
  --cream: #f4f1eb;
  --forest: #314238;
  --earth: #9a6a3a;

  --bg: var(--cream);
  --line: rgba(31, 31, 31, 0.14);

  --f-display: "Bastaman", "Arial Black", sans-serif;
  --f-body: "DM Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --max: 1360px;
  --space: clamp(80px, 12vw, 180px);
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(16px, 1.1vw, 18px);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
figure { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }

/* ---------- utility ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space); }

.eyebrow {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--earth);
  margin-bottom: 28px;
}

.display {
  font-family: var(--f-display);
  font-size: clamp(40px, 7vw, 112px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--forest);
}

.title {
  font-family: var(--f-display);
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--forest);
}

.lead { font-size: clamp(20px, 1.7vw, 26px); line-height: 1.4; font-weight: 400; color: var(--ink); }
.muted { color: var(--grey); }

.tags {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  line-height: 1.9;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 120px);
  align-items: start;
}

.full-bleed img { width: 100%; height: clamp(360px, 70vh, 820px); object-fit: cover; }
.full-bleed--tall { position: relative; background: var(--forest); }
.full-bleed--tall img {
  height: clamp(420px, 92vh, 1000px);
  /* toni più caldi e meno saturi, in linea con la palette */
  filter: saturate(.62) sepia(.18) contrast(1.04) brightness(.94);
}
/* sfumatura dal verde della sezione Metodo verso la foto */
.full-bleed--tall::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 45%;
  background: linear-gradient(180deg,
    var(--forest) 0%,
    rgba(49, 66, 56, .85) 22%,
    rgba(49, 66, 56, .45) 55%,
    rgba(49, 66, 56, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 16px 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background .3s, color .3s, border-color .3s;
}
.btn-light { background: var(--cream); color: var(--forest); border-color: var(--cream); }
.btn-light:hover { background: var(--sand); border-color: var(--sand); }
.btn-ghost { color: var(--cream); }
.btn-ghost:hover { background: var(--cream); color: var(--forest); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--forest);
  border-bottom: 1px solid var(--forest);
  padding-bottom: 6px;
}
.link-arrow::after { content: "→"; transition: transform .3s; }
.link-arrow:hover::after { transform: translateX(6px); }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  color: var(--cream);
  transition: background .4s, color .4s, box-shadow .4s;
}
.site-header.is-solid {
  background: rgba(244, 241, 235, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--forest);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand-name {
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav { display: flex; gap: clamp(20px, 2.6vw, 40px); align-items: center; }
.nav a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .9;
}
.nav a:hover { opacity: 1; }
.nav-cta { border: 1px solid currentColor; padding: 10px 18px; border-radius: 999px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 0;
  color: inherit; cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor;
  transition: transform .3s, top .3s;
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 26px; }
.nav-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 14s ease-out forwards;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(31,31,31,.35) 0%, rgba(31,31,31,0) 30%, rgba(31,31,31,.15) 55%, rgba(31,42,36,.78) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--max); margin-inline: auto;
  padding: calc(var(--header-h) + clamp(48px, 10vh, 120px)) var(--gutter) clamp(48px, 9vh, 110px);
}
.hero .eyebrow { color: var(--sand); }
.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(36px, 7.4vw, 120px);
  line-height: 0.88;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.hero-lead { max-width: 560px; font-size: clamp(17px, 1.3vw, 20px); font-weight: 700; }
.hero .tags { color: var(--sand); margin-bottom: 36px; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

@keyframes heroZoom { to { transform: scale(1); } }

/* ---------- intro ---------- */
.intro .split { padding-bottom: var(--space); }
.intro-text p:not(.lead) { color: var(--grey); max-width: 520px; }
.intro-text .signature {
  margin-top: 36px;
  font-family: var(--f-display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--earth);
}
.intro { padding-bottom: 0; }

/* ---------- services ---------- */
.services { padding-bottom: calc(var(--space) * .6); }
.service {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 96px);
  margin-bottom: clamp(80px, 10vw, 160px);
  padding-right: var(--gutter);
}
.service--rev { grid-template-columns: 1fr 1.45fr; padding-right: 0; padding-left: var(--gutter); }
.service--rev .service-media { order: 2; }
.service-media { overflow: hidden; }
.service-media img {
  width: 100%;
  height: clamp(360px, 80vh, 860px);
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.service:hover .service-media img { transform: scale(1.03); }
.service-body { max-width: 520px; }
.num {
  display: block;
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: .2em;
  color: var(--earth);
  margin-bottom: 18px;
}
.service h3 {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.2vw, 52px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 28px;
}
.service-body > p:first-of-type { font-size: clamp(18px, 1.4vw, 22px); line-height: 1.45; }
.service .tags { padding-top: 18px; border-top: 1px solid var(--line); margin-top: 24px; }

/* ---------- method ---------- */
.method {
  background: var(--forest);
  color: var(--cream);
  padding-block: var(--space);
}
.method .display { color: var(--cream); margin-bottom: 48px; }
.method-intro { max-width: 620px; margin-bottom: clamp(64px, 8vw, 120px); }
.method-intro .lead { color: var(--cream); }
.method-intro p:not(.lead) { color: var(--sand); }

.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(64px, 8vw, 110px);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid rgba(244,241,235,.25);
}
.steps li {
  position: relative;
  padding: 28px 12px 0 0;
  font-family: var(--f-display);
  font-size: clamp(13px, 1.15vw, 18px);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.steps li::before {
  content: "";
  position: absolute; top: -5px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--earth);
}
.steps li span {
  display: block;
  font-family: var(--f-body);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--sand);
  margin-bottom: 10px;
}
.method-outro { max-width: 720px; margin-left: auto; font-size: clamp(18px, 1.5vw, 24px); line-height: 1.5; color: var(--cream); }

/* ---------- feature (trail / destination) ---------- */
.feature-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
}
.feature-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(31,31,31,0) 45%, rgba(31,42,36,.75) 100%);
}
.feature-hero-text {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--max); margin-inline: auto;
  padding: 0 var(--gutter) clamp(48px, 9vh, 110px);
}
.feature-hero-text .eyebrow { color: var(--sand); }
.feature-hero-text .display { color: var(--cream); margin-bottom: 24px; }
.feature-hero-text p:last-child { max-width: 480px; opacity: .92; }

.feature .split p:not(.lead) { color: var(--grey); }

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1vw, 16px);
  padding-inline: clamp(8px, 1vw, 16px);
}
.gallery img { width: 100%; height: clamp(420px, 95vh, 1100px); object-fit: cover; }
.gallery img:nth-child(2) { margin-top: clamp(24px, 5vw, 80px); }

.lists { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 120px); }
.list-title {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--earth);
  margin-bottom: 20px;
}
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(18px, 1.5vw, 24px);
  color: var(--forest);
}
.list li:first-child { border-top: 1px solid var(--line); }

/* destination */
.feature--sand { background: #ebe4d8; }
.feature--sand .section:first-child { padding-bottom: calc(var(--space) * .6); }
.statement {
  margin-top: 48px;
  max-width: 820px;
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.3;
  color: var(--ink);
}
.statement em { font-style: normal; color: var(--earth); }

.system-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 120px);
  align-items: center;
}
.system-media img { width: 100%; height: clamp(420px, 85vh, 900px); object-fit: cover; }
.system .title { margin-bottom: 36px; }
.system-flow {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  counter-reset: flow;
}
.system-flow li {
  position: relative;
  padding: 0 0 22px 36px;
  font-family: var(--f-display);
  font-size: clamp(15px, 1.3vw, 20px);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--forest);
}
.system-flow li::before {
  content: "";
  position: absolute; left: 4px; top: 6px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--earth);
  background: #ebe4d8;
  z-index: 1;
}
.system-flow li:not(:last-child)::after {
  content: "";
  position: absolute; left: 9px; top: 18px; bottom: 0;
  width: 1.5px;
  background: var(--sand);
}
.system-flow li:last-child::before { background: var(--earth); }

.partners { padding-bottom: var(--space); }
.partner-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.partner-list li {
  padding: 12px 22px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  font-size: 15px;
  color: var(--forest);
}

/* ---------- contact ---------- */
.contact {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  color: var(--cream);
  overflow: hidden;
}
.contact > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.contact::after { content: ""; position: absolute; inset: 0; background: rgba(31,42,36,.55); }
.contact-content { position: relative; z-index: 1; padding-block: var(--space); }
.contact .eyebrow { color: var(--sand); }
.contact .display { color: var(--cream); margin-bottom: 28px; }
.contact p { font-size: clamp(17px, 1.4vw, 22px); margin-bottom: 40px; }

/* ---------- footer ---------- */
.site-footer { padding-top: clamp(64px, 8vw, 120px); background: var(--cream); }
.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-bottom: 64px;
}
.footer-logo { width: 110px; height: auto; }
.footer-claim {
  font-family: var(--f-display);
  font-size: clamp(22px, 2vw, 30px);
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 8px;
}
.footer-nav { display: grid; gap: 8px; }
.footer-nav a, .footer-bottom a { text-decoration: none; color: var(--grey); font-size: 14px; }
.footer-nav a:hover, .footer-bottom a:hover { color: var(--forest); }
.footer-bottom {
  display: flex; justify-content: space-between;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--grey);
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-img { animation: none; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .split, .lists, .system-wrap { grid-template-columns: 1fr; }
  .service, .service--rev { grid-template-columns: 1fr; padding: 0; gap: 32px; }
  .service--rev .service-media { order: 0; }
  .service-body { padding-inline: var(--gutter); max-width: none; }
  .service-media img { height: clamp(320px, 70vh, 640px); }

  .steps { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid rgba(244,241,235,.25); margin-left: 4px; }
  .steps li { padding: 0 0 26px 28px; }
  .steps li::before { top: 4px; left: -5px; }
  .steps li span { display: inline; margin: 0 14px 0 0; }

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

@media (max-width: 820px) {
  .nav-toggle { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; gap: 28px;
    background: var(--forest); color: var(--cream);
    opacity: 0; visibility: hidden;
    transition: opacity .35s, visibility .35s;
  }
  .nav a { font-size: 18px; }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav-open .site-header { color: var(--cream); background: transparent; box-shadow: none; backdrop-filter: none; }
  .nav-open { overflow: hidden; }
  .brand { position: relative; z-index: 2; }
}

@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: 80vh; }
  .gallery img:nth-child(2) { margin-top: 0; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .btn { padding: 14px 22px; }
}

.btn-mail { text-transform: none; letter-spacing: 0.04em; font-size: 15px; }

/* inquadratura: mostra la parte alta della foto (es. testa del rider) */
.pos-top { object-position: 50% 12%; }

/* titolo intro: più piccolo, "Il territorio" su una riga */
.intro-title { font-size: clamp(34px, 5vw, 82px); line-height: 1; }

/* Destination Development: foto orizzontale larga (furgone + rimorchio),
   mostrata intera in 3:2 senza tagliare i lati */
.service-media img.pos-trailer { height: auto; aspect-ratio: 3 / 2; }

/* Trail: testo e galleria ravvicinati, stile articolo editoriale */
.trail-text { padding-bottom: clamp(32px, 4vw, 64px); }

/* titoli delle liste Trail in grassetto */
.lists .list-title { font-weight: 700; }

/* Trail: la prima foto della galleria sale fino alla fine del testo a destra */
@media (min-width: 961px) {
  .trail-text + .gallery img:first-child { margin-top: calc(-1 * clamp(32px, 4vw, 64px)); }
}

/* respiro tra la foto del Metodo e l'hero Trail */
.full-bleed--tall { margin-bottom: clamp(24px, 4vw, 64px); }

/* hero Trail: il cielo sfuma verso lo sfondo chiaro */
#trail .feature-hero::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 35%;
  background: linear-gradient(180deg, var(--cream) 0%, rgba(244, 241, 235, .7) 30%, rgba(244, 241, 235, 0) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Contatti: la foto sfuma dallo sfondo sabbia della sezione Destination */
.contact::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 35%;
  background: linear-gradient(180deg, #ebe4d8 0%, rgba(235, 228, 216, .7) 30%, rgba(235, 228, 216, 0) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Lavoriamo con + Contatti: meno spazio vuoto */
.partners { padding-top: clamp(40px, 5vw, 80px); padding-bottom: clamp(32px, 4vw, 56px); }
.contact { min-height: 75vh; }
.contact::before { height: 25%; }
.contact-content { padding-block: clamp(96px, 10vw, 140px) clamp(64px, 8vw, 120px); }

/* "Trail & Outdoor Infrastructure": spostato a destra, sopra la parte scura della collina */
@media (min-width: 601px) {
  #trail .feature-hero-text .eyebrow { margin-left: clamp(80px, 14vw, 240px); }
}
