/* ==========================================================================
   Namaz Hesabım — namazhesabim.com site stilleri
   Renkler docs/DESIGN.md'den (petrol yeşili tema). Sistem yazı tipi, dış
   kaynak yok. Koyu tema prefers-color-scheme ile otomatik.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Marka renkleri (sabit) */
  --primary: #006B5C;        /* dolgulu butonlar, seçili durum */
  --primary-dark: #004D40;   /* basılı durum, gradyan ucu */
  --accent: #4CAF50;         /* "tamamlandı" noktası, ilerleme */
  --warning: #FB8C00;
  --danger: #E53935;

  /* Tema renkleri (açık) */
  --bg: #F5F5F5;
  --surface: #FFFFFF;
  --surface-2: #EDF3F1;
  --accent-light: #E8F5E9;
  --text: #212121;
  --text-2: #616161;         /* DESIGN'daki #757575 gri zeminde AA'yı geçmediği için bir ton koyu */
  --divider: #E0E0E0;
  --brand: #006B5C;          /* metin/bağlantı olarak güvenli marka rengi (6.4:1 beyazda) */
  --accent-text: #2E7D32;    /* yeşil metin (açık zeminde AA) */
  --err-text: #C62828;
  --link: var(--brand);
  --focus: #006B5C;
  --hero-from: #006B5C;
  --hero-to: #004D40;
  --mark-bg: #FFECB3;
  --mark-text: #212121;
  --err-bg: #FDECEA;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 28px -16px rgba(0, 77, 64, .28);
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1E1E1E;
    --surface-2: #26302C;
    --accent-light: #1B3A2F;
    --text: #EDEDED;
    --text-2: #A0A0A0;
    --divider: #333333;
    --brand: #4DB6AC;
    --accent-text: #81C784;
    --err-text: #EF9A9A;
    --focus: #4DB6AC;
    --hero-from: #004D40;
    --hero-to: #00332B;
    --mark-bg: #3E3410;
    --mark-text: #FFE082;
    --err-bg: #3A1F1F;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 28px -16px rgba(0, 0, 0, .7);
  }
}

/* --------------------------------------------------------------------------
   Temel
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }

a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Üst çubuk
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
}
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .site-header {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  min-height: 64px;
  padding-block: .5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 32px; height: 32px; flex: none; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .9rem;
}
.site-nav a {
  display: inline-block;
  padding: .35rem .15rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }
.site-nav a.nav-cta { color: var(--brand); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 3.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  --focus: #fff;
  --link: #fff;
}
.hero .container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 860px) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero .container { grid-template-columns: 1.1fr .9fr; }
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero .tagline {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  font-weight: 500;
  max-width: 34ch;
  opacity: .95;
}
.hero .lead { max-width: 52ch; opacity: .88; }
.hero .lead strong { color: #fff; opacity: 1; }

.hero-pills {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.hero-pills li {
  padding: .3rem .8rem;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.4;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  margin-top: 1.5rem;
}
/* Resmî mağaza rozetleri (Apple/Google kılavuzları: görsel değiştirilmez, en az 40px yükseklik).
   Google'ın PNG'sinde üst/altta saydam boşluk olduğundan (250px'in 192px'i rozet) yüksekliği
   Apple rozetiyle görsel olarak eşitlemek için 250/192 oranında büyütülür. */
.badge {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
  transition: transform .15s, opacity .15s;
}
.badge:hover { transform: translateY(-1px); opacity: .92; }
.badge img { display: block; width: auto; height: 46px; }
.badge--google-play img { height: 60px; margin-block: -7px; }

.hero-art { display: flex; justify-content: center; }
.phone-mock {
  width: min(300px, 78vw);
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .35));
}

