/* KUAN Mimarlık — ortak stiller. Renk ve boyutlar /api/settings'ten CSS değişkeni olarak gelir. */
:root {
  --bg: #FFFFFF;
  --fg: #111111;
  --accent: #111111;
  --accent-fg: #FFFFFF;
  --logo-h: 96px;
  --logo-h-m: 64px;
  --name-size: 26px;
  --name-weight: 600;
  --hero-overlay: 0.45;
  --muted: #666;
  --line: #e6e6e6;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }

/* ---------- Üst bar ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; }
.brand img { height: var(--logo-h); width: auto; display: block; }
.brand .name { font-size: var(--name-size); font-weight: var(--name-weight); line-height: 1.1; }
.site-header nav a { margin-left: 18px; text-decoration: none; color: var(--muted); font-size: 15px; }
.site-header nav a:hover { color: var(--fg); }

@media (max-width: 640px) {
  .site-header { padding: 10px 14px; }
  .brand img { height: var(--logo-h-m); }
  .brand .name { font-size: calc(var(--name-size) * 0.8); }
  .site-header nav a { margin-left: 12px; font-size: 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: #222 center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--hero-overlay));
}
.hero-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 48px 24px; width: 100%; }
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 52px); font-weight: 600; }
.hero p { margin: 0; font-size: clamp(15px, 2vw, 18px); opacity: 0.9; max-width: 640px; }
.hero.align-center .hero-inner { text-align: center; }
.hero.align-right .hero-inner { text-align: right; }

/* ---------- Bölümler ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.section h2 { font-size: 22px; margin: 0 0 16px; font-weight: 600; }
.about { color: #333; line-height: 1.7; white-space: pre-line; }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.service { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.service h3 { margin: 0 0 8px; font-size: 17px; }
.service p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- Proje kartları ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eee; display: block; }
.card .body { padding: 14px 16px 16px; }
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card .meta { color: var(--muted); font-size: 13px; }
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  margin-bottom: 8px;
}

/* ---------- Proje detay ---------- */
.project-page { max-width: 1000px; margin: 0 auto; padding: 24px; }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; font-size: 14px; }
.project-page h1 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 34px); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 18px 0 24px; }
.fact { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.fact .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fact .v { font-size: 16px; margin-top: 4px; font-weight: 500; }
.project-desc { line-height: 1.75; color: #333; white-space: pre-line; margin-bottom: 24px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; aspect-ratio: 4 / 3; background: #eee; cursor: zoom-in; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); display: none; align-items: center; justify-content: center; z-index: 50; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 90vh; object-fit: contain; }
.lightbox button { position: absolute; top: 16px; right: 16px; background: #fff; border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 15px; }

/* ---------- Form / butonlar ---------- */
.btn {
  background: var(--accent);
  color: var(--accent-fg);
  border: 0;
  padding: 11px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
}
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid #ccc; }
.btn.danger { background: #b3261e; color: #fff; }
.btn:disabled { opacity: 0.5; cursor: default; }

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  font-size: 16px; /* iOS yakınlaştırmayı engeller */
  margin-top: 4px;
  background: #fff;
  color: var(--fg);
}
textarea { min-height: 84px; resize: vertical; }
label { display: block; margin: 12px 0; font-size: 14px; color: #444; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 14px; }
.check input { width: auto; margin: 0; }

.footer { border-top: 1px solid var(--line); padding: 24px; color: var(--muted); font-size: 14px; text-align: center; }

@media (max-width: 640px) {
  .row, .row3 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .section { padding: 24px 16px; }
}
