@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
  --ink: #1a1a2e;
  --ink-light: #4a4a6a;
  --ink-muted: #8888aa;
  --cream: #faf9f6;
  --paper: #f4f2ed;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --accent-dark: #1d4ed8;
  --gold: #b45309;
  --gold-light: #fef3c7;
  --green: #065f46;
  --green-light: #d1fae5;
  --border: rgba(26,26,46,0.10);
  --border-strong: rgba(26,26,46,0.20);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(26,26,46,0.08), 0 4px 16px rgba(26,26,46,0.06);
  --shadow-lg: 0 4px 6px rgba(26,26,46,0.06), 0 12px 40px rgba(26,26,46,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--ink-light);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }

/* ── HERO ── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero p {
  font-size: 1.1rem;
  color: var(--ink-light);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding-top: 1rem;
}
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--ink);
  display: block;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── SECTION ── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}
.section-sub {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ── CALC GRID ── */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.calc-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  box-shadow: var(--shadow);
}
.calc-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--accent);
}
.calc-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.calc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.calc-icon.islamic { background: var(--green-light); }
.calc-icon.finance { background: var(--accent-light); }
.calc-icon.ai { background: #f3e8ff; }
.calc-icon.health { background: #ffe4e6; }
.calc-card h3 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.calc-card p {
  font-size: 0.85rem;
  color: var(--ink-light);
  line-height: 1.5;
  flex: 1;
}
.calc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.calc-tag {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.calc-arrow {
  font-size: 0.85rem;
  color: var(--accent);
  transition: transform 0.15s;
}
.calc-card:hover .calc-arrow { transform: translateX(4px); }

/* ── CALCULATOR PAGE ── */
.calc-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.calc-breadcrumb {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}
.calc-breadcrumb a { color: var(--accent); text-decoration: none; }
.calc-breadcrumb a:hover { text-decoration: underline; }
.calc-page-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.calc-page-desc {
  font-size: 1rem;
  color: var(--ink-light);
  font-weight: 300;
  margin-bottom: 2.5rem;
  max-width: 560px;
}

/* ── CALCULATOR WIDGET ── */
.calc-widget {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}
.calc-widget-header {
  background: var(--ink);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.calc-widget-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: white;
  font-weight: 400;
}
.calc-widget-icon { font-size: 1.25rem; }
.calc-widget-body { padding: 2rem 1.75rem; }

/* ── FORM ELEMENTS ── */
.field-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field input, .field select {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  width: 100%;
}
.field input:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  background: white;
}
.field-hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ── BUTTON ── */
.btn-calc {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-bottom: 1.5rem;
}
.btn-calc:hover { background: var(--accent-dark); }
.btn-calc:active { transform: scale(0.99); }

/* ── RESULT BOX ── */
.result-box {
  background: var(--accent-light);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  display: none;
}
.result-box.visible { display: block; animation: fadeUp 0.3s ease; }
.result-box.islamic-result {
  background: var(--green-light);
  border-color: rgba(6,95,70,0.2);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-main {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.result-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.result-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(37,99,235,0.15);
}
.result-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}
.result-row span:first-child { color: var(--ink-light); }
.result-row span:last-child { font-weight: 500; color: var(--ink); }

/* ── CONTENT SECTIONS ── */
.content-section {
  margin-bottom: 2.5rem;
}
.content-section h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.content-section p {
  color: var(--ink-light);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.content-section ul {
  color: var(--ink-light);
  font-size: 0.95rem;
  line-height: 1.75;
  padding-left: 1.5rem;
}
.content-section ul li { margin-bottom: 0.3rem; }

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.faq-q {
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.faq-a {
  font-size: 0.875rem;
  color: var(--ink-light);
  line-height: 1.6;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand .nav-logo { display: block; margin-bottom: 0.5rem; font-size: 1.2rem; }
.footer-brand p { font-size: 0.8rem; color: var(--ink-muted); line-height: 1.6; }
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-light);
  text-decoration: none;
  margin-bottom: 0.4rem;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ── AD PLACEHOLDER ── */
.ad-slot {
  background: var(--paper);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.78rem;
  margin: 1.5rem 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .hero { padding: 3rem 1.25rem 2rem; }
  .hero-stats { gap: 1.5rem; }
  .section { padding: 2rem 1.25rem; }
  .calc-page { padding: 2rem 1.25rem 4rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .nav-links { display: none; }
  .field-group { grid-template-columns: 1fr; }
}
