/* Home, direction C: the hero (copy, the hero board's photo with its glass card, the
   ticker of live figures and the load sequence), the section heads, "Signature
   locations" and "Find a location". The formats, campaigns, coverage and sellers
   sections are in home-sections.css. Tokens: site.css :root. Logical properties,
   so Arabic (dir=rtl) mirrors; the two gradients that cannot be logical are flipped. */

/* ---- Hero ---- */
.hero {
  /* The copy and the ticker line up with .wrap: --edge is the wrap's inline padding edge. */
  --edge: max(var(--gutter), calc((100cqw - var(--wrap)) / 2 + var(--gutter)));
  container-type: inline-size;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr);
  background: var(--night);
}
.hero-copy { position: relative; z-index: 2; padding: clamp(48px, 9vw, 72px) var(--gutter) 44px; }
.hero h1 { font-size: var(--fs-display); line-height: 1.02; margin-top: 26px; max-width: 11.5em; }
.hero h1 i { font-style: normal; color: var(--cyan); }
html[lang="ar"] .hero h1 { font-size: clamp(2.375rem, 4.6vw, 4.5rem); line-height: 1.28; }
/* Arabic has no italics: the signed word gets a cyan hairline under it instead. */
html[lang="ar"] .hero h1 i {
  font-style: normal; text-decoration: underline 1px var(--cyan); text-underline-offset: .35em;
}
.hero-text { margin: 26px 0 0; max-width: 30rem; color: var(--mute); font-size: var(--fs-lead); line-height: 1.75; }
.hero-actions { margin-top: 40px; }

/* Phones and tablets: the photo is a band of its own (cropped to the road, not the sky:
   JM_CONFIG.heroFocus overrides the focus), and the glass card follows it in the flow,
   overlapping its foot. From 960 px the photo fills the column and the card floats on it. */
/* overflow: the photo's pre-load scale(1.06) must never push the page sideways. */
.hero-visual { position: relative; padding-bottom: 8px; overflow: hidden; overflow: clip; }
.hero-photo {
  position: relative; display: block; width: 100%; height: min(62vh, 520px); object-fit: cover; object-position: 50% 72%;
  background: radial-gradient(80% 60% at 70% 30%, var(--night-3), var(--night-2) 60%, var(--night));
  filter: grayscale(1) contrast(1.05) brightness(.9);
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.4s var(--ease), transform 2.4s var(--ease);
}
.hero-visual.is-loaded .hero-photo { opacity: 1; transform: none; }
.hero-visual::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(23, 105, 201, .55), rgba(10, 37, 64, .45)); mix-blend-mode: multiply;
}
.hero-visual::before {
  content: ""; position: absolute; inset: 0 0 auto; height: min(62vh, 520px); z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, var(--night) 0%, rgba(10, 37, 64, 0) 18%, rgba(10, 37, 64, 0) 60%, rgba(10, 37, 64, .8) 100%);
}

/* The glass card: the hero board's code, title and facts, linking to its page. */
.glass {
  position: relative; z-index: 2; inset: auto; margin: -56px var(--gutter) 0;
  display: block; padding: 20px 22px; border-radius: 18px; text-decoration: none; color: inherit;
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(130%); backdrop-filter: blur(16px) saturate(130%);
  opacity: 0; transform: translateY(16px);
  transition: opacity .9s var(--ease) .45s, transform .9s var(--ease) .45s, border-color var(--t-fast);
}
.hero-visual.is-loaded .glass { opacity: 1; transform: none; }
.glass:hover { border-color: var(--cyan-line); }
.glass-code { unicode-bidi: isolate; }
.glass-title { display: block; margin-top: 10px; font-family: var(--serif); font-size: 1.375rem; line-height: 1.2; }
.glass-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 14px 0 0; font-size: var(--fs-small); }
.glass-facts dt { color: var(--mute); }
.glass-facts dd { margin: 0; }

