/* AL SAYYID — brand tokens and shared components (from Brand Guidelines, Jun 2026).
   Visual language: a tailoring house, not an app. Warm paper, one quiet voice,
   hairlines instead of boxes, square edges, no shadows, photos carry the page. */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500&family=Markazi+Text:wght@400;500;600&family=Quicksand:wght@400;500&display=swap');

:root {
  /* Primary */
  --maroon: #561924;
  --maroon-deep: #3e121a;
  --gold: #c6aa67;
  --gold-soft: #e3d3a8;
  --gold-text: #806426; /* gold dark enough for small text on paper/cream (≥4.5:1) */
  --cream: #efeee6;
  --paper: #f7f5f0;
  --tint: #efebe4; /* the quiet second surface for split sections */
  --white: #ffffff;
  --black: #000000;
  /* Secondary */
  --plum: #483338;
  --mauve: #b7a6a4;
  --slate: #2f3b48;
  --lilac: #a4a6b7;
  /* UI */
  --ink: #241a1c;
  --muted: #6f6164;
  --line: rgba(86, 25, 36, 0.14);
  --line-soft: rgba(86, 25, 36, 0.08);
  --ok: #3f6b4f;
  --warn: #8a5e12;
  --danger: #9b2c2c;

  /* Typography: licensed brand fonts are 29LT Zarid Display (headers) and
     Snaga Arabic Text (body). Markazi Text / IBM Plex Sans Arabic stand in
     until the font files are supplied — swap the families here only. */
  --font-display: '29LT Zarid Display', 'Markazi Text', serif;
  --font-body: 'Snaga Arabic Text', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-latin: 'Quicksand', system-ui, sans-serif;

  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 500; line-height: 1.25; margin: 0 0 .5em; color: var(--maroon); }
p { margin: 0 0 1em; }
b, strong { font-weight: 500; }
.latin { font-family: var(--font-latin); letter-spacing: .06em; direction: ltr; unicode-bidi: isolate; }
.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 60; background: var(--maroon); color: var(--cream); padding: 8px 14px; }
.skip:focus { top: 12px; }

/* ---------- brand marks (recolourable via currentColor) ---------- */
.logo, .emblem, .motif {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}
.logo { --src: url('../assets/logo.png'); aspect-ratio: 2425 / 1375; width: 132px; }
.emblem { --src: url('../assets/emblem.png'); aspect-ratio: 550 / 610; width: 38px; }
.motif { width: 100%; -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; -webkit-mask-size: auto 100%; mask-size: auto 100%; }
.motif--ornament { --src: url('../assets/motif-ornament.png'); height: 26px; }

