/* ==========================================================================
   Homepage — assets/home.css
   Self-contained styles for index.html / index-ar.html. Shared chrome
   (navbar, footer, WhatsApp float, tokens) still comes from style.css.
   Every rule is prefixed .hm- so nothing here leaks into other pages.
   Layout is mobile-first and uses logical properties so the Arabic page
   (dir="rtl") mirrors without a second stylesheet.
   ========================================================================== */

:root {
  --hm-pad-x: clamp(1.25rem, 4vw, 2.5rem);
  --hm-section-y: clamp(4.5rem, 9vw, 8rem);
  --hm-radius: 6px;
  --hm-ink-on-dark: #171310;
  --hm-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Primitives ---------------------------------------------------------- */

.hm-wrap {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--hm-pad-x);
}

.hm-section {
  padding-block: var(--hm-section-y);
}

.hm-section--alt {
  background: var(--bg-secondary);
}

.hm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 1.1rem;
}

.hm-eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.8;
}

.hm-title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
}

.hm-lede {
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 36rem;
}

/* Section header: title on the start side, lede / link on the end side. */
.hm-head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 900px) {
  .hm-head {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: 3rem;
  }
  .hm-head > .hm-head-side {
    justify-self: end;
    text-align: end;
  }
  .hm-head > .hm-head-side .hm-lede {
    margin-inline-start: auto;
  }
}

/* Buttons */
.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.5s var(--hm-ease), background-color 0.3s ease,
              border-color 0.3s ease, color 0.3s ease, box-shadow 0.5s ease;
}

.hm-btn:hover {
  transform: translateY(-2px);
}

.hm-btn--primary {
  background: var(--accent-gold);
  color: #fff;
}
.hm-btn--primary:hover {
  background: var(--accent-gold-hover);
  box-shadow: var(--shadow-card);
}

.hm-btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--rule-strong);
}
.hm-btn--ghost:hover {
  border-color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}

/* Variants that sit on a photograph / dark band */
.hm-btn--gold {
  background: var(--accent-gold-bright);
  color: var(--hm-ink-on-dark);
}
.hm-btn--gold:hover {
  background: #dcb887;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.hm-btn--light {
  background: transparent;
  color: var(--on-image);
  border-color: var(--rule-on-image);
}
.hm-btn--light:hover {
  border-color: var(--on-image);
  background: rgba(255, 255, 255, 0.12);
}

.hm-arrow {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
}
[dir="rtl"] .hm-arrow {
  transform: scaleX(-1);
}

/* Text link with arrow */
.hm-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--accent-gold);
  text-decoration: none;
  transition: gap 0.4s var(--hm-ease), color 0.3s ease;
}
.hm-link:hover {
  gap: 0.85rem;
  color: var(--accent-gold-hover);
}

/* Scroll reveal. Only hidden when JS is running, so a script failure still
   leaves a readable page. Delay comes from --d on the element. */
.js .rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--hm-ease), transform 0.9s var(--hm-ease);
  transition-delay: var(--d, 0s);
}
.js .rv.in {
  opacity: 1;
  transform: none;
}

/* --- Hero ---------------------------------------------------------------- */

.hm-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--hm-ink-on-dark);
  color: var(--on-image);
  padding: 0; /* overrides the generic section padding from style.css */
}

.hm-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hm-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center;
  animation: hm-kenburns 7s var(--hm-ease) both;
}

@keyframes hm-kenburns {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

.hm-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top,
      rgba(18, 14, 11, 0.94) 0%,
      rgba(18, 14, 11, 0.72) 32%,
      rgba(18, 14, 11, 0.30) 62%,
      rgba(18, 14, 11, 0.42) 100%);
}

.hm-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 9.5rem;
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
}

.hm-hero-eyebrow {
  color: var(--accent-gold-bright);
  margin-bottom: 1.4rem;
}

.hm-hero-title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(2.6rem, 7.6vw, 6.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--on-image);
  max-width: 14ch;
  text-wrap: balance;
}

.hm-hero-title em {
  font-style: normal;
  color: var(--accent-gold-bright);
}

.hm-hero-sub {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.7;
  color: var(--on-image-muted);
}

