/* ==========================================================================
   ALMALAS — "Coming Soon" landing page
   Visual identity: dark-brown ink + antique gold on a clean white background,
   matched to the logo. (Previously light-cream text on a dark charcoal
   background with a photo overlay — flipped when the brand direction moved
   to dark-brown-on-white; see config.php for the color rationale.)
   Display font: Cormorant Garamond · Body font: Jost · Arabic: Tajawal
   All colors are exposed as CSS custom properties so config.php can
   override them without touching this file.
   ========================================================================== */

:root {
  --maroon: #6E1E28;
  --maroon-dark: #3B1015;
  --gold: #C9A24B;
  --gold-light: #E8D19C;
  --gold-deep: #8A6428;
  --cream: #3B1400;
  --charcoal: #FFFFFF;
  --charcoal-2: #F9F0E1;

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Jost', 'Segoe UI', sans-serif;
  --font-arabic: 'Tajawal', 'Segoe UI', sans-serif;

  --container-w: 880px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }
a { color: inherit; }

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--charcoal);
  overflow-x: hidden;
  line-height: 1.5;
}

/* ---- Background: faint gold glow + background photo, no dark wash ----
   The dark overlay that used to sit on top of the photo (for light-text
   legibility against a busy image) has been removed entirely now that
   text is dark ink on a white page — it doesn't need the photo darkened
   behind it. The photo is kept, but knocked down to a low, watermark-like
   opacity via the whole layer's `opacity`, so it reads as a subtle textured
   accent rather than competing with the page. Set opacity to 0 (or delete
   this block) if you'd rather have a flat white background with no photo
   at all. */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.14;
  background-image:
    radial-gradient(60% 50% at 18% 8%, rgba(201, 162, 75, 0.35), transparent 60%),
    var(--bg-photo, url("/image/arabic-bg.jpg"));
  background-repeat: no-repeat;
  background-position: center, center 30%;
  background-size: auto, cover;
}

@media (max-width: 640px) {
  .bg-scene {
    background-image:
      radial-gradient(70% 50% at 20% 6%, rgba(201, 162, 75, 0.35), transparent 60%),
      var(--bg-photo-mobile, url("/image/arabic-bg-mobile.jpg"));
    background-position: center, 70% center;
  }
}

/* ---- Layout ----------------------------------------------------------- */
.wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 32px;
}

main {
  width: 100%;
  max-width: var(--container-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

section {
  width: 100%;
}

/* ---- Reveal animation ------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) forwards;
}
.d1 { animation-delay: .05s; }
.d2 { animation-delay: .18s; }
.d3 { animation-delay: .32s; }
.d4 { animation-delay: .46s; }
.d5 { animation-delay: .60s; }
.d6 { animation-delay: .74s; }
.d7 { animation-delay: .88s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---- Logo -------------------------------------------------------------- */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 6px;
}

.logo-img {
  width: clamp(180px, 32vw, 300px);
  height: auto;
}

.logo-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.1rem);
  letter-spacing: 0.14em;
  color: var(--cream);
  text-transform: uppercase;
}
.logo-word em {
  font-style: normal;
  color: var(--gold-deep);
}

/* ---- Divider ------------------------------------------------------------ */
.divider {
  width: 180px;
  height: 20px;
  margin: 22px auto 30px;
  color: var(--gold);
  opacity: 0.85;
}
.divider path, .divider circle {
  stroke: currentColor;
  fill: none;
}

/* ---- Headline ------------------------------------------------------------ */
.headline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}
.headline-en {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1.05;
  background: linear-gradient(100deg, var(--cream) 25%, var(--gold-deep) 65%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.headline-ar {
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: clamp(1.8rem, 5.6vw, 2.7rem);
  color: var(--gold-deep);
}

.subhead {
  max-width: 620px;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.subhead p {
  margin: 0;
  color: rgba(59, 20, 0, 0.88);
}
.subhead .en { font-size: 1.02rem; }
.subhead .ar {
  font-family: var(--font-arabic);
  font-size: 1.05rem;
  line-height: 1.9;
}

/* ---- Countdown ------------------------------------------------------------ */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 460px;
  margin: 0 auto 44px;
}
.countdown-box {
  background: rgba(201, 162, 75, 0.07);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: var(--radius);
  padding: 14px 6px 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.countdown-box:hover {
  border-color: rgba(201, 162, 75, 0.7);
  transform: translateY(-2px);
}
.countdown-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.countdown-label {
  margin-top: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(59, 20, 0, 0.6);
}
.countdown.is-live .countdown-num { color: var(--cream); }

.launch-note {
  font-size: 0.85rem;
  color: rgba(59, 20, 0, 0.65);
  margin: -30px auto 40px;
}

/* ---- Signup form ------------------------------------------------------------ */
.signup {
  width: 100%;
  max-width: 460px;
  margin: 0 auto 56px;
}
.signup-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cream);
  margin: 0 0 4px;
}
.signup-title .ar {
  font-family: var(--font-arabic);
  font-weight: 700;
}
.signup-sub {
  font-size: 0.92rem;
  color: rgba(59, 20, 0, 0.7);
  margin: 0 0 18px;
}
.signup-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.signup-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.signup-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 75, 0.4);
  background: var(--charcoal-2);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.signup-input::placeholder { color: rgba(59, 20, 0, 0.4); }
