/* ============================================================
   Salah Buddy — marketing site styles
   Theme mirrors the app: Deep Teal + light teal + sky, with the
   carpet's warm gold/orange accents. Fonts: Playfair Display + Nunito.
   ============================================================ */

:root {
  /* Brand palette (from the app) */
  --teal-900: #061417;
  --teal-800: #0b2128;
  --teal-700: #0f4c5c;   /* primary */
  --teal-600: #14606f;
  --teal-400: #4db6c4;   /* light teal */
  --sky: #0ea5e9;        /* accent */
  --gold: #e9a23b;       /* badge gold */
  --orange: #e0763c;     /* carpet orange */

  /* Surfaces & text */
  --bg: #f2f8f8;
  --surface: #ffffff;
  --tint: #eaf3f3;
  --ink: #0b2128;
  --muted: #4a6068;
  --border: #d6e4e4;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(15, 76, 92, 0.25);
  --shadow-lg: 0 24px 60px -20px rgba(6, 20, 23, 0.45);
  --maxw: 1120px;

  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; color: var(--teal-700); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; color: var(--ink); }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--teal-700); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--font-body); font-weight: 800; font-size: 1rem;
  padding: 14px 26px; border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .95rem; }
.btn-primary { background: var(--teal-700); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--teal-600); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal-700); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--teal-400); background: #fff; }
.btn-play {
  background: var(--teal-900); color: #fff; padding: 12px 22px; box-shadow: var(--shadow);
}
.btn-play:hover { background: #0a2026; color: #fff; }
.btn-play span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
.btn-play small { font-size: .68rem; font-weight: 600; opacity: .85; }
.btn-play strong { font-size: 1.15rem; font-weight: 800; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 248, 248, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand-logo { border-radius: 9px; box-shadow: 0 2px 8px rgba(6,20,23,.2); }
.brand-name { font-family: var(--font-head); font-size: 1.3rem; color: var(--teal-700); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink); font-weight: 700; font-size: .98rem; }
.nav-links a:hover { color: var(--teal-700); text-decoration: none; }
.nav-cta { color: #fff !important; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer;
  padding: 8px; border-radius: 8px;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--teal-700); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 500px at 75% -10%, rgba(77,182,196,.18), transparent 60%),
    radial-gradient(800px 500px at 0% 110%, rgba(14,165,233,.10), transparent 55%);
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 100px);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: .85rem; letter-spacing: .4px;
  color: var(--teal-600); background: var(--tint); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow.on-dark { color: #cdeff4; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.grad-text {
  background: linear-gradient(100deg, var(--teal-400), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 22px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px 26px; list-style: none; padding: 0; margin: 0; }
.trust-row li { font-weight: 700; color: var(--teal-700); font-size: .95rem; }

/* Phone mockup */
.hero-visual { display: flex; justify-content: center; }
.phone {
  position: relative; width: 300px; max-width: 80vw; border-radius: 38px;
  background: linear-gradient(160deg, var(--teal-800), var(--teal-900));
  padding: 14px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.06);
}
.phone-notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 22px; background: var(--teal-900); border-radius: 0 0 14px 14px; z-index: 2;
}
.phone-screen {
  background: linear-gradient(180deg, #0d3540, var(--teal-800));
  border-radius: 26px; padding: 34px 16px 18px; min-height: 540px; color: #eaf6f7;
}
.app-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.app-greet { font-family: var(--font-head); font-size: 1.15rem; margin: 0; color: #fff; }
.app-date { margin: 2px 0 0; font-size: .8rem; color: #9fc4cc; }
.app-mini-logo { border-radius: 9px; }
.streak-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(120deg, rgba(233,162,59,.22), rgba(224,118,60,.14));
  border: 1px solid rgba(233,162,59,.4); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px;
}
.streak-card .flame { font-size: 1.7rem; }
.streak-card strong { display: block; color: #fff; font-size: 1rem; }
.streak-card small { color: #d8c19a; font-size: .76rem; }
.prayer-list { list-style: none; padding: 0; margin: 0 0 18px; }
.prayer-list li {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; padding: 11px 14px; margin-bottom: 9px;
}
.prayer-list .p-name { font-weight: 700; color: #eaf6f7; }
.prayer-list .p-time { color: #9fc4cc; font-size: .85rem; font-variant-numeric: tabular-nums; }
.prayer-list .p-check {
  width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  background: var(--teal-400); color: var(--teal-900); font-weight: 800; font-size: .85rem;
}
.prayer-list li.done { border-color: rgba(77,182,196,.4); }
.prayer-list .p-open { background: transparent; border: 2px solid rgba(255,255,255,.25); color: transparent; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.mini-grid span { aspect-ratio: 1; border-radius: 3px; background: rgba(255,255,255,.08); }
.mini-grid .g1 { background: rgba(77,182,196,.25); }
.mini-grid .g2 { background: rgba(77,182,196,.5); }
.mini-grid .g3 { background: rgba(77,182,196,.75); }
.mini-grid .g4 { background: var(--teal-400); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 100px) 0; }
.section-tint { background: var(--tint); }
.section-head { margin-bottom: 48px; }
.lead-muted { color: var(--muted); font-size: 1.12rem; }
.big-quote { font-family: var(--font-head); font-style: italic; font-size: 1.35rem; }

/* Features */
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal-400); }
.feat-icon {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(15,76,92,.1), rgba(77,182,196,.18));
  border-radius: 14px; margin-bottom: 16px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Steps */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step;
}
.step {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 26px;
}
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal-700); color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: 1.3rem; margin-bottom: 16px;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); }

