/* ============================================
   VERBARIA — Design system
   Colors from logo + cartel
   ============================================ */

:root {
  --ink:        #1a2a4f;
  --ink-soft:   #2d3d63;
  --ink-70:     rgba(26, 42, 79, 0.7);
  --ink-40:     rgba(26, 42, 79, 0.4);
  --ink-15:     rgba(26, 42, 79, 0.15);
  --ink-08:     rgba(26, 42, 79, 0.08);

  --cream:      #f5f0e1;
  --cream-soft: #faf6ea;
  --cream-warm: #ede4cd;
  --paper:      #fbf8ef;

  --gold:       #b8935a;
  --gold-soft:  #d4b788;
  --gold-deep:  #8f6f3f;

  --danger:     #b34747;
  --success:    #4a7a52;

  --shadow-sm: 0 1px 2px rgba(26, 42, 79, .06), 0 2px 6px rgba(26, 42, 79, .04);
  --shadow-md: 0 4px 12px rgba(26, 42, 79, .08), 0 8px 24px rgba(26, 42, 79, .05);
  --shadow-lg: 0 12px 32px rgba(26, 42, 79, .10), 0 24px 60px rgba(26, 42, 79, .08);

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;

  --serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif-ar: "Amiri", "Playfair Display", Georgia, serif;
  --sans-ar:  "Tajawal", "Inter", -apple-system, sans-serif;
}

/* ============================================
   RTL — Arabic support
   ============================================ */
html[dir="rtl"] body,
body.is-rtl {
  font-family: var(--sans-ar);
}
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
body.is-rtl h1,
body.is-rtl h2,
body.is-rtl h3,
body.is-rtl h4 {
  font-family: var(--serif-ar);
  letter-spacing: 0;
  line-height: 1.25;
}
/* Preserve mono, keep numbers LTR inside RTL */
html[dir="rtl"] .mono,
html[dir="rtl"] [class*="mono"],
body.is-rtl .mono {
  font-family: var(--mono);
}
/* Ornaments: eyebrow line should mirror */
html[dir="rtl"] .eyebrow::before,
body.is-rtl .eyebrow::before {
  margin-left: 0;
}
/* Flip inline directional icons (arrows) — but not brand marks */
html[dir="rtl"] .flip-rtl,
body.is-rtl .flip-rtl {
  transform: scaleX(-1);
}
/* Keep numerals & latin-only tokens LTR when needed */
.ltr-inline {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* ============================================
   Language switcher (shared)
   ============================================ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--ink-08);
  border-radius: 2px;
  font-family: var(--sans);
}
.lang-switch button {
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-40);
  border-radius: 2px;
  cursor: pointer;
  transition: all .2s;
  line-height: 1;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.active {
  background: var(--ink);
  color: var(--cream);
}
/* Variant for dark backgrounds */
.lang-switch-dark {
  background: rgba(245, 240, 225, 0.1);
}
.lang-switch-dark button {
  color: rgba(245, 240, 225, 0.5);
}
.lang-switch-dark button:hover { color: var(--cream); }
.lang-switch-dark button.active {
  background: var(--gold);
  color: white;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

body { min-height: 100vh; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold-deep); }

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

/* ------- Typography ------- */

.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  margin: 0;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--gold);
}

/* ------- Buttons ------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 2px;
  transition: all .2s ease;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--ink-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--cream);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-40);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink-08);
}

.btn-gold {
  background: var(--gold);
  color: white;
}
.btn-gold:hover { background: var(--gold-deep); color: white; }

/* ------- Layout helpers ------- */

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

.divider-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 24px 0;
  color: var(--gold);
}
.divider-ornament::before,
.divider-ornament::after {
  content: "";
  flex: 0 0 40px;
  height: 1px;
  background: var(--gold);
}
.divider-ornament svg { width: 8px; height: 8px; }

/* ------- Kufic pattern background ------- */

.kufic-bg {
  background-image: url('/static/assets/pattern.svg');
  background-repeat: repeat;
  background-size: 180px 180px;
}

/* ------- Utility ------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
