/* awba.basira.ca
   One sheet for both directions: every horizontal measure is logical
   (inline-start/end), so Arabic needs nothing of its own but its fonts. */

/* --- Fonts: one family per role, Latin and Arabic split by unicode-range -- */

@font-face {
  font-family: "Awba Serif";
  src: url("/static/fonts/noto-serif.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212;
}
@font-face {
  font-family: "Awba Serif";
  src: url("/static/fonts/noto-naskh-arabic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Awba Sans";
  src: url("/static/fonts/noto-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212;
}
@font-face {
  font-family: "Awba Sans";
  src: url("/static/fonts/noto-sans-arabic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* --- Tokens: the app's own palette --------------------------------------- */

:root {
  --paper: #FFFDF8;
  --surface: #FFFFFF;
  --ink: #2E3B37;
  --muted: #5E6B66;
  --line: #E6E1D5;
  --brand: #4C675A;
  --brand-ink: #FFFDF8;
  --gold: #846429;
  --rose: #F7ECEA;
  --rose-ink: #8E4A45;
  --sage-band: #4C675A;
  --sage-band-ink: #FFFDF8;
  --sage-band-muted: #D9E3DD;
  --sage-band-gold: #D1AC6C;
  --frame: #1E2624;
  --shadow: 0 1px 2px rgb(46 59 55 / 0.06), 0 18px 40px -18px rgb(46 59 55 / 0.35);
  --serif: "Awba Serif", "Noto Serif", Georgia, serif;
  --sans: "Awba Sans", "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101513;
    --surface: #171E1B;
    --ink: #E8EEEA;
    --muted: #A6B3AD;
    --line: #27312D;
    --brand: #87B29E;
    --brand-ink: #101513;
    --gold: #D1AC6C;
    --rose: #2A1F1E;
    --rose-ink: #E3A8A1;
    --sage-band: #1B2723;
    --sage-band-ink: #E8EEEA;
    --sage-band-muted: #B7C7BF;
    --sage-band-gold: #D1AC6C;
    --frame: #2A3430;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 18px 40px -18px rgb(0 0 0 / 0.7);
  }
}

/* --- Base ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
:lang(ar) body, body:lang(ar) { font-size: 1.125rem; line-height: 1.85; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.45; }

h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); }
h3 { font-size: 1.25rem; margin-block-start: 1.75em; }

p { margin: 0 0 1em; }
ul, ol, dl { margin: 0 0 1em; padding: 0; }

a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

img, svg { display: block; max-width: 100%; height: auto; }
code { font-size: 0.92em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-block-end: 0.75rem;
}
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 0.95rem; }

.lead { font-size: 1.2rem; color: var(--muted); }
:lang(ar) .lead { font-size: 1.25rem; }
.small { font-size: 0.92rem; color: var(--muted); }

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  z-index: 10;
}
.skip:focus { inset-block-start: 1rem; }

/* --- Header -------------------------------------------------------------- */

.top { border-block-end: 1px solid var(--line); }
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand { display: inline-flex; }
.logo { width: 7.5rem; height: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}

.nav { display: flex; align-items: center; gap: clamp(0.75rem, 3vw, 1.75rem); }
.nav > a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav > a:hover { color: var(--brand); }

.lang { position: relative; }
.lang summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " ▾"; font-size: 0.75em; color: var(--muted); }
.lang ul {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + 0.5rem);
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  min-width: 10rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  box-shadow: var(--shadow);
  z-index: 5;
}
.lang li a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}
.lang li a:hover { background: var(--paper); }
.lang li a[aria-current] { color: var(--brand); font-weight: 600; }

/* --- Phone frames -------------------------------------------------------- */

.phone {
  margin: 0;
  justify-self: center;
  width: min(100%, 19rem);
}
.phone img {
  width: 100%;
  border-radius: 2.4rem;
  border: 0.45rem solid var(--frame);
  box-shadow: var(--shadow);
  background: var(--surface);
}

/* --- Home: hero ---------------------------------------------------------- */

.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 6vw, 4.5rem); }
.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}
.hero h1 { max-width: 14ch; }
:lang(ar) .hero h1 { max-width: 16ch; }
.hero .lead { max-width: 34rem; }
.phone-hero { width: min(100%, 20rem); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; margin-block: 1.75rem 1.5rem; }
.cta-note { margin: 0; color: var(--muted); font-size: 0.95rem; }
.stores { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cta-center .stores { justify-content: center; }
.cta-center { justify-content: center; }

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.35rem 1.35rem 0.45rem;
  border-radius: 0.8rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  line-height: 1.15;
}
.store:hover { background: var(--brand); color: var(--brand-ink); }
.store-small { font-size: 0.75rem; opacity: 0.85; }
.store-big { font-size: 1.3rem; font-weight: 600; font-family: var(--sans); }
.store-soon { background: transparent; color: var(--ink); border: 1px dashed var(--muted); }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}
.chips li {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
}