/* ---------- buttons: plain rectangles ---------- */
.btn {
  --bg: var(--maroon); --fg: var(--cream); --bd: var(--maroon);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 2.2em; border-radius: 0; border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font: 400 .95rem var(--font-body); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { --bg: var(--maroon-deep); --bd: var(--maroon-deep); }
.btn--ghost { --bg: transparent; --fg: var(--maroon); --bd: var(--mauve); }
.btn--ghost:hover { --bg: transparent; --bd: var(--maroon); }
.btn--sm { min-height: 38px; padding: .4em 1.2em; font-size: .88rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; pointer-events: none; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* a neck pattern drawn from its mask (js/ui/pattern.js): fabric tile, thread colour */
/* the whole pattern, top to the V. On the page it is line art in ink; given --fabric
   (the preview close-up) it sits on the customer's own fabric colour. */
.pattern { display: block; aspect-ratio: 1 / 2; background: var(--fabric, transparent); transition: background-color .3s ease; }
.pattern__thread { display: block; width: 100%; height: 100%; background: var(--thread, var(--maroon)); transition: background-color .3s ease;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: auto 92%; mask-size: auto 92%; }

/* quiet underlined link used beside buttons */
.text-link { display: inline-flex; align-items: center; gap: .4em; color: var(--maroon); text-decoration: none; padding-bottom: 2px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .35s var(--ease); }
.text-link:hover { background-size: 0 1px; background-position: 100% 100%; }
/* the house signature: a link framed by two dashes — like this — */
.dash-link { display: inline-flex; align-items: center; gap: .6em; color: var(--maroon); text-decoration: none; font-size: .98rem; background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.dash-link::before, .dash-link::after { content: ''; width: .7em; height: 1px; background: currentColor; transition: width .3s var(--ease); }
.dash-link:hover::before, .dash-link:hover::after { width: 1.3em; }
.dash-link--light { color: var(--gold-soft); }

/* ---------- forms: an underline, not a box ---------- */
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .15em; }
input, select, textarea {
  width: 100%; padding: .6em 0; border: 0; border-bottom: 1px solid var(--mauve); border-radius: 0;
  background: transparent; color: var(--ink); font: 400 1rem var(--font-body);
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { padding: .7em .8em; border: 1px solid var(--line); resize: vertical; }
select { appearance: none; padding-inline-end: 1.6em; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23561924' stroke-width='1.2'/%3E%3C/svg%3E") left .2em center no-repeat; }
input:not([type='checkbox'], [type='radio']):focus, select:focus { outline: none; border-bottom-color: var(--maroon); box-shadow: 0 1px 0 var(--maroon); }
textarea:focus { outline: none; border-color: var(--maroon); }
input::placeholder, textarea::placeholder { color: #a89b9a; }
input[type='number'], input[inputmode='numeric'], input[inputmode='decimal'], input[type='tel'] { direction: ltr; text-align: right; }
input[type='search'] { padding-inline-start: 1.6em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%23483338'/%3E%3Cpath d='M9.5 9.5L13 13' stroke='%23483338'/%3E%3C/svg%3E") right 0 center no-repeat; }
.field { margin-bottom: 1.4rem; }
.field__hint { font-size: .8rem; color: var(--muted); margin-top: .35em; }
.field__error { font-size: .82rem; color: var(--danger); margin-top: .35em; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }

/* ---------- labels, notes, toast ---------- */
.eyebrow { font-family: var(--font-latin); font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-text); margin-bottom: .8em; }
.badge { display: inline-flex; align-items: center; gap: .5em; font-size: .82rem; color: var(--plum); line-height: 1.4; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge--verified { color: var(--ok); }
.badge--pending { color: var(--warn); }
.badge--danger { color: var(--danger); }
.notice { margin: 0 0 1em; padding: .1em 1em; border-inline-start: 2px solid var(--gold); color: var(--plum); font-size: .92rem; }
.notice--ok { border-color: var(--ok); }

.toast {
  position: fixed; inset-inline: 0; bottom: 28px; margin-inline: auto; width: max-content; max-width: calc(100% - 32px);
  background: var(--ink); color: var(--cream); padding: .85em 1.6em; font-size: .92rem;
  opacity: 0; transform: translateY(12px); transition: .3s ease; z-index: 100;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast--error { background: var(--danger); }
.toast--ok { background: var(--maroon); }

/* ---------- footer (shared, js/ui/chrome.js) ---------- */
.house-foot { padding: clamp(70px, 9vw, 110px) 0 28px; }
.house-foot__panel { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 40px; padding: clamp(40px, 6vw, 72px) clamp(28px, 6vw, 88px); background: var(--maroon); color: var(--cream); }
.house-foot__intro h2 { color: var(--cream); font-size: clamp(1.7rem, 2.6vw, 2.1rem); margin-bottom: .3em; }
.house-foot__intro p { color: #e6d9d2; max-width: 34ch; margin-bottom: 1.4em; }
.house-foot__col h3 { font-family: var(--font-body); font-size: .9rem; font-weight: 400; color: var(--gold-soft); margin: .4em 0 1.1em; }
.house-foot__col a, .house-foot__col p { display: block; color: #f1e9e4; text-decoration: none; font-size: .92rem; margin: 0 0 .7em; }
.house-foot__col a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.house-foot__base { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding-top: 30px; font-size: .8rem; color: var(--muted); }
.house-foot__base > :last-child { justify-self: end; }
.house-foot__base a { color: inherit; text-decoration: none; }
.house-foot__base a:hover { color: var(--maroon); }
.house-foot__logo .logo { width: 84px; color: var(--maroon); }

@media (max-width: 1000px) {
  .house-foot__panel { grid-template-columns: repeat(3, 1fr); }
  .house-foot__intro { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .house-foot__panel { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .house-foot__base { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px; }
  .house-foot__base > :last-child { justify-self: center; }
  .house-foot__logo { order: -1; }
}

/* ---------- reveal on scroll (pages opt in with .reveal) ---------- */
.can-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s var(--ease); }
.can-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .can-reveal .reveal { opacity: 1; transform: none; }
}
