/* ===== Tokens ===== */
:root {
  --night: #1A1625;
  --night-2: #120F1A;
  --teal: #2A2438;
  --gold: #E8912B;
  --gold-soft: #F0B15C;
  --ivory: #F2EDE4;
  --copper: #C1443C;
  --sage: #9B8FA6;

  --font-display: 'Fraunces', serif;
  --font-devanagari: 'Tiro Devanagari Hindi', serif;
  --font-body: 'Baloo 2', sans-serif;
  --font-mono: 'Fira Code', monospace;

  --radius: 6px;
  --wrap: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--ivory);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
a { color: var(--gold-soft); }

/* Ink-blot / inkwell splatter texture, distinct from all other family sites */
.star-field {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(3px 3px at 80px 60px, rgba(232,145,43,0.12) 0, transparent 100%),
    radial-gradient(2px 2px at 260px 140px, rgba(193,68,60,0.12) 0, transparent 100%),
    radial-gradient(4px 4px at 460px 40px, rgba(232,145,43,0.08) 0, transparent 100%),
    radial-gradient(2px 2px at 600px 180px, rgba(242,237,228,0.08) 0, transparent 100%);
  background-repeat: repeat;
  background-size: 700px 400px;
}

/* ===== Header ===== */
.site-header { padding: 20px 0; border-bottom: 1px solid rgba(232,145,43,0.2); }
.header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.5rem;
  display: flex; align-items: center; gap: 10px;
  color: var(--ivory);
  text-decoration: none;
}
.brand:hover { color: var(--gold-soft); }
.brand-mark { color: var(--gold); font-style: normal; font-size: 1.2rem; }
.site-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--ivory); font-size: 0.9rem; opacity: 0.85; transition: opacity 0.2s; }
.site-nav a:hover { opacity: 1; color: var(--gold-soft); }

/* ===== Hero ===== */
.hero { padding: 60px 24px 44px; text-align: center; }
.eyebrow { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--sage); margin: 0 0 14px; }
#hindi-date-big {
  font-family: var(--font-devanagari);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--gold-soft);
  margin: 0 0 10px;
}
#hijri-date-big { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: clamp(1.3rem, 2.5vw, 1.7rem); color: var(--ivory); margin: 0; }
.hero-sub { font-family: var(--font-mono); font-size: 0.9rem; color: rgba(242,237,228,0.65); margin: 10px 0 0; }

.numeral-toggle {
  margin-top: 18px; background: transparent; border: 1px solid rgba(232,145,43,0.4); color: var(--gold-soft);
  font-family: var(--font-body); font-size: 0.82rem; padding: 8px 16px; border-radius: var(--radius); cursor: pointer;
}
.numeral-toggle:hover { background: rgba(232,145,43,0.1); }

/* ===== Doha of the Day (signature) ===== */
.doha-card { max-width: 580px; margin: 36px auto 0; background: var(--teal); border: 1px solid rgba(232,145,43,0.25); border-radius: 12px; padding: 32px 28px; text-align: center; }
.doha-label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--sage); margin: 0 0 16px; }
.doha-hindi { font-family: var(--font-devanagari); font-size: 1.5rem; line-height: 2; color: var(--ivory); white-space: pre-line; margin: 0 0 14px; }
.doha-meaning { font-size: 0.9rem; color: rgba(242,237,228,0.7); margin: 0 0 10px; font-style: italic; }
.doha-poet { font-family: var(--font-mono); font-size: 0.78rem; color: var(--copper); }

.divider {
  height: 18px; margin: 8px auto; max-width: var(--wrap);
  background-image: radial-gradient(circle, rgba(232,145,43,0.35) 2px, transparent 2.1px);
  background-size: 24px 18px; background-position: center; opacity: 0.5;
  mask-image: linear-gradient(90deg, transparent, black 15%, black 85%, transparent);
}

/* ===== Sections ===== */
.section { padding: 52px 24px; }
.section-title { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.8rem; margin: 0 0 6px; color: var(--ivory); }
.section-sub { font-family: var(--font-mono); font-size: 0.85rem; color: var(--sage); margin: 0 0 28px; }

