/*
 * Moon Shine AI, Website İçerik Motoru ortak stil dosyası.
 * Bu dosya index.php'nin <style> bloğundaki token'ları ve temel tasarım
 * dilini birebir aynı değerlerle taşır (docs/website_content_engine_architecture.md §0, §6).
 * index.php DEĞİŞTİRİLMEDİ; bu dosya sadece content.php / templates için üretildi.
 */

:root {
  /* Light theme palette, krem-lavanta (index.php ile birebir aynı) */
  --bg:           #F7F2FB;
  --bg-2:         #EFE7F7;
  --bg-3:         #E6DCF2;
  --surface:      #FFFFFF;
  --surface-soft: rgba(255,255,255,0.65);
  --surface-tint: #F0EAF8;

  /* Ink, derin kozmik mor */
  --ink:          #1F0F4D;
  --ink-2:        #3B1A8A;
  --text:         #2D1B5E;
  --text-muted:   #5A4A78;
  --text-dim:     #8478A2;

  /* Aksanlar */
  --accent:       #7C5CFF;
  --accent-soft:  #B39DFF;
  --gold:         #D49E2E;
  --gold-2:       #B07F1F;
  --gold-soft:    #E8B642;

  /* Çizgiler */
  --border:        rgba(59, 26, 138, 0.10);
  --border-strong: rgba(59, 26, 138, 0.18);

  /* Gölgeler */
  --shadow-sm: 0 2px 8px rgba(59, 26, 138, 0.06);
  --shadow-md: 0 8px 28px rgba(59, 26, 138, 0.10);
  --shadow-lg: 0 24px 60px rgba(59, 26, 138, 0.14);
}

/* ================= Reset / base ================= */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(217, 205, 240, 0.55), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(224, 211, 242, 0.50), transparent 65%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(232, 220, 245, 0.40), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--ink-2); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }

/* Erişilebilirlik: klavye odak halkası, tüm etkileşimli öğelerde */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Decorative sparkle (index.php ile aynı, sayfa-özel süs için) */
.sparkle {
  position: absolute;
  pointer-events: none;
  opacity: .55;
}
.sparkle-1 { top: 80px;  right: 8%;  width: 24px; height: 24px; }
.sparkle-2 { top: 380px; left: 4%;   width: 18px; height: 18px; }
.sparkle-3 { top: 30%;   right: 3%;  width: 16px; height: 16px; }
.sparkle-4 { bottom: 18%; left: 6%;  width: 20px; height: 20px; }

/* ================= Typography (h1-h3, eyebrow) ================= */
h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 64px;
  line-height: 1.05;
  margin: 0 0 24px;
  letter-spacing: -0.5px;
  font-weight: 500;
  color: var(--ink);
}
h1 em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 44px;
  letter-spacing: -0.4px;
  margin: 0 0 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
}
h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-2);
}

h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  margin: 0 0 12px;
  letter-spacing: -0.2px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 11.5px;
  letter-spacing: 3px;
  font-weight: 600;
  margin-bottom: 22px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold-soft);
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #FFFFFF;
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: var(--shadow-sm);
}
.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--ink-2);
  color: #FFFFFF;
}
.store-btn .small {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  display: block;
  line-height: 1.2;
  letter-spacing: 0.5px;
}
.store-btn .big {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.store-btn svg { width: 26px; height: 26px; flex-shrink: 0; }

/* ================= Nav (index.php ile birebir görsel eş) ================= */
nav {
  padding: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(59, 26, 138, 0.20));
}
.brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--ink);
  text-transform: uppercase;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--ink-2); }

/* Lang switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  background: #fff;
  cursor: pointer;
}
.lang-flag svg,
.lang-flag img { width: 100%; height: 100%; display: block; object-fit: cover; }
.lang-flag:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-soft);
}
.lang-flag.is-active {
  border: 2px solid var(--ink-2);
  box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.18);
  transform: scale(1.05);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 15px; letter-spacing: 2px; }
  nav { gap: 6px; }
  .nav-right { gap: 8px; }
  .lang-switch { padding: 2px; gap: 2px; }
  .lang-flag { width: 22px; height: 22px; }
}

/* ================= Footer (index.php ile birebir görsel eş) ================= */
footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 56px;
  color: var(--text-dim);
  font-size: 14px;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a { color: var(--text-muted); }
.foot-links a:hover { color: var(--ink-2); }

/* =========================================================================
 * İçerik motoru ortak bileşenleri (mimari §6, glossary/academy şablonları)
 * ========================================================================= */

/* ---- .ms-breadcrumb: sayfa üstü konum yolu ---- */
.ms-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 0 0 28px;
}
.ms-breadcrumb a { color: var(--text-muted); }
.ms-breadcrumb a:hover { color: var(--ink-2); }
.ms-breadcrumb .sep {
  color: var(--text-dim);
  opacity: .6;
}
.ms-breadcrumb .current {
  color: var(--ink);
  font-weight: 500;
}

