/* ============================================================
   Masarra Perfume — Coming Soon / Waitlist
   Built to design_handoff_masarra_coming_soon (high-fidelity).
   PROVISIONAL brand values per client brief (palette/fonts/logo) —
   confirm before launch. Arabic copy is an AI draft pending native review.
   Arabic is DEFAULT (html lang=ar dir=rtl); layout self-mirrors via dir.
   ============================================================ */

:root {
  --canvas: #FAF6F0;
  --ink: #2B2420;          /* headings / wordmark */
  --body: #5F5449;         /* body text */
  --muted: #8A7C6D;
  --muted-2: #9B8E7D;
  --muted-3: #B9AC9C;
  --accent: #B5734A;       /* eyebrow, divider, glows — never large fills */
  --accent-dark: #8A5432;  /* phone number */
  --gold-tan: #C7935F;     /* on dark */
  --royal: #14100D;        /* royal black surfaces */
  --border: rgba(43,36,32,0.16);
  --border-strong: rgba(43,36,32,0.22);
  --hair: rgba(43,36,32,0.12);
  --sep: #C4B7A5;

  --f-latin-display: "Cormorant Garamond", serif;
  --f-latin-body: "Mulish", system-ui, sans-serif;
  --f-ar-display: "Amiri", serif;
  --f-ar-body: "Tajawal", system-ui, sans-serif;

  --neon-rest: 0 0 22px rgba(181,115,74,0.55), 0 6px 18px rgba(20,16,13,0.28);
  --neon-hover: 0 0 30px rgba(181,115,74,0.75), 0 8px 22px rgba(20,16,13,0.3);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--f-ar-body);
  background-image:
    radial-gradient(120% 45% at 50% -8%, rgba(181,115,74,0.28) 0%, rgba(181,115,74,0) 62%),
    radial-gradient(90% 30% at 50% 108%, rgba(181,115,74,0.16) 0%, rgba(181,115,74,0) 60%);
  background-attachment: fixed;
}
html[lang="en"] body { font-family: var(--f-latin-body); }

/* ---------- Page frame: header / main / footer ---------- */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  justify-content: flex-end;   /* toggle at end; mirrors by dir */
  align-items: baseline;
  padding: 26px 28px 0;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 0 34px;
}

.site-footer {
  padding: 0 40px 32px;
  text-align: center;
}

/* ---------- Language toggle ---------- */
.lang-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: none;
  border: 0;
  padding: 10px 4px;              /* ≥44px hit area */
  margin: -10px -4px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}
html[lang="en"] .lang-toggle { flex-direction: row-reverse; }  /* active lang first */
.lang-toggle .sep { color: var(--sep); }
.lang-toggle .lang-ar { font-family: var(--f-ar-body); }
.lang-toggle .lang-en { font-family: var(--f-latin-body); letter-spacing: 0.08em; }
html[lang="ar"] .lang-ar,
html[lang="en"] .lang-en { color: var(--ink); font-weight: 700; }
html[lang="ar"] .lang-en,
html[lang="en"] .lang-ar { color: var(--muted); font-weight: 400; }

/* ---------- Brand / wordmark ---------- */
.brand--header { display: none; align-items: baseline; gap: 12px; }
.brand--main { margin: 12px 0 0; }

.wordmark { color: var(--ink); line-height: 1.2; }
html[lang="ar"] .brand--main .wordmark { font-family: var(--f-ar-display); font-size: 44px; }
html[lang="en"] .brand--main .wordmark { font-family: var(--f-latin-display); font-size: 33px; letter-spacing: 0.2em; text-indent: 0.2em; }

.subline {
  margin: 4px 0 0;
  font-family: var(--f-latin-body);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
}
html[lang="ar"] .brand--main .subline { letter-spacing: 0.44em; text-indent: 0.44em; }
html[lang="en"] .brand--main .subline { letter-spacing: 0.46em; text-indent: 0.46em; margin-top: 6px; }
/* No Latin "Masarra Perfume" name on the Arabic page (wordmark only) */
html[lang="ar"] .subline { display: none; }

