/* peak: VISIT section. Charcoal "after dark" band, stylised map card, big actions.
   Uses tokens from styles.css (--pink, --ink, --slate, --mist, --fog, --ease, --font). Logical properties so it mirrors in RTL. */

.visit {
  --v-bg: var(--ink);
  --v-line: rgb(255 255 255 / .14);
  --v-soft: rgb(255 255 255 / .78);   /* 9:1+ on --ink */
  position: relative; z-index: 1;
  padding: 72px var(--gutter) calc(88px + var(--safe-bottom));
  background:
    radial-gradient(60% 40% at 100% 0%, rgb(159 160 158 / .22), transparent 70%),
    var(--v-bg);
  color: var(--paper);
  scroll-margin-top: 0;
}
/* wavy top edge: the door cut-out rhythm, drawn over whatever section sits above */
.visit { overflow-x: clip; } /* its wavy top drifts sideways (motion.js); clip that sideways, it still shows above */
.visit::before {
  content: ""; position: absolute; inset-inline: 0; top: -27px; height: 28px;
  background: var(--v-bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28'%3E%3Cpath d='M0 28V16C15 16 15 4 30 4S45 16 60 16 75 4 90 4s15 12 30 12v12Z'/%3E%3C/svg%3E") repeat-x bottom / 120px 28px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28'%3E%3Cpath d='M0 28V16C15 16 15 4 30 4S45 16 60 16 75 4 90 4s15 12 30 12v12Z'/%3E%3C/svg%3E") repeat-x bottom / 120px 28px;
  pointer-events: none;
}

.visit__wrap { max-width: 1200px; margin-inline: auto; display: grid; gap: 28px; }

/* ---------- head ---------- */
.visit__kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pink);
}
.visit__kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); flex: none; }
:lang(ar) .visit__kicker { font-size: .8125rem; }
.visit__title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px;
  margin-top: 12px;
  font-size: clamp(2.5rem, 1.7rem + 3.4vw, 4.75rem); font-weight: 600; line-height: .98; letter-spacing: -.03em;
}
:lang(ar) .visit__title { line-height: 1.25; font-size: clamp(2.5rem, 1.8rem + 3.2vw, 4.5rem); }
.visit__doodle {
  width: clamp(76px, 7vw, 104px); height: auto; flex: none; overflow: visible;
  fill: none; stroke: var(--pink); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round;
  rotate: -6deg;
}
.visit__doodle .visit__heart { fill: var(--pink); fill-opacity: .18; }
:root[dir="rtl"] .visit__doodle { scale: -1 1; }
.visit__lede { margin-top: 16px; max-width: 34ch; font-size: clamp(1rem, .95rem + .25vw, 1.1875rem); color: var(--v-soft); }
:lang(ar) .visit__lede { line-height: 1.75; }

/* ---------- map card ---------- */
/* phone/tablet: the stage dissolves so the map, its footer and the photo can take their own place in the flow */
.visit__stage { display: contents; }
.visit__head { order: 0; }
.vmap { order: 1; }
.vmap__foot { order: 2; margin-top: -14px; }
.visit__actions { order: 3; }
.visit__info { order: 4; }
.visit__photo { order: 5; }
.vmap {
  position: relative; direction: ltr;           /* maps don't mirror */
  aspect-ratio: 600 / 460; overflow: hidden;
  border-radius: 30px;
  background: #E9EAE8;
  /* wavy bottom edge: the door cut-out */
  clip-path: url(#vmap-clip);
  box-shadow: none;
}
.vmap__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vmap__label {
  position: absolute; transform: translate(-50%, -50%);
  padding: 3px 9px; border-radius: 999px;
  font-size: clamp(.6875rem, .64rem + .22vw, .8125rem); font-weight: 500; line-height: 1.3; white-space: nowrap;
  color: var(--ink); background: rgb(255 255 255 / .86);
  unicode-bidi: plaintext;
}
:root[dir="rtl"] .vmap__label { direction: rtl; }
.vmap__label--rj { left: 67.7%; top: 41.5%; width: 15%; white-space: normal; text-align: center; background: transparent; padding: 0; font-weight: 600; line-height: 1.2; opacity: .8; }
.vmap__label--circle { left: 31.7%; top: 76%; }

.vmap__pin { position: absolute; left: 71.7%; top: 21.7%; width: 0; height: 0; }
.vmap__pinbody {
  position: absolute; left: 0; bottom: 0; translate: -50% 0;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--pink); border-radius: 50% 50% 50% 0; rotate: -45deg;
  box-shadow: 0 8px 18px rgb(43 43 46 / .3);
  transform-origin: 50% 50%;
}
.vmap__pinbody svg { width: 22px; height: 22px; rotate: 45deg; }
.vmap__pinbody::after {          /* soft pulse on the ground */
  content: ""; position: absolute; left: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--pink); opacity: 0; z-index: -1;
}
.vmap__tag {
  position: absolute; left: 0; top: 10px; translate: -50% 0;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font-size: .8125rem; font-weight: 600; background: var(--ink); color: var(--paper);
}
@media (prefers-reduced-motion: no-preference) {
  .vmap__pinbody::after { animation: vpulse 2.6s var(--ease) infinite; }
  .vmap__route { animation: vroute 1.6s linear infinite; }
}
@keyframes vpulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(4.2); opacity: 0; } }
@keyframes vroute { to { stroke-dashoffset: -24; } }

