/* Talbiya website: light, calm, on brand. No external fonts or scripts. */
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "InterDisplay"; src: url("../fonts/InterDisplay-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --emerald: #0B5D3A;
  --deep: #08472D;
  --night: #033B27;
  --gold: #C9A962;
  --ink: #1F1F1F;
  --soft: #4F5D55;
  --ivory: #FFFBF3;
  --mint: #E3F1E8;
  --line: #E6E1D3;
  --card: #FFFFFF;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
}
a { color: var(--emerald); text-underline-offset: 3px; }
a:hover { color: var(--deep); }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(255, 251, 243, 0.9); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 68px; gap: 4px 16px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--emerald); font-family: "InterDisplay", "Inter", sans-serif; font-weight: 700; font-size: 22px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { position: relative; text-decoration: none; color: var(--soft); font-weight: 600; font-size: 16px; padding: 10px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transition: transform 0.3s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--emerald); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
  background:
    url("../img/pattern.svg") center top / 96px repeat,
    radial-gradient(70% 90% at 80% 60%, var(--mint) 0%, rgba(227, 241, 232, 0) 70%),
    var(--ivory);
}
/* Fade the pattern out towards the bottom so it never fights the text. */
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 251, 243, 0) 40%, var(--ivory) 100%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; }
.hero .mark { width: 84px; margin: 0 0 18px; }
.hero h1 { font-family: "InterDisplay", "Inter", sans-serif; font-weight: 700; color: var(--emerald); font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; margin: 0 0 20px; letter-spacing: -0.02em; }
.hero h1 span { color: var(--deep); background: linear-gradient(transparent 70%, rgba(201, 169, 98, 0.45) 70%); background-size: 0 100%; background-repeat: no-repeat; animation: underline 1s 0.9s var(--ease) forwards; }
.hero p.lead { font-size: 21px; color: var(--soft); max-width: 540px; margin: 0 0 30px; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; background: var(--emerald); color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; box-shadow: 0 8px 20px rgba(11, 93, 58, 0.22); }
.badge.outline { background: rgba(255, 255, 255, 0.6); color: var(--emerald); border: 1.5px solid var(--emerald); box-shadow: none; }
.note { color: var(--soft); font-size: 15px; }

.hero-phones { position: relative; height: 560px; }
.hero-phones .phone { position: absolute; width: 250px; }
.hero-phones .front { left: 50%; top: 10px; margin-left: -150px; z-index: 2; animation: enter-front 1.1s 0.2s var(--ease) both, float 7s 1.4s ease-in-out infinite; }
.hero-phones .back { left: 50%; top: 60px; margin-left: -20px; transform: rotate(7deg); opacity: 0.95; animation: enter-back 1.1s 0.45s var(--ease) both; }

.phone { border-radius: 36px; padding: 8px; background: #1C211E; box-shadow: 0 30px 60px rgba(3, 59, 39, 0.22), 0 6px 14px rgba(3, 59, 39, 0.12); min-width: 0; }
.phone img { border-radius: 29px; width: 100%; height: auto; }

/* The day band: the sun crosses the sky above the five prayers. */
.day { background: var(--mint); padding: 56px 0 44px; }
.sky { position: relative; width: min(560px, 86%); aspect-ratio: 2 / 1; margin: 0 auto; border: 1.5px dashed rgba(11, 93, 58, 0.35); border-bottom: 0; border-radius: 999px 999px 0 0; }
.sky::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 1.5px; background: rgba(11, 93, 58, 0.35); }
.arm { position: absolute; left: 50%; bottom: 0; width: 50%; height: 0; transform-origin: 0 0; transform: rotate(-180deg); animation: orbit 16s ease-in-out infinite alternate; }
.sun { position: absolute; right: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 8px rgba(201, 169, 98, 0.22), 0 0 30px 8px rgba(201, 169, 98, 0.35); }
.prayers { list-style: none; display: flex; justify-content: space-between; width: min(640px, 100%); margin: 18px auto 10px; padding: 0; font-family: "InterDisplay", "Inter", sans-serif; font-weight: 700; color: var(--emerald); font-size: 20px; }