.hm-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

.hm-hero-foot {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-on-image);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.hm-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hm-stat-num {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1;
  color: var(--on-image);
}

.hm-stat-num b {
  font-weight: 300;
  color: var(--accent-gold-bright);
}

.hm-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-image-muted);
}

.hm-hero-loc {
  display: none;
}

/* Phones: the fixed WhatsApp button sits bottom-right, exactly where the
   third stat lands, so the hero keeps extra room underneath the stats. */
@media (max-width: 600px) {
  .hm-hero-inner {
    padding-bottom: 5.5rem;
  }
}

/* Staggered entrance. The image itself is not animated in opacity so the
   LCP element paints immediately. */
.js .hm-hero-inner > * {
  animation: hm-rise 1.1s var(--hm-ease) both;
}
.js .hm-hero-inner > :nth-child(1) { animation-delay: 0.15s; }
.js .hm-hero-inner > :nth-child(2) { animation-delay: 0.30s; }
.js .hm-hero-inner > :nth-child(3) { animation-delay: 0.45s; }
.js .hm-hero-inner > :nth-child(4) { animation-delay: 0.60s; }
.js .hm-hero-inner > :nth-child(5) { animation-delay: 0.85s; }

@keyframes hm-rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

@media (min-width: 900px) {
  .hm-hero-inner {
    padding-top: 11rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "eyebrow eyebrow"
      "title   title"
      "sub     loc"
      "cta     loc"
      "foot    foot";
    column-gap: 3rem;
  }
  .hm-hero-eyebrow { grid-area: eyebrow; }
  .hm-hero-title   { grid-area: title; }
  .hm-hero-sub     { grid-area: sub; }
  .hm-hero-cta     { grid-area: cta; }
  .hm-hero-foot    { grid-area: foot; grid-template-columns: repeat(3, max-content); gap: 4rem; }
  .hm-hero-loc {
    grid-area: loc;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    text-align: end;
    gap: 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-image-muted);
    padding-bottom: 0.25rem;
  }
  .hm-hero-loc strong {
    font-weight: 500;
    color: var(--on-image);
  }
}

/* --- Clients strip --------------------------------------------------------- */

.hm-clients {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--bg-primary);
  contain-intrinsic-size: 0 80px;
}

.hm-clients-row {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hm-clients-label {
  flex: 0 0 auto;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.hm-marquee {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.hm-marquee-track {
  display: flex;
  gap: 2.75rem;
  width: max-content;
  padding-inline-end: 2.75rem;
  animation: hm-marquee 46s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

/* Phones: the label and the marquee sat side by side, so the (long) label
   squeezed the marquee to a sliver and the mask made the names look cut off
   under it. Stack them, and drop the mask — masking a moving layer is what
   made the strip stutter on low-end phones. */
@media (max-width: 700px) {
  .hm-clients-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }
  .hm-clients-label {
    white-space: normal;
    line-height: 1.5;
  }
  .hm-marquee {
    width: 100%;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .hm-marquee-track {
    animation-duration: 30s;
  }
}
[dir="rtl"] .hm-marquee-track {
  animation-name: hm-marquee-rtl;
}
.hm-marquee:hover .hm-marquee-track {
  animation-play-state: paused;
}

.hm-marquee-track span {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 2.75rem;
}
.hm-marquee-track span::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-gold-bright);
}

@keyframes hm-marquee     { to { transform: translateX(-50%); } }
@keyframes hm-marquee-rtl { to { transform: translateX(50%); } }

/* No-JS: the track is not duplicated, so let it wrap. */
.no-js .hm-marquee { mask-image: none; -webkit-mask-image: none; }
.no-js .hm-marquee-track { animation: none; flex-wrap: wrap; width: auto; }

/* --- Services ------------------------------------------------------------- */

.hm-svc-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--hm-pad-x);
  padding-inline: var(--hm-pad-x);
  margin-inline: calc(-1 * var(--hm-pad-x));
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hm-svc-grid::-webkit-scrollbar { display: none; }

.hm-svc {
  flex: 0 0 min(78vw, 22rem);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--rule-soft);
  border-radius: var(--hm-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.6s var(--hm-ease), box-shadow 0.6s ease, border-color 0.3s ease;
}

.hm-svc-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-secondary);
}

