/* =========================================================
   Mehari 4x4 Formentera — styles
   Mediterranean palette: turquoise/teal, warm sand, off-white,
   deep navy text.
   ========================================================= */

:root {
  --teal:       #1f9aa6;
  --teal-deep:  #14707a;
  --turquoise:  #38c5c9;
  --sand:       #e7d4b5;
  --sand-soft:  #f3e7d3;
  --offwhite:   #fbf8f2;
  --navy:       #11304a;
  --navy-soft:  #3a5468;
  --line:       rgba(17, 48, 74, 0.10);
  --shadow-sm:  0 2px 10px rgba(17, 48, 74, 0.07);
  --shadow-md:  0 12px 32px rgba(17, 48, 74, 0.12);
  --radius:     18px;
  --radius-lg:  26px;
  --maxw:       1140px;
  --ease:       cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--navy);
  background: var(--offwhite);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, "Times New Roman", serif; line-height: 1.1; margin: 0; }

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

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

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.container--narrow { max-width: 760px; }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tint { background: linear-gradient(180deg, var(--sand-soft), var(--offwhite)); }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin: 0 0 0.6rem;
}

.section__title { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 600; margin-bottom: 0.8rem; }
.section__intro { color: var(--navy-soft); max-width: 60ch; margin: 0 0 2.4rem; }

.lead { font-size: 1.18rem; color: var(--navy-soft); margin-top: 1.2rem; }
.replace-me { color: var(--navy-soft); }
.replace-me strong { color: var(--teal-deep); font-weight: 600; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.nav.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }

.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 14px clamp(20px, 5vw, 48px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.02rem; }
.nav__brand em { font-style: italic; color: var(--teal-deep); }
.nav__mark { color: var(--turquoise); font-size: 1.1rem; }

.nav__links { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav__links a {
  font-size: 0.94rem; font-weight: 500; color: var(--navy-soft);
  position: relative; padding: 4px 0; transition: color .2s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--turquoise); transition: width .25s var(--ease);
}
.nav__links a:hover { color: var(--navy); }
.nav__links a:hover::after { width: 100%; }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; padding: 8px; }
.nav__toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav__toggle span + span { margin-top: 5px; }
.nav__toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-active span:nth-child(2) { opacity: 0; }
.nav__toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.hero__media {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(56,197,201,.55), transparent 60%),
    linear-gradient(160deg, var(--teal) 0%, var(--teal-deep) 45%, var(--navy) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; letter-spacing: .04em;
  color: rgba(255,255,255,.82);
}
.hero__overlay {
  position: relative; z-index: 2;
  max-width: var(--maxw); width: 100%; margin-inline: auto;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 48px) clamp(56px, 8vw, 96px);
}
.hero::after { /* legibility scrim */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(17,48,74,.55) 0%, rgba(17,48,74,.10) 45%, transparent 75%);
}
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: .8rem; font-weight: 600;
  margin: 0 0 1rem; color: rgba(255,255,255,.9);
}
.hero__title { font-size: clamp(2.6rem, 8vw, 5.4rem); font-weight: 700; text-shadow: 0 2px 24px rgba(17,48,74,.35); }
.hero__subtitle { font-size: clamp(1.05rem, 2.4vw, 1.4rem); max-width: 38ch; margin: 1rem 0 2rem; color: rgba(255,255,255,.95); }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn--primary { background: #fff; color: var(--navy); box-shadow: var(--shadow-md); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 22px; z-index: 3;
  transform: translateX(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4);
  color: #fff; font-size: 1.1rem; animation: bob 2.2s var(--ease) infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

/* =========================================================
   PLACEHOLDERS
   ========================================================= */
.placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 1.5rem;
  color: var(--teal-deep);
  font-weight: 500; font-size: .95rem; letter-spacing: .02em;
  background:
    repeating-linear-gradient(45deg, rgba(31,154,166,.06) 0 12px, rgba(31,154,166,.02) 12px 24px),
    var(--sand-soft);
  border: 2px dashed rgba(31,154,166,.45);
  border-radius: var(--radius);
}
.placeholder--hero { border: none; border-radius: 0; }
.placeholder--map { aspect-ratio: 16 / 9; }
.placeholder--route { aspect-ratio: 4 / 3; border-radius: var(--radius) var(--radius) 0 0; }
.placeholder--gallery { height: 100%; min-height: 200px; }

/* =========================================================
   WHERE WE STAYED
   ========================================================= */
.stay { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; margin-top: 1.5rem; }
.stay__map { box-shadow: var(--shadow-md); }
.stay__text h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: .6rem; }
.facts { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.facts li {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 16px; font-weight: 600; color: var(--navy); box-shadow: var(--shadow-sm);
}
.facts span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--teal-deep); font-weight: 600; }

/* =========================================================
   CARDS (routes)
   ========================================================= */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.5vw, 28px); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__body { padding: 20px 22px 24px; }
.card__title { font-size: 1.25rem; font-weight: 600; margin-bottom: .35rem; }
.card__meta { font-size: .9rem; color: var(--navy-soft); margin: 0 0 .7rem; }
.card__meta span { color: var(--teal-deep); font-weight: 600; }
.card__notes { font-size: .95rem; margin: 0; }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}
.gallery__tile { border-radius: var(--radius); overflow: hidden; }
.gallery__tile--tall { grid-row: span 2; }
.gallery__tile--wide { grid-column: span 2; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--navy); color: rgba(255,255,255,.85); padding: 40px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer__brand { font-weight: 600; color: #fff; margin: 0; }
.footer__note { margin: 0; font-size: .9rem; color: rgba(255,255,255,.6); }
.footer__top { font-size: .9rem; color: var(--turquoise); font-weight: 600; }
.footer__top:hover { color: #fff; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stay { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery__tile--wide { grid-column: span 2; }
}

@media (max-width: 680px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--offwhite); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden;
    transition: max-height .3s var(--ease);
  }
  .nav__links.is-open { max-height: 340px; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 14px clamp(20px,5vw,48px); }
  .nav__links a::after { display: none; }

  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery__tile--tall { grid-row: span 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}