/* ---------- Eyebrow ---------- */
.eyebrow { margin: 0; color: var(--accent); font-weight: 700; }
html[lang="ar"] .eyebrow { font-family: var(--f-ar-body); font-size: 12px; letter-spacing: 0.2em; }
html[lang="en"] .eyebrow { font-family: var(--f-latin-body); font-size: 10px; letter-spacing: 0.34em; text-indent: 0.34em; text-transform: uppercase; }

/* ---------- Glow divider ---------- */
.divider {
  width: 34px; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(181,115,74,0.8);
  border-radius: 2px;
  margin: 28px auto;
}

/* ---------- Headline ---------- */
.headline { margin: 0; color: var(--ink); }
html[lang="ar"] .headline { font-family: var(--f-ar-display); font-size: 31px; line-height: 1.45; }
html[lang="en"] .headline { font-family: var(--f-latin-display); font-weight: 500; font-size: 31px; line-height: 1.28; }

/* ---------- Body ---------- */
.body { color: var(--body); margin: 16px auto 0; }
html[lang="ar"] .body { font-family: var(--f-ar-body); font-size: 15px; line-height: 1.9; }
html[lang="en"] .body { font-family: var(--f-latin-body); font-size: 14.5px; line-height: 1.75; margin-top: 18px; }

