/* Visual polish for the whole site: colour rhythm, gradients and interactive details.
   Works with the classes rendered by the React bundle and the nodes added by site-enhance.js. */
:root {
  --gold-grad: linear-gradient(135deg, #f1d58a 0%, #d6a84b 45%, #a8781f 100%);
  --night-0: #0c0d10;
  --night-1: #131726;
}

/* ---------- scroll progress + header ---------- */
.scroll-progress {
  background: var(--gold-grad);
  height: 2px;
  inset: 0 0 auto 0;
  pointer-events: none;
  position: fixed;
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 60;
}

[dir="rtl"] .scroll-progress {
  transform-origin: 100% 50%;
}

.site-header {
  transition: box-shadow 300ms ease, background 300ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 28px #10192b14;
}

/* ---------- section titles get a small gold eight-point star ---------- */
.section__title {
  align-items: center;
  display: inline-flex;
  gap: 0.45em;
}

.section__title::before {
  aspect-ratio: 1;
  background: var(--gold-grad);
  clip-path: polygon(50% 0, 61% 26%, 85% 15%, 74% 39%, 100% 50%, 74% 61%, 85% 85%, 61% 74%, 50% 100%, 39% 74%, 15% 85%, 26% 61%, 0 50%, 26% 39%, 15% 15%, 39% 26%);
  content: "";
  flex: none;
  width: 0.42em;
}

/* ---------- clients band: dark continuation of the hero ---------- */
.clients.clients--marquee {
  background:
    radial-gradient(ellipse 50% 120% at 85% 0%, #d6a84b14, transparent 70%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 100%);
  border: 0;
  color: #c3c8d2;
  padding-block: clamp(28px, 4vw, 48px) clamp(36px, 5vw, 64px);
}

.clients--marquee .clients__inner {
  display: block;
  padding-block: 0;
}

.clients--marquee .clients__label {
  margin: 0;
  color: #9198a6;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

.clients--marquee .clients__list {
  display: none;
}

.clients-marquee {
  /* logos carry no text: keep the track LTR so the loop maths works; RTL only flips the motion */
  direction: ltr;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  margin-block: clamp(14px, 2vw, 24px);
  overflow: hidden;
}

.clients-marquee__track {
  animation: clients-marquee 48s linear infinite;
  display: flex;
  width: max-content;
}

.clients-marquee:hover .clients-marquee__track {
  animation-play-state: paused;
}

[dir="rtl"] .clients-marquee__track {
  animation-direction: reverse;
}

.clients-marquee__group {
  align-items: center;
  display: flex;
  gap: clamp(40px, 5vw, 72px);
  list-style: none;
  margin: 0;
  padding: 0 clamp(20px, 2.5vw, 36px);
}

.clients-marquee__item img {
  display: block;
  filter: brightness(0) invert(1);
  height: clamp(52px, 6vw, 76px);
  max-width: 170px;
  object-fit: contain;
  opacity: 0.5;
  transition: filter 400ms ease, opacity 400ms ease, transform 400ms var(--ease, ease);
  width: auto;
}

.clients-marquee__item img:hover {
  filter: none;
  opacity: 1;
  transform: scale(1.12);
}

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

.clients__trusted {
  color: #9198a6;
  font-size: 0.92rem;
  margin: 0 auto;
  max-width: 52ch;
  text-align: center;
}

.stats {
  border-top: 1px solid #ffffff14;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(24px, 3vw, 36px) 0 0;
  padding-top: clamp(24px, 3vw, 36px);
}

.stat {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.stat__num {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-display, inherit);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.stat__label {
  color: #9198a6;
  font-size: 0.88rem;
  margin-top: 8px;
}

@media (width <= 640px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
  }
}

/* ---------- work cards: lift, darken, arrow ---------- */
.work__button {
  transition: transform 400ms var(--ease, ease);
}

.work__button:hover {
  transform: translateY(-4px);
}

.work__media {
  border-radius: 12px;
  box-shadow: 0 1px 0 #10192b0a;
  transition: box-shadow 400ms var(--ease, ease);
}

.work__button:hover .work__media {
  box-shadow: 0 22px 44px #10192b2b;
}

.work__button:hover .work__media img {
  transform: scale(1.06);
}

.work__media::after {
  background: linear-gradient(180deg, transparent 45%, #0c0d10b3 100%);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 400ms ease;
}

.work__media::before {
  align-items: center;
  background: #fffffff0;
  border-radius: 50%;
  color: #10192b;
  content: "\2197";
  display: grid;
  font-size: 1.1rem;
  height: 42px;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  opacity: 0;
  place-items: center;
  position: absolute;
  transform: scale(0.6) rotate(-20deg);
  transition: opacity 300ms ease, transform 400ms var(--ease, ease);
  width: 42px;
  z-index: 2;
}

.work__button:hover .work__media::after,
.work__button:focus-visible .work__media::after {
  opacity: 1;
}

.work__button:hover .work__media::before,
.work__button:focus-visible .work__media::before {
  opacity: 1;
  transform: none;
}

.work__count {
  z-index: 2;
}

.work__title {
  transition: color 300ms ease;
}

.work__button:hover .work__title {
  color: var(--gold, #b4862c);
}

/* ---------- calligraphy style cards ---------- */
.calligraphy-categories__card {
  transition: transform 350ms var(--ease, ease), box-shadow 350ms var(--ease, ease), border-color 300ms ease !important;
}

.calligraphy-categories__card:hover {
  border-color: color-mix(in srgb, var(--gold, #b4862c) 50%, transparent) !important;
  box-shadow: 0 18px 40px #10192b1f;
  transform: translateY(-5px);
}

/* ---------- pointer spotlight (position set by site-enhance.js) ---------- */
.spotlight {
  position: relative;
}

.spotlight::after {
  background: radial-gradient(360px circle at var(--mx, -400px) var(--my, -400px), color-mix(in srgb, var(--gold, #b4862c) 14%, transparent), transparent 60%);
  border-radius: inherit;
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 300ms ease;
}

.spotlight:hover::after {
  opacity: 1;
}

/* ---------- "How it works" ---------- */
.process__head {
  align-items: flex-end;
  flex-wrap: wrap;
}

.process__lead {
  color: var(--muted, #5c6372);
  margin: 0;
  max-width: 46ch;
}

.process__steps {
  counter-reset: step;
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* golden thread linking the four steps */
.process__steps::before {
  background: linear-gradient(to right, transparent, #d6a84b88 12%, #d6a84b88 88%, transparent);
  content: "";
  height: 1px;
  inset-inline: 6% 6%;
  position: absolute;
  top: 54px;
}

.process__step {
  background: var(--paper-3, #f7f7f4);
  border: 1px solid var(--line, #c9ccc3);
  border-radius: 16px;
  padding: clamp(22px, 2.4vw, 28px);
  transition: transform 350ms var(--ease, ease), box-shadow 350ms var(--ease, ease), border-color 300ms ease;
}

.process__step:hover {
  border-color: color-mix(in srgb, var(--gold, #b4862c) 45%, var(--line, #c9ccc3));
  box-shadow: 0 18px 40px #10192b1a;
  transform: translateY(-5px);
}

.process__icon {
  align-items: center;
  background: linear-gradient(145deg, #1a1f2e, #0c0d10);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 #ffffff14, 0 8px 18px #10192b33;
  color: #e9c46a;
  display: grid;
  height: 52px;
  place-items: center;
  position: relative;
  width: 52px;
  z-index: 1;
}

.process__icon svg {
  height: 24px;
  width: 24px;
}

.process__num {
  color: color-mix(in srgb, var(--gold, #b4862c) 70%, transparent);
  float: inline-end;
  font-family: var(--font-display, inherit);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: -40px;
}

.process__title {
  font-size: 1.15rem;
  margin: 18px 0 8px;
}

.process__text {
  color: var(--ink-2, #2b3446);
  font-size: 0.95rem;
  margin: 0;
}

.page .process {
  margin-top: clamp(40px, 6vw, 64px);
  padding: 0;
}

.page .process__steps {
  grid-template-columns: repeat(2, 1fr);
}

.page .process__steps::before {
  display: none;
}

@media (width <= 900px) {
  .process__steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .process__steps::before {
    display: none;
  }
}

@media (width <= 520px) {
  .process__steps,
  .page .process__steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- services band ---------- */
.section--band {
  background:
    radial-gradient(ellipse 40% 60% at 100% 0%, #d6a84b14, transparent 70%),
    radial-gradient(ellipse 40% 60% at 0% 100%, color-mix(in srgb, var(--lapis, #2541a3) 8%, transparent), transparent 70%),
    var(--paper-2, #e2e4dc);
}

.service-list {
  border-top: 0 !important;
  gap: clamp(14px, 2vw, 20px) !important;
}

.service-list li.service-card,
.service-list li.service-card + li.service-card {
  background: var(--paper-3, #f7f7f4);
  border: 1px solid var(--line, #c9ccc3);
  border-radius: 16px;
  padding: clamp(22px, 2.4vw, 28px);
  transition: transform 350ms var(--ease, ease), box-shadow 350ms var(--ease, ease), border-color 300ms ease;
}

.service-list li.service-card:hover {
  border-color: color-mix(in srgb, var(--gold, #b4862c) 45%, var(--line, #c9ccc3));
  box-shadow: 0 18px 40px #10192b1a;
  transform: translateY(-5px);
}

.service-card__icon {
  align-items: center;
  background: color-mix(in srgb, var(--gold, #b4862c) 14%, transparent);
  border-radius: 12px;
  color: color-mix(in srgb, var(--gold, #b4862c) 85%, var(--ink, #10192b));
  display: grid;
  height: 46px;
  margin-bottom: 6px;
  place-items: center;
  transition: background 300ms ease, color 300ms ease, transform 400ms var(--ease, ease);
  width: 46px;
}

.service-card__icon svg {
  height: 22px;
  width: 22px;
}

.service-card:hover .service-card__icon {
  background: var(--gold-grad);
  color: #1a1206;
  transform: rotate(-6deg) scale(1.06);
}

.service-list__price bdi {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.25rem;
  font-weight: 800;
}

/* ---------- pricing page cards ---------- */
.price {
  border-radius: 14px;
  transition: transform 350ms var(--ease, ease), box-shadow 350ms var(--ease, ease);
}

.price:hover {
  box-shadow: 0 16px 36px #10192b14;
  transform: translateY(-3px);
}

/* ---------- buttons ---------- */
.btn {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  transition: transform 250ms var(--ease, ease), box-shadow 250ms ease, background 250ms ease;
}

.btn::after {
  background: linear-gradient(105deg, transparent 30%, #ffffff59 50%, transparent 70%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-120%);
  transition: transform 700ms var(--ease, ease);
  z-index: -1;
}

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

.btn:hover::after {
  transform: translateX(120%);
}

.btn--ink:hover {
  box-shadow: 0 10px 24px #10192b33;
}

/* ---------- closing call to action: living gold light ---------- */
.cta {
  background:
    radial-gradient(ellipse 45% 70% at var(--cta-x, 20%) 30%, #d6a84b26, transparent 70%),
    radial-gradient(ellipse 40% 60% at 85% 90%, #2541a340, transparent 70%),
    linear-gradient(135deg, #0c0d10 0%, #131a2e 100%) !important;
  animation: cta-glow 14s ease-in-out infinite alternate;
}

@property --cta-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 20%;
}

@keyframes cta-glow {
  to { --cta-x: 70%; }
}

.cta .btn--paper {
  background: var(--gold-grad);
  border-color: transparent;
  box-shadow: 0 10px 30px #d6a84b40;
  color: #1a1206;
  font-weight: 700;
}

.cta .btn--paper:hover {
  box-shadow: 0 14px 38px #d6a84b66;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
}

.site-footer::before {
  background: linear-gradient(to right, transparent, #d6a84b99, transparent);
  content: "";
  height: 1px;
  inset: 0 0 auto 0;
  position: absolute;
}

/* ---------- floating WhatsApp ---------- */
.wa-float {
  align-items: center;
  background: linear-gradient(135deg, #2bd66a, #12a150);
  border-radius: 999px;
  bottom: max(18px, env(safe-area-inset-bottom));
  box-shadow: 0 12px 30px #12a15066, 0 2px 6px #0003;
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  gap: 10px;
  inset-inline-end: 18px;
  opacity: 0;
  padding: 12px 18px 12px 14px;
  pointer-events: none;
  position: fixed;
  text-decoration: none;
  transform: translateY(24px) scale(0.9);
  transition: opacity 350ms ease, transform 450ms var(--ease, ease), box-shadow 250ms ease;
  z-index: 50;
}

.wa-float svg {
  flex: none;
  height: 24px;
  width: 24px;
}

.wa-float.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.wa-float::before {
  animation: wa-pulse 2.6s ease-out infinite;
  border: 2px solid #2bd66a;
  border-radius: inherit;
  content: "";
  inset: 0;
  position: absolute;
}

.wa-float:hover {
  box-shadow: 0 16px 38px #12a15088, 0 2px 6px #0003;
  transform: translateY(-2px);
}

@keyframes wa-pulse {
  0% { opacity: 0.7; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.25); }
}

@media (width <= 640px) {
  .wa-float {
    padding: 14px;
  }

  .wa-float span {
    display: none;
  }
}

/* ---------- reveal on scroll (classes added by site-enhance.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 800ms var(--ease, ease) var(--reveal-delay, 0ms),
    transform 900ms var(--ease, ease) var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* cards that also move on hover: keep the hover transform snappy once revealed */
.work.reveal.is-visible,
.process__step.reveal.is-visible,
.service-card.reveal.is-visible {
  transition-delay: 0ms;
}

@media (prefers-reduced-motion: reduce) {
  .clients-marquee__track,
  .cta,
  .wa-float::before {
    animation: none !important;
  }

  .clients-marquee__track {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }

  .clients-marquee__group[aria-hidden="true"] {
    display: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
