/* =========================================================
   Jeddati Heritage — "Coming soon" screen
   Brand charter (Jeddati_Heritage_About_Us.pdf):
     sand #EAD9C6 · brand brown #6E3D22 · typeface Lora
   ========================================================= */

:root {
  --cream: #f3e6d3;
  --cream-soft: rgb(243 230 211 / .84);
  --cream-faint: rgb(243 230 211 / .6);
  --sand: #dcbf9f;
  --dark: #24150d;
  --hairline: rgb(243 230 211 / .3);

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --body:  "Lora", Georgia, serif;

  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.23, 1, .32, 1);   /* strong ease-out */
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}
html[lang="ar"] {
  --serif: "Amiri", "Noto Naskh Arabic", serif;
  --body:  "Noto Sans Arabic", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--dark);
  color: var(--cream);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }

/* ---------- Background: photos that cross-fade, lightly veiled ----------
   The veil is darkest just behind the text and fades out toward the edges,
   so the photos stay visible; text shadows keep the words readable. */
.bgs { position: fixed; inset: -24px; }       /* a bit larger than the screen, so the parallax never shows an edge */
.bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: var(--pos, 50% 50%);
  transform-origin: var(--origin, 50% 50%);
  filter: brightness(var(--b, 1));            /* per photo: brighter photos are dimmed a little so the text stays readable */
  opacity: 0;
}
.bg.is-prev   { opacity: 1; z-index: 1; }     /* stays under the incoming photo until it has fully appeared */
.bg.is-active { opacity: 1; z-index: 2; transition: opacity 2.2s var(--ease-in-out); }
.scrim { position: fixed; inset: 0; }
.scrim {
  background:
    radial-gradient(ellipse 42% 40% at 50% 50%, rgb(28 16 9 / .62) 0%, rgb(28 16 9 / .35) 70%, rgb(28 16 9 / .18) 100%),
    linear-gradient(0deg, rgb(28 16 9 / .65), transparent 20%);
}

/* ---------- Layout: one screen, content centred ---------- */
.page {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-rows: 1fr auto;
  padding: calc(env(safe-area-inset-top, 0px) + 28px) var(--pad) calc(env(safe-area-inset-bottom, 0px) + 24px);
  text-align: center;
}

.soon {
  align-self: center; justify-self: center;
  display: flex; flex-direction: column; align-items: center;
  padding-block: 2rem;
}
.soon__logo { width: clamp(170px, 18vw, 240px); height: auto; margin-bottom: 2.4rem; filter: drop-shadow(0 2px 18px rgb(20 11 6 / .6)); }
.soon__title, .soon__sub, .foot p { text-shadow: 0 1px 2px rgb(20 11 6 / .5), 0 2px 24px rgb(20 11 6 / .7); }

.ornament { display: flex; align-items: center; gap: .7rem; margin-bottom: 2rem; color: var(--sand); filter: drop-shadow(0 1px 6px rgb(20 11 6 / .7)); }
.ornament i { display: block; width: 44px; height: 1px; background: currentColor; opacity: .8; }
.ornament b { display: block; width: 9px; height: 9px; border: 1px solid currentColor; transform: rotate(45deg); position: relative; }
.ornament b::before { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: currentColor; top: -7px; left: -7px; }

.soon__title {
  margin: 0 0 1.2rem;
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.08;
  color: var(--cream);
  text-wrap: balance;
}
html[lang="ar"] .soon__title { font-style: normal; line-height: 1.45; }

.soon__sub {
  margin: 0; max-width: 38em; text-wrap: balance;
  font-size: .86rem; letter-spacing: .22em; text-transform: uppercase; line-height: 1.9;
  color: var(--cream-soft);
}
html[lang="ar"] .soon__sub { letter-spacing: 0; text-transform: none; font-size: 1.1rem; }

/* ---------- Contact: email ---------- */
.contact {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .9rem 2rem; margin: 2.4rem 0 0; padding: 0; list-style: none;
}
.contact a {
  display: inline-flex; align-items: center; gap: .7rem;
  color: var(--cream); text-decoration: none;
  text-shadow: 0 1px 2px rgb(20 11 6 / .5), 0 2px 18px rgb(20 11 6 / .7);
}
.contact svg {
  width: 18px; height: 18px; flex: none; color: var(--sand); filter: drop-shadow(0 1px 4px rgb(20 11 6 / .7));
  transition: transform .2s var(--ease);
}
.contact .v {
  font-size: .98rem; letter-spacing: .02em; direction: ltr; unicode-bidi: isolate;
  padding-bottom: .3rem; border-bottom: 1px solid var(--hairline);
  transition: border-color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .contact a:hover .v { border-color: var(--sand); }
  .contact a:hover svg { transform: translateY(-2px); }
}

