/* Vitalia Polyclinic — vitaliakw.com. One light theme on purpose: the brand is beige on warm white. */
@font-face {
  font-family: "Vitalia Serif"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/cormorant-garamond-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Vitalia Serif"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/amiri-400-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  color-scheme: light;
  --paper: #faf7f3;
  --panel: #f2ebe3;
  --ink: #2f2621;
  --muted: #6b5c51;
  --brand: #9c826e;      /* logo, rules, large type */
  --brand-ink: #775d4a;  /* links and small brand text (AA on paper and panel) */
  --line: #e4d9ce;
  --serif: "Vitalia Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Geeza Pro", Tahoma, Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding-inline: var(--gutter);
  background: var(--paper); color: var(--ink);
  font: 400 1rem/1.7 var(--sans);
}
:lang(ar) { line-height: 1.95; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); text-wrap: balance; margin: 0; font-variant-numeric: lining-nums; }
.eyebrow {
  margin: 0; font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--brand-ink);
}
:lang(ar).eyebrow, :lang(ar) .eyebrow { letter-spacing: 0; font-size: .9rem; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- home ---------- */
.wrap { max-width: 1040px; margin-inline: auto; }
.mast { padding-block: clamp(40px, 8vw, 88px) clamp(28px, 5vw, 48px); }
.mast img { width: clamp(180px, 34vw, 280px); margin-inline: auto; }

.duo {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(24px, 5vw, 64px); align-items: start;
  padding-block: clamp(24px, 4vw, 40px) clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}
.duo .side { display: grid; gap: 18px; max-width: 46ch; }
.duo [dir="ltr"] { justify-self: end; }
.duo [dir="rtl"] { justify-self: start; }
.duo h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); line-height: 1.1; }
.duo [dir="rtl"] h1 { line-height: 1.45; }
.duo p { margin: 0; color: var(--muted); }
.rule { align-self: stretch; width: 1px; background: var(--line); position: relative; }
.rule img { position: absolute; top: 0; left: 50%; width: 34px; transform: translateX(-50%); background: var(--paper); padding-block: 6px; }

.btn {
  justify-self: start; display: inline-flex; align-items: center; gap: .55em;
  padding: .7em 1.3em; border: 1px solid var(--brand); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: .95rem; background: transparent;
}
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

.contact {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0;
  background: var(--panel); border-radius: 4px;
}
.contact .item { padding: clamp(20px, 3vw, 32px); display: grid; gap: 10px; align-content: start; }
.contact .item + .item { border-inline-start: 1px solid var(--line); }
.contact h2 { font-family: var(--sans); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-ink); font-weight: 600; }
.contact h2 [lang="ar"] { display: block; letter-spacing: 0; font-size: .9rem; text-transform: none; margin-top: 2px; }
.contact p { margin: 0; }
.contact a { color: var(--ink); }

/* ---------- legal pages ---------- */
.bar {
  max-width: 760px; margin-inline: auto; padding-block: 28px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line);
}
.bar img { width: 112px; }
.bar .lang { font-size: .95rem; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .3em 1em; }
.bar .lang:hover { border-color: var(--brand); }

.doc { max-width: 760px; margin-inline: auto; padding-block: clamp(32px, 6vw, 56px) 64px; }
.doc > header { display: grid; gap: 10px; margin-bottom: 36px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.1; }
.doc[dir="rtl"] h1, [dir="rtl"] .doc h1 { line-height: 1.5; }
.doc .updated { margin: 0; color: var(--muted); font-size: .9rem; }
.doc .lead { font-size: 1.08rem; color: var(--ink); max-width: 65ch; }
.doc section { padding-block: 22px; border-top: 1px solid var(--line); }
.doc h2 { font-size: 1.6rem; line-height: 1.25; margin-bottom: 10px; }
.doc p, .doc li { max-width: 68ch; }
.doc p { margin: 0 0 .8em; }
.doc ul { margin: 0 0 .8em; padding-inline-start: 1.2em; }
.doc li { margin-bottom: .35em; }
.doc li::marker { color: var(--brand); }
.doc .note { color: var(--muted); font-size: .92rem; }

/* ---------- footer (all pages) ---------- */
.foot {
  max-width: 1040px; margin-inline: auto; padding-block: 28px 40px; margin-top: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem;
  display: grid; gap: 10px;
}
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot .licence { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
.doc + .foot { max-width: 760px; }

@media (max-width: 760px) {
  .duo { grid-template-columns: 1fr; }
  .duo .side { max-width: none; justify-self: stretch; }
  .rule { display: none; }
  .duo [dir="rtl"] { padding-top: 28px; border-top: 1px solid var(--line); }
  .contact { grid-template-columns: 1fr; }
  .contact .item + .item { border-inline-start: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: no-preference) { .btn { transition: background-color .2s, color .2s; } }
@media print { body { background: #fff; } .bar .lang, .btn { display: none; } }
