/* Vamos homepage: the hero, the departures board, the destinations bento, the services, how to book, the
   reviews; and the 404 page (a one-row board). Layout families, one each: a full-bleed photo hero, a board
   (rows of flip tiles), a bento of photo cards, a sticky title beside a list of service rows plus one wide
   band, a dashed flight path of three steps beside a rules card, a centred trio of quotes. */

/* ------------------------------------------------------------------ 1. Hero */
.hero { position: relative; isolation: isolate; display: grid; align-items: end; min-height: min(calc(100svh - var(--header-h)), 900px); padding-block: clamp(96px, 14vw, 180px) clamp(40px, 6vw, 80px); color: var(--on-blue); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(10 36 89 / 0.85) 0%, rgb(10 36 89 / 0.45) 38%, rgb(10 36 89 / 0) 66%), linear-gradient(to right, rgb(10 36 89 / 0.35), rgb(10 36 89 / 0) 60%); }
[dir="rtl"] .hero::after { background: linear-gradient(to top, rgb(10 36 89 / 0.85) 0%, rgb(10 36 89 / 0.45) 38%, rgb(10 36 89 / 0) 66%), linear-gradient(to left, rgb(10 36 89 / 0.35), rgb(10 36 89 / 0) 60%); }
@media (prefers-reduced-motion: no-preference) {
  .hero__bg img { animation: drift 1.6s var(--ease) both; }
  @keyframes drift { from { transform: scale(1.06); } }
}
.hero__title { max-width: 14ch; font-family: var(--display); font-weight: 800; font-size: clamp(2.75rem, 1.2rem + 3.8vw, 4.5rem); line-height: 0.95; letter-spacing: -0.02em; text-wrap: balance; }
[dir="rtl"] .hero__title { max-width: 12ch; line-height: 1.15; letter-spacing: 0; }
.hero__title > span { display: block; }
.hero__accent { color: var(--sun); }
.hero__lede { max-width: 42ch; margin-top: 18px; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
@media (max-width: 61.99rem) {
  .hero { min-height: calc(100svh - var(--header-h)); }
}
@media (max-width: 47.99rem) {
  .hero__actions { display: grid; }
}

/* ------------------------------------------------------------------ 2. The departures board */
/* Night-blue board, each value on its own tile like a split-flap display: the destination and the price in
   yellow. When the board comes into view the tiles flip down into place, row by row (rotateX, once; still
   without scripts or under reduced motion). On phones each row becomes a stacked card. */
.departs { padding-top: clamp(40px, 6vw, 72px); }
.board { padding: clamp(20px, 3vw, 40px); border-radius: 28px; background: var(--night); color: var(--on-blue); box-shadow: var(--shadow); }
.board__head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 16px; margin-bottom: 26px; }
.board__icon { grid-row: span 2; width: 56px; height: 56px; padding: 12px; border-radius: 50%; background: var(--sun); color: var(--ink); }
[dir="rtl"] .board__icon { transform: scaleX(-1); }
.board__title { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.05; }
.board__lede { color: rgb(246 248 252 / 0.85); }
.board__cols, .board__link { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.5fr) minmax(0, 1.7fr) minmax(0, 0.8fr) minmax(6.5rem, auto); gap: 8px; align-items: stretch; }
.board__cols { padding-inline: 10px; margin-bottom: 8px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sun); }
.board__rows { display: grid; gap: 8px; }
.board__link { padding: 8px; border-radius: 16px; text-decoration: none; }
.board__go { text-decoration: none; }
@media (min-width: 62rem) {
  /* Wide screens: the Voir link covers the whole row. */
  .board__row { position: relative; }
  .board__go::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
  .board__row:has(.board__go:hover) .board__link { background: rgb(246 248 252 / 0.06); }
}
.board__cell { display: flex; flex-wrap: wrap; align-content: center; align-items: center; gap: 4px 10px; min-height: 56px; padding: 8px 14px; border-radius: 10px; background: #12357a; box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.3), inset 0 1px 0 rgb(255 255 255 / 0.06); font-weight: 500; }
.board__dest { font-family: var(--display); font-weight: 800; font-size: 1.375rem; line-height: 1.1; color: var(--sun); }
.board__times { flex-direction: column; align-items: flex-start; align-content: flex-start; justify-content: center; gap: 0; font-size: 0.9375rem; }
.board__price { font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--sun); white-space: nowrap; }
.board__go { gap: 8px; padding-inline: 18px; background: var(--sun); color: var(--ink); font-family: var(--display); font-weight: 700; }
.board__date .tbc { font-size: 0.75rem; }
@media (prefers-reduced-motion: no-preference) {
  .js .board:not(.is-on) .board__cell { transform: rotateX(-90deg); opacity: 0; }
  .js .board__cell { transform-origin: 50% 0; transition: transform 0.55s var(--ease), opacity 0.3s ease; transition-delay: calc(var(--r, 0) * 90ms + var(--c, 0) * 60ms); }
  .board__row:nth-child(2) { --r: 1; }
  .board__row:nth-child(3) { --r: 2; }
  .board__row:nth-child(4) { --r: 3; }
  .board__row:nth-child(5) { --r: 4; }
  .board__cell:nth-child(2) { --c: 1; }
  .board__cell:nth-child(3) { --c: 2; }
  .board__cell:nth-child(4) { --c: 3; }
  .board__cell:nth-child(5) { --c: 4; }
}
@media (max-width: 61.99rem) {
  .board__cols { display: none; }
  .board__link { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dest price" "day day" "times times" "go go"; gap: 6px; padding: 12px; border-radius: 18px; background: #0e2c69; }
  .board__dest { grid-area: dest; }
  .board__price { grid-area: price; }
  .board__day { grid-area: day; }
  .board__times { grid-area: times; }
  .board__go { grid-area: go; justify-content: center; }
  .board__day, .board__times { min-height: 0; padding-block: 4px; background: transparent; box-shadow: none; }
  .board__day::before, .board__times::before { content: attr(data-label); width: 100%; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sun); }
}

