/* ==========================================================================
   Motif kit: the Asli ornament language, from the client's reference sheet
   (docs/MOTIFS.md). Fine gold line on cream; the stones (lapis, carnelian,
   malachite) appear only as small set dots. Ornament frames the content, in
   corners, edges and seams; it never fills the field.
   Tiles and the sprite are generated by tools/assets/motifs.mjs (geometry
   lives there); everything here is decoration, so keep it aria-hidden.
   ========================================================================== */
:root {
  /* Inlay border: two rules and a gold vine set with stones (the inlay plate's border strip). */
  --m-inlay: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='20' viewBox='0 0 96 20'%3E%3Cg fill='none' stroke='%23c59a5b' stroke-width='.8'%3E%3Cpath d='M0 1.5H96M0 18.5H96'/%3E%3Cpath d='M0 10C8 4 16 4 24 10S40 16 48 10S64 4 72 10S88 16 96 10'/%3E%3C/g%3E%3Cg fill='%23c59a5b'%3E%3Cpath d='M5 7.2Q7 3.6 10.5 4Q9 7 5 7.2Z'/%3E%3Cpath d='M29 12.8Q31 16.4 34.5 16Q33 13 29 12.8Z'/%3E%3Cpath d='M53 7.2Q55 3.6 58.5 4Q57 7 53 7.2Z'/%3E%3Cpath d='M77 12.8Q79 16.4 82.5 16Q81 13 77 12.8Z'/%3E%3C/g%3E%3Cg stroke='%23c59a5b' stroke-width='.6'%3E%3Ccircle cx='16' cy='10.8' r='2' fill='%232c4a7e'/%3E%3Ccircle cx='40' cy='9.2' r='2' fill='%23b4532f'/%3E%3Ccircle cx='64' cy='10.8' r='2' fill='%232f6e52'/%3E%3Ccircle cx='88' cy='9.2' r='2' fill='%23b4532f'/%3E%3C/g%3E%3C/svg%3E");
  /* Beaded plinth (the jharokha's base). */
  --m-beads: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cg fill='none' stroke='%23c59a5b' stroke-width='.8'%3E%3Cpath d='M0 .5H24M0 11.5H24'/%3E%3Ccircle cx='12' cy='6' r='3'/%3E%3C/g%3E%3Cg fill='%23c59a5b'%3E%3Ccircle cx='0' cy='6' r='1.1'/%3E%3Ccircle cx='24' cy='6' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
  /* Cusped edge (mask): a row of lobes rising from the bottom. */
  --m-scallop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='14' viewBox='0 0 40 14'%3E%3Cpath d='M0 14V12A10 9 0 0 1 20 12A10 9 0 0 1 40 12V14Z'/%3E%3C/svg%3E");
  /* Pietra-dura vine: an ogee lattice of gold stems with a stone lotus at each crossing. */
  --m-vine: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c59a5b' stroke-width='.9'%3E%3Cpath d='M0 0C30 10 30 50 60 60S90 110 120 120M120 0C90 10 90 50 60 60S30 110 0 120'/%3E%3Cpath d='M27 30C20 30 17 24 21 20C25 17 29 21 26 24M93 30C100 30 103 24 99 20C95 17 91 21 94 24M27 90C20 90 17 96 21 100C25 103 29 99 26 96M93 90C100 90 103 96 99 100C95 103 91 99 94 96'/%3E%3C/g%3E%3Cg stroke='%23c59a5b' stroke-width='.7'%3E%3Cpath fill='%232c4a7e' d='M60 46C64 52 64 58 60 62C56 58 56 52 60 46Z'/%3E%3Cpath fill='%232f6e52' d='M60 62C54 61 49 55 48 49C54 51 58 56 60 62ZM60 62C66 61 71 55 72 49C66 51 62 56 60 62Z'/%3E%3C/g%3E%3Ccircle cx='60' cy='63' r='1.8' fill='%23b4532f'/%3E%3Cg fill='%23c59a5b'%3E%3Ccircle cx='0' cy='60' r='1.4'/%3E%3Ccircle cx='120' cy='60' r='1.4'/%3E%3Ccircle cx='60' cy='0' r='1.4'/%3E%3Ccircle cx='60' cy='120' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
  /* Diagonal buti lattice (the dupatta all-over): stitched diamonds, a four-dot flower in each. */
  --m-lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 0L40 20L20 40L0 20Z' fill='none' stroke='%23c59a5b' stroke-width='.7' stroke-dasharray='2 2'/%3E%3Cg fill='%23c59a5b'%3E%3Ccircle cx='20' cy='17' r='1.3'/%3E%3Ccircle cx='20' cy='23' r='1.3'/%3E%3Ccircle cx='17' cy='20' r='1.3'/%3E%3Ccircle cx='23' cy='20' r='1.3'/%3E%3C/g%3E%3Ccircle cx='20' cy='20' r='1' fill='%23b4532f'/%3E%3C/svg%3E");
  /* Khatam jaali, the same lattice as the numbers card and the skyline sweep. */
  --m-jaali: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c59a5b' stroke-width='.8'%3E%3Cg id='s'%3E%3Crect x='20' y='20' width='24' height='24'/%3E%3Crect x='20' y='20' width='24' height='24' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='5.5'/%3E%3C/g%3E%3Cuse href='%23s' x='-32' y='-32'/%3E%3Cuse href='%23s' x='32' y='-32'/%3E%3Cuse href='%23s' x='-32' y='32'/%3E%3Cuse href='%23s' x='32' y='32'/%3E%3Cpath d='M32 -6 38 0 32 6 26 0Z M32 58 38 64 32 70 26 64Z M-6 32 0 26 6 32 0 38Z M58 32 64 26 70 32 64 38Z'/%3E%3Cpath d='M32 15V6M32 49V58M15 32H6M49 32H58M44 44 52 52M20 20 12 12M44 20 52 12M20 44 12 52'/%3E%3C/g%3E%3C/svg%3E");
  /* Cusped (multifoil) arch, filled, in the same 400 x 500 box as the pointed-arch mask. */
  --m-arch-cusped: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500' preserveAspectRatio='none'%3E%3Cpath d='M12 488V230A39.03 39.03 0 0 1 23.97 166.06A35.94 35.94 0 0 1 55.44 115.09A36.05 36.05 0 0 1 99.71 74.48A36.1 36.1 0 0 1 150.13 41.65A34.21 34.21 0 0 1 200 14A34.21 34.21 0 0 1 249.87 41.65A36.1 36.1 0 0 1 300.29 74.48A36.05 36.05 0 0 1 344.56 115.09A35.94 35.94 0 0 1 376.03 166.06A39.03 39.03 0 0 1 388 230V488Z'/%3E%3C/svg%3E");
}

