/* =========================================================
   UMOOR SEHHAT
   White base, logo green, and the Umoor Sehhat mint star
   pattern (Images/pattern-bg.jpg) mixed into select sections.
   One sans family (Outfit); Lisan ud-Dawat in Kanz al Marjaan.
   Shape rule: buttons and tags are pills, cards and images
   are 18px, inputs are 12px.
   ========================================================= */

@font-face {
  font-family: "Kanz";
  src: url("Kanz-al-Marjaan.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #fbfcfa;
  --surface: #ffffff;
  --soft: #eef6f0;
  --mint: #d5f7dd;        /* average tone of pattern-bg.jpg, shown while it loads */
  --green: #1e6b45;       /* sampled from the logo */
  --green-hover: #17583a;
  --green-ink: #123524;
  --text: #1a2520;
  --muted: #55625a;
  --line: rgba(26, 37, 32, .1);

  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lisan: "Kanz", "Amiri", "Traditional Arabic", serif;

  --wrap: 1180px;
  --header-h: 72px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --pattern: url("Images/pattern-bg.jpg");
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font: 400 17px/1.65 var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--green); color: #fff; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.lisan { font-family: var(--lisan); font-weight: 400; }

.title {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--green-ink);
  text-wrap: balance;
  margin-bottom: 16px;
}

.lead { font-size: 18px; color: var(--muted); max-width: 58ch; }
.prose p { color: var(--muted); max-width: 58ch; }
.prose p + p { margin-top: 14px; }

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-soft { background: var(--soft); }
.section-head { margin-bottom: clamp(32px, 4vw, 48px); }

/* the brand pattern: mint star lattice with a soft centre glow */
.section-pattern { background: var(--mint) var(--pattern) center / cover no-repeat; }
.section-pattern .lead,
.section-pattern .prose p,
.section-pattern .rows p { color: #2f4a3b; }

.text-link {
  display: inline-block;
  margin-top: 22px;
  font-weight: 500;
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-underline-offset .3s var(--ease), color .3s var(--ease);
}

.text-link:hover { color: var(--green-hover); text-underline-offset: 9px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 16px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .2s var(--ease);
}

.btn:active { transform: scale(.98); }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); }

.btn-outline { border-color: rgba(30, 107, 69, .4); color: var(--green); background: rgba(255, 255, 255, .5); }
.btn-outline:hover { border-color: var(--green); background: #fff; }

.btn-light { background: #fff; color: var(--green-ink); }
.btn-light:hover { background: var(--soft); }

/* frosted pill for use over the video */
.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.btn-glass:hover { background: rgba(255, 255, 255, .22); }

.btn-lg { min-height: 56px; padding: 0 32px; font-size: 17px; }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 15px; }

.btn .lisan { font-size: 23px; line-height: 1; padding-top: 3px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img { width: 54px; height: 54px; object-fit: contain; }

.brand-name {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--green-ink);
  white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 32px; }

.nav-links > a:not(.btn) {
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 8px;
  transition: color .3s var(--ease);
}

.nav-links > a:not(.btn):hover { color: var(--green-ink); }

.nav-links > a[aria-current="page"] {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

.menu-btn {
  display: none;
  place-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--green-ink);
  transition: transform .35s var(--ease);
}

.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- hero (home) ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(100vh, 1000px);
  min-height: min(100svh, 1000px);
  padding: calc(var(--header-h) + 32px) 0 clamp(40px, 9vh, 96px);
  overflow: hidden;
  color: #fff;
  background: #10251a url("Images/hero-poster.jpg") center / cover;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(8, 20, 14, .78), rgba(8, 20, 14, .36) 45%, rgba(8, 20, 14, .05) 75%);
}

.hero-content { display: grid; justify-items: end; gap: 28px; text-align: right; }

.hero-lisan {
  max-width: 1100px;
  font: 400 clamp(28px, 3.9vw, 50px)/1.8 var(--lisan);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.hero-lisan span {
  display: inline-block;
  margin-inline: .35em;
  font: 500 .58em/1 var(--sans);
  vertical-align: middle;
}

/* dir="rtl" on this row: Patient Portal sits first, on the right */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-content > * { animation: rise 1.1s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: .15s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- page header (inner pages) ---------- */

.page-hero {
  padding: calc(var(--header-h) + clamp(56px, 8vw, 104px)) 0 clamp(48px, 6vw, 80px);
  background: var(--mint) var(--pattern) center / cover no-repeat;
}

.page-hero h1 {
  max-width: 16ch;
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--green-ink);
  margin-bottom: 16px;
}

.page-hero .lead { color: #2f4a3b; }

/* ---------- split: photo + text ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 600px;
  object-fit: cover;
  border-radius: 18px;
}

/* ---------- heading + rows ---------- */

.rows-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.rows { list-style: none; }
.rows li { padding: 26px 0; border-top: 1px solid rgba(18, 53, 36, .18); }
.rows h3 { font-size: 22px; font-weight: 500; color: var(--green-ink); margin-bottom: 6px; }
.rows p { color: var(--muted); max-width: 48ch; }

/* ---------- tags ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin-top: 8px; }

.tags li {
  padding: 10px 18px;
  font-size: 16px;
  color: var(--green-ink);
  background: var(--soft);
  border: 1px solid rgba(30, 107, 69, .15);
  border-radius: 999px;
}

/* ---------- large words grid ---------- */

.words {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.words h3 {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--green);
  margin-bottom: 6px;
}

.words p { color: var(--muted); font-size: 16px; }

/* ---------- instagram ---------- */

.ig-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.ig-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line);
}

