:root {
  --cream: #f3ebe3;
  --paper: #ece1d4;
  --sand: #e2d2bf;
  --gold: #8b6a3e;
  --gold-light: #b8955f;
  --gold-deep: #6e5130;
  --ink: #3d2c1c;
  --ink-soft: #6b5a48;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --sadu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='30' viewBox='0 0 56 30'%3E%3Cg fill='none' stroke='%238b6a3e' stroke-width='1.6'%3E%3Cpath d='M0 26 L14 8 L28 26 L42 8 L56 26'/%3E%3Cpath d='M0 20 L14 2 L28 20 L42 2 L56 20' opacity='.55'/%3E%3C/g%3E%3Cg fill='%238b6a3e'%3E%3Cpath d='M28 6 l2.5 3 l-2.5 3 l-2.5 -3z'/%3E%3Cpath d='M0 6 l2.5 3 l-2.5 3 l-2.5 -3z M56 6 l2.5 3 l-2.5 3 l-2.5 -3z'/%3E%3C/g%3E%3C/svg%3E");
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 30%, #f8f2ec 0%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 110%, var(--sand) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .35  0 0 0 0 .22  0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}

/* ---------- Ambient layers ---------- */

.dust {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 35%), rgba(184, 149, 95, .16), transparent 65%);
  transition: background .2s;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(56px, 9vh, 96px) 24px clamp(150px, 26vh, 240px);
}

.emblem {
  position: relative;
  width: clamp(104px, 15vw, 150px);
  margin-bottom: clamp(18px, 3vh, 30px);
  perspective: 700px;
}

.halo {
  position: absolute;
  inset: -45% -60%;
  background: radial-gradient(closest-side, rgba(184, 149, 95, .28), rgba(184, 149, 95, 0) 70%);
  opacity: 0;
  animation: fade 2s 1.4s ease forwards, breathe 6s 3.4s ease-in-out infinite;
  z-index: -1;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease-out);
  filter: drop-shadow(0 10px 18px rgba(110, 81, 48, .14));
}

.logo .arch {
  fill: none;
  stroke: url(#logo-gold);
  stroke-width: 12;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2s .3s var(--ease-in-out) forwards;
}

.logo .dunes {
  opacity: 0;
  transform: translateY(26px);
  animation: rise 1.4s 1.1s var(--ease-out) forwards;
}

.logo .ridges path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.2s 1.6s var(--ease-out) forwards;
}
.logo .ridges path:nth-child(2) { animation-delay: 1.75s; }
.logo .ridges path:nth-child(3) { animation-delay: 1.9s; }
.logo .ridges path:nth-child(4) { animation-delay: 2.05s; }
.logo .ridges path:nth-child(5) { animation-delay: 2.2s; }

.logo .fort {
  opacity: 0;
  transform: translateY(40px);
  animation: rise 1.4s 1.45s var(--ease-out) forwards;
}

.logo .trunk {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  animation: grow 1.3s 1.8s var(--ease-out) forwards;
}

.logo .crown {
  transform-box: view-box;
  transform-origin: 100px 98px;
  animation: sway 7s 3.6s ease-in-out infinite;
}

.logo .frond {
  transform-box: view-box;
  transform-origin: 100px 98px;
  transform: scale(0) rotate(-20deg);
  opacity: 0;
  animation: unfurl 1.1s calc(2.45s + var(--i) * .09s) var(--ease-out) forwards;
}

.title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.3rem, 6.4vw, 4.4rem);
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .28em;
}

.title .word {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transform: translateY(.45em);
  animation: reveal 1.3s calc(2.7s + var(--w) * .16s) var(--ease-out) forwards;
}

.family {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(8px, 1.4vh, 14px);
}

.family-name {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 500;
  color: var(--gold);
  opacity: 0;
  animation: fade 1.2s 3.4s ease forwards;
}

.rule {
  position: relative;
  display: block;
  width: clamp(36px, 8vw, 84px);
  height: 1px;
  background: linear-gradient(to left, rgba(139, 106, 62, .75), rgba(139, 106, 62, 0));
  transform: scaleX(0);
  transform-origin: right center;
  animation: grow-x 1.2s 3.25s var(--ease-out) forwards;
}
.family .rule:last-child {
  background: linear-gradient(to right, rgba(139, 106, 62, .75), rgba(139, 106, 62, 0));
  transform-origin: left center;
}
.rule i {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: translate(50%, -50%) rotate(45deg);
}
.family .rule:first-child i { right: 0; }
.family .rule:last-child i { left: 0; transform: translate(-50%, -50%) rotate(45deg); }

