/* ===========================================================
   Sabir — Chronic Illness Community
   Built to the Sabir brand guidelines.
   Palette, type and voice follow the brand deck.
   =========================================================== */

/* ---- Tokens ---- */
:root {
  --charcoal: #2B2A28;
  --ivory:    #FFFDF9;
  --teal:     #2B5B5A;
  --rose:     #B27171;
  --taupe:    #8A7666;
  --gold:     #BC9D51;
  --raspberry:#ED5D7B;
  --cyan:     #4BB9B9;

  /* gradient (from Sabir collateral) */
  --grad-center: #FFEBCD;
  --grad-middle: #F8D3BE;
  --grad-edge:   #D88BA6;

  /* tints for soft panels */
  --teal-tint: #EAF1F0;
  --rose-tint: #F7ECEC;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Now", "Poppins", "Helvetica Neue", Arial, sans-serif;

  --measure: 40rem;      /* comfortable reading width */
  --wide: 68rem;         /* wide container */
  --pad: clamp(1.25rem, 5vw, 2.5rem);

  --line: rgba(43, 42, 40, 0.12);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---- Type ---- */
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; }

.title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  line-height: 1.35;
  color: var(--taupe);
}
.heading {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.15rem);
  letter-spacing: -0.01em;
}
.subheading {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.2rem;
}
.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0 0 1rem;
}
.eyebrow--teal { color: var(--teal); }
.eyebrow--gold { color: var(--gold); }

p { margin: 0 0 1.25rem; }
.lead {
  font-size: 1.2rem;
  line-height: 1.6;
}
strong { font-weight: 600; }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--pad); }
.measure { max-width: var(--measure); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.divider { height: 1px; background: var(--gold); opacity: 0.5; border: 0; margin: 0; }
.stack > * + * { margin-top: 1.25rem; }
.flow > * + * { margin-top: 2.75rem; }

/* section colour variants */
.section--teal { background: var(--teal); color: var(--ivory); }
.section--teal .eyebrow { color: var(--gold); }
.section--rose-tint { background: var(--rose-tint); }
.section--teal-tint { background: var(--teal-tint); }

/* ---- Skip link ---- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--charcoal); color: var(--ivory);
  padding: 0.75rem 1rem; z-index: 200; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* ===========================================================
   Header / nav
   =========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; }
.nav-links {
  list-style: none; display: flex; gap: 1.75rem;
  margin: 0; padding: 0; align-items: center;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.95rem; font-weight: 500;
  color: var(--charcoal);
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { border-color: var(--raspberry); }
.nav-links a.nav-cta {
  text-decoration: none;
  font-weight: 600; font-size: 0.95rem;
  color: var(--ivory); background: var(--charcoal);
  padding: 0.5rem 1.1rem; border-radius: 999px;
  border: 0;
  transition: background 0.2s, color 0.2s;
}
.nav-links a.nav-cta:hover { background: var(--teal); color: var(--ivory); border: 0; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 0.5rem; color: var(--charcoal);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: flex-start;
    gap: 0; background: var(--ivory);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad) 1.5rem;
    box-shadow: 0 20px 30px -20px rgba(43,42,40,0.25);
    transform: translateY(-120%);
    transition: transform 0.28s ease;
    height: auto;
  }
  .nav[data-open="true"] .nav-links { transform: translateY(0); }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .nav-links a:hover, .nav-links a[aria-current="page"] { border-bottom-color: var(--line); color: var(--raspberry); }
  .nav-links a.nav-cta { margin-top: 1rem; text-align: center; color: var(--ivory); }
}

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  position: relative;
  background: radial-gradient(120% 130% at 50% 30%,
              var(--grad-center) 0%, var(--grad-middle) 45%, var(--grad-edge) 100%);
  text-align: center;
  padding-block: clamp(4rem, 11vw, 8rem);
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; }
.hero-logo { height: clamp(58px, 12vw, 104px); width: auto; margin: 0 auto 2rem; }
.hero .title { color: var(--charcoal); max-width: 20ch; margin-inline: auto; }
.hero .subtitle {
  color: var(--charcoal); opacity: 0.82;
  margin: 1.5rem auto 0; max-width: 30ch;
}
.hero-actions {
  margin-top: 2.5rem; display: flex; flex-wrap: wrap;
  gap: 0.9rem; justify-content: center;
}

/* page hero (interior pages) */
.page-hero { padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.page-hero .title { max-width: 22ch; }
.page-hero .subtitle { margin-top: 1.25rem; max-width: 44ch; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.6rem; border-radius: 999px;
  border: 1.5px solid var(--charcoal);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--charcoal); color: var(--ivory); }
.btn--primary:hover { background: var(--teal); border-color: var(--teal); }
.btn--ghost { background: transparent; color: var(--charcoal); }
.btn--ghost:hover { background: var(--charcoal); color: var(--ivory); }
.btn--on-teal { border-color: var(--ivory); color: var(--ivory); background: transparent; }
.btn--on-teal:hover { background: var(--ivory); color: var(--teal); }

/* ===========================================================
   Content blocks
   =========================================================== */
.section .heading + p,
.section .heading + .stack { margin-top: 1.25rem; }

/* the definition card (Sabir / صابر) */
.definition {
  background: var(--teal); color: var(--ivory);
  border-radius: 18px;
  padding: clamp(2.25rem, 5vw, 3.5rem);
  display: grid; gap: 1.75rem;
}
.definition .word {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3rem, 9vw, 5rem); line-height: 1;
}
.definition .pron {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  color: rgba(255,253,249,0.85);
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; align-items: baseline;
}
.definition .pron .ar { font-style: normal; font-size: 1.15em; }
.definition .meaning {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.4;
  max-width: 34ch; color: var(--ivory);
}
.definition .rule { width: 44px; height: 2px; background: var(--gold); border: 0; }

