/* Shifa Services — design system */
:root {
  /* Palette 1: warm ivory + deep forest */
  --ivory: #F4EFE6;
  --cream: #FBF7EF;
  --sand: #E8DFCC;
  --sage: #8B9A82;
  --forest: #3A4A3A;
  --forest-deep: #2A372A;
  --taupe: #A89684;
  --charcoal: #2B2B26;
  --gold: #B89B5E;
  --gold-soft: #C9B687;
  --line: rgba(43, 43, 38, 0.12);
  --line-soft: rgba(43, 43, 38, 0.06);

  /* Type */
  --serif: 'Lora', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', 'Inter', -apple-system, system-ui, sans-serif;

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

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

body { overflow-x: hidden; }

/* Headings — serif */
h1, h2, h3, h4, h5, .serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--forest-deep);
  text-wrap: balance;
}

h1 { font-size: clamp(44px, 6vw, 88px); }
h2 { font-size: clamp(36px, 4.4vw, 60px); }
h3 { font-size: clamp(24px, 2.4vw, 32px); }
h4 { font-size: clamp(18px, 1.6vw, 22px); }

p { text-wrap: pretty; }
.lede { font-size: clamp(17px, 1.2vw, 20px); line-height: 1.65; color: #4a4a42; }

/* Eyebrow */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* Layout */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 32px; }

section { padding: clamp(80px, 11vw, 140px) 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(.2,.7,.2,1);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--forest);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--forest-deep);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -12px rgba(58,74,58,0.5);
}
.btn-secondary {
  background: transparent;
  color: var(--forest-deep);
  border-color: var(--line);
}
.btn-secondary:hover {
  background: var(--cream);
  border-color: var(--forest);
}
.btn-ghost {
  background: transparent;
  color: var(--forest-deep);
  padding: 10px 0;
}
.btn .arrow {
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.btn:hover .arrow { transform: translateX(4px); }

/* Link arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: all .3s ease;
}
.link-arrow:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.link-arrow svg { transition: transform .3s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* Cards */
.card {
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 36px 32px;
  transition: all 0.5s cubic-bezier(.2,.7,.2,1);
}
.card:hover {
  border-color: var(--line);
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -28px rgba(58,74,58,0.25);
}

/* Imagery placeholder */
.img-ph {
  position: relative;
  background: linear-gradient(135deg, #d6c8a8 0%, #b8a87f 50%, #8b9a82 100%);
  overflow: hidden;
  border-radius: 4px;
}
.img-ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 30% 20%, rgba(255,247,228,0.55), transparent 60%),
    radial-gradient(ellipse 60% 40% at 75% 80%, rgba(58,74,58,0.25), transparent 60%);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Divider */
.hairline {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* Soft texture noise */
.noise::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
}
.field input, .field textarea, .field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 14px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--charcoal);
  transition: border-color .3s ease;
  width: 100%;
  outline: none;
  border-radius: 0;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--forest);
}
.field.error input, .field.error textarea, .field.error select {
  border-color: #b86b5e;
}
.field .err {
  font-size: 12px;
  color: #b86b5e;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* Accordion */
.acc-item {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  cursor: pointer;
}
.acc-item:last-child { border-bottom: 1px solid var(--line); }
.acc-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--serif);
  font-size: clamp(20px, 1.6vw, 24px);
  color: var(--forest-deep);
  font-weight: 400;
}
.acc-toggle {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  transition: all .4s cubic-bezier(.2,.7,.2,1);
  color: var(--forest);
}
.acc-item[data-open="true"] .acc-toggle {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
  transform: rotate(180deg);
}
.acc-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .6s cubic-bezier(.2,.7,.2,1), margin .6s ease, opacity .6s ease;
  opacity: 0;
  color: #555;
  max-width: 760px;
}
.acc-item[data-open="true"] .acc-a {
  max-height: 400px;
  margin-top: 18px;
  opacity: 1;
}

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 32px;
  transition: all .4s ease;
  background: rgba(244, 239, 230, 0);
}
.header.scrolled {
  background: rgba(244, 239, 230, 0.9);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 32px;
}
.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--forest-deep);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.brand .small { color: var(--sage); font-style: italic; font-weight: 400; }
.nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav a {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--charcoal);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all .3s ease;
  position: relative;
}
.nav a:hover { color: var(--forest); }
.nav a.active { color: var(--forest-deep); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.nav-cta {
  margin-left: 12px;
}

/* Mobile */
.mobile-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 960px) {
  .nav { display: none; }
  .nav-cta { display: none; }
  .mobile-toggle { display: flex; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 20px;
    border-top: 1px solid var(--line);
    gap: 0;
  }
  .nav.open a { padding: 14px; width: 100%; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav.open + .nav-cta { display: inline-flex; }
}

/* Footer */
.footer {
  background: var(--forest-deep);
  color: var(--cream);
  padding: 100px 0 40px;
  position: relative;
  overflow: hidden;
}
.footer h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 500;
  margin-bottom: 20px;
}
.footer a {
  color: rgba(251, 247, 239, 0.7);
  text-decoration: none;
  display: block;
  padding: 6px 0;
  font-size: 14px;
  transition: color .3s ease;
}
.footer a:hover { color: var(--cream); }

/* Marquee dots */
.dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dots .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
}

/* Tag */
.tag {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--charcoal);
  background: var(--cream);
}

/* Quote */
.quote {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 32px);
  font-style: italic;
  line-height: 1.4;
  color: var(--forest-deep);
  font-weight: 400;
}

/* Page transition */
.page {
  animation: fadeIn 0.7s cubic-bezier(.2,.7,.2,1);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Subtle scroll bar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ivory); }
::-webkit-scrollbar-thumb { background: var(--sand); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--taupe); }

/* Responsive grid */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Hide scroll on body when mobile menu open */
body.no-scroll { overflow: hidden; }

/* Selection */
::selection { background: var(--gold-soft); color: var(--forest-deep); }