.hm-svc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--hm-ease);
}

.hm-svc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.5rem 1.6rem;
  gap: 0.6rem;
}

.hm-svc-num {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--accent-gold);
}

.hm-svc h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--text-primary);
}

.hm-svc p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.hm-svc-more {
  margin-top: auto;
  padding-top: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--accent-gold);
  transition: gap 0.4s var(--hm-ease);
}

.hm-svc:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(140, 97, 52, 0.35);
}
.hm-svc:hover .hm-svc-img img { transform: scale(1.06); }
.hm-svc:hover .hm-svc-more { gap: 0.85rem; }

.hm-svc-hint {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .hm-svc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    padding-bottom: 0;
  }
  .hm-svc { flex: initial; }
  .hm-svc-hint { display: none; }
}

@media (min-width: 1100px) {
  .hm-svc-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* --- Featured work ---------------------------------------------------------- */

.hm-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.hm-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.hm-tile figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hm-tile-img {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-secondary);
  aspect-ratio: 4 / 5;
  flex: 0 0 auto;
}

.hm-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--hm-ease);
}

.hm-tile:hover .hm-tile-img img { transform: scale(1.05); }

.hm-tile figcaption {
  padding: 0.7rem 0.1rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hm-tile-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.3;
  color: var(--text-primary);
  transition: color 0.3s ease;
}
.hm-tile:hover .hm-tile-title { color: var(--accent-gold); }

.hm-tile-meta {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hm-tile--lead {
  grid-column: 1 / -1;
}
.hm-tile--lead .hm-tile-img { aspect-ratio: 16 / 10; }

/* Six tiles in two columns leaves the last one orphaned, so on phones it
   spans the row like the lead: full · 2 · 2 · full. */
@media (max-width: 759px) {
  .hm-tile:last-child { grid-column: 1 / -1; }
  .hm-tile:last-child .hm-tile-img { aspect-ratio: 16 / 10; }
}

.hm-work-foot {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

@media (min-width: 760px) {
  .hm-work-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .hm-tile-img { aspect-ratio: 4 / 3; }
  .hm-tile--lead {
    grid-column: span 2;
    grid-row: span 2;
  }
  .hm-tile--lead .hm-tile-img {
    aspect-ratio: auto;
    flex: 1 1 auto;
    min-height: 0;
  }
  .hm-tile-title { font-size: 1.05rem; }
  .hm-tile--lead .hm-tile-title { font-size: 1.25rem; }
}

/* --- Why Designation ------------------------------------------------------- */

.hm-why {
  display: grid;
  gap: 2.5rem;
}

.hm-why-visual {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-width: 30rem;
  box-shadow: var(--shadow-card);
}
.hm-why-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hm-why-visual figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1rem 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-image-muted);
  background: linear-gradient(to top, rgba(18, 14, 11, 0.85), transparent);
}

.hm-pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.hm-pillar {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.hm-pillar-num {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  padding-top: 0.35rem;
}

.hm-pillar h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.hm-pillar p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

@media (min-width: 900px) {
  .hm-why {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 5rem;
    align-items: start;
  }
  /* The pillar list is shorter than the intro + image column, so it is
     centred against it rather than left hanging from the top. */
  .hm-pillars {
    align-self: center;
  }
  .hm-why-visual {
    margin-top: 2.5rem;
    aspect-ratio: 5 / 4;
    max-width: 100%;
  }
  .hm-pillar {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    padding: 2rem 0;
  }
  .hm-pillar h3 { font-size: 1.35rem; }
}

/* --- Process -------------------------------------------------------------- */

.hm-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
}

.hm-step {
  position: relative;
  padding: 0 0 2rem 2.25rem;
  padding-inline-start: 2.25rem;
  padding-inline-end: 0;
  border-inline-start: 1px solid var(--rule-strong);
}
.hm-step:last-child { padding-bottom: 0; }

.hm-step::before {
  content: '';
  position: absolute;
  inset-inline-start: -5px;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 0 4px var(--bg-secondary);
}