/* --- Home: feature rows -------------------------------------------------- */

.features { display: grid; gap: clamp(4rem, 10vw, 7rem); padding-block: clamp(2rem, 6vw, 4rem) clamp(4rem, 10vw, 7rem); }
.feature {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 52rem) {
  .feature { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .feature:nth-child(even) .phone { order: -1; }
}
.feature-text { max-width: 34rem; }

.points { list-style: none; display: grid; gap: 0.6rem; }
.points li {
  position: relative;
  padding-inline-start: 1.6rem;
}
.points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.2rem;
  inset-block-start: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--gold);
  transform: rotate(45deg);
}

/* --- Home: bands ---------------------------------------------------------- */

.band { padding-block: clamp(3.5rem, 9vw, 6rem); }
.band-rose { background: var(--rose); }
.band-rose .eyebrow, .band-rose h2 { color: var(--rose-ink); }
.band-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 52rem) {
  .band-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
.band-text { max-width: 34rem; }

.split {
  display: grid;
  gap: 3rem;
  padding-block: clamp(4rem, 10vw, 6.5rem);
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
.split h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }

.band-sage { background: var(--sage-band); color: var(--sage-band-ink); }
.band-sage .eyebrow { color: var(--sage-band-gold); }
.band-sage a { color: var(--sage-band-ink); }
.promise { text-align: center; }
.promises {
  list-style: none;
  display: grid;
  gap: 1rem;
  max-width: 60rem;
  margin: 2rem auto;
  text-align: start;
}
@media (min-width: 40rem) {
  .promises { grid-template-columns: 1fr 1fr; }
}
.promises li {
  padding: 1.2rem 1.35rem;
  border: 1px solid color-mix(in srgb, var(--sage-band-ink) 22%, transparent);
  border-radius: 1rem;
  color: var(--sage-band-muted);
}
.promises strong { display: block; color: var(--sage-band-ink); font-family: var(--serif); font-size: 1.15rem; margin-block-end: 0.2rem; }
.promise-link { margin: 0; }

.closing { text-align: center; padding-block: clamp(4rem, 10vw, 6.5rem); }
.closing .lead { max-width: 34rem; margin-inline: auto; }
.languages-line { font-family: var(--serif); font-size: 1.2rem; margin-block-end: 2.5rem; }

/* --- Prose pages: privacy and support ------------------------------------ */

.prose {
  max-width: 46rem;
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 8vw, 5rem);
}
.prose h1 { font-size: clamp(2.1rem, 1.5rem + 2.5vw, 3rem); }
.prose h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.7rem); margin-block-start: 2.25em; }
.prose ul { padding-inline-start: 1.25rem; }
.prose li { margin-block-end: 0.35rem; }
.prose li::marker { color: var(--gold); }
.updated { color: var(--muted); font-size: 0.95rem; }

.summary, .contact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.4rem 1.5rem 0.6rem;
  margin-block: 2rem;
}
.summary h2, .contact h2 { margin-block-start: 0; font-size: 1.3rem; }

.prose dl { display: grid; gap: 0.2rem; }
.prose dt { font-weight: 600; margin-block-start: 0.9rem; }
.prose dd { margin: 0; color: var(--muted); }

.button {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 0.8rem;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: none;
  direction: ltr;
}
.button:hover { background: var(--ink); color: var(--paper); }

.faq { display: grid; gap: 0.75rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0 1.25rem;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding-block: 1rem;
  padding-inline-end: 2rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 0.85rem;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--gold);
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding-block-end: 0.4rem; color: var(--muted); }
.faq .answer strong { color: var(--ink); font-weight: 600; }

/* --- Footer --------------------------------------------------------------- */

.bottom { border-block-start: 1px solid var(--line); padding-block: 2.5rem; }
.bottom-row {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.bottom p { margin: 0; }
.mark { width: 1.75rem; }
.mark-ink { fill: var(--brand); }
.mark-gold { fill: var(--gold); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; }
.footer-nav a { color: var(--muted); }
.footer-nav a[href^="mailto"] { direction: ltr; unicode-bidi: isolate; }

/* --- Not found ------------------------------------------------------------ */

.notfound { max-width: 40rem; padding-block: 5rem; text-align: center; }
.notfound .brand { justify-content: center; margin-block-end: 2.5rem; }
.notfound p { color: var(--muted); }
.homes { list-style: none; display: grid; gap: 0.5rem; margin-block-start: 2rem; }

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 30rem) {
  .logo { width: 6.25rem; }
  .nav { gap: 0.8rem; }
  .nav > a { font-size: 0.95rem; }
  .phone img { border-radius: 2rem; border-width: 0.35rem; }
}
