/* Athar | أثر — atharbh.app shared styles. Tokens mirror brand/tokens.json (BRAND.md §3–§6). */
:root {
  --canvas: #edf2ec;
  --surface: #ffffff;
  --sunken: #f6f9f5;
  --ink: #0f2d1f;
  --ink-2: #3e5548;
  --ink-3: #6c7e73;
  --hair: rgba(15, 45, 31, 0.1);
  --hair-2: rgba(15, 45, 31, 0.16);
  --brand: #1e6b47;
  --brand-bright: #2f8a5c;
  --brand-tint: #ddeddf;
  --track: #dce6da;
  --pending: #9a620b;
  --pending-tint: #f7ead1;
  --ticket: #123b28;
  --on-ticket: #f1f7f0;
  --btn: #0f2d1f;
  --on-btn: #ffffff;
  --glass: rgba(237, 242, 236, 0.78);
  --focus: #2f8a5c;
  --mk-1: #123b28;
  --mk-2: #2f8a5c;
  --mk-3: #9ed08f;
  --mk-rib: rgba(18, 59, 40, 0.35);
  --e1: 0 1px 2px rgba(15, 45, 31, 0.06), 0 6px 20px rgba(15, 45, 31, 0.06);
  --e2: 0 2px 6px rgba(15, 45, 31, 0.08), 0 18px 48px rgba(15, 45, 31, 0.14);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --inout: cubic-bezier(0.65, 0, 0.35, 1);
  --display: "Bricolage Grotesque", "Readex Pro", system-ui, sans-serif;
  --body: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #07110c;
    --surface: #0f1e16;
    --sunken: #0b1812;
    --ink: #e6f0e7;
    --ink-2: #b3c4b8;
    --ink-3: #82958a;
    --hair: rgba(230, 240, 231, 0.09);
    --hair-2: rgba(230, 240, 231, 0.16);
    --brand: #86d7a6;
    --brand-bright: #5fbf86;
    --brand-tint: #173426;
    --track: #1d3127;
    --pending: #e8b35c;
    --pending-tint: #33270f;
    --ticket: #1b4a33;
    --btn: #86d7a6;
    --on-btn: #062014;
    --glass: rgba(7, 17, 12, 0.74);
    --focus: #86d7a6;
    --mk-1: #e6f0e7;
    --mk-2: #6cc892;
    --mk-3: #2e9d5c;
    --mk-rib: rgba(230, 240, 231, 0.4);
    --e1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
    --e2: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 48px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 300 17px / 1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--brand);
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection {
  background: var(--brand-tint);
  color: var(--ink);
}
.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 100;
  background: var(--btn);
  color: var(--on-btn);
  padding: 10px 16px;
  border-radius: 999px;
}
.skip:focus {
  top: 12px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Two languages in the same page: only the active one shows. */
html[lang="en"] [data-l="ar"],
html[lang="ar"] [data-l="en"] {
  display: none !important;
}
html[lang="ar"] body {
  font-size: 17.5px;
  line-height: 1.75;
}
html[lang="ar"] .display,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
  letter-spacing: 0 !important;
  line-height: 1.3;
  font-family: var(--body);
  font-weight: 600;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.display {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "opsz" 96, "wdth" 90;
  letter-spacing: -.025em;
  line-height: 0.98;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "opsz" 72, "wdth" 92;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
.lede {
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--ink-2);
  max-width: 36ch;
}
.num {
  font-variant-numeric: tabular-nums;
}

/* Header */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background .3s var(--out), box-shadow .3s var(--out), transform .4s var(--out);
}
.top.scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 1px 0 var(--hair);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 68px;
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.lockup svg {
  width: 34px;
  height: 34px;
}
.lockup .w {
  font: 700 22px / 1 var(--display);
  font-variation-settings: "opsz" 48, "wdth" 92;
  letter-spacing: -.02em;
}
.lockup .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mk-2);
}
.lockup .ar {
  font: 700 22px / 1 "Aref Ruqaa", serif;
  transform: translateY(-2px);
}
.top nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.top nav a.link {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 999px;
}
.top nav a.link:hover {
  color: var(--ink);
  background: var(--hair);
}
.lang {
  font: 500 14px / 1 var(--body);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
}
.lang:hover {
  background: var(--hair);
}
@media (max-width: 760px) {
  .top nav a.link {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font: 500 16px / 1 var(--body);
  text-decoration: none;
  cursor: pointer;
  background: var(--btn);
  color: var(--on-btn);
  transition: transform .11s var(--out), box-shadow .3s var(--out);
}
.btn:active {
  transform: scale(0.965);
}
.btn.quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair-2);
}
.btn svg {
  width: 22px;
  height: 22px;
}
.btn.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14.5px;
}