/* honest list — what this space is */
.marker-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.marker-list li {
  position: relative; padding-left: 1.9rem;
  font-size: 1.075rem;
}
.marker-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--raspberry);
}
.section--teal .marker-list li::before { background: var(--gold); }

/* affirmations / pull statements */
.pull {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.35; color: var(--teal);
  max-width: 24ch;
}
.section--teal .pull { color: var(--ivory); }
.affirm { display: grid; gap: 0.6rem; }
.affirm p {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 1.85rem);
  line-height: 1.3; margin: 0; color: var(--charcoal);
}
.affirm p:last-child { color: var(--rose); }

/* two-column split */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 780px) {
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .split--sticky > :first-child { position: sticky; top: 100px; }
}

/* guideline cards (What we ask of members) */
.card-grid { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 640px) { .card-grid { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 1.5rem 1.6rem;
}
.card h3 {
  font-family: var(--sans); font-weight: 600; font-size: 1.08rem;
  margin-bottom: 0.5rem; color: var(--teal);
}
.card p { margin: 0; font-size: 1rem; color: var(--charcoal); }

/* numbered steps (how you join) */
.steps { counter-reset: step; list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.steps li {
  position: relative; padding-left: 3.75rem; min-height: 2.5rem;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -0.15rem;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  background: var(--teal); color: var(--ivory);
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  display: grid; place-items: center;
}
.steps li h3 { font-family: var(--sans); font-weight: 600; font-size: 1.1rem; margin-bottom: 0.25rem; }
.steps li p { margin: 0; }

/* channels list (where community lives) */
.facts { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact {
  border-top: 2px solid var(--rose); padding-top: 1rem;
}
.fact .k { font-family: var(--serif); font-size: 1.5rem; color: var(--teal); font-weight: 600; }
.fact .v { font-size: 0.98rem; color: var(--taupe); }

/* CTA cards row (home footer nav) */
.link-cards { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 720px) { .link-cards { grid-template-columns: repeat(3, 1fr); } }
.link-card {
  text-decoration: none; color: var(--charcoal);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 1.5rem 1.6rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.link-card:hover { border-color: var(--raspberry); transform: translateY(-2px); background: #fff; }
.link-card .label { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.link-card .arrow { color: var(--raspberry); font-size: 1.4rem; line-height: 1; }

/* callout (crisis / cannot do) */
.callout {
  background: var(--rose-tint);
  border: 1px solid rgba(178,113,113,0.35);
  border-radius: 14px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.callout .heading { color: var(--rose); }
.callout p:last-child { margin-bottom: 0; }

/* contact blocks */
.contact-block { border-top: 1px solid var(--line); padding-top: 2rem; }
.mail-link {
  font-family: var(--serif); font-style: italic; font-size: 1.35rem;
  color: var(--teal); text-decoration: none;
  border-bottom: 1.5px solid var(--gold); padding-bottom: 2px;
}
.mail-link:hover { color: var(--raspberry); border-color: var(--raspberry); }

/* prose (privacy) */
.prose h2 { font-family: var(--sans); font-weight: 600; font-size: 1.3rem; color: var(--teal); margin: 2.75rem 0 0.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--teal); text-underline-offset: 3px; }
.note {
  font-family: var(--serif); font-style: italic; color: var(--taupe);
  font-size: 1rem; border-left: 3px solid var(--gold); padding-left: 1rem;
}

/* ===========================================================
   Footer
   =========================================================== */
.site-footer {
  background: var(--charcoal); color: var(--ivory);
  padding-block: clamp(3rem, 6vw, 4.5rem);
  margin-top: auto;
}
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer .foot-logo { height: 40px; margin-bottom: 1.25rem; }
.site-footer a { color: var(--ivory); text-decoration: none; opacity: 0.85; }
.site-footer a:hover { opacity: 1; color: var(--raspberry); }
.footer-col h4 { font-family: var(--sans); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer-note { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,253,249,0.15); font-size: 0.9rem; opacity: 0.7; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.footer-note a { opacity: 0.85; }

/* page shell keeps footer down */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