/* ===== Calendar ===== */
.cal-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.cal-nav { display: flex; align-items: center; gap: 16px; font-family: var(--font-mono); }
.cal-nav button { background: none; border: 1px solid rgba(232,145,43,0.35); color: var(--gold-soft); width: 32px; height: 32px; border-radius: var(--radius); cursor: pointer; font-size: 1rem; }
.cal-nav button:hover { background: rgba(232,145,43,0.12); }
.cal-month-label { min-width: 160px; text-align: center; color: var(--ivory); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-weekday { text-align: center; font-family: var(--font-devanagari); font-size: 0.85rem; color: var(--sage); padding-bottom: 6px; }
.cal-day { aspect-ratio: 1; background: var(--teal); border: 1px solid rgba(232,145,43,0.15); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.95rem; }
.cal-day.empty { background: transparent; border: none; }
.cal-day.today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; color: var(--gold-soft); font-weight: 700; }

/* ===== Events ===== */
.events-list { display: flex; flex-direction: column; gap: 2px; }
.event-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid rgba(232,145,43,0.15); }
.event-days { font-family: var(--font-mono); font-size: 0.78rem; color: var(--copper); background: rgba(193,68,60,0.15); padding: 4px 8px; border-radius: var(--radius); text-align: center; }
.event-name { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.1rem; color: var(--ivory); }
.event-date { font-family: var(--font-mono); font-size: 0.85rem; color: var(--gold-soft); text-align: right; }

/* ===== Info sections ===== */
.info-text { max-width: 68ch; color: rgba(242,237,228,0.85); font-size: 0.98rem; margin: 0 auto 20px; }
.month-table-wrap { overflow-x: auto; }
.month-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.month-table th, .month-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(232,145,43,0.15); }
.month-table th { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sage); }
.month-table td.month-name { font-family: var(--font-display); font-style: italic; font-size: 1.02rem; color: var(--ivory); }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 2px; }
.faq-item { border-bottom: 1px solid rgba(232,145,43,0.15); }
.faq-item summary { cursor: pointer; padding: 16px 0; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.05rem; color: var(--ivory); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); color: var(--gold); font-size: 1.2rem; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: 16px; margin: 0; color: rgba(242,237,228,0.8); font-size: 0.92rem; max-width: 65ch; }

/* ===== Disclaimer banner ===== */
.disclaimer-banner { border: 1px solid rgba(193,68,60,0.35); background: rgba(193,68,60,0.08); border-radius: var(--radius); padding: 14px 18px; font-size: 0.82rem; color: rgba(242,237,228,0.75); margin: 24px auto 0; max-width: 560px; }
.disclaimer-banner a { color: var(--copper); }

/* ===== Contact card ===== */
.contact-card { margin-top: 24px; background: var(--teal); border: 1px solid rgba(232,145,43,0.25); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; max-width: 340px; }
.contact-label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sage); }
.contact-value { font-family: var(--font-mono); font-size: 1.05rem; color: var(--gold-soft); }

/* ===== Legal pages ===== */
.legal-content { max-width: 680px; padding: 64px 24px 80px; }
.legal-title { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 2.1rem; margin: 0 0 8px; color: var(--ivory); }
.legal-updated { font-family: var(--font-mono); font-size: 0.78rem; color: var(--sage); margin: 0 0 32px; }
.legal-content h2 { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.25rem; color: var(--gold-soft); margin: 32px 0 10px; }
.legal-content p { color: rgba(242,237,228,0.85); font-size: 0.98rem; }
.legal-content a { color: var(--gold-soft); }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid rgba(232,145,43,0.2); padding: 28px 24px; margin-top: 40px; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: rgba(242,237,228,0.6); }
.footer-family { color: var(--gold-soft); }
.site-footer a { color: var(--gold-soft); text-decoration: none; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a:hover { opacity: 1; }
.footer-copyright { font-family: var(--font-mono); font-size: 0.72rem; color: rgba(242,237,228,0.4); margin-top: 10px; }

/* ===== Back to top ===== */
#back-to-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--teal); border: 1px solid var(--gold); color: var(--gold-soft); font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 0.25s ease, transform 0.25s ease; z-index: 50; }
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-to-top:hover { background: rgba(232,145,43,0.18); }
@media (prefers-reduced-motion: reduce) { #back-to-top { transition: opacity 0.01s; } html { scroll-behavior: auto; } }

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .site-nav { gap: 14px; }
  .event-row { grid-template-columns: 70px 1fr; }
  .event-date { grid-column: 1 / -1; text-align: left; padding-left: 90px; }
  .doha-card { padding: 24px 18px; }
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