.ig-card .instagram-media {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ig-card iframe { min-width: 0 !important; max-width: 100% !important; }

.ig-card .instagram-media > a {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 24px;
  color: var(--green);
  text-decoration: none;
  background: var(--surface);
}

/* ---------- resources ---------- */

.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.res-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 24px;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color .35s var(--ease);
}

.res-card:hover { border-color: rgba(30, 107, 69, .35); }

.res-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.res-card h3 { font-size: 24px; font-weight: 500; color: var(--green-ink); margin-bottom: 6px; }
.res-card p { font-size: 16px; color: var(--muted); margin-bottom: 16px; }

.res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.res-actions .text-link { margin-top: 0; font-size: 15px; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.details { margin-top: 28px; }
.details dt { font-size: 14px; color: var(--muted); }
.details dd { margin-bottom: 22px; font-size: 18px; color: var(--green-ink); }
.details a { text-decoration: none; border-bottom: 1px solid rgba(30, 107, 69, .35); transition: border-color .3s var(--ease); }
.details a:hover { border-color: var(--green); }

.form {
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.form h2 { font-size: 28px; font-weight: 500; color: var(--green-ink); }
.form > p { color: var(--muted); margin: 4px 0 24px; }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 15px; font-weight: 500; }
.field label span { font-weight: 400; color: var(--muted); }

.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  font-size: 16px; /* 16px stops iOS zooming on focus */
  background: var(--bg);
  border: 1px solid rgba(26, 37, 32, .18);
  border-radius: 12px;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease);
}

.field textarea { min-height: 140px; resize: vertical; }

.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 107, 69, .15);
}

.form .btn { width: 100%; }
.form .btn:disabled { opacity: .6; cursor: wait; }
.form-status { margin-top: 14px; font-size: 15px; color: var(--muted); }
.form-status:empty { display: none; }
.form-status.ok { color: var(--green); }
.form-status.err { color: #b3261e; }

/* ---------- CTA (sits in a .section-pattern) ---------- */

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}

.cta-band .title { margin-bottom: 8px; }
.cta-band p { color: #2f4a3b; max-width: 44ch; }

/* ---------- footer ---------- */

.site-footer { color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-block: 64px 44px;
}

.footer-logo { display: inline-block; margin-bottom: 14px; }
.footer-logo img { width: 84px; height: 84px; object-fit: contain; }

.footer-brand p { max-width: 34ch; font-size: 16px; }

.site-footer h3 { margin-bottom: 12px; font-size: 16px; font-weight: 500; color: var(--green-ink); }

.site-footer nav a,
.footer-contact a {
  display: block;
  padding: 4px 0;
  font-size: 16px;
  text-decoration: none;
  transition: color .3s var(--ease);
}

.site-footer nav a:hover,
.footer-contact a:hover { color: var(--green); }

.footer-contact p { font-size: 16px; padding: 4px 0; }

.footer-bottom {
  padding-block: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

/* ---------- reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-grid { grid-template-columns: 1fr; }
  .words { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }

  .brand img { width: 46px; height: 46px; }
  .brand-name { font-size: 19px; }

  .menu-btn { display: grid; }

  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    padding: 8px 20px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(18, 53, 36, .12);
  }

  .nav-links.open { display: flex; animation: rise .4s var(--ease) both; }

  .nav-links > a:not(.btn) {
    padding: 16px 0;
    font-size: 19px;
    color: var(--green-ink);
    border-bottom: 1px solid var(--line);
  }

  .nav-links > a[aria-current="page"] { text-decoration: none; color: var(--green); }

  .nav-links .btn { margin-top: 20px; min-height: 50px; }

  .split,
  .rows-layout,
  .contact-grid { grid-template-columns: 1fr; }

  .photo { aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  .hero-content { justify-items: stretch; }

  .hero-lisan { font-size: 27px; }

  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .btn:nth-child(-n+2) { grid-column: 1 / -1; }

  .ig-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: -20px;
    padding: 0 20px 12px;
    scroll-padding-inline: 20px;
  }

  .ig-card { scroll-snap-align: start; }

  .words { grid-template-columns: 1fr; gap: 24px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .btn-row .btn { flex: 1 1 100%; }
}

@media (max-width: 480px) {
  .res-card { grid-template-columns: 92px 1fr; gap: 16px; padding: 16px; }
  .res-card h3 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .btn-glass { background: rgba(16, 37, 26, .85); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
