/* ===== 57-PAREN SITE — dhikr.ai/57 ===== */
/* Smooth dhikr.ai stijl — diep donker, subtiele gloed, zachte lijnen */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cabin:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg: #07070d;
  --bg-card: #0e0e16;
  --bg-card-hover: #13131e;
  --gold: #d4a853;
  --gold-dim: #b8923a;
  --gold-glow: rgba(212, 168, 83, 0.08);
  --gold-border: rgba(212, 168, 83, 0.12);
  --text: #e8e0d0;
  --text-dim: #8a8478;
  --text-muted: #5c574e;
  --border: #181824;
  --border-subtle: rgba(255, 255, 255, 0.04);
  --accent-blue: #4a7db5;
  --accent-red: #c0392b;
  --accent-green: #27ae60;
  --amiri: 'Amiri', 'Traditional Arabic', serif;
  --cabin: 'Cabin', 'Segoe UI', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--cabin);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--amiri);
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); color: var(--gold); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); color: var(--gold); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--gold-dim); }
h4 { font-size: clamp(0.95rem, 1.8vw, 1.15rem); color: var(--gold-dim); }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition), text-shadow var(--transition);
}

a:hover {
  color: #e8c86a;
  text-shadow: 0 0 16px var(--gold-glow);
}

.gold-text { color: var(--gold); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }

/* ---- Container ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header / Nav ---- */
.site-header {
  background: linear-gradient(180deg, rgba(12, 12, 22, 0.95) 0%, rgba(7, 7, 13, 0.98) 100%);
  border-bottom: 1px solid var(--gold-border);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.header-inner .logo {
  font-family: var(--amiri);
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo small { font-size: 0.85rem; color: var(--text-dim); font-family: var(--cabin); font-weight: 400; }

.header-nav {
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.header-nav a {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: all var(--transition);
  border: 1px solid transparent;
  position: relative;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--gold);
  background: var(--gold-glow);
  border-color: var(--gold-border);
}

/* ---- Language Toggle ---- */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 0.15rem;
  flex-shrink: 0;
}

.lang-btn {
  font-family: var(--cabin);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.55rem;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  line-height: 1;
}

.lang-btn.active {
  background: var(--gold);
  color: #07070d;
  box-shadow: 0 0 12px rgba(212, 168, 83, 0.25);
}

.lang-btn:not(.active):hover {
  color: var(--gold);
}

/* ---- Ring Hero ---- */
.ring-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.ring-hero .ring-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 20px rgba(212, 168, 83, 0.1));
}

.ring-hero h1 { margin-bottom: 0.3rem; }

.ring-hero .ring-subtitle {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: var(--text-dim);
  max-width: 650px;
  margin: 0 auto;
}

.ring-hero .ring-desc {
  margin-top: 0.6rem;
  font-size: clamp(0.82rem, 1.4vw, 0.9rem);
  color: var(--text-muted);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ---- Pair Grid ---- */
.pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  padding: 1rem 0 2rem;
}

.pair-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pair-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.pair-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-border);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(212, 168, 83, 0.04), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pair-card:hover::before {
  opacity: 1;
}

.pair-card .pair-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.pair-card .pair-nums {
  font-family: var(--amiri);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
}

.pair-card .pair-nums .arrow { color: var(--text-muted); font-family: var(--cabin); font-size: 0.9rem; }

.pair-card .pair-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--gold-glow);
  color: var(--gold-dim);
  border: 1px solid var(--gold-border);
}

