/* ============================================================
   Layout
   ------------------------------------------------------------
   App kabuğu, üst bar, alt navigasyon, FAB, sayfa kabuğu,
   hero bölümü, bölüm başlıkları ve responsive kırılma noktaları.
   ============================================================ */

/* App kabuğu ------------------------------------------------- */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

.app-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page {
  padding: 18px clamp(16px, 4vw, 32px) 100px;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 24px 0 0;
  line-height: 1.5;
}

/* Üst bar ---------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line);
  padding: 14px clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px;
  flex: 0 0 auto;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  min-width: 0;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.015em;
  font-size: 14px;
  color: var(--ink);
}

.brand-text small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 1px;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: transparent;
  transition: .18s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.icon-btn.primary {
  background: var(--primary);
  color: #fff;
}

.icon-btn.primary:hover {
  background: var(--primary-2);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* Hero / karşılama ------------------------------------------ */
.hero {
  padding: 24px 0 16px;
}

.hero-greeting {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0 0 6px;
}

.hero-title {
  font-size: clamp(28px, 7vw, 52px);
  letter-spacing: -.04em;
  line-height: 1.05;
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--ink);
}

.hero-title em {
  font-style: normal;
  color: var(--primary);
}

.hero-sub {
  color: var(--ink-2);
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.5;
  max-width: 560px;
}

.hero-stats {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hero-stat {
  flex: 1;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.hero-stat strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}

.hero-stat span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* Bölüm başlıkları ------------------------------------------ */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 36px 0 14px;
  gap: 14px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 22px;
  letter-spacing: -.02em;
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-head a {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  min-height: 32px;
}

/* Alt navigasyon -------------------------------------------- */
.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 8px;
  display: none;
  gap: 6px;
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  margin: 0 auto;
}

.bn-item {
  flex: 1;
  padding: 8px 4px;
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  transition: .18s;
  min-height: 56px;
  justify-content: center;
}

.bn-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.bn-item.active {
  background: var(--primary);
  color: #fff;
}

.bn-item:not(.active):hover {
  color: var(--ink);
  background: var(--surface-2);
}

/* PDF indirme düğmesi (FAB) -------------------------------- */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 35;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: .18s;
}

.fab:hover {
  transform: translateY(-2px);
}

.fab:active {
  transform: scale(.96);
}

.fab svg {
  width: 18px;
  height: 18px;
}

@media (min-width: 768px) {
  .fab {
    bottom: 24px;
  }
}

/* Responsive kırılma noktaları ------------------------------ */
@media (max-width: 680px) {
  .page {
    padding-bottom: 120px;
  }

  .fab span {
    display: none;
  }

  .fab {
    padding: 14px;
  }
}

@media print {
  .topbar,
  .bottom-nav,
  .fab {
    display: none !important;
  }
}
