/* ==========================================================================
   Adam Akaaboune - Travel Site
   Hand-written CSS. No framework, no build step.
   Visual direction: "sun-bleached Mediterranean" editorial.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  --ink:       #16233a;
  --ink-2:     #41506b;
  --ink-3:     #6b7893;
  --bone:      #f7f2e9;
  --bone-2:    #efe6d8;
  --line:      #ded3c1;
  --clay:      #be5a3b;
  --clay-2:    #9a4327;
  --saffron:   #dfa33d;
  --chaouen:   #2b6e8f;
  --white:     #fffdf9;

  --display: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --radius: 3px;
  --shadow: 0 18px 40px -22px rgba(22, 35, 58, .45);
}

/* --- 2. Reset / base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  overflow-x: hidden;              /* belt-and-braces against 375px overflow */
}

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

a { color: var(--clay-2); text-underline-offset: .18em; }
a:hover { color: var(--clay); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.2rem); }
h2 { font-size: clamp(1.85rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2rem); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--ink); color: var(--white); padding: .7rem 1.1rem;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* --- 3. Shared header / nav ---------------------------------------------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bone);
}
.site-head__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem 1.5rem; padding-block: 1.15rem;
}
.brand { display: flex; align-items: baseline; gap: .6rem; text-decoration: none; }
.brand__mark {
  font-family: var(--display); font-size: 1.5rem; font-weight: 700;
  color: var(--clay); letter-spacing: -.03em;
}
.brand__name {
  font-family: var(--display); font-size: 1.22rem; font-weight: 600;
  color: var(--ink); letter-spacing: -.01em;
}
.brand__sub {
  display: block; font-family: var(--sans); font-size: .62rem; font-weight: 600;
  letter-spacing: .19em; text-transform: uppercase; color: var(--ink-3);
  margin-top: .18rem;
}

.nav { display: flex; flex-wrap: wrap; gap: .15rem .35rem; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: .42rem .78rem; text-decoration: none;
  font-size: .8rem; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-2);
  border: 1px solid transparent; border-radius: var(--radius);
}
.nav a:hover { color: var(--clay-2); background: var(--bone-2); }

/* Active-page highlight driven purely by <body data-page>, so the header
   markup stays byte-identical across all four pages. No JS involved. */
body[data-page="home"]         .nav a[href="index.html"],
body[data-page="destinations"] .nav a[href="destinations.html"],
body[data-page="about"]        .nav a[href="about.html"],
body[data-page="contact"]      .nav a[href="contact.html"] {
  color: var(--clay-2);
  border-color: var(--line);
  background: var(--white);
}

/* --- 4. Shared footer ---------------------------------------------------- */
.site-foot {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  background: var(--ink); color: #c9d2e2;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  font-size: .93rem;
}
.site-foot a { color: var(--saffron); }
.site-foot a:hover { color: #f2c778; }
.site-foot__grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.site-foot h4 {
  color: var(--white); font-family: var(--sans); font-size: .7rem; font-weight: 700;
  letter-spacing: .19em; text-transform: uppercase; margin-bottom: .85rem;
}
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .4rem; }
.site-foot__sig {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.16);
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; justify-content: space-between;
  font-size: .87rem;
}
.site-foot__name { font-family: var(--display); font-size: 1.05rem; color: var(--white); }

/* --- 5. Section furniture ------------------------------------------------ */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }

.eyebrow {
  display: flex; align-items: center; gap: .7rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--clay); margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 2.2rem; height: 2px; background: var(--clay); flex: none;
}
.lede { font-size: clamp(1.1rem, 1.9vw, 1.32rem); line-height: 1.6; color: var(--ink-2); }
.measure { max-width: 68ch; }

.rule { border: 0; border-top: 1px solid var(--line); margin-block: clamp(2rem, 5vw, 3.5rem); }