.statement {
  margin: clamp(22px, 4vh, 38px) 0 0;
  max-width: 40ch;
  text-wrap: balance;
  font-size: clamp(1rem, 2.1vw, 1.25rem);
  font-weight: 300;
  line-height: 1.9;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(12px);
  animation: rise 1.3s 3.65s var(--ease-out) forwards;
}

.soon {
  position: relative;
  margin-top: clamp(22px, 4vh, 36px);
  padding: 12px 40px 14px;
  border-radius: 999px;
  isolation: isolate;
  opacity: 0;
  transform: scale(.9);
  animation: pop 1.2s 4s var(--ease-out) forwards;
}

.soon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 252, 248, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px -12px rgba(110, 81, 48, .35), inset 0 1px 0 rgba(255, 255, 255, .7);
  z-index: -2;
}

.soon-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: conic-gradient(from var(--angle, 0deg), rgba(139, 106, 62, .15), rgba(184, 149, 95, .95), rgba(139, 106, 62, .15) 30%, rgba(139, 106, 62, .15) 70%, rgba(184, 149, 95, .95), rgba(139, 106, 62, .15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 6s linear infinite;
  z-index: -1;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.soon-text {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  background: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold-deep) 38%, #d9b97f 50%, var(--gold-deep) 62%, var(--gold-deep) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4.5s 4.4s ease-in-out infinite;
  background-position: 100% 0;
}

.verse {
  margin: clamp(24px, 4.5vh, 40px) 0 0;
  font-family: "Amiri", serif;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--gold);
  opacity: 0;
  animation: fade-to 1.6s 4.5s ease forwards;
  --to: .85;
}

/* ---------- Skyline ---------- */

.skyline {
  position: fixed;
  inset: auto 0 0 0;
  height: clamp(170px, 34vh, 330px);
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 45%, transparent 100%);
  mask-image: linear-gradient(to top, #000 45%, transparent 100%);
}

.sky-layer {
  position: absolute;
  bottom: 0;
  left: -4%;
  width: 108%;
  height: 100%;
  transition: transform 1.2s var(--ease-out);
}
.sky-front { height: 72%; }

.sky-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0;
  transform: translateY(50px);
}
.sky-back img { animation: sky-in 2.4s .5s var(--ease-out) forwards; --to: .9; }
.sky-front img { animation: sky-in 2.4s .8s var(--ease-out) forwards; }

/* ---------- Footer ---------- */

.footer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 5;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  opacity: 0;
  animation: fade 1.6s 1.2s ease forwards;
}

.sadu {
  height: 30px;
  margin: 0 0 12px;
  background-image: var(--sadu);
  background-repeat: repeat-x;
  background-position: 0 0;
  opacity: .5;
  animation: sadu-drift 40s linear infinite;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.footer p {
  margin: 0;
  font-size: .8rem;
  font-weight: 400;
  color: var(--ink-soft);
  opacity: .85;
}

/* ---------- Keyframes ---------- */

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes fade-to { to { opacity: var(--to, 1); } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { to { opacity: 1; transform: none; } }
@keyframes grow { to { transform: scaleY(1); } }
@keyframes grow-x { to { transform: scaleX(1); } }
@keyframes unfurl { to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes reveal { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes sway {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(2.2deg); }
  70% { transform: rotate(-1.6deg); }
}
@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.92); }
}
@keyframes spin { to { --angle: 360deg; } }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  45%, 100% { background-position: 0% 0; }
}
@keyframes sky-in { to { opacity: var(--to, 1); transform: none; } }
@keyframes sadu-drift { to { background-position: -560px 0; } }

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .hero { padding-top: 64px; }
  .statement { max-width: 22ch; }
  .footer p { font-size: .72rem; padding: 0 28px; }
}

@media (max-height: 640px) and (min-width: 561px) {
  .verse { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .dust { display: none; }
}