/* ---------- Footer: Instagram (icon + @username) centred above the © line ---------- */
.foot { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.insta {
  display: inline-flex; align-items: center; gap: .75rem;
  color: var(--cream); text-decoration: none;
}
.insta__icon {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--hairline); background: rgb(28 16 9 / .35);
  transition: border-color .2s ease, background-color .2s ease, transform .2s var(--ease);
}
.insta:active .insta__icon { transform: scale(.96); transition-duration: .12s; }
.insta__handle {
  font-size: .95rem; letter-spacing: .04em; direction: ltr; unicode-bidi: isolate;
  padding-bottom: .25rem; border-bottom: 1px solid var(--hairline);
  text-shadow: 0 1px 2px rgb(20 11 6 / .5), 0 2px 18px rgb(20 11 6 / .7);
  transition: border-color .2s ease;
}
.insta svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 4px rgb(20 11 6 / .7));
}
.insta svg .dot { fill: currentColor; stroke: none; }
@media (hover: hover) and (pointer: fine) {
  .insta:hover .insta__icon { border-color: var(--sand); background: rgb(28 16 9 / .55); transform: translateY(-2px); }
  .insta:hover:active .insta__icon { transform: translateY(-2px) scale(.96); }
  .insta:hover .insta__handle { border-color: var(--sand); }
}
.foot p { margin: 0; font-size: .82rem; color: var(--cream-faint); }

/* ---------- Ambient motion ---------- */
/* Background: fades in on arrival, then each photo zooms in very slowly while it is shown */
.bgs { animation: fade-in 2.4s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }
.bg.is-active, .bg.is-prev { animation: drift 10s linear both; }
@keyframes drift { from { transform: scale(1.1); } to { transform: scale(1); } }

/* Steam: soft wisps rising from the bottom and fading as they go */
.steam { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.steam span {
  position: absolute; bottom: calc(var(--s) * -0.7); left: var(--x);
  width: var(--s); height: calc(var(--s) * 1.4); margin-left: calc(var(--s) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(243 230 211 / .13), rgb(243 230 211 / 0));
  opacity: 0;
  animation: steam var(--d) linear var(--delay) infinite;
  will-change: transform, opacity;
}
@keyframes steam {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) scale(.6); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), -115vh, 0) scale(1.7); }
}

/* ---------- Entrance: once per visit, staggered rise ---------- */

.reveal {
  opacity: 0; transform: translateY(12px);
  animation: rise .9s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 80ms + 150ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* Ornament: the lines draw outward from the diamond, which turns into place */
.ornament i { animation: draw 1s var(--ease) .4s both; }
.ornament i:first-child { transform-origin: right center; }
.ornament i:last-child  { transform-origin: left center; }
html[dir="rtl"] .ornament i:first-child { transform-origin: left center; }
html[dir="rtl"] .ornament i:last-child  { transform-origin: right center; }
@keyframes draw { from { transform: scaleX(0); } }
.ornament b { animation: gem 1.1s var(--ease) .3s both; }
@keyframes gem { from { opacity: 0; transform: rotate(-135deg) scale(.6); } }

@keyframes fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  /* Fewer, gentler: fades only — no zoom, steam, drawing or parallax */
  .bg.is-active, .bg.is-prev, .ornament i, .ornament b { animation: none; }
  .steam { display: none; }
  .reveal { transform: none; animation: fade .4s ease forwards; animation-delay: 0s; }
}

@media (max-width: 600px) {
  /* Portrait screens: the text covers more of the photo, so the veil is a bit wider */
  .scrim {
    background:
      radial-gradient(ellipse 85% 42% at 50% 50%, rgb(28 16 9 / .66) 0%, rgb(28 16 9 / .4) 70%, rgb(28 16 9 / .22) 100%),
      linear-gradient(0deg, rgb(28 16 9 / .6), transparent 18%);
  }
  .soon__logo { margin-bottom: 2rem; }
  .ornament { margin-bottom: 1.6rem; }
  .soon__sub { font-size: .78rem; letter-spacing: .18em; }
  .contact { flex-direction: column; gap: .9rem; margin-top: 2rem; }
}