/* --- 6. Hero ------------------------------------------------------------- */
.hero { position: relative; background: var(--bone-2); }
.hero__media { position: relative; height: clamp(340px, 56vw, 560px); overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,35,58,.15) 0%, rgba(22,35,58,.55) 100%);
}
.hero__card {
  position: relative; z-index: 2; margin-top: -5.5rem;
  background: var(--bone); border: 1px solid var(--line);
  padding: clamp(1.6rem, 4vw, 2.75rem);
  max-width: 46rem; box-shadow: var(--shadow);
}
.hero__card h1 { margin-bottom: .35em; }

/* --- 7. Cards / grids ---------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden;
}
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card__num {
  font-family: var(--display); font-size: 2.1rem; line-height: 1;
  color: var(--bone-2); -webkit-text-stroke: 1px var(--clay); margin-bottom: -.4rem;
}
.card h3 { margin: 0; }
.card p { font-size: .97rem; color: var(--ink-2); }
.card .btn { margin-top: auto; align-self: flex-start; }

/* --- 8. Figures / split blocks ------------------------------------------ */
figure { margin: 0; }
figcaption {
  font-size: .74rem; color: var(--ink-3); padding-top: .45rem; line-height: 1.45;
}
figcaption a { color: var(--ink-3); }

.split {
  display: grid; gap: var(--gap); align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.split--offset img { box-shadow: var(--shadow); }

.band { background: var(--bone-2); border-block: 1px solid var(--line); }

/* --- 9. Buttons ---------------------------------------------------------- */
.btn {
  display: inline-block; border: 1px solid var(--clay); background: var(--clay);
  color: var(--white); text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  padding: .78rem 1.4rem; border-radius: var(--radius);
  transition: background .16s ease, color .16s ease;
}
.btn:hover { background: var(--clay-2); border-color: var(--clay-2); color: var(--white); }
.btn--ghost { background: transparent; color: var(--clay-2); }
.btn--ghost:hover { background: var(--clay); color: var(--white); }
.btn--dark { background: var(--ink); border-color: var(--ink); }
.btn--dark:hover { background: #0e1728; border-color: #0e1728; }

/* --- 10. Slideshow (interactive #1) -------------------------------------- */
.slideshow { position: relative; border: 1px solid var(--line); background: var(--ink); }
.slideshow__frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .45s ease;
}
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(10,16,28,0) 0%, rgba(10,16,28,.88) 65%);
  color: #f3ece0; padding: 3rem 1.1rem .9rem; font-size: .84rem;
}
.slide figcaption b { display: block; font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.slide figcaption span { color: #b9c3d4; font-size: .72rem; }

.sl-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 3rem; height: 3rem; border: 0; cursor: pointer;
  background: rgba(247,242,233,.9); color: var(--ink);
  font-size: 1.6rem; line-height: 1; display: grid; place-items: center;
}
.sl-btn:hover { background: var(--white); color: var(--clay); }
.sl-prev { left: .6rem; }
.sl-next { right: .6rem; }

.slideshow__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem .9rem; background: var(--ink); color: #b9c3d4; font-size: .78rem;
}
.sl-dots { display: flex; gap: .45rem; }
.sl-dot {
  width: .62rem; height: .62rem; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255,255,255,.32); cursor: pointer;
}
.sl-dot.is-active { background: var(--saffron); }
.sl-counter { font-variant-numeric: tabular-nums; letter-spacing: .1em; }

/* --- 11. Embeds: YouTube + Google Map (interactive #2 and #3) ------------ */
.embed {
  position: relative; width: 100%; border: 1px solid var(--line);
  background: var(--ink); overflow: hidden;
}
.embed::before { content: ""; display: block; padding-top: 56.25%; }
.embed--map::before { padding-top: 66%; }
.embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}

