/* ── Palette ────────────────────────────────────
   Background:  #FAF7F0  warm cream
   Ink dark:    #1A1008  near-black
   Ink mid:     #3D2B1A  deep brown
   Ink soft:    #6B4C35  muted brown
   Divider:     #C8A882  warm tan
   Pink:        #C97080  dusty rose (و separator)
   ─────────────────────────────────────────────── */

/* ── Corner clusters ──────────────────────────── */

.corner {
  position: fixed;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}

.corner-tl { top: -8px;  left: -8px; }
.corner-tr { top: -8px;  right: -8px; }
.corner-bl { bottom: -8px; left: -8px; }
.corner-br { bottom: -8px; right: -8px; }

@keyframes floatCorner {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  40%       { transform: translate(2px,-5px) rotate(0.4deg); }
  70%       { transform: translate(-2px,-3px) rotate(-0.3deg); }
}

.corner-tl { animation: floatCorner 6.0s ease-in-out infinite; }
.corner-tr { animation: floatCorner 7.0s ease-in-out infinite 0.5s; }
.corner-bl { animation: floatCorner 6.5s ease-in-out infinite 1.0s; }
.corner-br { animation: floatCorner 7.5s ease-in-out infinite 1.5s; }

/* ── Page layout ──────────────────────────────── */

body {
  overflow-y: auto;
  overflow-x: hidden;
}

#page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(72px, 14vw, 140px) clamp(20px, 8vw, 80px);
  gap: clamp(16px, 3.5vw, 36px);
}

/* ── Content blocks ───────────────────────────── */

.block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2vw, 18px);
  width: 100%;
  max-width: 620px;
  opacity: 0;
  will-change: opacity, transform;
}

/* ── Dividers ─────────────────────────────────── */

.divider {
  width: clamp(100px, 28vw, 220px);
  height: 1px;
  background: linear-gradient(90deg, transparent, #C8A882 30%, #C8A882 70%, transparent);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  will-change: transform, opacity;
}

/* ── Basmala ──────────────────────────────────── */

#basmala-svg {
  width: clamp(240px, 72vw, 580px);
  height: auto;
  overflow: visible;
}

/* ── Verse ────────────────────────────────────── */

#verse-text {
  font-family: 'Scheherazade New', 'Amiri', serif;
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(14px, 2.4vw, 21px);
  color: #1A1008;
  text-align: center;
  direction: rtl;
  line-height: 2.4;
  max-width: min(560px, 90vw);
}

.verse-word { display: inline; }

#tagline-text {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(13px, 1.9vw, 17px);
  color: #6B4C35;
  text-align: center;
  direction: rtl;
}

/* ── Names ────────────────────────────────────── */

#names-tagline {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(13px, 1.8vw, 16px);
  color: #6B4C35;
  text-align: center;
  direction: rtl;
}

#names-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(6px, 2vw, 32px);
  direction: rtl;
  flex-wrap: nowrap;
  justify-content: center;
  width: 100%;
}

#name-mustafa,
#name-zahraa {
  height: clamp(90px, 24vw, 200px);
  width: auto;
  will-change: transform, opacity, filter;
}

#separator-and {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(18px, 2.8vw, 28px);
  color: #C97080;
  flex-shrink: 0;
}

/* ── Details ──────────────────────────────────── */

#details-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(8px, 2vw, 16px);
  direction: rtl;
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(14px, 1.9vw, 18px);
  color: #3D2B1A;
  flex-wrap: wrap;
  justify-content: center;
}

.detail-sep {
  color: #C8A882;
}

#details-closing {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(13px, 1.7vw, 16px);
  color: #6B4C35;
  direction: rtl;
  text-align: center;
}

/* ── Block header label ───────────────────────── */

.block-header {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(13px, 3.2vw, 15px);
  color: #6B4C35;
  letter-spacing: 0.06em;
  direction: rtl;
  text-align: center;
}

/* ── Contact ──────────────────────────────────── */

#phone-link {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(22px, 6vw, 28px);
  color: #1A1008;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  padding: 6px 0;
  display: inline-block;
}

#phone-link:hover { color: #C97080; }

#contact-note {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(13px, 3.2vw, 14px);
  color: #3D2B1A;
  direction: rtl;
  text-align: center;
}

/* ── Easter egg (punishment) ──────────────────── */

#block-option2 {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

#option2-trigger {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(13px, 3.5vw, 14px);
  color: #6B4C35;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline dashed rgba(200, 168, 130, 0.55);
  text-underline-offset: 3px;
  direction: rtl;
  padding: 4px;
  transition: color 0.2s;
}

#option2-trigger:hover { color: #6B4C35; }
#option2-trigger:disabled { opacity: 0.4; cursor: default; text-decoration: none; }

#option2-message {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(200, 168, 130, 0.10);
  border: 1px solid rgba(200, 168, 130, 0.28);
  border-radius: 12px;
  padding: 14px clamp(14px, 4vw, 20px);
  width: 100%;
  max-width: 360px;
  text-align: center;
  direction: rtl;
}

#option2-message.visible { display: flex; }

#option2-message p {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(14px, 3.8vw, 15px);
  color: #1A1008;
  line-height: 1.9;
}