/* The ticker: live figures under the hero. */
.ticker {
  position: relative; z-index: 3; list-style: none; margin: 0;
  display: flex; flex-wrap: wrap; gap: 14px 36px; padding: 20px var(--gutter);
  border-top: 1px solid var(--line); background: rgba(10, 37, 64, .74);
  color: var(--mute); font-size: .6875rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.ticker li { display: flex; align-items: baseline; }
.ticker b { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; letter-spacing: 0; color: var(--ivory); margin-inline-end: 10px; }
html[lang="ar"] .ticker { letter-spacing: 0; font-size: .8125rem; }

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    min-height: clamp(640px, calc(100svh - var(--header-h)), 940px);
  }
  .hero-copy { align-self: center; padding-block: 72px 150px; padding-inline: var(--edge) clamp(32px, 4vw, 64px); }
  .hero-visual { position: absolute; inset: 0; min-height: 0; padding-bottom: 0; overflow: hidden; }
  .hero-photo { position: absolute; inset: 0; height: 100%; object-position: 50% 50%; }
  .hero-visual::before {
    inset: 0; height: auto;
    background: linear-gradient(90deg, var(--night) 0%, rgba(10, 37, 64, .2) 40%, rgba(10, 37, 64, 0) 100%),
      linear-gradient(0deg, rgba(10, 37, 64, .7) 0%, rgba(10, 37, 64, 0) 32%);
  }
  [dir="rtl"] .hero-visual::before {
    background: linear-gradient(270deg, var(--night) 0%, rgba(10, 37, 64, .2) 40%, rgba(10, 37, 64, 0) 100%),
      linear-gradient(0deg, rgba(10, 37, 64, .7) 0%, rgba(10, 37, 64, 0) 32%);
  }
  .glass { position: absolute; margin: 0; inset: auto var(--edge) 108px auto; width: 340px; padding: 24px; }
  [dir="rtl"] .glass { inset: auto auto 108px var(--edge); }
  .ticker {
    position: absolute; inset: auto 0 0; gap: 18px 60px; padding: 22px var(--edge);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
}

/* The load sequence: tag line and its hairline, headline, text, buttons; then the photo
   (once loaded), its glass card, and the ticker once the figures arrive. */
@keyframes jm-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes jm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jm-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-tag { animation: jm-fade .8s var(--ease) both; }
.hero-tag::before { transform-origin: left; animation: jm-draw 1.1s var(--ease) .1s both; }
[dir="rtl"] .hero-tag::before { transform-origin: right; }
.hero h1 { animation: jm-rise 1s var(--ease) .15s both; }
.hero-text { animation: jm-rise 1s var(--ease) .3s both; }
.hero-actions { animation: jm-rise 1s var(--ease) .45s both; }
.ticker { animation: jm-fade .9s var(--ease) .2s both; }
.ticker li { animation: jm-rise .8s var(--ease) both; }
.ticker li:nth-child(2) { animation-delay: .08s; }
.ticker li:nth-child(3) { animation-delay: .16s; }
.ticker li:nth-child(4) { animation-delay: .24s; }
.ticker li:nth-child(5) { animation-delay: .32s; }

/* ---- Sections and their heads ---- */
.section { padding-block: var(--section); }
.section-flush { padding-top: 0; }
.hero + .section[hidden] + .section-flush { padding-top: var(--section); }
.head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 24px 48px; margin-bottom: clamp(36px, 5vw, 56px);
}
.head h2 { font-size: var(--fs-h2); margin-top: 18px; }
.head .head-text { margin: 0; max-width: 26rem; }
.head .head-text:empty { display: none; }

/* ---- Signature locations: photo tiles that lift on hover; a swipe rail on phones ---- */
.rail {
  display: grid; gap: 16px; grid-auto-flow: column; grid-auto-columns: min(80%, 320px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter) 12px; scroll-padding-inline: var(--gutter);
}
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 640px) {
  .rail {
    grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px;
    overflow: visible; margin-inline: 0; padding: 0;
  }
}
@media (min-width: 1100px) { .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feat {
  display: flex; flex-direction: column; overflow: hidden; scroll-snap-align: start;
  background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r-card);
  text-decoration: none; color: inherit;
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.feat:hover { transform: translateY(-6px); border-color: var(--cyan-line); box-shadow: var(--shadow); }
.feat-frame { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.feat-photo {
  width: 100%; height: 100%; object-fit: cover; filter: saturate(.8);
  transition: transform 1.2s var(--ease), filter .6s var(--ease);
}
.feat:hover .feat-photo { transform: scale(1.045); filter: saturate(1); }
.feat-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.feat-code { font-size: .75rem; font-weight: 600; letter-spacing: .18em; color: var(--cyan); unicode-bidi: isolate; }
.feat-title { margin-top: 8px; font-family: var(--serif); font-size: var(--fs-h3); line-height: 1.2; }
html[lang="ar"] .feat-title { font-family: var(--sans); font-size: 1.125rem; font-weight: 500; }
.feat-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 16px; color: var(--mute); font-size: var(--fs-small);
}
.feat-go {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px;
  border: 1px solid var(--line-strong); border-radius: 50%; color: var(--pearl); font-size: .9375rem; line-height: 1;
  transition: transform var(--t), border-color var(--t), color var(--t);
}
.feat:hover .feat-go { transform: rotate(90deg); border-color: var(--cyan); color: #fff; }

/* ---- Find a location: the map in its frame beside four board cards ---- */
.find-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .find-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: stretch; } }
.find-map {
  min-height: 300px; border-radius: var(--r-card); overflow: hidden;
  border: 1px solid var(--line); background: var(--night-2);
}
@media (min-width: 900px) { .find-map { min-height: 440px; } }
.find-cards { display: grid; gap: 10px; align-content: start; }
.find-all-row { margin: 36px 0 0; text-align: center; }