/* ------------------------------------------------------------------ 3. Destinations (bento) */
.dest__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(200px, 22vw, 300px); gap: clamp(12px, 1.6vw, 20px); margin-top: 36px; }
.dest--big { grid-column: span 2; grid-row: span 2; }
.dest__link { position: relative; isolation: isolate; display: grid; align-content: end; height: 100%; overflow: hidden; border-radius: var(--r-card); color: var(--on-blue); text-decoration: none; }
.dest__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
/* A deep scrim from the bottom, so the words read on any photo (snow-white walls, bright sky). */
.dest__link::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(10 36 89 / 0.94) 0%, rgb(10 36 89 / 0.72) 32%, rgb(10 36 89 / 0.25) 62%, rgb(10 36 89 / 0) 82%); }
.dest__link:hover .dest__img { transform: scale(1.05); }
.dest__text { display: grid; justify-items: start; gap: 4px; padding: clamp(14px, 2vw, 26px); text-shadow: 0 1px 12px rgb(10 36 89 / 0.6); }
.dest__region { max-width: 100%; overflow: hidden; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; color: var(--sun); }
.dest__name { font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem); line-height: 1.1; }
.dest--big .dest__name { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.dest__tag { font-size: 0.9375rem; line-height: 1.35; }
.dest--small .dest__tag { font-size: 0.875rem; }
/* Tablets: Bousaâda across the top, the other four in two rows of two. */
@media (max-width: 61.99rem) {
  .dest__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 340px; grid-auto-rows: 250px; }
  .dest--big { grid-column: 1 / -1; grid-row: span 1; }
}
/* Phones: the same, shorter; the small cards keep the region and the name only. */
@media (max-width: 47.99rem) {
  .dest__grid { grid-template-rows: 280px; grid-auto-rows: 200px; gap: 12px; }
  .dest--small .dest__tag { display: none; }
  .dest--small .dest__region { font-size: 0.6875rem; white-space: normal; }
}

