/* Deem visual foundation. Keep section-specific CSS in future module files. */
html:root {
  /* Core palette: based on the approved full-page visual concept. */
  --deem-plum: #2a151e;
  --deem-plum-deep: #1d0c15;
  --deem-plum-soft: #43252e;
  --deem-ivory: #f4ede4;
  --deem-cream: #fbf7f2;
  --deem-gold: #c1945e;
  --deem-gold-light: #e1bd89;
  --deem-ink: #2d1b21;
  --deem-muted: #67585b;
  --deem-line: #dcd0c3;
  --deem-white: #fffdf9;

  /* Type and layout scale. */
  --deem-font-display: 'Amiri', 'Noto Naskh Arabic', Georgia, serif;
  --deem-font-body: 'Tajawal', Tahoma, Arial, sans-serif;
  --deem-body-size: 1.0625rem;
  --deem-body-leading: 1.85;
  --deem-h1-size: clamp(2.75rem, 5.5vw, 5.25rem);
  --deem-h2-size: clamp(2.25rem, 3.6vw, 3.75rem);
  --deem-h3-size: clamp(1.75rem, 2.5vw, 2.5rem);
  --deem-container: 1240px;
  --deem-gutter: clamp(20px, 4vw, 56px);
  --deem-section-space: clamp(72px, 7vw, 120px);
  --deem-radius: 4px;
  --deem-radius-card: 8px;

  /* Astra color variables: keep common theme components on the same palette. */
  --ast-global-color-0: var(--deem-gold);
  --ast-global-color-1: var(--deem-plum);
  --ast-global-color-2: var(--deem-ink);
  --ast-global-color-3: var(--deem-muted);
  --ast-global-color-4: var(--deem-cream);
  --ast-global-color-5: var(--deem-white);
  --ast-global-color-6: var(--deem-ivory);
  --ast-global-color-7: var(--deem-line);
  --ast-global-color-8: var(--deem-plum-deep);
}

html { scroll-behavior: smooth; }

body {
  background: var(--deem-cream);
  color: var(--deem-ink);
  font-family: var(--deem-font-body);
  font-size: var(--deem-body-size);
  line-height: var(--deem-body-leading);
}

body.rtl { direction: rtl; }

body, button, input, select, textarea { font-family: var(--deem-font-body); }

h1, h2, h3, h4, h5, h6,
.entry-title, .site-title {
  color: var(--deem-plum);
  font-family: var(--deem-font-display);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 { font-size: var(--deem-h1-size); }
h2 { font-size: var(--deem-h2-size); }
h3 { font-size: var(--deem-h3-size); }

/* Old Astra and Elementor page styles still set blue heading colors later in the cascade. */
#content .entry-content :is(h1, h2, h3, h4, h5, h6) {
  color: var(--deem-plum);
}

#content :is(.entry-title, .entry-title a, .page-title, .ast-archive-title) {
  color: var(--deem-plum);
}

/* Keep the approved gold titles legible against the dark Deem banners. */
#content .entry-content :is(.deem-hero__title, .deem-contact-cta__title),
#content .entry-content :is(.elementor-element-ac2a79e, .elementor-element-75b188d, .elementor-element-0142d7f) :is(h1, h2, h3, h4, h5, h6) {
  color: var(--deem-gold-light);
}

p { margin-block: 0 1.2em; }
::selection { background: var(--deem-gold-light); color: var(--deem-plum-deep); }
:focus-visible { outline: 2px solid var(--deem-gold); outline-offset: 3px; }

/* Small reusable primitives for the future page sections. */
.deem-container {
  width: min(100% - (2 * var(--deem-gutter)), var(--deem-container));
  margin-inline: auto;
}

.deem-section { padding-block: var(--deem-section-space); }
.deem-section--dark { background: var(--deem-plum); color: var(--deem-ivory); }
.deem-section--dark h1,
.deem-section--dark h2,
.deem-section--dark h3 { color: var(--deem-ivory); }

.deem-eyebrow {
  color: var(--deem-gold);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.6;
}

.deem-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8em 1.65em;
  border: 1px solid var(--deem-gold);
  border-radius: var(--deem-radius);
  background: var(--deem-gold);
  color: var(--deem-plum-deep);
  font-family: var(--deem-font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  cursor: pointer;
}

.deem-button:hover,
.deem-button:focus-visible {
  background: var(--deem-gold-light);
  border-color: var(--deem-gold-light);
  color: var(--deem-plum-deep);
}

.deem-button--outline {
  background: transparent;
  color: var(--deem-gold-light);
}

.deem-button--outline:hover,
.deem-button--outline:focus-visible {
  background: var(--deem-gold);
  border-color: var(--deem-gold);
  color: var(--deem-plum-deep);
}

@media (max-width: 767px) {
  html:root { --deem-section-space: 64px; }
  .deem-button { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .deem-button { transition: none; }
}
