/* A textile in the room, not another HUD. The document is never scaled:
   the two selvedges unwind from its centre while the type stays still. */
#privacyModal.rug-dialog {
  --rug-art:url("assets/privacy-rug/carpet.webp");
  --rug-binding:clamp(23px,4.2vw,53px);
  --rug-fringe:calc(var(--rug-binding) * 1.2);
  --rug-side:max(8px,2.5vw,env(safe-area-inset-left),env(safe-area-inset-right));
  --rug-end:max(9px,3vh,env(safe-area-inset-top),env(safe-area-inset-bottom));
  --rug-open:850ms; --rug-close:560ms;
  --rug-ease-out:cubic-bezier(.32,.03,.17,1);
  --rug-ease-in:cubic-bezier(.45,.04,.69,.75);
  --rug-paper:#ffefd8; --rug-warm:#f1c99c;
  position:fixed; inset:0; margin:auto; padding:0; border:0; border-radius:0;
  width:min(60rem,calc(100% - 2 * var(--rug-side)))!important;
  max-width:calc(100% - 2 * var(--rug-side))!important;
  height:min(54rem,86vh); max-height:calc(100vh - 2 * var(--rug-end))!important;
  overflow:visible; background:transparent; box-shadow:none;
  color:var(--rug-paper); color-scheme:dark; text-align:start; text-shadow:none;
  font:400 1rem/1.56 "Segoe UI",Arial,sans-serif; letter-spacing:normal; text-transform:none;
  opacity:1; transform:none; clip-path:none; transition:none; outline:0;
}
@supports(height:100dvh) {
  #privacyModal.rug-dialog {height:min(54rem,86dvh); max-height:calc(100dvh - 2 * var(--rug-end))!important}
}
#privacyModal.rug-dialog:not([open]) {display:none}
#privacyModal.rug-dialog::backdrop {
  opacity:0; background:rgb(28 14 9 / .62);
  -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px);
  transition:opacity 380ms ease;
}
#privacyModal.rug-dialog[open].is-visible::backdrop {opacity:1}
#privacyModal.rug-dialog.is-closing::backdrop {opacity:0; transition-delay:115ms}

#privacyModal .rug-stage {
  position:relative; isolation:isolate; width:100%; height:100%;
  clip-path:inset(50% 0); transition:clip-path var(--rug-close) var(--rug-ease-in);
}
#privacyModal.is-visible .rug-stage {
  clip-path:inset(0% 0); transition:clip-path var(--rug-open) var(--rug-ease-out);
}
/* The inset mock weave gives the text an opaque backing even if the image
   is unavailable; it must never colour the transparent tassels. */
.rug-stage::before {
  content:""; position:absolute; z-index:-2;
  inset:calc(var(--rug-fringe) * .58) calc(var(--rug-binding) * .48);
  border-radius:4px; background:#591c21;
  box-shadow:0 9px 15px rgb(14 4 3 / .42);
}
.rug-weave {
  position:absolute; inset:0; z-index:-1; pointer-events:none;
  border:solid transparent; border-width:var(--rug-fringe) var(--rug-binding);
  /* Preserve tassels/corners at the same scale rather than stretching the
     entire landscape photograph vertically on phones. */
  border-image-source:var(--rug-art); border-image-slice:130 110 133 110 fill;
  border-image-repeat:round;
}
.rug-roll {
  position:absolute; z-index:2; inset-inline:calc(var(--rug-binding) * .21);
  height:clamp(9px,1.55vh,17px); overflow:hidden; border-radius:40% / 20%;
  pointer-events:none; opacity:1;
  /* A narrow real band of the same wool with light turning around it. */
  background-image:linear-gradient(var(--rug-light,180deg),#2c080e 2%,#ad625e8a 25%,#f9c08b66 42%,#9f514757 55%,#310c12dc 96%),var(--rug-art);
  background-size:auto,105% auto; background-position:center,center;
}
.rug-roll--top {
  top:50%; box-shadow:0 5px 10px #26091291;
  transition:top var(--rug-close) var(--rug-ease-in),opacity 100ms ease-out;
}
.rug-roll--bottom {
  --rug-light:0deg; bottom:50%; box-shadow:0 -5px 10px #26091291;
  transition:bottom var(--rug-close) var(--rug-ease-in),opacity 100ms ease-out;
}
#privacyModal.is-visible .rug-roll--top {
  top:0; opacity:0; transition:top var(--rug-open) var(--rug-ease-out),opacity 185ms ease 610ms;
}
#privacyModal.is-visible .rug-roll--bottom {
  bottom:0; opacity:0; transition:bottom var(--rug-open) var(--rug-ease-out),opacity 185ms ease 610ms;
}