/* --- 12. Budget estimator (interactive #4) ------------------------------- */
.estimator {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  background: var(--white); border: 1px solid var(--line); padding: clamp(1.3rem, 3vw, 2rem);
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.est-field { margin-bottom: 1.35rem; }
.est-field > label,
.est-legend {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: .5rem;
}
.est-field output {
  float: right; font-family: var(--display); font-size: 1rem; color: var(--clay-2);
  letter-spacing: 0; text-transform: none;
}
input[type="range"] { width: 100%; accent-color: var(--clay); cursor: pointer; }
.est-choices { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; margin: 0; padding: 0; }
.est-choices legend { padding: 0; }
.est-choices label {
  border: 1px solid var(--line); padding: .48rem .85rem; cursor: pointer;
  font-size: .82rem; background: var(--bone); border-radius: var(--radius);
}
.est-choices input { position: absolute; opacity: 0; width: 0; height: 0; }
.est-choices input:checked + span { color: var(--white); }
.est-choices label:has(input:checked) { background: var(--clay); border-color: var(--clay); color: var(--white); }
.est-choices label:focus-within { outline: 3px solid var(--chaouen); outline-offset: 2px; }

.est-out { background: var(--ink); color: #dbe2ee; padding: clamp(1.2rem, 3vw, 1.8rem); }
.est-out h3 { color: var(--white); margin-bottom: .8rem; }
.est-line {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .5rem 0; border-bottom: 1px dashed rgba(255,255,255,.16); font-size: .93rem;
}
.est-line span:last-child { font-variant-numeric: tabular-nums; color: var(--white); }
.est-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin-top: 1.1rem; padding-top: .9rem; border-top: 2px solid var(--saffron);
}
.est-total b { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--saffron); font-weight: 700; }
.est-note { font-size: .78rem; color: #94a1b8; margin-top: .9rem; }

/* --- 13. Contact form (interactive #5) ----------------------------------- */
.form { background: var(--white); border: 1px solid var(--line); padding: clamp(1.3rem, 3vw, 2rem); }
.field { margin-bottom: 1.15rem; }
.field label {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: .4rem;
}
.field .req { color: var(--clay); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bone); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .68rem .8rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--chaouen); }
.field .err { display: none; color: var(--clay-2); font-size: .84rem; margin-top: .32rem; font-weight: 600; }
.field.is-bad input, .field.is-bad textarea { border-color: var(--clay); background: #fdf2ee; }
.field.is-bad .err { display: block; }
.field .hint { font-size: .78rem; color: var(--ink-3); margin-top: .3rem; }

.form-status { display: none; padding: .95rem 1.1rem; margin-bottom: 1.2rem; font-size: .94rem; border-radius: var(--radius); }
.form-status.is-shown { display: block; }
.form-status--ok   { background: #e7f2ea; border: 1px solid #8dbd9f; color: #1d5433; }
.form-status--bad  { background: #fdf2ee; border: 1px solid var(--clay); color: var(--clay-2); }
.form-status--busy { background: var(--bone-2); border: 1px solid var(--line); color: var(--ink-2); }

/* --- 14. Misc ------------------------------------------------------------ */
.download {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem;
  background: var(--white); border: 1px solid var(--line);
  border-left: 5px solid var(--saffron); padding: 1.3rem 1.5rem;
}
.download__meta { font-size: .82rem; color: var(--ink-3); }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.linklist li:last-child { border-bottom: 0; }
.linklist a { font-weight: 600; }
.linklist span { display: block; font-size: .87rem; color: var(--ink-2); }

.fact { display: flex; gap: .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.fact dt { flex: 0 0 8.5rem; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding-top: .18rem; }
.fact dd { margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- 15. Small screens (checked at 375px) -------------------------------- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .site-head__inner { flex-direction: column; align-items: flex-start; gap: .85rem; }
  .nav { width: 100%; }
  .nav a { padding: .4rem .6rem; font-size: .72rem; letter-spacing: .1em; }
  .hero__card { margin-top: -2.5rem; }
  .sl-btn { width: 2.5rem; height: 2.5rem; font-size: 1.3rem; }
  .slide figcaption { padding: 2.2rem .8rem .75rem; font-size: .78rem; }
  .fact { flex-direction: column; gap: .15rem; }
  .fact dt { flex: none; }
  .est-total { flex-direction: column; align-items: flex-start; gap: .2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* --- 16. Print ----------------------------------------------------------- */
@media print {
  .site-head, .site-foot, .sl-btn, .slideshow__bar, .embed { display: none; }
}
