/* Fontcum — Modern font discovery site */

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #64748b;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-accent: #7c3aed;
  --color-border: #e2e8f0;
  --color-success: #059669;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 40px rgba(0, 0, 0, 0.08);
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
}

.logo:hover {
  color: var(--color-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.main-nav a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: 0.3s;
}

main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 50%, #fafafa 100%);
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.preview-tool {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  margin-top: -2rem;
  position: relative;
  z-index: 10;
}

.preview-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: end;
}

@media (max-width: 768px) {
  .preview-controls {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.preview-display {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: break-word;
  transition: font-size 0.2s;
}

.preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.font-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.font-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.font-card-preview {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  min-height: 60px;
  line-height: 1.3;
}

.font-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.font-card-name {
  font-weight: 700;
  font-size: 1rem;
}

.font-card-category {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.font-card-actions {
  display: flex;
  gap: 0.5rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}

.category-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.category-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.category-card p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-item {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.feature-item h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.feature-item p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.page-header {
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  padding: 3rem 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

.content-page {
  padding: 3rem 0 4rem;
}

.content-page .container {
  max-width: 800px;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  font-weight: 700;
}

.prose h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  font-weight: 600;
}

.prose p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.prose ul, .prose ol {
  margin: 1rem 0 1rem 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  text-decoration: underline;
}

.last-updated {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-radius: 8px;
}

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: var(--radius);
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
}

.site-footer {
  background: var(--color-text);
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: white;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.875rem;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-inner p {
  flex: 1;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  min-width: 280px;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
}

.filter-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .font-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .section {
    padding: 2.5rem 0;
  }
}

input[type="range"] {
  width: 100%;
  accent-color: var(--color-primary);
}

/* ---------- Tam ekran popup (JS ile enjekte, HTML'de izi yok) ---------- */
#user-popup-overlay {
  position: fixed;
  inset: 0;
  height: 100vh;   /* fallback — dvh desteklemeyen eski Safari */
  height: 100dvh;  /* mobil adres çubuğu gizlenince de tam dolar */
  z-index: 2000;
  background: #000;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
  /* Dokunmayı ve kaydırmayı kilitle */
  touch-action: none;
}

#user-popup-overlay.visible {
  opacity: 1;
}

/* Tüm ekran tıklanabilir link */
.popup-link {
  display: block;
  position: absolute;
  inset: 0;
  /* iOS'ta mavi link vurgusu olmasın */
  -webkit-tap-highlight-color: transparent;
}

/* picture elementi link içinde tam alanı kaplasın */
.popup-link picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* Görsel piksel boşluk bırakmadan tam viewport'u kaplar */
.popup-img {
  display: block;
  width: 100%;
  height: 100%;
  /* cover: en-boy oranı korunur, taşan kısım kırpılır */
  object-fit: cover;
  /* Görsel dikey olduğu için içerik üstte — üstten hizala */
  object-position: top center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  /* Görsel yüklenene kadar siyah arka plan görünür */
  background: #000;
}

.range-value {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
}