/* ---------- Form ---------- */
.waitlist {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 34px;
}
.phone {
  width: 100%;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 15px 16px;
  font-size: 15px;
  color: var(--ink);
  text-align: center;
}
html[lang="ar"] .phone { font-family: var(--f-ar-body); }
html[lang="en"] .phone { font-family: var(--f-latin-body); }
.phone::placeholder { color: #A79A8A; opacity: 1; }
.phone:focus { outline: none; border-color: rgba(181,115,74,0.6); }
.phone.invalid { border-color: rgba(181,115,74,0.85); }

.submit {
  width: 100%;
  min-height: 44px;
  background: var(--royal);
  color: var(--canvas);
  border: none;
  border-radius: 3px;
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--neon-rest);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
html[lang="ar"] .submit { font-family: var(--f-ar-body); font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
html[lang="en"] .submit { font-family: var(--f-latin-body); font-size: 12px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; }
.submit:hover { transform: translateY(-1px); box-shadow: var(--neon-hover); }

/* ---------- Success card ---------- */
.success {
  margin-top: 40px;
  background: var(--royal);
  border-radius: 3px;
  padding: 30px 24px;
  box-shadow: 0 0 26px rgba(181,115,74,0.5), 0 8px 22px rgba(20,16,13,0.28);
}
.success-label { margin: 0; color: var(--gold-tan); font-weight: 700; }
html[lang="ar"] .success-label { font-family: var(--f-ar-body); font-size: 12px; letter-spacing: 0.14em; }
html[lang="en"] .success-label { font-family: var(--f-latin-body); font-size: 12px; letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase; }
.success-msg { margin: 12px 0 0; color: var(--canvas); }
html[lang="ar"] .success-msg { font-family: var(--f-ar-display); font-size: 22px; line-height: 1.7; }
html[lang="en"] .success-msg { font-family: var(--f-latin-display); font-style: italic; font-size: 21px; line-height: 1.5; }

/* ---------- "or" divider ---------- */
.ordiv { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.ordiv .hair { flex: 1; height: 1px; background: var(--hair); }
.or-label { color: var(--muted-2); }
html[lang="ar"] .or-label { font-family: var(--f-ar-body); font-size: 12px; }
html[lang="en"] .or-label { font-family: var(--f-latin-body); font-size: 11px; letter-spacing: 0.14em; text-indent: 0.14em; text-transform: uppercase; }

/* ---------- Contact block ---------- */
.contact { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 20px; }
.contact-line { margin: 0; color: var(--body); }
html[lang="ar"] .contact-line { font-family: var(--f-ar-body); font-size: 13.5px; }
html[lang="en"] .contact-line { font-family: var(--f-latin-body); font-size: 13px; }

/* line 2: two matching CTAs (WhatsApp + Call) */
.contact-ctas { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }

.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 12px 24px;
  color: var(--ink);
  background: rgba(255,255,255,0.4);
  text-decoration: none;
  font-weight: 700;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
html[lang="ar"] .wa { font-family: var(--f-ar-body); font-size: 14px; }
html[lang="en"] .wa { font-family: var(--f-latin-body); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.cta:hover { border-color: rgba(181,115,74,0.65); box-shadow: 0 0 16px rgba(181,115,74,0.35); }
.cta svg { flex: none; }
/* phone-number CTA label: always LTR + Latin so the number reads correctly in AR */
.call .num { font-family: var(--f-latin-body); direction: ltr; white-space: nowrap; font-weight: 700; letter-spacing: 0.01em; }

/* ---------- Consent + footer url ---------- */
.consent { margin: 0 auto; color: var(--muted-2); }
html[lang="ar"] .consent { font-family: var(--f-ar-body); font-size: 12px; line-height: 1.8; }
html[lang="en"] .consent { font-family: var(--f-latin-body); font-size: 11px; line-height: 1.6; }
.consent--desktop { display: none; }

.site-url {
  margin: 0;
  font-family: var(--f-latin-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: var(--muted-3);
  display: none;               /* mobile default hides it; shown in success + desktop */
}

/* ---------- State: submitted ---------- */
.page[data-submitted="true"] .waitlist,
.page[data-submitted="true"] .ordiv,
.page[data-submitted="true"] .consent--mobile { display: none; }
.page[data-submitted="true"] .site-url { display: block; }
.page:not([data-submitted="true"]) .success { display: none; }

/* fade-in for the success card */
.success { animation: fade-settle 300ms ease-out both; }

@keyframes fade-settle {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Desktop (~768px+): wordmark to header, form row, contact row,
   consent under form, footer shows site url.
   ============================================================ */
@media (min-width: 768px) {
  body {
    background-image:
      radial-gradient(80% 55% at 50% -12%, rgba(181,115,74,0.26) 0%, rgba(181,115,74,0) 60%),
      radial-gradient(60% 35% at 50% 112%, rgba(181,115,74,0.15) 0%, rgba(181,115,74,0) 60%);
  }
  .site-header { justify-content: space-between; padding: 34px 48px 0; }
  .brand--header { display: inline-flex; }
  .brand--header .wordmark { font-size: 26px; }
  html[lang="ar"] .brand--header .wordmark { font-family: var(--f-ar-display); }
  html[lang="en"] .brand--header .wordmark { font-family: var(--f-latin-display); letter-spacing: 0.16em; }
  .brand--header .subline { margin: 0; font-size: 9px; letter-spacing: 0.4em; text-indent: 0.4em; }

  .content { padding: 0 60px; align-items: center; }
  .brand--main, .divider { display: none; }          /* wordmark lives in header on desktop */

  html[lang="ar"] .eyebrow { font-size: 13px; letter-spacing: 0.22em; }
  .headline { max-width: 640px; margin-top: 22px; }
  html[lang="ar"] .headline { font-size: 54px; line-height: 1.4; }
  html[lang="en"] .headline { font-size: 54px; line-height: 1.12; }
  .body { max-width: 480px; }
  html[lang="ar"] .body { font-size: 17px; line-height: 2; }
  html[lang="en"] .body { font-size: 16px; line-height: 1.85; }

  .waitlist { flex-direction: row; gap: 14px; width: 500px; margin-top: 42px; }
  .phone { flex: 1; text-align: start; padding: 15px 18px; }
  .submit { width: auto; padding: 15px 40px; white-space: nowrap; }

  .success { width: 500px; margin-left: auto; margin-right: auto; }

  .ordiv { display: none; }        /* no or-divider on desktop */

  /* consent shows in main under the form; footer shows the url */
  .consent--desktop { display: block; max-width: 440px; margin-top: 22px; }
  html[lang="ar"] .consent--desktop { font-size: 12.5px; line-height: 1.9; }
  .consent--mobile { display: none; }
  .site-footer { padding: 0 48px 30px; }
  .site-url { display: block; letter-spacing: 0.2em; text-indent: 0.2em; }

  .contact { gap: 16px; margin-top: 30px; }   /* stays column: sentence over CTA row */
  .contact-line { font-size: 13.5px; }
  .cta { padding: 12px 26px; }

  /* in success state, keep contact centered, no consent-in-main */
  .page[data-submitted="true"] .consent--desktop { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .submit, .cta { transition: none; }
  .submit:hover { transform: none; }
  .success { animation: none; }
}