.signup-input:focus {
  border-color: var(--gold);
  background: #FFFFFF;
}

.signup-btn {
  flex: 0 0 auto;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--cream);
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  box-shadow: 0 8px 24px -8px rgba(201, 162, 75, 0.55);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s;
}
.signup-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(201, 162, 75, 0.7); }
.signup-btn:active { transform: translateY(0); }
.signup-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.signup-msg {
  min-height: 22px;
  margin-top: 12px;
  font-size: 0.88rem;
  text-align: left;
}
.signup-msg[data-state="ok"], .signup-msg[data-state="duplicate"] { color: var(--gold-deep); }
.signup-msg[data-state="invalid"], .signup-msg[data-state="error"] { color: var(--maroon); }

/* ---- App teaser ------------------------------------------------------------ */
.app-teaser {
  max-width: 560px;
  margin: 0 auto 56px;
  padding: 32px 24px;
  border-radius: 20px;
  border: 1px solid rgba(201, 162, 75, 0.22);
  background: linear-gradient(160deg, var(--charcoal-2), #FFFFFF);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.app-teaser h2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0 8px;
  color: var(--cream);
}
.app-teaser h2 .ar {
  font-family: var(--font-arabic);
  font-weight: 700;
}
.app-teaser p {
  margin: 0 0 22px;
  font-size: 0.92rem;
  color: rgba(59, 20, 0, 0.72);
}

.app-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.app-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 75, 0.25);
  background: var(--charcoal-2);
  cursor: not-allowed;
  user-select: none;
}
.app-badge img {
  height: 38px;
  width: auto;
  border-radius: 6px;
  opacity: 0.9;
  transition: opacity .25s var(--ease);
}
.app-badge:hover img { opacity: 1; }
.app-badge-caption {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(59, 20, 0, 0.55);
}

/* ---- Social icons ------------------------------------------------------------ */
.social {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 0 auto 40px;
}
.social a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 75, 0.4);
  background: rgba(201, 162, 75, 0.08);
  color: var(--gold-deep);
  transition: background .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.social a svg { width: 18px; height: 18px; }
.social a:hover {
  background: rgba(201, 162, 75, 0.18);
  border-color: var(--gold);
  transform: translateY(-3px);
}

/* ---- Footer ------------------------------------------------------------ */
footer {
  width: 100%;
  max-width: var(--container-w);
  padding-top: 24px;
  border-top: 1px solid rgba(201, 162, 75, 0.3);
  text-align: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 1rem;
  color: var(--gold-deep);
  text-transform: uppercase;
}
.footer-meta {
  margin-top: 6px;
  font-size: 0.78rem;
  color: rgba(59, 20, 0, 0.55);
}
.footer-meta a { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Responsive tweaks ------------------------------------------------------------ */
@media (max-width: 480px) {
  .countdown { gap: 8px; }
  .countdown-box { padding: 10px 4px 8px; }
  .signup-form { flex-direction: column; }
  .signup-input { flex: none; width: 100%; }
  .signup-btn { width: 100%; }
  .app-teaser { padding: 24px 18px; }

  /* Keep the two store badges side by side instead of stacking — shrink
     them just enough to both fit in one row at ~360px+ widths. */
  .app-badges { gap: 8px; }
  .app-badge { padding: 10px 12px; gap: 6px; }
  .app-badge img { height: 28px; }
  .app-badge-caption { font-size: 0.56rem; letter-spacing: 0.1em; }
}

@media (min-width: 640px) {
  .wrap { padding: 64px 32px 40px; }
}