.pair-card .pair-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.pair-card .pair-study {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.pair-card:hover .pair-study { color: var(--gold); }

.pair-card .pair-meaning { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.4rem; line-height: 1.5; }
.pair-card .pair-keys { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.pair-card .pair-keys strong { color: var(--gold-dim); }
.pair-card .pair-links { margin-top: 0.5rem; font-size: 0.78rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.pair-card .pair-links a { color: var(--text-muted); transition: color var(--transition); }
.pair-card .pair-links a:hover { color: var(--gold); }
.pair-card .pair-toggle { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; font-style: italic; }
.pair-card .pair-arabic { font-family: var(--amiri); font-size: 1.1rem; color: var(--gold); }
.pair-card .pair-keyverses { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ---- Quran Modal (inline expand) ---- */
.quran-content {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.quran-content.open { display: block; }

.quran-content .translation {
  margin-bottom: 1rem;
}

.quran-content .trans-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.quran-content .trans-label .lang { color: var(--gold); }

.quran-content .trans-text {
  font-family: var(--amiri);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.8;
  color: var(--text);
  padding: 0.06rem 0;
}

.quran-content .verse-numbers {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.quran-loading {
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

.quran-error {
  color: var(--accent-red);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.site-footer .footer-links a {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.site-footer .footer-links a:hover { color: var(--gold); }

.site-footer .footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- Index page specific ---- */
.rings-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  padding: 2rem 0;
}

.ring-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.ring-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.ring-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(212, 168, 83, 0.05), 0 6px 30px rgba(0, 0, 0, 0.3);
}

.ring-card:hover::before {
  opacity: 1;
}

.ring-card .ring-icon-big { font-size: 2.5rem; margin-bottom: 0.5rem; filter: drop-shadow(0 0 16px rgba(212, 168, 83, 0.08)); }
.ring-card h3 { margin-bottom: 0.3rem; }
.ring-card p { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 0.8rem; }
.ring-card .ring-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.ring-card .ring-vis { display: inline-block; margin-top: 0.5rem; font-size: 0.82rem; }

/* ---- 3D Viz placeholder ---- */
.viz-placeholder {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  text-align: center;
  padding: 3rem 1.5rem;
  margin: 2rem 0;
  transition: all var(--transition);
}

.viz-placeholder:hover {
  box-shadow: 0 0 40px rgba(212, 168, 83, 0.04);
}

.viz-placeholder .viz-icon { font-size: 3rem; margin-bottom: 0.5rem; filter: drop-shadow(0 0 20px rgba(212, 168, 83, 0.08)); }
.viz-placeholder p { color: var(--text-dim); max-width: 500px; margin: 0 auto; }

/* ---- Kern page specific ---- */
.kern-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.kern-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.kern-stat-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--gold-border), transparent 40%, transparent 60%, var(--gold-border));
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 0;
  pointer-events: none;
}

.kern-stat-card:hover::after {
  opacity: 1;
}

.kern-stat-card .stat-value {
  font-family: var(--amiri);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--gold);
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.kern-stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
  position: relative;
  z-index: 1;
}

/* ---- Kern page sections ---- */
.kern-section { max-width: 800px; margin: 0 auto; padding: 0 1.5rem 2rem; }
.kern-section h2 { margin-top: 1.5rem; }
.kern-section p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 0.8rem; line-height: 1.8; }
.kern-quote {
  font-family: var(--amiri);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--gold);
  font-style: italic;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  margin: 1.2rem 0;
  line-height: 1.8;
  transition: all var(--transition);
}
.kern-quote .ref { display: block; font-family: var(--cabin); font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; font-style: normal; }
.kern-highlight {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  margin: 1.2rem 0;
  transition: all var(--transition);
}
.kern-highlight:hover {
  border-color: var(--gold-border);
  box-shadow: 0 0 24px rgba(212, 168, 83, 0.04);
}
.kern-highlight h4 { color: var(--gold); margin-bottom: 0.4rem; }
.kern-highlight p { font-size: 0.88rem; margin-bottom: 0; }
.kern-table-wrap { overflow-x: auto; margin: 1rem 0; }
.kern-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.kern-table th { background: var(--bg-card); color: var(--gold); text-align: left; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--border); font-weight: 600; letter-spacing: 0.02em; }
.kern-table td { padding: 0.4rem 0.8rem; border-bottom: 1px solid var(--border-subtle); color: var(--text-dim); }
.kern-table tr:last-child td { border-bottom: none; }
.kern-table tr:hover td { background: rgba(212, 168, 83, 0.02); }
.kern-table .val { color: var(--text); font-family: var(--amiri); font-weight: 700; }
.kern-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.kern-links { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; }
.kern-links a {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  transition: all var(--transition);
}
.kern-links a:hover {
  border-color: var(--gold-border);
  color: var(--gold);
  box-shadow: 0 0 16px rgba(212, 168, 83, 0.04);
}
.kern-diagram {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 1.2rem 0;
  font-family: var(--cabin);
}
.kern-diagram .layer { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.3rem 0; }
.kern-diagram .layer-label { color: var(--text-muted); font-size: 0.8rem; min-width: 120px; text-align: right; }
.kern-diagram .bar { height: 1.2rem; border-radius: 4px; }
.kern-diagram .bar-core { background: #d4a853; width: 60px; }
.kern-diagram .bar-outer { background: #3884cc; width: 180px; }
.kern-diagram .bar-mantle { background: #8a8478; width: 240px; }
.kern-diagram .bar-crust { background: #5c574e; width: 20px; }
.kern-diagram .depth { color: var(--text-dim); font-size: 0.75rem; min-width: 80px; text-align: left; }
.kern-note {
  background: var(--bg-card);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.2rem;
  margin: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: all var(--transition);
}
.kern-note:hover {
  border-left-color: #e8c86a;
}

/* ---- Ring note (reserve page) ---- */
.ring-note {
  max-width: 800px; margin: 0 auto 2rem; padding: 1.2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 0.9rem; color: var(--text-dim); line-height: 1.6;
  transition: all var(--transition);
}
.ring-note:hover {
  border-color: var(--gold-border);
  box-shadow: 0 0 24px rgba(212, 168, 83, 0.03);
}
.ring-note strong { color: var(--gold); }
.ring-note .alm-key {
  font-family: var(--amiri); font-size: 1.5rem; color: var(--gold);
  display: inline-block; background: var(--gold-glow); padding: 0.2rem 0.8rem;
  border-radius: var(--radius-sm); border: 1px solid var(--gold-border); margin: 0.3rem 0;
}

/* ---- Groei page ---- */
.ring-overview-section { max-width: 800px; margin: 0 auto 2rem; padding: 0 1.5rem; }
.ring-overview-section h2 { text-align: center; }
.ring-overview-section p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 0.6rem; }
.ring-overview-section .highlight-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.2rem 1.5rem; margin: 1rem 0;
  transition: all var(--transition);
}
.ring-overview-section .highlight-box:hover {
  border-color: var(--gold-border);
  box-shadow: 0 0 24px rgba(212, 168, 83, 0.03);
}
.ring-overview-section .highlight-box h4 { color: var(--gold); margin-bottom: 0.3rem; }
.ring-overview-section .highlight-box p { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0; }
.ring-overview-section .one-third-note {
  background: var(--bg-card); border-left: 3px solid var(--accent-red);
  border-radius: var(--radius-sm); padding: 0.8rem 1.2rem; margin: 1rem 0;
  font-size: 0.85rem; color: var(--text-dim);
  transition: all var(--transition);
}
.ring-overview-section .one-third-note:hover {
  border-left-color: #e74c3c;
}

/* ---- Section subhead ---- */
.section-subhead { color: var(--gold); font-family: var(--cabin); font-size: 0.9rem; letter-spacing: 2px; text-transform: uppercase; margin-top: 2rem; text-align: center; opacity: 0.7; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
  h2 { font-size: clamp(1.2rem, 4vw, 1.6rem); }
  .header-inner { flex-direction: column; gap: 0.5rem; }
  .pair-grid { grid-template-columns: 1fr; }
  .rings-overview { grid-template-columns: 1fr; }
  .kern-stats { grid-template-columns: 1fr 1fr; }
  .ring-hero { padding: 2rem 1rem 1.5rem; }
  .kern-diagram .layer { flex-wrap: wrap; }
  .kern-diagram .layer-label { min-width: auto; text-align: center; }
}

@media (max-width: 480px) {
  .kern-stats { grid-template-columns: 1fr; }
  .lang-toggle { margin-top: 0.3rem; }
}