/* Deep / motivation section */
.section-deep {
  background:
    radial-gradient(900px 400px at 80% 0%, rgba(77,182,196,.16), transparent 60%),
    linear-gradient(160deg, var(--teal-800), var(--teal-900));
  color: #eaf6f7;
}
.on-dark { color: #fff; }
.on-dark-muted { color: #b9d6dc; }

/* Privacy band */
.privacy-band {
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 36px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: clamp(28px, 4vw, 48px); box-shadow: var(--shadow);
}
.privacy-band h2 { margin-bottom: .4em; }
.privacy-badges { display: grid; gap: 12px; }
.privacy-badges span {
  background: var(--tint); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; font-weight: 700; color: var(--teal-700);
}

/* Contact */
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 36px; max-width: 480px; margin: 32px auto 0; box-shadow: var(--shadow);
}
.contact-label { color: var(--muted); margin: 0 0 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: .78rem; }
.contact-email { display: block; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; margin-bottom: 22px; word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: #c6dfe4; padding: 56px 0 28px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer .brand-name { color: #fff; }
.footer-tag { max-width: 320px; color: #9fc4cc; margin-top: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px 28px; align-content: flex-start; }
.footer-links a { color: #c6dfe4; font-weight: 700; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 22px; font-size: .9rem; color: #8fb3bb; }
.footer-bottom p { margin: 0; }
.footer-bottom--solo { border-top: 0; padding-top: 0; }
.footer-home-link { color: #c6dfe4; font-weight: 700; }
.footer-home-link:hover { color: #fff; }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(40px, 6vw, 72px) 0 80px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .3em; }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal .meta { color: var(--muted); font-weight: 700; margin-bottom: 2rem; }
.legal p, .legal li { color: #2a4148; }
.legal table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .96rem; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border: 1px solid var(--border); vertical-align: top; }
.legal th { background: var(--tint); color: var(--teal-700); }
.legal a { font-weight: 700; }
.back-home { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; font-weight: 700; }

/* ---------- 404 ---------- */
.error-wrap { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 24px; }
.error-wrap .big { font-family: var(--font-head); font-size: clamp(4rem, 14vw, 8rem); color: var(--teal-400); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .privacy-band { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 16px 20px; transform: translateY(-150%); transition: transform .3s ease;
    box-shadow: var(--shadow); max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 6px; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: 12px; text-align: center; border-bottom: 0 !important; }
  .nav-toggle { display: flex; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .footer-bottom { flex-direction: column; }
}

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