/* ══════════════════════════════════════════════
   ONE STEP CLOSER — Main Stylesheet
   
   Identity: Deep midnight blue + warm amber gold
   The feeling of walking toward a lighthouse at night.
   Clean, scholarly, trustworthy — not a personal blog,
   a place of learning.
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
  /* Core Palette */
  --midnight:       #0D1B2A;   /* deep navy — headers, hero bg */
  --midnight-soft:  #162032;   /* slightly lighter navy */
  --amber:          #D4960A;   /* warm Islamic gold */
  --amber-light:    #F0C040;   /* bright gold for text on dark */
  --amber-pale:     #FDF3D0;   /* very pale gold — accent bg */
  --cream:          #FAFAF6;   /* page background */
  --white:          #FFFFFF;
  --ink:            #1A1A1A;   /* body text */
  --ink-soft:       #4A4A5A;   /* muted text */
  --border:         #E4E0D6;
  --surface:        #FFFFFF;
  --surface-warm:   #F7F4EE;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --font-arabic:  'Noto Naskh Arabic', serif;

  /* Spacing & Shape */
  --radius-sm:  3px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(13,27,42,0.06);
  --shadow-sm: 0 2px 8px rgba(13,27,42,0.08);
  --shadow-md: 0 6px 20px rgba(13,27,42,0.10);
  --shadow-lg: 0 12px 40px rgba(13,27,42,0.14);

  /* Layout */
  --max-w: 1120px;
  --prose-w: 740px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a  { color: var(--midnight); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber); }

/* ── Type Scale ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--midnight);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }
h4 { font-size: 1.1rem;  font-weight: 600; }
p  { margin-bottom: 1.3rem; }

/* ── Arabic ── */
.ar {
  font-family: var(--font-arabic);
  direction: rtl;
  line-height: 2.2;
  color: var(--midnight);
}
.ar-xl  { font-size: 2.2rem; }
.ar-lg  { font-size: 1.7rem; }
.ar-md  { font-size: 1.2rem; }
.ar-sm  { font-size: 0.95rem; }
.ar-center { text-align: center; }

/* ── Layout Helpers ── */
.wrap        { max-width: var(--max-w);   margin: 0 auto; padding: 0 1.5rem; }
.prose       { max-width: var(--prose-w); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.muted       { color: var(--ink-soft); }
.amber       { color: var(--amber); }
.section     { padding: 5rem 0; }
.section-sm  { padding: 3rem 0; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-gold   { background: var(--amber); color: var(--midnight); }
.btn-gold:hover { background: var(--amber-light); color: var(--midnight); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.45); }
.btn-outline:hover { border-color: var(--amber-light); color: var(--amber-light); }
.btn-dark   { background: var(--midnight); color: #fff; }
.btn-dark:hover { background: var(--midnight-soft); }

/* ══════════════════════════════════════════════
   TOP BAR — thin strip above nav
   ══════════════════════════════════════════════ */
.top-bar {
  background: var(--midnight);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0.35rem 1.5rem;
  text-align: center;
}
.top-bar p {
  font-family: var(--font-arabic);
  font-size: 1rem;
  color: var(--amber-light);
  direction: rtl;
  margin: 0;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════
   HEADER / NAV
   ══════════════════════════════════════════════ */
.site-header {
  background: var(--midnight);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--amber);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 20px; height: 20px; fill: var(--midnight); }
.logo-text {}
.logo-text .logo-en {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1.1;
}
.logo-text .logo-tagline {
  font-size: 0.68rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Nav links */
.nav-menu { display: flex; list-style: none; gap: 0; }
.nav-menu a {
  display: block;
  color: rgba(255,255,255,0.78);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(255,255,255,0.09);
  color: var(--amber-light);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: 0.25s;
}

/* ══════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════ */
.hero {
  background: var(--midnight);
  padding: 7rem 1.5rem 6rem;
  position: relative;
  overflow: hidden;
}

/* Geometric Islamic pattern overlay (CSS only) */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 10% 60%, rgba(212,150,10,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 20%, rgba(212,150,10,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.02) 0%, transparent 60%);
  pointer-events: none;
}

/* Subtle star-of-david / geometric motif top right */
.hero::after {
  content: '✦';
  position: absolute;
  top: 2.5rem;
  right: 6%;
  font-size: 5rem;
  color: rgba(212,150,10,0.06);
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  max-width: var(--prose-w);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-bismillah {
  font-family: var(--font-arabic);
  font-size: 1.75rem;
  color: var(--amber-light);
  margin-bottom: 2rem;
  display: block;
}

.hero-step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212,150,10,0.12);
  border: 1px solid rgba(212,150,10,0.25);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: 1.5rem;
}
.hero-step::before { content: '◆'; font-size: 0.5rem; }

.hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  font-style: italic;
}
.hero h1 em { font-style: normal; color: var(--amber-light); }

.hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
}

.hero-rule {
  width: 48px;
  height: 1px;
  background: var(--amber);
  margin: 0 auto 2.5rem;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.3);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(212,150,10,0.6), transparent);
}

/* ══════════════════════════════════════════════
   AYAH BLOCK
   ══════════════════════════════════════════════ */
.ayah-block {
  background: var(--amber-pale);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 2rem 2.5rem;
  margin: 2.5rem 0;
}
.ayah-block .ar { margin-bottom: 0.75rem; }
.ayah-trans {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: center;
}
.ayah-ref {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-top: 0.5rem;
}

/* ══════════════════════════════════════════════
   SECTION TITLES
   ══════════════════════════════════════════════ */