/* Sections */
section.block { padding: 80px 0; }
section.block h2, .jariyah h2 { font-family: "InterDisplay", "Inter", sans-serif; font-size: clamp(30px, 4vw, 42px); color: var(--emerald); margin: 0 0 12px; line-height: 1.15; letter-spacing: -0.01em; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.feature { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px 24px 22px; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s; }
.feature:hover { transform: translateY(-4px); border-color: rgba(201, 169, 98, 0.7); box-shadow: 0 18px 40px rgba(11, 93, 58, 0.1); }
.feature .num { display: block; font-family: "InterDisplay", "Inter", sans-serif; font-weight: 700; font-size: 15px; color: var(--gold); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.feature h3 { margin: 0 0 6px; font-size: 20px; color: var(--ink); }
.feature p { margin: 0; color: var(--soft); font-size: 16px; }

.inside { background: linear-gradient(180deg, var(--ivory), var(--mint)); }
.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 36px; }
.screens figure { margin: 0; }
.screens figure:nth-child(even) { margin-top: 48px; }
.screens .phone { transition: transform 0.45s var(--ease); }
.screens figure:hover .phone { transform: translateY(-8px) rotate(-1deg); }
.screens figcaption { margin-top: 14px; text-align: center; font-weight: 600; color: var(--emerald); font-size: 16px; }

/* Sadaqah jariyah band */
.jariyah { position: relative; padding: 88px 0; color: #F3EEDF; background: url("../img/pattern-gold.svg") center / 96px repeat, var(--night); }
.jariyah h2 { color: var(--ivory); }
.measure { max-width: 640px; margin: 0 auto 22px; }
.jariyah .measure { color: rgba(255, 251, 243, 0.85); }
.promise { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 8px 0 30px; }
.promise span { border: 1px solid rgba(201, 169, 98, 0.6); border-radius: 999px; padding: 8px 18px; font-weight: 600; color: var(--ivory); font-size: 16px; background: rgba(3, 59, 39, 0.6); }
.jariyah .disclaimer { font-size: 15px; color: rgba(255, 251, 243, 0.7); margin-bottom: 0; }

/* Motion */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes underline { to { background-size: 100% 100%; } }
@keyframes enter-front { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(40px) rotate(14deg); } to { opacity: 0.95; transform: rotate(7deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes orbit { from { transform: rotate(-178deg); } to { transform: rotate(-2deg); } }
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.rise { animation: rise 0.9s var(--ease) both; }
.rise.d1 { animation-delay: 0.08s; }
.rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.24s; }
.rise.d4 { animation-delay: 0.32s; }

/* Sections slide in as they scroll into view, where the browser supports it. */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero h1 span { background-size: 100% 100%; }
  .arm { transform: rotate(-60deg); }
}

/* Documents (privacy, terms, support) */
.doc { padding: 48px 0 64px; }
.doc h1 { font-family: "InterDisplay", "Inter", sans-serif; font-size: clamp(32px, 5vw, 44px); color: var(--emerald); margin: 0 0 6px; line-height: 1.15; }
.doc .updated { color: var(--soft); font-size: 15px; margin: 0 0 28px; }
.doc h2 { font-family: "InterDisplay", "Inter", sans-serif; font-size: 25px; color: var(--ink); margin: 38px 0 8px; line-height: 1.3; }
.doc h3 { font-size: 19px; margin: 24px 0 6px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .summary { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px 24px; }
.doc .summary p { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--emerald); font-weight: 600; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin: 10px 0; transition: border-color 0.3s; }
.faq details:hover { border-color: rgba(201, 169, 98, 0.7); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
.faq details[open] summary { color: var(--emerald); }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin: 18px 0 8px; }
.contact-card p { margin: 0; }
.contact-card .label { margin-bottom: 6px; }
.contact-card .after { margin-top: 10px; }
.contact-card .email { font-size: 22px; font-weight: 600; }
section.block.flush { padding-top: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--soft); font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--soft); }

@media (max-width: 900px) {
  .hero { padding: 48px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .hero .mark { margin: 0 auto 18px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .badges { justify-content: center; }
  .hero-phones { height: 470px; max-width: 380px; width: 100%; margin: 0 auto; }
  .hero-phones .phone { width: 210px; }
  .hero-phones .front { margin-left: -135px; }
  .hero-phones .back { margin-left: -40px; top: 50px; }
  .screens { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 17px; overflow-wrap: anywhere; }
  .site-header .wrap { justify-content: center; }
  .wrap { padding: 0 16px; }
  .nav { gap: 14px; }
  .nav a { font-size: 15px; }
  .hero .mark { width: 72px; }
  .hero p.lead { font-size: 19px; }
  .hero-phones { height: 400px; }
  .hero-phones .phone { width: 180px; }
  .hero-phones .front { margin-left: -118px; }
  .hero-phones .back { margin-left: -48px; }
  .prayers { font-size: 15px; }
  .screens { gap: 16px; }
  .screens figcaption { font-size: 14px; }
  section.block { padding: 60px 0; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc tr:first-child { display: none; }
  .doc tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .doc td { border: 0; padding: 2px 0; }
  .doc td:first-child { font-weight: 600; color: var(--emerald); }
  .doc td:nth-child(n+2)::before { color: var(--soft); font-size: 14px; display: block; }
  .doc td:nth-child(2)::before { content: "Service"; }
  .doc td:nth-child(3)::before { content: "What is sent"; }
  .doc td:nth-child(4)::before { content: "When"; }
}