.vmap__foot {
  min-width: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  padding-inline: 4px;
}
.vmap__open {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-weight: 600; text-decoration: none; color: var(--paper);
  border-bottom: 2px solid var(--pink); padding-block: 2px;
}
.vmap__open svg { width: 18px; height: 18px; transition: translate .3s var(--ease); }
:root[dir="rtl"] .vmap__open svg { scale: -1 1; }
.vmap__open:hover svg { translate: 2px -2px; }
.vmap__note { font-size: .75rem; color: rgb(255 255 255 / .62); }   /* 5.6:1 on --ink */

/* ---------- actions ---------- */
.visit__actions { display: grid; gap: 12px; }
.vact {
  display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 12px 18px 12px 14px; padding-inline: 14px 18px;
  border: 1.5px solid var(--v-line); border-radius: 999px;
  background: rgb(255 255 255 / .06);
  color: var(--paper); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), translate .35s var(--ease), box-shadow .35s var(--ease);
}
.vact__icon {
  flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  background: rgb(255 255 255 / .1);
  transition: background-color .35s var(--ease), rotate .5s var(--spring);
}
.vact__icon svg { width: 24px; height: 24px; }
.vact__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.vact__title { font-size: 1.0625rem; font-weight: 600; line-height: 1.2; }
.vact__sub { font-size: .875rem; color: rgb(255 255 255 / .72); line-height: 1.3; }
.vact__arrow { flex: none; width: 22px; height: 22px; opacity: .8; transition: translate .35s var(--ease); }
:root[dir="rtl"] .vact__arrow { scale: -1 1; }
.vact:hover { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .3); translate: 0 -2px; }
.vact:hover .vact__icon { rotate: -8deg; }
.vact:hover .vact__arrow { translate: 4px 0; }
:root[dir="rtl"] .vact:hover .vact__arrow { translate: -4px 0; }
.vact:active { translate: 0 0; }

