/* Single-screen holding page: tokens, base, brand header, hero */

:root {
  color-scheme: light;

  /* Palette: Madinah heritage, olive ink + bronze + paper */
  --ink: #23220e;
  --olive-800: #2e2d12;
  --bronze-600: #8f6220;
  --bronze-500: #b07d2c;
  --gold-300: #e2c48a;
  --paper: #f7f1e4;
  --paper-light: #fcf9f2;
  --text: #2b2a14;
  --text-muted: #625f45;
  --line: rgba(46, 45, 18, 0.14);
  --line-strong: rgba(46, 45, 18, 0.28);

  /* Type */
  --font-display: "Reem Kufi", "IBM Plex Sans Arabic", "Geeza Pro", serif;
  --font-body: "IBM Plex Sans Arabic", "Geeza Pro", "Segoe UI", sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0938rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem);
  --text-2xl: clamp(1.75rem, 1.35rem + 1.8vw, 3rem);
  --text-hero: clamp(2.375rem, 1.5rem + 3.9vw, 4.75rem);

  /* Space and shape */
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --container: 1220px;
  --header-height: 4.75rem;
  --radius-md: 14px;
  --shadow-lift: 0 2px 4px rgba(35, 34, 14, 0.08), 0 24px 48px -20px rgba(35, 34, 14, 0.4);

  /* Motion */
  --duration-slow: 900ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Textures */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.14 0 0 0 0 0.13 0 0 0 0 0.05 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --star-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M14 14H42V42H14ZM28 8.2L47.8 28L28 47.8L8.2 28ZM28 0V8.2M56 28H47.8M28 56V47.8M0 28H8.2' fill='none' stroke='%232e2d12' stroke-width='.8'/%3E%3C/svg%3E");
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background-color: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.09;
  mix-blend-mode: multiply;
}

h1, p, dl, dd, figure {
  margin: 0;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: var(--gold-300);
  color: var(--ink);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Brand header (logo only) */
.site-header .container {
  display: flex;
  align-items: center;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  width: 2.1rem;
  height: auto;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
}

.brand-sub {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--bronze-600);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(1.5rem, 0.5rem + 3vw, 3.5rem) clamp(2.5rem, 1.5rem + 4vw, 5rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: -1;
  width: 62%;
  background-image: var(--star-ink);
  background-size: 56px;
  opacity: 0.07;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 30% 55%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 70% at 30% 55%, #000 10%, transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
}

.hero-copy > * {
  animation: rise var(--duration-slow) var(--ease-out-expo) both;
}

.hero-copy > :nth-child(2) { animation-delay: 90ms; }
.hero-copy > :nth-child(3) { animation-delay: 180ms; }
.hero-copy > :nth-child(4) { animation-delay: 270ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-light);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
}

.status-dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--bronze-500);
  box-shadow: 0 0 0 4px rgba(176, 125, 44, 0.18);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-hero);
  line-height: 1.32;
  color: var(--ink);
  text-wrap: balance;
}

.accent-word {
  color: var(--bronze-500);
  background-image: linear-gradient(transparent 68%, rgba(226, 196, 138, 0.5) 68%, rgba(226, 196, 138, 0.5) 92%, transparent 92%);
  padding-inline: 0.08em;
}

.br-wide {
  display: none;
}

.hero-lede {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: var(--text-lg);
  line-height: 1.95;
  color: var(--text-muted);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: clamp(1.25rem, 0.5rem + 3vw, 3rem);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.hero-facts div {
  display: flex;
  flex-direction: column-reverse;
}

.hero-facts dd {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 1.4rem + 1.6vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--olive-800);
}

.hero-facts dt {
  margin-top: 0.35rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Hero arch illustration */
.hero-visual {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 430px;
}

.arch-art {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(35, 34, 14, 0.28));
}

.arch-rays {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: rays-sway 16s ease-in-out 1.6s infinite alternate;
}

.arch-rays path {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: rays-in 1.8s var(--ease-out-expo) 0.2s both;
}

.arch-sun {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: sun-rise 1.6s var(--ease-out-expo) 0.1s both;
}

@keyframes rays-in {
  from { opacity: 0; transform: scale(0.35); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes rays-sway {
  from { transform: rotate(-2.5deg); }
  to { transform: rotate(2.5deg); }
}

@keyframes sun-rise {
  from { transform: translateY(70px); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

.hero-card {
  position: absolute;
  max-width: 15.5rem;
  padding: 0.9rem 1.15rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(252, 249, 242, 0.94);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: rise 1.1s var(--ease-out-expo) both;
}

.hero-card p {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--text);
}

.hero-card-label {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--bronze-600);
}

.hero-card-vision {
  bottom: 9%;
  inset-inline-end: -14%;
  animation-delay: 0.9s;
}

.hero-card-place {
  top: 30%;
  inset-inline-start: -10%;
  animation-delay: 1.15s;
}

.hero-card-place p {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
}

/* 404 page */
.page-message {
  display: grid;
  flex: 1;
  place-items: center;
  padding: var(--gutter);
  text-align: center;
}

.page-message .brand-mark {
  width: 4rem;
  margin: 0 auto 1.5rem;
}

.page-message h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--ink);
}

.page-message p {
  max-width: 30rem;
  margin: 1rem auto 0;
  color: var(--text-muted);
}

.page-message a {
  color: var(--bronze-600);
  font-weight: 600;
  text-underline-offset: 0.3em;
}

/* Responsive */
@media (min-width: 640px) {
  .br-wide {
    display: inline;
  }
}

@media (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 360px;
    margin-top: 1rem;
  }

  .hero-card-vision {
    inset-inline-end: -6%;
  }

  .hero-card-place {
    inset-inline-start: -4%;
  }
}

@media (max-width: 559px) {
  .status-pill {
    padding: 0.35rem 0.85rem;
    font-size: var(--text-xs);
  }

  .hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .hero-visual {
    max-width: 290px;
  }

  .hero-card {
    max-width: 12rem;
    padding: 0.7rem 0.9rem;
  }

  .hero-card-vision {
    inset-inline-end: -10%;
    bottom: 5%;
  }

  .hero-card-place {
    top: 26%;
    inset-inline-start: -8%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