.hm-step-num {
  display: block;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.hm-step h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.hm-step p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 30rem;
}

@media (min-width: 900px) {
  .hm-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
  .hm-step {
    padding: 1.75rem 0 0;
    border-inline-start: 0;
    border-top: 1px solid var(--rule-strong);
  }
  .hm-step::before {
    inset-inline-start: 0;
    top: -5px;
  }
  .hm-step-num { font-size: 2.4rem; letter-spacing: 0; margin-bottom: 0.9rem; }
}

/* --- Journal -------------------------------------------------------------- */

.hm-posts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.hm-post {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}

.hm-post-cat {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.hm-post h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--text-primary);
  transition: color 0.3s ease;
}
.hm-post:hover h3 { color: var(--accent-gold); }

.hm-post p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.hm-post-meta {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hm-post-meta .hm-link { font-size: 0.9rem; }

@media (min-width: 900px) {
  .hm-posts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 3rem;
  }
  .hm-post { padding: 2rem 0; }
}

/* --- CTA band --------------------------------------------------------------- */

.hm-cta {
  position: relative;
  overflow: hidden;
  background: var(--hm-ink-on-dark);
  color: var(--on-image);
  text-align: center;
  padding-block: clamp(4.5rem, 10vw, 8rem);
  contain-intrinsic-size: 0 480px;
}

.hm-cta-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hm-cta-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hm-cta-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(18, 14, 11, 0.8);
}

.hm-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 44rem;
  margin-inline: auto;
}

.hm-cta .hm-eyebrow { color: var(--accent-gold-bright); justify-content: center; }
.hm-cta .hm-eyebrow::before { display: none; }

.hm-cta h2 {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--on-image);
  text-wrap: balance;
}

.hm-cta p {
  margin: 1.25rem auto 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--on-image-muted);
}

.hm-cta-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

/* --- Contact ---------------------------------------------------------------- */

.hm-contact {
  display: grid;
  gap: 3rem;
}

.hm-details {
  margin: 2rem 0 0;
  display: grid;
  gap: 1.35rem;
}

.hm-detail dt {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.3rem;
}

.hm-detail dd {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-light);
}

.hm-detail a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.hm-detail a:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.hm-map {
  margin-top: 2rem;
  border-radius: var(--hm-radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  aspect-ratio: 16 / 10;
  background: var(--bg-primary);
}
.hm-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(100%) contrast(0.95);
}

.hm-form {
  background: var(--bg-primary);
  border: 1px solid var(--rule-soft);
  border-radius: 8px;
  padding: clamp(1.4rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 1.1rem;
}

.hm-form-row {
  display: grid;
  gap: 1.1rem;
}

.hm-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hm-field label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-light);
}

.hm-field input,
.hm-field select,
.hm-field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* 16px keeps iOS from zooming the page on focus */
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  padding: 0.8rem 0.95rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hm-field textarea {
  resize: vertical;
  min-height: 7rem;
}

.hm-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 2.5rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2357504a' stroke-width='1.6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
}
[dir="rtl"] .hm-field select { background-position: left 1rem center; }

.hm-field input:focus,
.hm-field select:focus,
.hm-field textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(140, 97, 52, 0.15);
}

.hm-form .hm-btn { width: 100%; margin-top: 0.4rem; }

/* Honeypot field for contact.php: off-screen, never shown to people. */
.hm-hp {
  position: absolute;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hm-form { position: relative; }

.hm-form-status {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 4px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-inline-start: 3px solid var(--accent-gold-bright);
}
.hm-form-status.is-ok { border-inline-start-color: #2e8b57; }
.hm-form-status.is-fail { border-inline-start-color: #b4462f; }

.hm-form-note {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
}
.hm-form-note a {
  color: var(--text-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 640px) {
  .hm-form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .hm-contact {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 5rem;
    align-items: start;
  }
}

/* --- Motion preferences ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .hm-hero-media img,
  .js .hm-hero-inner > *,
  .hm-marquee-track {
    animation: none;
  }
  .js .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hm-btn, .hm-svc, .hm-tile-img img, .hm-svc-img img {
    transition: none;
  }
}
