/* Qadry Website Styles — Mobile-first, clean, centered */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Tokens */
:root {
  --text-primary: #14121b;
  --text-secondary: #5b5f74;

  --bg-primary: #f7f4ff;
  --surface: #ffffff;
  --surface-alt: #f1f3ff;

  --border-color: rgba(20, 18, 27, 0.12);

  --link-color: #3f4bf1;
  --link-hover: #2d33b8;

  --shadow: 0 12px 28px rgba(40, 37, 80, 0.12);
  --shadow-soft: 0 6px 16px rgba(40, 37, 80, 0.08);

  --radius: 16px;
}

/* Motion */
html {
  scroll-behavior: smooth;
}

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

/* Base */
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background:
    radial-gradient(1200px 600px at 10% -10%, #ffe7f0 0%, transparent 60%),
    radial-gradient(1200px 600px at 90% -20%, #d9f2ff 0%, transparent 55%),
    var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout container */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Header */
.header {
  padding: 20px 0 12px;
  margin-bottom: 24px;
}

.header .container {
  display: flex;
  flex-direction: column;
  align-items: center; /* ✅ center header */
  gap: 12px;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

/* Nav */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center; /* ✅ center nav */
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-soft);
  transition: color 0.15s ease, transform 0.15s ease;
}

.nav a:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.nav a.active {
  color: var(--text-primary);
  background: linear-gradient(
    135deg,
    rgba(63, 75, 241, 0.18),
    rgba(255, 143, 163, 0.22)
  );
}

.nav a:focus {
  outline: 2px solid var(--link-color);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Main */
main {
  padding-bottom: 64px;
  min-height: 60vh;
}

/* Typography */
h2 {
  font-size: 30px;
  font-weight: 700;
  margin: 28px 0 10px;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 8px;
}

p {
  margin-bottom: 16px;
  max-width: 68ch; /* nice reading width for body */
}

p:last-child {
  margin-bottom: 0;
}

.meta {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

a:hover {
  color: var(--link-hover);
  box-shadow: inset 0 -1px 0 var(--link-hover);
}

a:focus {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Lists */
ul,
ol {
  margin-left: 20px;
  margin-bottom: 16px;
  max-width: 65ch;
}

li {
  margin-bottom: 8px;
}

/* Sections */
.section {
  max-width: 760px;       /* ✅ center content blocks like a column */
  margin: 0 auto 24px;    /* ✅ centered */
  padding: 18px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(63, 75, 241, 0.08);
}

/* Remove the “narrow column inside a wide card” effect */
.section p {
  max-width: none;
}

/* Callout */
.callout {
  background: linear-gradient(
    135deg,
    rgba(63, 75, 241, 0.08),
    rgba(255, 143, 163, 0.12)
  );
  border-left: 4px solid var(--link-color);
  padding: 18px 20px;
  border-radius: 12px;
}

.callout p {
  margin-bottom: 8px;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Table of contents */
.toc {
  max-width: 760px;     /* ✅ align with sections */
  margin: 24px auto 32px;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: 12px;
}

.toc p {
  margin-bottom: 8px;
  font-size: 15px;
  max-width: none;
}

.toc ul {
  list-style: none;
  margin-left: 0;
  margin-bottom: 0;
  max-width: none;
}

.toc li {
  margin-bottom: 4px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 32px 0;
  margin-top: 64px;
  background: var(--surface-alt);
}

/* ✅ force footer truly centered */
.footer .container {
  text-align: center;
}

.footer .nav {
  justify-content: center;
  margin-bottom: 12px;
}

/* Footer paragraphs should NOT use the global 68ch max-width */
.footer p {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  font-size: 14px;
  margin-bottom: 8px;
}

.footer .meta {
  margin-top: 16px;
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* Desktop */
@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .header {
    padding: 28px 0 16px;
  }

  .header h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 36px;
  }

  h3 {
    font-size: 22px;
  }

  .section {
    padding: 24px;
    margin-bottom: 28px;
  }
}