/* Shared core for the four invitation experiences.
   Each page sets its own composition; this file holds tokens, type, the Basmala and the map button. */

:root {
  --navy: #0A1324;
  --navy-deep: #050A15;
  --champagne: #D8C39A;
  --gold: #C9A766;
  --ivory: #F1EADC;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: 'Noto Kufi Arabic', system-ui, sans-serif;
  background: var(--navy-deep);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: none; }
.nowrap { white-space: nowrap; }
.latin { unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Basmala: the family's calligraphy, vectorised, tinted through a mask */
.basmala {
  display: block;
  aspect-ratio: 6011 / 1512;
  background: currentColor;
  -webkit-mask: url(basmala.svg) center / contain no-repeat;
  mask: url(basmala.svg) center / contain no-repeat;
}

/* Location button: a real link. Gold sweeps in from the reading side (right) on hover / press */
.map {
  --line: rgba(216, 195, 154, .75);
  --fill: var(--champagne);
  --text: var(--champagne);
  --text-on: var(--navy);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75em;
  min-height: 50px;
  padding: .95em 1.9em;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  white-space: nowrap;
  transition: color .5s var(--ease-out), border-color .5s var(--ease-out), transform .25s ease;
}
.map::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: var(--fill);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .6s var(--ease-out);
}
.map svg { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; }
.map .arrow { transition: transform .5s var(--ease-out); }
@media (hover: hover) {
  .map:hover { color: var(--text-on); border-color: var(--fill); }
  .map:hover::before { transform: scaleX(1); }
  .map:hover .arrow { transform: translateX(-.3em); }
}
.map:focus-visible { outline: 1px solid var(--line); outline-offset: 5px; }
.map.is-pressed, .map:active { color: var(--text-on); border-color: var(--fill); transform: scale(.985); }
.map.is-pressed::before, .map:active::before { transform: scaleX(1); }

/* Desktop ambient: the same navy silk extends around the portrait stage */
.ambient { position: fixed; inset: 0; z-index: 0; background: var(--navy-deep); overflow: hidden; }
.ambient img { width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: saturate(.9); }
.ambient::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(5, 10, 21, .2), rgba(5, 10, 21, .85) 75%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* static share render: no button in a still image */
.still .map, .still .seal, .still .replay, .still .progress { display: none !important; }