/* ------------------------------------------------------------------ 4. Services (a blue section) */
.services { background: var(--blue); color: var(--on-blue); }
.services .section__lede { color: rgb(246 248 252 / 0.85); }
.svc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.svc { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); overflow: hidden; border-radius: var(--r-card); background: var(--blue-deep); }
.svc--tall { grid-row: span 3; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.svc--wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.svc__pic img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; }
.svc__text { display: grid; align-content: center; gap: 8px; padding: clamp(18px, 2.4vw, 30px); }
.svc__title { font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.1; color: var(--sun); }
.svc .tbc { color: var(--on-blue); }
@media (max-width: 61.99rem) {
  .svc__grid { grid-template-columns: minmax(0, 1fr); }
  .svc--tall { grid-row: auto; }
  .svc--wide { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); }
  .svc--tall .svc__pic img { max-height: 320px; }
}
@media (max-width: 47.99rem) {
  .svc, .svc--wide { grid-template-columns: minmax(0, 1fr); }
  .svc__pic img { min-height: 0; aspect-ratio: 16 / 9; }
}

/* ------------------------------------------------------------------ 5. How to book */
.how__inner { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
/* Three steps on a dashed flight path. */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.steps::before { content: ""; position: absolute; top: 31px; inset-inline: 32px; border-top: 3px dashed color-mix(in srgb, var(--blue) 40%, transparent); }
.step { position: relative; display: grid; justify-items: start; gap: 8px; }
.step__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sun); color: var(--ink); box-shadow: 0 0 0 6px var(--paper); }
.step__icon .icon { width: 30px; height: 30px; }
.step__title { margin-top: 8px; font-family: var(--display); font-weight: 800; font-size: 1.375rem; line-height: 1.15; }
.step p { color: var(--ink-2); }
.how__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.rules { padding: clamp(22px, 3vw, 34px); border-radius: var(--r-card); background: var(--sand); }
.rules__title { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.rules__title .icon { color: var(--blue); }
.rules__list { display: grid; gap: 12px; margin-top: 16px; }
.rules__list li { display: flex; gap: 10px; }
.rules__list .icon { margin-top: 3px; color: var(--blue); }
@media (max-width: 61.99rem) {
  .how__inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 47.99rem) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .steps::before { top: 32px; bottom: 32px; inset-inline: 31px auto; border-top: 0; border-inline-start: 3px dashed color-mix(in srgb, var(--blue) 40%, transparent); }
  .step { grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; }
  .step__icon { grid-row: span 2; }
  .step__title { margin-top: 0; align-self: end; }
  .how__actions { display: grid; }
}

/* ------------------------------------------------------------------ 6. Reviews (centred) */
.reviews { padding-top: 0; }
.reviews__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.quote { display: grid; justify-items: center; gap: 12px; padding: 28px 22px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); text-align: center; color: var(--blue-deep); }
.quote:nth-child(2) { transform: translateY(18px); }
.quote__mark { width: 40px; height: 40px; color: var(--sun-deep); }
.quote__by { color: var(--ink-2); }
.reviews__more { display: flex; justify-content: center; margin-top: 44px; }
@media (max-width: 61.99rem) {
  .reviews__list { grid-template-columns: minmax(0, 1fr); }
  .quote:nth-child(2) { transform: none; }
}

/* ------------------------------------------------------------------ 404: a one-row board */
.nf__board { display: grid; justify-items: center; gap: 14px; max-width: 760px; margin-inline: auto; padding-block: clamp(32px, 5vw, 56px); text-align: center; }
.nf__board .board__head { display: flex; margin: 0; gap: 16px; }
.nf__code { font-family: var(--display); font-weight: 800; font-size: clamp(4rem, 3rem + 5vw, 7rem); line-height: 1; color: var(--sun); }
.nf__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 14px; }
