/* ============================================================
   LASHIBI FUNERAL HOMES — Design System
   Calm · traditional · dignified · trustworthy
   Palette built on the real red-and-white logo:
   deep oxblood red + warm ivory/white. No gold.
   Type: Playfair Display (display) + Mulish (body)
   ============================================================ */

/* ---- Design tokens ------------------------------------------------ */
:root {
  /* Surfaces */
  --bg:          #F7F4EE;   /* warm ivory — dominant background */
  --bg-alt:      #EFEAE0;   /* parchment — section banding */
  --surface:     #FFFFFF;   /* cards */
  --surface-2:   #FCFAF5;   /* tinted card */

  /* Brand — Lashibi logo red + charcoal (UI red a touch deeper than logo) */
  --brand:       #BE1620;   /* slightly deepened logo red: buttons, accents */
  --brand-dark:  #9E1219;   /* hover / pressed */
  --brand-deep:  #231F20;   /* logo charcoal: footer, deep panels, at-need */
  --brand-tint:  #FBE7E6;   /* very soft red wash */
  --brand-line:  #EBC4C2;   /* soft red border */
  --soft-on-deep:#D9B8B3;   /* warm rose for small text on charcoal */

  /* Ink */
  --ink:         #2B2A28;   /* primary text */
  --muted:       #5B5852;   /* secondary text */
  --faint:       #6B675E;   /* tertiary / meta — AA on ivory & parchment */
  --line:        #E3DCCE;   /* warm hairline */
  --line-strong: #D6CDBB;

  /* Utility */
  --whatsapp:    #0E7C3C;   /* WhatsApp only — deepened for AA white labels */
  --whatsapp-dk: #0C6E35;

  /* Type */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Mulish', system-ui, -apple-system, sans-serif;

  /* Spacing — 8px scale */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;

  /* Shape */
  --r-btn: 4px;
  --r-card: 8px;
  --r-pill: 999px;

  /* Shadow — soft, low-opacity */
  --sh-1: 0 1px 2px rgba(43,42,40,.04), 0 2px 8px rgba(43,42,40,.05);
  --sh-2: 0 4px 14px rgba(43,42,40,.07), 0 2px 6px rgba(43,42,40,.05);
  --sh-3: 0 18px 48px rgba(79,16,25,.12), 0 6px 16px rgba(43,42,40,.08);

  /* Layout */
  --maxw: 1180px;
  --header-h: 100px;
}

/* Tweakable font overrides (set by tweaks panel) */
[data-serif="cormorant"] { --font-display: 'Cormorant Garamond', Georgia, serif; }
[data-serif="playfair"]  { --font-display: 'Playfair Display', Georgia, serif; }
[data-sans="mulish"]     { --font-body: 'Mulish', system-ui, sans-serif; }
[data-sans="lato"]       { --font-body: 'Lato', system-ui, sans-serif; }

/* ---- Reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- Typography --------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04;
  font-weight: 500;
}
h2.section-title { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; }
h3 { font-size: clamp(22px, 2.4vw, 28px); }
p { margin: 0 0 1em; text-wrap: pretty; }
.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--muted);
  line-height: 1.6;
}

/* Eyebrow — small uppercase sans, wide tracking, in brand red */
.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--s2);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1.5px;
  background: var(--brand);
  display: inline-block;
}
.eyebrow.center { justify-content: center; }
.eyebrow.light { color: #E9C8C0; }
.eyebrow.light::before { background: #E9C8C0; }

/* ---- Layout primitives -------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s3); }
.section { padding: 120px 0; }
body[data-page="home"] .section { padding: 164px 0; }
.section.tight { padding: 104px 0; }
body[data-page="home"] .section.tight { padding: 128px 0; }
.section.ivory { background: var(--bg); }
.section.parchment { background: var(--bg-alt); }
.section.deep { background: var(--brand-deep); color: #F3E8E6; }
.section.deep h2, .section.deep h3 { color: #FBF4F2; }
.center { text-align: center; }
.measure { max-width: 620px; }
.measure.center { margin-left: auto; margin-right: auto; }

/* ---- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  padding: 15px 28px;
  min-height: 52px;
  border-radius: var(--r-btn);
  border: 1.5px solid transparent;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--sh-1); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: var(--sh-2); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.btn-ghost.on-deep { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost.on-deep:hover { background: #fff; color: var(--brand-deep); border-color:#fff; }
.btn-wa { background: var(--whatsapp); color: #fff; box-shadow: var(--sh-1); }
.btn-wa:hover { background: var(--whatsapp-dk); transform: translateY(-2px); box-shadow: var(--sh-2); }
.btn-lg { font-size: 17px; padding: 17px 34px; min-height: 58px; }
.btn-block { width: 100%; }

/* Plain descriptive link (no bare "read more") */
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start; width: fit-content;
  font-weight: 700; color: var(--brand);
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px; transition: gap .18s ease, border-color .18s ease;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .18s ease; }
.link-arrow:hover { border-color: var(--brand); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---- Image placeholders (real photos swap in later) --------------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, rgba(138,34,48,.035) 0 2px, transparent 2px 11px),
    linear-gradient(160deg, #E7DFD2, #D9CFBE);
  color: var(--brand-deep);
  overflow: hidden;
  border-radius: var(--r-card);
  display: flex; align-items: center; justify-content: center;
}
/* Real photo using the placeholder's sizing/positioning */
img.ph { object-fit: cover; width: 100%; height: auto; }
img.ph::after { display: none; }
/* Fill contexts: image must match its box exactly (overrides height:auto) */
.fac-tile img.ph, .cat img.ph, .hero-bleed img.ph, .contact-close img.ph { height: 100%; }
.ph::after {
  /* subtle frame */
  content: ""; position: absolute; inset: 10px;
  border: 1px solid rgba(79,16,25,.16); border-radius: 4px;
  pointer-events: none;
}
.ph-inner {
  position: relative; z-index: 1;
  text-align: center; padding: var(--s3);
  max-width: 80%;
}
.ph-ico { width: 34px; height: 34px; margin: 0 auto 12px; opacity: .55; }
.ph-ico svg { width: 100%; height: 100%; }
.ph-label {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  opacity: .75;
}
.ph-cap {
  font-family: var(--font-display); font-style: italic;
  font-size: 16px; line-height: 1.35; margin-top: 8px; color: var(--brand-deep);
  opacity: .85; font-weight: 500;
}
.ph.dark {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 2px, transparent 2px 11px),
    linear-gradient(160deg, #5A3B3E, #3C2528);
  color: #F1DFDC;
}
.ph.dark::after { border-color: rgba(255,255,255,.18); }
.ph.dark .ph-cap { color: #F1DFDC; }

/* ---- Cards -------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-1);
}

/* ---- Forms -------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: var(--s2); }
.field label { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.field label .opt { font-weight: 400; color: var(--faint); }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-btn);
  padding: 13px 15px; min-height: 50px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

/* ---- Focus visibility (a11y) -------------------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- Utilities ---------------------------------------------------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.stack-1 > * + * { margin-top: var(--s1); }
.stack-2 > * + * { margin-top: var(--s2); }
.stack-3 > * + * { margin-top: var(--s3); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