/* Telefon çizimi renkleri (SVG sınıfları) */
.phone-mock .m-frame        { fill: #1C1C1E; }
.phone-mock .m-bg           { fill: var(--bg); }
.phone-mock .m-surface      { fill: var(--surface); }
.phone-mock .m-stroke       { stroke: var(--divider); }
.phone-mock .m-today-stroke { stroke: var(--brand); }
.phone-mock .m-text         { fill: var(--text); }
.phone-mock .m-text2        { fill: var(--text-2); }
.phone-mock .m-text2-stroke { stroke: var(--text-2); }
.phone-mock .m-brand        { fill: var(--brand); }
.phone-mock .m-brand-stroke { stroke: var(--brand); }
.phone-mock .m-primary      { fill: var(--primary); }
.phone-mock .m-on-primary   { fill: #fff; }
.phone-mock .m-accent       { fill: var(--accent); }
.phone-mock .m-accent-text  { fill: var(--accent-text); }
.phone-mock .m-accent-light { fill: var(--accent-light); }
.phone-mock .m-divider      { fill: var(--divider); }
.phone-mock text            { font-family: var(--font); }

/* --------------------------------------------------------------------------
   Bölümler
   -------------------------------------------------------------------------- */
.section { padding: 3.5rem 0; scroll-margin-top: 5rem; }
@media (min-width: 860px) { .section { padding: 5rem 0; } }
.section.alt { background: var(--surface); border-block: 1px solid var(--divider); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head p { color: var(--text-2); font-size: 1.0625rem; }
.eyebrow {
  display: inline-block;
  margin-bottom: .5rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}

/* Özellikler */
.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.feature {
  padding: 1.5rem;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.feature .icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--brand);
}
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 { margin-bottom: .35rem; }
.feature p { margin: 0; color: var(--text-2); font-size: .95rem; }

/* Nasıl çalışır */
.steps { display: grid; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  padding: 1.5rem;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--bg);
}
.step .num {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.step p { margin: 0; color: var(--text-2); }

/* SSS */
.faq { display: grid; gap: .75rem; max-width: 820px; }
.faq details {
  padding: 0 1.25rem;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: var(--surface);
}
.faq summary {
  position: relative;
  padding: 1rem 2.5rem 1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: .35rem;
  top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details[open] summary { border-bottom: 1px solid var(--divider); margin-bottom: .75rem; }
.faq details p { margin: 0 0 1rem; color: var(--text-2); }

/* Alt çağrı */
.cta {
  padding: 3.5rem 0;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  --focus: #fff;
  --link: #fff;
}
.cta h2 { color: #fff; }
.cta p { max-width: 50ch; margin-inline: auto; opacity: .9; }
.cta .badges { justify-content: center; }

/* --------------------------------------------------------------------------
   Alt bilgi
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--divider);
  background: var(--surface);
  color: var(--text-2);
  font-size: .9rem;
}
.site-footer .container { display: grid; gap: .75rem; }
.footer-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
}
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--brand); }
.site-footer p { margin: 0; }
.footer-legal { font-size: .78rem; opacity: .75; }

/* --------------------------------------------------------------------------
   İç sayfalar (hukuki metinler, 404)
   -------------------------------------------------------------------------- */
.page { padding: 2.5rem 0 4rem; }

.prose { max-width: 76ch; }
.prose h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.prose h2 { font-size: 1.375rem; margin-top: 2.25rem; scroll-margin-top: 5rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: .35em 0; }
.prose .table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td {
  padding: .55rem .75rem;
  border: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--surface); }

/* Dar ekranda tablo satırları kart olarak alt alta dizilir (data-label ile) */
@media (max-width: 640px) {
  .prose table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose table.stack, .prose table.stack tbody, .prose table.stack tr, .prose table.stack td { display: block; width: 100%; }
  .prose table.stack tr {
    margin-bottom: .75rem;
    border: 1px solid var(--divider);
    border-radius: 10px;
    background: var(--surface);
    overflow: hidden;
  }
  .prose table.stack td { border: 0; border-top: 1px solid var(--divider); padding: .5rem .75rem; }
  .prose table.stack td:first-child { border-top: 0; font-weight: 600; }
  .prose table.stack td::before { content: attr(data-label) ": "; color: var(--text-2); font-weight: 600; }
  .prose table.stack td:first-child::before { content: none; }
}

.meta { color: var(--text-2); font-size: .95rem; }

.toc {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: var(--surface);
}
.toc strong { display: block; margin-bottom: .35rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin: .2em 0; }
@media (min-width: 700px) { .toc ol { columns: 2; column-gap: 2rem; } }

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
}
.callout p:last-child { margin-bottom: 0; }
.callout.summary {
  border-left-color: var(--accent);
  background: var(--accent-light);
  font-size: 1.0625rem;
}

mark.todo {
  padding: 0 .3em;
  border-radius: 4px;
  background: var(--mark-bg);
  color: var(--mark-text);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.center { text-align: center; }
.error-code {
  font-size: clamp(4rem, 15vw, 7rem);
  font-weight: 800;
  line-height: 1;
  color: var(--brand);
  margin: 0 0 .25em;
}