/* Borders: full-width strips for seams between sections. */
.mn-m-inlay { display: block; height: 2rem; background: var(--m-inlay) center / auto 100% repeat-x; }
.mn-m-beads { display: block; height: 1.2rem; background: var(--m-beads) center / auto 100% repeat-x; }
/* A cusped edge in currentColor: set color to the neighbouring section's background. */
.mn-m-scallop {
  display: block;
  height: 1.4rem;
  background: currentColor;
  -webkit-mask: var(--m-scallop) center bottom / 4rem 100% repeat-x;
          mask: var(--m-scallop) center bottom / 4rem 100% repeat-x;
}

/* Fills: an absolutely placed layer behind content, faint (--m-o), optionally faded at the centre. */
.mn-m-vine, .mn-m-lattice, .mn-m-jaali {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--m-o, .14);
}
.mn-m-vine { background: var(--m-vine) center / 12rem 12rem repeat; }
.mn-m-lattice { background: var(--m-lattice) center / 4rem 4rem repeat; }
.mn-m-jaali { background: var(--m-jaali) center / 6.4rem 6.4rem repeat; }
/* Keeps the field clear: the pattern lives at the edges, as in the corner-border reference. */
.mn-m-fade {
  -webkit-mask: radial-gradient(ellipse 62% 58% at 50% 50%, transparent 0%, rgba(0,0,0,.08) 45%, #000 100%);
          mask: radial-gradient(ellipse 62% 58% at 50% 50%, transparent 0%, rgba(0,0,0,.08) 45%, #000 100%);
}

/* Cusped-arch mask for photos (pairs with the pointed arch used by Quick Experiences). */
.mn-m-arch {
  -webkit-mask: var(--m-arch-cusped) 0 0 / 100% 100% no-repeat;
          mask: var(--m-arch-cusped) 0 0 / 100% 100% no-repeat;
}

/* Sprite symbols: <svg class="mn-m-sym"><use href="assets/img/motifs.svg#m-lotus"/></svg>.
   Strokes take color and stroke-width from here; tween the <use>'s stroke-dashoffset 1 -> 0 to draw. */
.mn-m-sym { display: inline-block; overflow: visible; color: var(--gold); stroke-width: 1; }
.mn-m-sym use { stroke-dasharray: 1; stroke-dashoffset: 0; }