.vact--primary { background: var(--pink); border-color: var(--pink); color: var(--ink); }   /* 5.9:1 */
.vact--primary .vact__icon { background: rgb(43 43 46 / .14); }
.vact--primary .vact__sub { color: rgb(43 43 46 / .8); }
.vact--primary:hover { background: #EC93B7; border-color: #EC93B7; box-shadow: 0 14px 34px rgb(229 131 170 / .28); }

.vact:focus-visible, .vmap__open:focus-visible { outline-color: var(--paper); box-shadow: 0 0 0 5px var(--pink); }

/* ---------- info list ---------- */
.visit__info { margin: 0; border-top: 1px solid var(--v-line); }
.visit__row {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--v-line);
}
.visit__row dt { padding-top: 3px; font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--pink); }
:lang(ar) .visit__row dt { font-size: .8125rem; }
.visit__row dd { margin: 0; display: grid; gap: 2px; }
.visit__big { font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.visit__val { font-size: 1.0625rem; font-weight: 500; }
.visit__small { font-size: .875rem; color: var(--v-soft); }
.visit__code { justify-self: start; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
:lang(ar) .visit__small, :lang(ar) .vact__sub { line-height: 1.6; }
:lang(ar) .visit__big { font-size: 1.25rem; line-height: 1.45; text-wrap: balance; }

/* ---------- photo ---------- */
.visit__photo {
  position: relative; margin: 0; width: min(62vw, 270px); justify-self: center;
  border-radius: 999px 999px 28px 28px; overflow: hidden;
  box-shadow: 0 0 0 4px var(--pink), 0 24px 50px rgb(0 0 0 / .4);
  background: var(--slate);
}
.visit__photo img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.visit__photo figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 36px 16px 14px;
  font-size: .8125rem; font-weight: 500; text-align: center;
  background: linear-gradient(to top, rgb(20 20 22 / .85), transparent);
}

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  .visit { padding-top: 96px; }
  .visit__actions { grid-template-columns: repeat(3, 1fr); }
  .vact { border-radius: 28px; flex-wrap: wrap; align-content: center; padding: 16px; min-height: 128px; align-items: flex-start; flex-direction: column; gap: 14px; }
  .vact__arrow { display: none; }
  .visit__info { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; border-top: 0; }
  .visit__info .visit__row { border-top: 1px solid var(--v-line); border-bottom: 0; }
  .visit__row { grid-template-columns: 1fr; gap: 6px; }
  .visit__row dt { padding-top: 0; }
  .visit__photo { justify-self: center; width: 260px; }
}

/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  .visit { padding-top: 120px; padding-bottom: 120px; }
  .visit__wrap {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(40px, 6vw, 96px); row-gap: 32px;
    grid-template-areas: "head stage" "actions stage" "info stage";
    grid-template-rows: auto auto 1fr; align-items: start;
  }
  .visit__head { grid-area: head; }
  .visit__stage { display: block; position: relative; grid-area: stage; min-width: 0; }
  .vmap__foot { margin-top: 14px; }
  .visit__actions { grid-area: actions; grid-template-columns: 1fr; }
  .vact { flex-direction: row; flex-wrap: nowrap; align-items: center; min-height: 76px; border-radius: 999px; padding: 12px 20px 12px 14px; padding-inline: 14px 20px; }
  .vact__arrow { display: block; }
  .visit__info { grid-area: info; grid-template-columns: 1fr; }
  .visit__info .visit__row { border-top: 0; border-bottom: 1px solid var(--v-line); grid-template-columns: 110px 1fr; gap: 12px; }
  .visit__info { border-top: 1px solid var(--v-line); }
  .visit__row dt { padding-top: 3px; }
  .vmap { border-radius: 36px; }
  /* the night photo straddles the map's bottom-end corner */
  .visit__photo {
    position: absolute; right: 36px; top: 46%;  /* physical: the map never mirrors */ z-index: 2;
    width: clamp(220px, 20vw, 280px);
    rotate: 2.5deg;
  }
  .vmap__foot { flex-direction: column; align-items: flex-start; gap: 4px; direction: ltr; max-width: 46%; margin-right: auto; }  /* stays left, clear of the photo */
  :root[dir="rtl"] .vmap__foot > * { direction: rtl; }
}

@media (prefers-reduced-motion: reduce) {
  .vact, .vact__icon, .vact__arrow, .vmap__open svg { transition: none; }
}

/* ---------- motion v4: landing ring under the pin, the walker on the route ---------- */
.vmap__pin::after {
  content: ""; position: absolute; left: -16px; top: -6px; width: 32px; height: 12px; border-radius: 50%;
  border: 2px solid var(--pink-deep); opacity: 0; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .vmap__pin.is-landed::after { animation: vland .9s var(--ease) both; }
}
@keyframes vland { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(3); opacity: 0; } }
.vmap__walker { filter: drop-shadow(0 2px 3px rgb(43 43 46 / .35)); }
/* the press ripple needs a clipping box */
.vact { overflow: hidden; isolation: isolate; }