/* Store buttons. They become links when the store listings exist (see STORE in site.js). */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 20px 0 16px;
  border-radius: 16px;
  background: var(--btn);
  color: var(--on-btn);
  text-decoration: none;
  transition: transform .11s var(--out);
}
.store:active {
  transform: scale(0.965);
}
.store svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.store .t {
  display: grid;
  line-height: 1.15;
  text-align: start;
}
.store .t small {
  font-size: 11.5px;
  opacity: 0.78;
  font-weight: 400;
}
.store .t b {
  font-size: 17px;
  font-weight: 500;
}
.store[aria-disabled="true"] {
  cursor: default;
}
.soon {
  font-size: 14px;
  color: var(--ink-3);
  margin-top: 12px;
}

/* Footer */
.foot {
  padding: 72px 0 40px;
  border-top: 1px solid var(--hair);
  margin-top: 0;
  font-size: 15px;
  color: var(--ink-2);
}
.foot .cols {
  display: grid;
  gap: 32px;
  grid-template-columns: 1.4fr repeat(3, 1fr);
}
.foot h3 {
  font: 500 14px / 1.4 var(--body);
  color: var(--ink-3);
  letter-spacing: 0;
  margin-bottom: 12px;
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.foot a {
  color: var(--ink);
  text-decoration: none;
}
.foot a:hover {
  text-decoration: underline;
}
.foot .legal {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  font-size: 13.5px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
@media (max-width: 860px) {
  .foot .cols {
    grid-template-columns: 1fr 1fr;
  }
  .foot .cols > :first-child {
    grid-column: 1 / -1;
  }
}

/* Document pages: privacy, terms, support, account deletion */
.doc {
  padding: 128px 0 96px;
}
.doc .wrap {
  max-width: 760px;
}
.doc header {
  margin-bottom: 40px;
}
.doc h1 {
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.02;
}
.doc .meta {
  color: var(--ink-3);
  font-size: 14.5px;
  margin-top: 14px;
}
.doc h2 {
  font-size: clamp(22px, 2.6vw, 27px);
  margin: 48px 0 12px;
  line-height: 1.2;
}
.doc h3 {
  font: 500 17.5px / 1.4 var(--body);
  margin: 28px 0 8px;
  letter-spacing: 0;
}
.doc p,
.doc li {
  color: var(--ink-2);
}
.doc p + p {
  margin-top: 14px;
}
.doc ul,
.doc ol {
  padding-inline-start: 1.3em;
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.doc strong {
  font-weight: 500;
  color: var(--ink);
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 16px 0;
  display: block;
  overflow-x: auto;
}
.doc th,
.doc td {
  text-align: start;
  vertical-align: top;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--hair);
}
.doc th {
  font-weight: 500;
  color: var(--ink);
}
.doc .note {
  background: var(--brand-tint);
  color: var(--ink);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 24px 0;
}
.doc .note p {
  color: var(--ink);
}
.doc .steps {
  counter-reset: s;
  list-style: none;
  padding: 0;
}
.doc .steps li {
  counter-increment: s;
  position: relative;
  padding-inline-start: 48px;
  min-height: 34px;
}
.doc .steps li::before {
  content: counter(s);
  position: absolute;
  inset-inline-start: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hair-2);
  font-weight: 500;
  color: var(--ink);
}
.doc details {
  border-bottom: 1px solid var(--hair);
  padding: 18px 0;
}
.doc details summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.doc details summary::-webkit-details-marker {
  display: none;
}
.doc details summary::after {
  content: "+";
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  transition: transform .36s var(--out);
}
.doc details[open] summary::after {
  transform: rotate(45deg);
}
.doc details p {
  margin-top: 10px;
}
.doc .contact {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 24px 0;
}
.doc .contact a {
  display: block;
  background: var(--surface);
  border-radius: 18px;
  padding: 18px 20px;
  text-decoration: none;
  box-shadow: var(--e1);
  color: var(--ink);
}
.doc .contact a span {
  display: block;
  color: var(--ink-3);
  font-size: 14px;
}
.doc .rings-deco {
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
.btn,
.lang {
  white-space: nowrap;
}
@media (max-width: 430px) {
  .top nav .btn.small {
    display: none;
  }
}
