@import url("fonts.css");

/* Bloomly's "Monochrome Studio" palette, as in the app (lib/core/design/tokens.dart). */
:root {
  --canvas: #0b0b0c;
  --surface: #141416;
  --raised: #1c1c1f;
  --hairline: #2a2a2e;
  --ink: #f4f1ec;
  --muted: #9a968f;
  --faint: #5c5a56;
  --accent: #d9c3a0;
  --on-accent: #0b0b0c;
  --glow: rgba(217, 195, 160, 0.10);

  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  --arabic: "IBM Plex Sans Arabic", "Geeza Pro", Tahoma, sans-serif;

  --page: min(1120px, 100% - 32px);
  --radius: 22px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --canvas: #f5f3ef;
    --surface: #ffffff;
    --raised: #ece9e3;
    --hairline: #ddd8d0;
    --ink: #111111;
    --muted: #6e6a64;
    --faint: #ada79e;
    --accent: #8e7148;
    --on-accent: #ffffff;
    --glow: rgba(142, 113, 72, 0.10);
    color-scheme: light;
  }
}

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

[hidden] { display: none !important; }

/* Decorative glows and tilted phones may overhang the page; never let them
   make it scroll sideways (in RTL, browsers open such pages scrolled). */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

html[lang="ar"] body { font-family: var(--arabic); font-size: 17.5px; line-height: 1.8; }

/* One page, two languages: show the half that matches <html lang>. */
html[lang="ar"] .en { display: none !important; }
html:not([lang="ar"]) .ar { display: none !important; }

a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { width: var(--page); margin-inline: auto; }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--hairline) 60%, transparent);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-inline-end: auto; }
.brand img { width: 22px; height: auto; }
.brand span { font: 400 26px/1 var(--serif); letter-spacing: 0.2px; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 560px) { .top nav .hide-sm { display: none; } }

.lang {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface);
}
.lang button {
  font: 500 13px/1 var(--sans);
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  cursor: pointer;
}
.lang button[lang="ar"] { font-family: var(--arabic); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--canvas); }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; text-transform: none; }

h1, h2, h3 { font-weight: 400; margin: 0; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.5px; }
h1 { font-size: clamp(46px, 8vw, 84px); line-height: 1.02; }
h2 { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; }
h3 { font: 500 19px/1.35 var(--sans); }
html[lang="ar"] h1, html[lang="ar"] h2 { font-family: var(--arabic); font-weight: 500; letter-spacing: 0; line-height: 1.3; }
html[lang="ar"] h1 { font-size: clamp(38px, 7vw, 68px); }
html[lang="ar"] h3 { font-family: var(--arabic); }

.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 34em; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 9vw, 110px) 0 40px; position: relative; overflow-x: clip; }
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 620px;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
  z-index: -1;
}
.hero .wrap { display: grid; gap: 28px; }
.hero .mark { width: 54px; height: auto; margin-bottom: 8px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 20px 10px 16px;
  border-radius: 16px;
  text-decoration: none;
  background: var(--ink);
  color: var(--canvas);
  border: 1px solid var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.store:hover { transform: translateY(-1px); }
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font-size: 11.5px; opacity: 0.7; line-height: 1.2; }
.store strong { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; }
.store.soon { background: transparent; color: var(--ink); border-color: var(--hairline); cursor: default; }
.store.soon:hover { transform: none; }
.store.soon small { color: var(--accent); opacity: 1; }

/* ---------- Phones ---------- */
.phones {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
  padding: 40px 0 10px;
  perspective: 1400px;
}
.phone {
  width: min(29vw, 290px);
  aspect-ratio: 393 / 852;
  border-radius: clamp(26px, 4.5vw, 46px);
  padding: clamp(5px, 0.8vw, 9px);
  background: linear-gradient(145deg, #2c2c30, #0e0e10 60%);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  flex: none;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: clamp(21px, 3.8vw, 38px); }
.phone:nth-child(1) { transform: rotateY(14deg) translateY(28px) scale(0.94); }
.phone:nth-child(3) { transform: rotateY(-14deg) translateY(28px) scale(0.94); }
html[dir="rtl"] .phone:nth-child(1) { transform: rotateY(-14deg) translateY(28px) scale(0.94); }
html[dir="rtl"] .phone:nth-child(3) { transform: rotateY(14deg) translateY(28px) scale(0.94); }

@media (max-width: 700px) {
  .phones {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-inline: 16px;
    margin-inline: -16px;
    scrollbar-width: none;
  }
  .phones::-webkit-scrollbar { display: none; }
  .phone { width: 72vw; scroll-snap-align: center; transform: none !important; }
}

/* ---------- Features ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section header { display: grid; gap: 14px; margin-bottom: 40px; max-width: 40em; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.card .icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  color: var(--accent);
  margin-bottom: 6px;
}
.card .icon svg { width: 20px; height: 20px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- Documents (privacy, support) ---------- */
.doc { padding: clamp(40px, 7vw, 80px) 0 40px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(40px, 6vw, 60px); margin: 10px 0 12px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 36px; }
.doc h2 { font: 500 22px/1.35 var(--sans); letter-spacing: 0; margin: 44px 0 12px; }
html[lang="ar"] .doc h2 { font-family: var(--arabic); }
.doc p, .doc li { color: color-mix(in srgb, var(--ink) 86%, var(--muted)); }
.doc ul { padding-inline-start: 22px; }
.doc li { margin: 8px 0; }
.doc strong { color: var(--ink); font-weight: 600; }
.callout {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 24px 0;
}
.callout p { margin: 6px 0; }

details {
  border-top: 1px solid var(--hairline);
  padding: 4px 0;
}
details:last-of-type { border-bottom: 1px solid var(--hairline); }
summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 500;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 18px; }
details > div p:first-child { margin-top: 0; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--hairline); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: grid; gap: 18px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot nav a { text-decoration: none; color: var(--ink); }
.foot p { margin: 0; max-width: 60em; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
