:root {
  --cream: #FEF4EA;
  --sand: #F8E6D2;
  --peach: #F3D3B2;
  --navy: #0D2147;
  --blue: #24357E;
  --teal: #22A09E;
  --terra: #B4512F;      /* 5:1 on white, used for the badge */
  --ink-soft: #3C4A66;   /* body text, 8.6:1 on cream */
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Arabic", sans-serif;
  --font-ar: "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--cream);
  /* faint zellige stars in the corners, like the launch post */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23F5DCC2' stroke-width='1.2'%3E%3Cpath d='M36 8l8 20 20 8-20 8-8 20-8-20-20-8 20-8z'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23F5DCC2' stroke-width='1.2'%3E%3Cpath d='M36 8l8 20 20 8-20 8-8 20-8-20-20-8 20-8z'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 72px 72px;
  background-position: 0 0, 36px 36px;
  color: var(--navy);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* fade the pattern out towards the middle so text sits on plain cream */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 80% at 50% 45%, var(--cream) 60%, rgba(254, 244, 234, 0.75) 82%, rgba(254, 244, 234, 0.35) 100%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

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

a { color: inherit; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* ---------- language switch ---------- */

.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 14px 0 0;
}

.lang {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--peach);
  border-radius: 999px;
}

.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: 600 14px/1 var(--font);
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
}

.lang button[lang="ar"] { font-family: var(--font-ar); }

.lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.lang button:not([aria-pressed="true"]):hover { color: var(--navy); background: var(--sand); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 8px 0 24px;
  text-align: center;
}

.hero-text { display: flex; flex-direction: column; align-items: center; }

.logo { width: 132px; height: auto; margin-bottom: 18px; }

.badge {
  margin: 0 0 14px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--terra);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 8.6vw, 3.6rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-wrap: balance;
}

.lead {
  margin: 14px 0 0;
  font-size: clamp(1.15rem, 4.4vw, 1.45rem);
  font-weight: 700;
  color: var(--blue);
}

.second {
  margin: 8px 0 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  text-wrap: balance;
}

.second[lang="ar"] { font-family: var(--font-ar); font-size: 1.15rem; line-height: 1.7; }

.intro {
  max-width: 34rem;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.follow-label {
  margin: 26px 0 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}

.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; }

.btn svg .dot { fill: currentColor; stroke: none; }

.btn-primary { background: var(--navy); color: #fff; }

.btn-primary:hover { background: var(--blue); }

.btn-ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }

.btn-ghost:hover { background: var(--sand); }

.hero-art { margin: 18px -16px 0; }

.hero-art img {
  width: 100%;
  height: auto;
  /* soften the picture's edges into the page */
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 78% at 50% 50%, #000 62%, transparent 100%);
}

/* ---------- features ---------- */

.features {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
}

.features article {
  padding: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  text-align: start;
}

.features svg {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 12px;
  background: var(--navy);
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.features article:nth-child(2) svg { background: var(--teal); }

.features article:nth-child(3) svg { background: var(--terra); }

.features h2 { margin: 12px 0 4px; font-size: 1.08rem; line-height: 1.3; }

.features p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- sellers + footer ---------- */

.sellers {
  margin: 20px 0 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.sellers p { margin: 0; }

.sellers .link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.sellers .link:hover { background: var(--cream); }

.footer {
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer p { margin: 0; }

.footer a { font-weight: 600; text-underline-offset: 3px; }

/* ---------- Arabic ---------- */

html[lang="ar"] body { font-family: var(--font-ar); }

html[lang="ar"] h1 { letter-spacing: 0; line-height: 1.3; }

html[lang="ar"] .badge { letter-spacing: 0; }

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .sellers { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
  .hero-art { margin: 18px 0 0; }
}

@media (min-width: 960px) {
  .topbar { padding-top: 22px; }
  .hero {
    grid-template-columns: 1fr 1.05fr;
    gap: 40px;
    padding: 24px 0 40px;
    text-align: start;
  }
  .hero-text { align-items: flex-start; }
  /* the second line is in the other script; keep it on the column's edge */
  html[dir="ltr"] .second { text-align: left; }
  html[dir="rtl"] .second { text-align: right; }
  .social { justify-content: flex-start; }
  .logo { width: 150px; }
  .hero-art { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* 404 page */
.notfound { padding-top: 12vh; }