.sec-title { margin-bottom: 3rem; }
.sec-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.6rem;
}
.sec-title h2 { color: var(--midnight); }
.sec-title p   { color: var(--ink-soft); max-width: 480px; margin-top: 0.5rem; }
.sec-title.center { text-align: center; }
.sec-title.center p { margin-left: auto; margin-right: auto; }

/* ══════════════════════════════════════════════
   POST CARDS
   ══════════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s;
  box-shadow: var(--shadow-xs);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

/* Coloured top stripe per category */
.card-stripe { height: 3px; width: 100%; }
.stripe-quran       { background: linear-gradient(90deg, #1A6B55, #3DB389); }
.stripe-seerah      { background: linear-gradient(90deg, #7B5E00, #D4960A); }
.stripe-reflections { background: linear-gradient(90deg, #2D3A8C, #6474D8); }
.stripe-dua         { background: linear-gradient(90deg, #6B2280, #B55FD0); }
.stripe-general     { background: linear-gradient(90deg, #3A3A4A, #7A7A8A); }

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Category badge */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  width: fit-content;
}
.badge-quran       { background: #E3F4EE; color: #1A6B55; }
.badge-seerah      { background: #FEF3DC; color: #7B5E00; }
.badge-reflections { background: #EEF0FC; color: #2D3A8C; }
.badge-dua         { background: #F9EAF8; color: #6B2280; }
.badge-general     { background: #EDEDF0; color: #3A3A4A; }

.card h3 {
  font-size: 1.1rem;
  line-height: 1.45;
  margin-bottom: 0.6rem;
}
.card h3 a { color: var(--midnight); }
.card h3 a:hover { color: var(--amber); }

.card-excerpt {
  font-size: 0.88rem;
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
  font-size: 0.77rem;
  color: var(--ink-soft);
}
.card-date { display: flex; align-items: center; gap: 0.3rem; }
.card-read  { font-weight: 600; color: var(--midnight); font-size: 0.8rem; }
.card-read:hover { color: var(--amber); }

/* ══════════════════════════════════════════════
   STATS / NUMBERS STRIP
   ══════════════════════════════════════════════ */
.stats-strip {
  background: var(--midnight);
  padding: 3.5rem 1.5rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--amber-light);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* ══════════════════════════════════════════════
   CATEGORY TILES
   ══════════════════════════════════════════════ */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  text-align: center;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  display: block;
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--amber);
}
.tile-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.tile h3 { font-size: 1rem; color: var(--midnight); margin-bottom: 0.3rem; }
.tile p   { font-size: 0.8rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }

/* ══════════════════════════════════════════════
   PAGE HEADERS (interior pages)
   ══════════════════════════════════════════════ */
.page-hero {
  background: var(--midnight);
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
}
.page-hero h1 { color: #fff; }
.page-hero p  { color: rgba(255,255,255,0.65); max-width: 500px; margin: 0.75rem auto 0; }
.page-hero .ar { color: var(--amber-light); margin-bottom: 1rem; }

/* ══════════════════════════════════════════════
   SINGLE POST
   ══════════════════════════════════════════════ */
.post-hero {
  background: var(--midnight);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}
.post-hero h1   { color: #fff; max-width: 700px; margin: 0.75rem auto 1rem; }
.post-hero .badge { margin: 0 auto 0.75rem; }
.post-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}
.post-meta span { display: flex; align-items: center; gap: 0.3rem; }

.post-body {
  padding: 3.5rem 0 5rem;
}
.post-body h2 { margin: 2.5rem 0 1rem; }
.post-body h3 { margin: 2rem 0 0.75rem; color: var(--midnight-soft); }
.post-body ul,
.post-body ol  { padding-left: 1.75rem; margin-bottom: 1.3rem; }
.post-body li  { margin-bottom: 0.4rem; }
.post-body blockquote {
  border-left: 3px solid var(--amber);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--amber-pale);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ink-soft);
}
.post-body strong { color: var(--midnight); }
.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Post footer box */
.post-footer-note {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-top: 3rem;
}
.post-footer-note p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

/* ══════════════════════════════════════════════
   NEWSLETTER / CTA SECTION
   ══════════════════════════════════════════════ */
.cta-section {
  background: linear-gradient(135deg, var(--midnight), var(--midnight-soft));
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '◆';
  position: absolute;
  font-size: 18rem;
  color: rgba(212,150,10,0.03);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}
.cta-section h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-section p  { color: rgba(255,255,255,0.6); max-width: 440px; margin: 0 auto 2rem; }

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.site-footer {
  background: #080F16;
  color: rgba(255,255,255,0.55);
  padding: 4rem 1.5rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: var(--max-w);
  margin: 0 auto 3rem;
}
.footer-brand .logo-en-ft {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}
.footer-brand .logo-ar-ft {
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  color: var(--amber);
  direction: rtl;
  margin-bottom: 0.75rem;
}
.footer-brand p { font-size: 0.82rem; line-height: 1.7; max-width: 240px; }
.footer-col h5 {
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.55rem; }
.footer-col ul a {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--amber-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.77rem;
  color: rgba(255,255,255,0.28);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--midnight-soft);
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.1rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open { display: flex; }
  .nav-toggle    { display: flex; }
  .cards-grid    { grid-template-columns: 1fr; }
  .tiles-grid    { grid-template-columns: 1fr 1fr; }
  .footer-grid   { grid-template-columns: 1fr; gap: 2rem; }
  .hero          { padding: 5rem 1.5rem 4rem; }
}

@media (max-width: 420px) {
  .tiles-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