.rug-reading {
  position:absolute; z-index:1;
  inset-block:calc(var(--rug-fringe) + clamp(9px,1.8vh,19px));
  inset-inline:calc(var(--rug-binding) + clamp(10px,2.9vw,44px));
  overflow:auto; overflow-x:hidden; overscroll-behavior:contain;
  scrollbar-width:thin; scrollbar-color:#bf875f transparent; scrollbar-gutter:stable;
  padding-inline:clamp(3px,.7vw,11px); opacity:0; transition:opacity 120ms ease-out;
}
#privacyModal.is-visible .rug-reading {opacity:1; transition:opacity 350ms ease-out 320ms}
.rug-reading:focus:not(:focus-visible) {outline:none}
.rug-reading:focus-visible {outline:2px solid var(--rug-warm); outline-offset:2px}
.rug-copy,.rug-footer {max-width:66ch; margin-inline:auto; overflow-wrap:anywhere}
.rug-copy {padding-block:.22rem .5rem}
.rug-copy h2,.rug-copy h3 {
  font-family:Georgia,"Times New Roman",serif; font-weight:500;
  color:var(--rug-paper); text-transform:none; letter-spacing:-.024em; text-align:start;
}
.rug-copy h2 {
  margin:0; padding-inline-end:1.4rem;
  font-size:clamp(1.85rem,3.3vw,3.16rem); line-height:1.08; text-wrap:balance;
}
.rug-copy .privacy-effective {
  margin:.82rem 0 0; padding:0; font:500 .91rem/1.45 "Segoe UI",Arial,sans-serif;
  color:var(--rug-warm); letter-spacing:normal; text-transform:none;
}
.rug-copy .privacy-intro,.rug-copy .privacy-section p {
  padding:0; border:none; background:none; font-size:clamp(1rem,1.13vw,1.13rem);
  line-height:1.61; color:var(--rug-paper);
}
.rug-copy .privacy-intro {margin:1.25rem 0 1.55rem}
.rug-copy .privacy-section {padding:1.18rem 0 1.25rem; border-top:1px solid rgb(239 186 130 / .34)}
.rug-copy .privacy-section h3 {
  margin:0 0 .42rem; font-size:clamp(1.26rem,1.7vw,1.65rem); line-height:1.23;
  letter-spacing:-.016em; text-transform:none; font-family:Georgia,"Times New Roman",serif;
  font-weight:500; color:var(--rug-paper);
}
.rug-copy .privacy-section p {margin:0}
.rug-copy .privacy-section a {
  border:0; color:#ffd493; text-decoration:underline; text-underline-offset:.19em;
  text-decoration-thickness:1px; unicode-bidi:isolate;
}
.rug-copy .privacy-section a:hover,.rug-copy .privacy-section a:focus-visible {color:white}
.rug-copy .privacy-section a:focus-visible,.rug-close:focus-visible {outline:2px solid #ffe3a8; outline-offset:2px}
.rug-footer {
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:.4rem 1.2rem;
  border-top:1px solid rgb(239 186 130 / .42); padding-block:.74rem .25rem;
  color:var(--rug-warm); font-size:.84rem; line-height:1.45;
}
.rug-close {
  position:absolute; z-index:3; inset-block-start:calc(var(--rug-fringe) + 4px);
  inset-inline-end:calc(var(--rug-binding) + 7px); width:44px; height:44px;
  display:grid; place-content:center; padding:0; border:1px solid rgb(255 221 170 / .65);
  border-radius:50%; color:var(--rug-paper); cursor:pointer;
  background:#4a151bd9; font:400 26px/1 "Segoe UI",Arial,sans-serif;
  opacity:0; transition:opacity 110ms ease-out;
}
#privacyModal.is-visible .rug-close {opacity:1; transition:opacity 250ms ease-out 390ms}
.rug-close:hover {background:#691e24; border-color:var(--rug-warm)}
html[lang="ar"] .rug-stage {direction:rtl}
html[lang="ar"] .rug-copy :is(h2,h3) {letter-spacing:normal; line-height:1.38}
html[lang="ar"] .rug-copy :is(a[href^="tel:"],a[href^="mailto:"]) {
  display:inline-block; direction:ltr; unicode-bidi:isolate;
}

@media(max-width:760px) {
  #privacyModal.rug-dialog {height:91vh; height:91dvh}
  .rug-reading {
    inset-block-start:calc(var(--rug-fringe) + 52px); inset-block-end:calc(var(--rug-fringe) + 7px);
    inset-inline:calc(var(--rug-binding) + 4px); padding-inline:clamp(4px,1.55vw,12px);
  }
  .rug-close {inset-block-start:calc(var(--rug-fringe) + 2px); inset-inline-end:calc(var(--rug-binding) + 7px)}
  .rug-copy h2 {padding-inline-end:0}
}
@media(max-height:460px) {
  #privacyModal.rug-dialog {--rug-end:max(4px,env(safe-area-inset-top),env(safe-area-inset-bottom)); --rug-binding:22px; height:97vh; height:97dvh}
}
@media(prefers-reduced-motion:reduce) {
  #privacyModal.rug-dialog::backdrop,#privacyModal :is(.rug-stage,.rug-reading,.rug-close) {transition:none!important}
  #privacyModal .rug-roll {display:none}
}