/* ---- .ms-prose: okuma akışlı gövde metni (65-75ch) ---- */
.ms-prose {
  max-width: 72ch;
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}
.ms-prose p { margin: 0 0 20px; }
.ms-prose p:last-child { margin-bottom: 0; }
.ms-prose h2 {
  font-size: 30px;
  margin: 48px 0 18px;
}
.ms-prose h2:first-child { margin-top: 0; }
.ms-prose h3 {
  font-size: 21px;
  margin: 34px 0 14px;
}
.ms-prose ul,
.ms-prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--text);
}
.ms-prose li { margin-bottom: 8px; }
.ms-prose li:last-child { margin-bottom: 0; }
.ms-prose strong { color: var(--ink); font-weight: 600; }
.ms-prose a { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.ms-prose a:hover { text-decoration-color: var(--accent); }
.ms-prose blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--gold-soft);
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 720px) {
  .ms-prose { font-size: 16px; line-height: 1.7; }
  .ms-prose h2 { font-size: 25px; margin: 38px 0 14px; }
  .ms-prose h3 { font-size: 19px; }
}

/* ---- .ms-trybox: persona CTA kutusu, gold vurgulu ---- */
.ms-trybox {
  background:
    radial-gradient(ellipse 70% 100% at 0% 0%, rgba(212, 158, 46, 0.08), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 32px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.ms-trybox-body { flex: 1 1 320px; min-width: 0; }
.ms-trybox-persona {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 10px;
}
.ms-trybox-persona::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-soft);
}
.ms-trybox-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
}
.ms-trybox-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #FFFFFF;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: var(--shadow-sm);
}
.ms-trybox-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--ink-2);
  color: #FFFFFF;
}

@media (max-width: 480px) {
  .ms-trybox { padding: 24px; gap: 18px; }
  .ms-trybox-text { font-size: 18px; }
  .ms-trybox-cta { width: 100%; justify-content: center; }
}

/* ---- .ms-faq: details/summary, index.php .faq-item ile uyumlu ---- */
.ms-faq {
  max-width: 820px;
  margin: 40px 0;
  display: grid;
  gap: 14px;
}
.ms-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ms-faq-item[open] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.ms-faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.ms-faq-item summary::-webkit-details-marker { display: none; }
.ms-faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--gold-2);
  flex-shrink: 0;
  transition: transform .2s ease;
}
.ms-faq-item[open] summary::after { transform: rotate(45deg); }
.ms-faq-item p {
  margin: 0;
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.65;
}
@media (max-width: 720px) {
  .ms-faq-item summary { font-size: 16px; padding: 16px 18px; }
  .ms-faq-item p { padding: 0 18px 16px; }
}

/* ---- .ms-related: ilgili terim çip/link ızgarası ---- */
.ms-related {
  margin: 40px 0;
}
.ms-related-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 14px;
}
.ms-related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ms-related-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 92, 255, 0.08);
  color: var(--ink-2);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(124, 92, 255, 0.16);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.ms-related-chip:hover {
  background: rgba(124, 92, 255, 0.14);
  border-color: var(--accent-soft);
  color: var(--ink-2);
  transform: translateY(-1px);
}

/* ---- .ms-lesson-nav: önceki/sonraki ders ---- */
.ms-lesson-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 48px 0;
}
.ms-lesson-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  min-width: 0;
}
.ms-lesson-nav-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.ms-lesson-nav-item.next { text-align: right; align-items: flex-end; }
.ms-lesson-nav-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold-2);
}
.ms-lesson-nav-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.ms-lesson-nav-placeholder {
  padding: 22px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 14px;
}

@media (max-width: 720px) {
  .ms-lesson-nav { grid-template-columns: 1fr; }
  .ms-lesson-nav-item.next { text-align: left; align-items: flex-start; }
}

/* ---- .ms-card + .ms-hub-grid: hub kart ızgarası ---- */
.ms-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.ms-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-tint) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.ms-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.ms-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.ms-card-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold-2);
}
.ms-card h3 { margin: 0; }
.ms-card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}
.ms-card-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.ms-card:hover .ms-card-link { color: var(--accent); }

@media (max-width: 880px) {
  .ms-hub-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 480px) {
  .ms-hub-grid { grid-template-columns: 1fr; }
  .ms-card { padding: 22px; }
}

/* ---- .ms-disclaimer: küçük gri sorumluluk notu ---- */
.ms-disclaimer {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
  max-width: 72ch;
}

/* ---- .ms-diagram: SVG diyagram sarmalayıcı ---- */
.ms-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 40px 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}
.ms-diagram svg {
  width: 100%;
  max-width: 360px;
  height: auto;
}
.ms-diagram-caption {
  color: var(--text-dim);
  font-size: 13.5px;
  text-align: center;
  max-width: 46ch;
  margin: 0;
}

@media (max-width: 480px) {
  .ms-diagram { padding: 22px; }
  .ms-diagram svg { max-width: 280px; }
}

/* ---- Sayfa gövde section aralığı (content sayfaları için) ---- */
.ms-section {
  padding: 60px 0;
}
.ms-page-head {
  max-width: 760px;
  margin: 0 0 40px;
}
.ms-page-head .eyebrow { margin-bottom: 18px; }
.ms-page-head p {
  color: var(--text-muted);
  font-size: 18px;
  margin: 0;
}
.ms-lesson-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 92, 255, 0.10);
  color: var(--ink-2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 14px;
  border: 1px solid rgba(124, 92, 255, 0.18);
}

@media (max-width: 720px) {
  .ms-section { padding: 40px 0; }
}