.option2-btn {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(12px, 1.5vw, 13px);
  color: #6B4C35;
  background: none;
  border: 1px solid #C8A882;
  border-radius: 16px;
  padding: 5px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  direction: rtl;
}

.option2-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(200, 168, 130, 0.25);
}

/* ── Floating sheet trigger button ────────────── */

@keyframes pillPulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(61, 43, 26, 0.28), 0 0 0 0 rgba(61, 43, 26, 0.18); }
  60%       { box-shadow: 0 4px 24px rgba(61, 43, 26, 0.28), 0 0 0 8px rgba(61, 43, 26, 0); }
}

#sheet-trigger {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  direction: rtl;
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(14px, 3.8vw, 16px);
  font-weight: 500;
  color: #FAF7F0;
  background: #1A1008;
  border: none;
  border-radius: 32px;
  padding: 13px 26px 13px 20px;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(61, 43, 26, 0.28), 0 1px 6px rgba(61, 43, 26, 0.18);
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  opacity: 0;
  animation: pillPulse 2.8s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}

#sheet-trigger:hover {
  background: #3D2B1A;
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 10px 36px rgba(61, 43, 26, 0.32), 0 2px 8px rgba(61, 43, 26, 0.18);
  animation: none;
}

#sheet-trigger-icon { font-size: 17px; line-height: 1; }

/* ── Bottom sheet overlay ─────────────────────── */

#sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(26, 16, 8, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Bottom sheet ─────────────────────────────── */

#bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 70;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-top: 1px solid rgba(200, 168, 130, 0.40);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 48px rgba(61, 43, 26, 0.14);
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#bottom-sheet.open {
  transform: translateY(0);
}

#sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(200, 168, 130, 0.55);
  border-radius: 2px;
  margin: 14px auto 0;
}

#sheet-content {
  padding: 16px clamp(16px, 5vw, 28px) max(40px, env(safe-area-inset-bottom, 40px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  direction: rtl;
}

#sheet-title {
  height: clamp(38px, 8vw, 58px);
  width: auto;
}

/* ── Timeline (inside sheet) ──────────────────── */

.logistics-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
}

.timeline-step {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 0;
}

.step-label {
  flex: 1;
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(14px, 3.8vw, 16px);
  color: #1A1008;
  direction: rtl;
  text-align: center;
  line-height: 1.5;
}

.time-badge {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(12px, 3.2vw, 13px);
  color: #1A1008;
  background: rgba(200, 168, 130, 0.18);
  border: 1px solid rgba(200, 168, 130, 0.38);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
  direction: ltr;
  flex-shrink: 0;
}

.map-btn {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(12px, 3vw, 13px);
  color: #1A1008;
  border: 1px solid #C8A882;
  border-radius: 16px;
  padding: 5px 14px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  direction: ltr;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.map-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(200, 168, 130, 0.3);
}

.timeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
}

.connector-line {
  width: 1px;
  height: 14px;
  background: #C8A882;
  opacity: 0.55;
}

.connector-label {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(12px, 3vw, 13px);
  color: #3D2B1A;
  direction: rtl;
}

#sheet-note {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(13px, 3.5vw, 15px);
  color: #3D2B1A;
  text-align: center;
  direction: rtl;
  width: 100%;
  max-width: 420px;
}

.sheet-inner-divider {
  width: clamp(80px, 40%, 180px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,168,130,0.4) 40%, rgba(200,168,130,0.4) 60%, transparent);
}

#sheet-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* ── Reduced motion ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .corner, .block, .divider {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Reward QR block ──────────────────────────── */

#block-reward {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

#reward-title {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(16px, 4.5vw, 19px);
  font-weight: 700;
  color: #1A1008;
  direction: rtl;
  line-height: 1.5;
}

#reward-hint {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(13px, 3.5vw, 15px);
  color: #3D2B1A;
  direction: rtl;
  line-height: 1.85;
  max-width: 320px;
}

#reward-redeem {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(13px, 3.5vw, 14px);
  color: #3D2B1A;
  direction: rtl;
  text-align: center;
  line-height: 1.6;
}

#reward-trigger {
  background: rgba(200, 168, 130, 0.15);
  border: 1.5px solid #C8A882;
  border-radius: 24px;
  padding: 12px 32px;
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  font-size: clamp(15px, 4vw, 17px);
  color: #1A1008;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  min-height: 48px;
}

#reward-trigger:hover {
  background: rgba(200, 168, 130, 0.28);
  transform: translateY(-1px);
}

#reward-trigger:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

#reward-qr {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#reward-qr.visible {
  display: flex;
}

#qr-canvas {
  border-radius: 12px;
  border: 1px solid rgba(200, 168, 130, 0.35);
  box-shadow: 0 2px 20px rgba(200, 168, 130, 0.22);
  max-width: 100%;
}

#reward-code {
  font-family: 'Courier New', monospace;
  font-size: clamp(14px, 4vw, 16px);
  letter-spacing: 3px;
  color: #3D2B1A;
  background: rgba(200, 168, 130, 0.12);
  border: 1px solid rgba(200, 168, 130, 0.30);
  border-radius: 8px;
  padding: 8px 18px;
}
