/*
 * muslimcompanion.net: the app's own palette (src/theme/tokens.ts in the
 * app), light and dark, system fonts only, so the site loads nothing from
 * another server.
 */
:root {
  --page: #f4faf7;
  --surface: #ffffff;
  --surface-alt: #edf4f1;
  --ink: #10201b;
  --ink-2: #64756f;
  --line: #e4ede9;
  --dot: #c5d3cd;
  --green: #0e7c66;
  --green-deep: #0a5f4e;
  --green-lift: #1c9c82;
  --on-green: #ffffff;
  --gold: #e3b93c;
  --shade: rgba(13, 70, 56, 0.14);
  --glow: rgba(14, 124, 102, 0.45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Noto Naskh Arabic", "Segoe UI", Tahoma, "Geeza Pro", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0c1512;
    --surface: #13211d;
    --surface-alt: #182b25;
    --ink: #e8f2ed;
    --ink-2: #9aaca5;
    --line: #24382f;
    --dot: #3a5148;
    --green: #1fa184;
    --green-deep: #127963;
    --green-lift: #2bb898;
    --on-green: #04140f;
    --shade: rgba(0, 0, 0, 0.45);
    --glow: rgba(31, 161, 132, 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 2px; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
/* Hidden without being moved off the page: a link parked far to the left
   widened the right-to-left pages, which can scroll that way. */
.skip-link { position: absolute; top: 8px; inset-inline-start: 12px; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { width: auto; height: auto; clip-path: none; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { display: flex; gap: 20px; font-size: 15px; font-weight: 600; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green); }
.header-end { display: flex; align-items: center; gap: 18px; margin-inline-start: auto; }

/* The language menu: the current language's flag, opening a list of all */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.lang-menu summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lang-menu img { width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); }
.lang-menu ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 20;
  list-style: none; margin: 0; padding: 6px; min-width: 220px; max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px -18px var(--shade);
}
.lang-menu li a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: 15px;
}
.lang-menu li a:hover, .lang-menu li a:focus-visible { background: var(--surface-alt); outline: none; }
.lang-menu li a[aria-current="true"] { color: var(--green); font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding-block: 32px 40px; font-size: 14px; color: var(--ink-2); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.foot-inner nav { display: flex; flex-wrap: wrap; gap: 8px 18px; min-width: 0; }
.foot-inner address { font-style: normal; }

/* Buttons: the app's soft green button */
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  background: linear-gradient(180deg, var(--green-lift), var(--green));
  color: var(--on-green); font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 22px -10px var(--glow), 0 2px 4px var(--shade), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.button:hover { background: linear-gradient(180deg, var(--green), var(--green-deep)); }
.button svg { width: 22px; height: 22px; fill: currentColor; }

/* Home */
.hero { padding-block: 56px 28px; }
.hero-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 12px 28px -14px var(--shade); }
.hero-text { display: grid; gap: 18px; justify-items: center; text-align: center; min-width: 0; max-width: 720px; margin: 0 auto; }
.arabic-name { font-family: var(--font-ar); font-size: 22px; color: var(--green); margin: 0; }
h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
.lead { font-size: 19px; color: var(--ink-2); margin: 0; max-width: 40ch; }
.note { font-size: 14px; color: var(--ink-2); margin: 0; max-width: 60ch; }

/* The store's pictures, in a strip that scrolls sideways */
.gallery { padding-block: 12px 8px; }
.gallery-inner { display: flex; align-items: center; gap: 12px; }
.gallery-track {
  list-style: none; margin: 0; padding: 8px 4px 20px;
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: thin; flex: 1; min-width: 0;
}
.gallery-track:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 12px; }
.gallery-track li { flex: 0 0 auto; width: clamp(180px, 22vw, 236px); scroll-snap-align: start; }
.gallery-track img { width: 100%; border-radius: 16px; box-shadow: 0 14px 30px -18px var(--shade); }
.gallery-button {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--green); cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 6px 14px -10px var(--shade);
}
.gallery-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.gallery-button:disabled { opacity: 0.35; cursor: default; }
.gallery-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[dir="rtl"] .gallery-button svg { transform: scaleX(-1); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-block: 32px 8px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px; box-shadow: 0 8px 20px -16px var(--shade);
}
.feature h2 { font-size: 17px; margin: 0 0 6px; }
.feature p { font-size: 15px; color: var(--ink-2); margin: 0; }
.languages { text-align: center; color: var(--ink-2); font-size: 15px; padding-block: 24px 0; max-width: 60ch; margin: 0 auto; }

/* Legal and support pages */
.page { padding-block: 48px 0; }
.page-intro { display: grid; gap: 8px; margin-bottom: 28px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin: 0; }
.updated { color: var(--ink-2); font-size: 15px; margin: 0; }
.reference { color: var(--ink-2); font-size: 15px; margin: 0; padding: 10px 14px; background: var(--surface-alt); border-radius: 10px; max-width: 68ch; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 21px; margin: 36px 0 10px; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-block: 6px; }
.prose address { font-style: normal; margin-top: 12px; }

.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 24px; display: grid; gap: 10px; justify-items: start; max-width: 68ch;
  box-shadow: 0 8px 20px -16px var(--shade);
}
.contact-card p { margin: 0; color: var(--ink-2); }
.contact-card .address { font-size: clamp(16px, 4.4vw, 20px); font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.faq { max-width: 68ch; margin-top: 36px; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding-block: 14px; }
.faq details[open] summary { color: var(--green); }
.faq details p, .faq details ul { margin: 0 0 14px; color: var(--ink-2); }

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 40px 8px; }
  .features { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .header-inner { gap: 10px; }
  .header-end { gap: 10px; }
  .site-nav { gap: 12px; font-size: 14px; }
  .brand span { font-size: 14px; }
  .lang-current { display: none; }
}
/* A dot to each picture, shown on a phone only (below), the current one long and green. */
.gallery-dots { display: none; justify-content: center; gap: 7px; padding-top: 4px; }
.gallery-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--dot); transition: width 0.2s, background-color 0.2s; }
.gallery-dots i.on { width: 22px; background: var(--green); }

@media (max-width: 480px) {
  .brand span { display: none; }
  /* On a phone the strip is as wide as the screen: the arrows lie over the
     pictures' edges and the dots say how many there are, in place of the
     scroll bar, which said nothing (the owner's choice, 5 November 2026). */
  .gallery-inner { position: relative; }
  .gallery-button {
    position: absolute; top: 50%; z-index: 1; width: 40px; height: 40px;
    margin-top: -26px;
  }
  .gallery-button[data-step="-1"] { inset-inline-start: 8px; }
  .gallery-button[data-step="1"] { inset-inline-end: 8px; }
  .gallery-track { scrollbar-width: none; padding-bottom: 12px; }
  .gallery-track::-webkit-scrollbar { display: none; }
  .gallery-dots { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
