/* =========================================================
   Artaş Elektrik — Dijital Katalog (katalog.css)
   Dergi/broşür konsepti: her .sheet bir A4 sayfadır.
   Ekranda görülen sayfa = baskıdaki sayfa (PDF birebir).
   app.css token'larını kullanır.
   ========================================================= */

/* Sayfa düzeni: koyu masa üstünde A4 yapraklar */
body.cat {
  background: var(--ink-900);
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-800);
}
.mono { font-family: var(--font-mono); }

.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 72px 16px 96px;
}
#projectPages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  align-self: stretch;
}

/* ---------- A4 yaprak ---------- */
.sheet {
  position: relative;
  width: min(100%, 800px);
  aspect-ratio: 210 / 297;
  background: #fff;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.55), 0 4px 16px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  container-type: inline-size;
}

/* Sayfa içi tipografi sayfa genişliğiyle ölçeklenir (PDF hissi).
   DİKKAT: cqw, container'ın KENDİSİNDE viewport'a düşer — yalnız iç öğelerde kullan. */
.sheet { line-height: 1.55; }
.sheet__body { font-size: 2cqw; }

.sheet__head, .sheet__foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2em;
  font-size: 1.25cqw;
  letter-spacing: .14em;
  color: var(--ink-400);
  padding: 3.2cqw 6cqw 0;
}
.sheet__foot { padding: 0 6cqw 3.2cqw; align-items: flex-end; }
.sheet__head { border-bottom: none; }
.sheet__head span:first-child { color: var(--brand-copper-strong); }
.sheet__num { font-size: 1.7cqw; color: var(--ink-900); font-weight: 700; }

.sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 2.6cqw 6cqw;
}

/* ---------- Ortak sayfa öğeleri ---------- */
.sec-no {
  font-size: 7cqw;
  font-weight: 700;
  color: var(--brand-copper-soft);
  -webkit-text-stroke: 1px var(--brand-copper);
  color: transparent;
  line-height: 1;
  margin-bottom: .4cqw;
}
.sheet-title {
  font-family: var(--font-display);
  font-size: 4.6cqw;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  margin: 0 0 2.4cqw;
  text-wrap: balance;
}
.sheet-lead { color: var(--ink-500); max-width: 60ch; margin: 0 0 3cqw; }

/* ---------- Kapak ---------- */
.sheet--cover {
  background: var(--ink-900);
  color: var(--ink-100);
}
.cover__top { padding: 6cqw 6cqw 0; }
.cover__mid { padding: 0 6cqw; }
.cover__bot { padding: 0 6cqw 6cqw; }
.back__mid { padding: 0 6cqw; }
.cover__grid {
  position: absolute; inset: 0;
  background:
    radial-gradient(90cqw 60cqw at 110% -20%, rgba(217,114,53,.22), transparent 65%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 12.5cqw),
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 12.5cqw);
  pointer-events: none;
}
.cover__top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.cover__logo { width: 24cqw; height: auto; }
.cover__edition {
  font-size: 1.4cqw; letter-spacing: .3em; color: var(--brand-copper);
  border: 1px solid var(--ink-600); padding: 1cqw 1.6cqw;
}
.cover__mid { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cover__rule { display: block; width: 12cqw; height: .55cqw; background: var(--brand-copper); margin-bottom: 3cqw; }
.sheet--cover h1 {
  font-family: var(--font-display);
  font-size: 11cqw;
  line-height: .98;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 2.6cqw;
}
.cover__tag { color: var(--ink-300); font-size: 2cqw; margin: 0; }
.cover__bot {
  position: relative;
  display: flex; justify-content: space-between;
  font-size: 1.4cqw; letter-spacing: .18em; color: var(--ink-400);
  border-top: 1px solid var(--ink-700); padding-top: 2.4cqw;
}

/* ---------- İçindekiler ---------- */
.toc { list-style: none; margin: 1cqw 0 0; padding: 0; flex: 1; }
.toc li { display: flex; align-items: baseline; gap: 1.6cqw; padding: 2cqw 0; border-bottom: 1px solid var(--ink-100); }
.toc .toc__no { font-family: var(--font-mono); color: var(--brand-copper-strong); font-size: 1.6cqw; width: 3.4cqw; }
.toc a { color: var(--ink-900); font-family: var(--font-display); font-weight: 600; font-size: 2.6cqw; text-decoration: none; }
.toc a:hover { color: var(--brand-copper); }
.toc .toc__dots { flex: 1; border-bottom: 2px dotted var(--ink-200); transform: translateY(-.5cqw); }
.toc .toc__page { font-family: var(--font-mono); font-size: 2cqw; color: var(--ink-900); font-weight: 700; }
.toc__note { font-size: 1.3cqw; color: var(--ink-400); letter-spacing: .06em; line-height: 1.7; }

/* ---------- Hakkımızda ---------- */
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3.4cqw; color: var(--ink-600); }
.about-cols p { margin: 0 0 1.8cqw; font-size: 1.9cqw; }
.fig-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqw;
  margin: auto 0 0; padding-top: 3cqw; border-top: 2px solid var(--ink-900);
}
.fig dt {
  font-family: var(--font-display); font-size: 6cqw; font-weight: 700; line-height: 1;
  color: var(--brand-copper-strong); font-variant-numeric: tabular-nums;
}
.fig dt small { font-size: .4em; color: var(--ink-400); margin-left: .3cqw; }
.fig dd { margin: .8cqw 0 0; font-size: 1.5cqw; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }

/* ---------- Hizmetler ---------- */
.svc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6cqw 4cqw; flex: 1; align-content: start; }
.svc h3 {
  font-family: var(--font-display); font-size: 2.3cqw; font-weight: 600; color: var(--ink-900);
  margin: 0 0 1.2cqw; display: flex; align-items: center; gap: 1.2cqw;
}
.svc h3 .mono {
  flex: 0 0 auto; width: 3.4cqw; height: 3.4cqw; display: grid; place-items: center;
  background: var(--ink-900); color: var(--brand-copper); font-size: 1.7cqw; font-weight: 700;
}
.svc ul { list-style: none; margin: 0; padding: 0; }
.svc li {
  font-size: 1.7cqw; color: var(--ink-500); padding: .55cqw 0 .55cqw 2.2cqw; position: relative;
  border-bottom: 1px solid var(--ink-50);
}
.svc li::before {
  content: ""; position: absolute; left: .4cqw; top: 1.5cqw;
  width: .9cqw; height: .9cqw; background: var(--brand-copper);
}

/* ---------- Logo duvarı ---------- */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.6cqw;
  flex: 1;
  align-content: start;
  margin-top: 1cqw;
}
.logo-cell {
  margin: 0;
  border: 1px solid var(--ink-100);
  background: #fff;
  display: grid;
  place-items: center;
  height: 10.5cqw;
  padding: 1.4cqw;
}
.logo-cell img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* ---------- Bölüm kapağı (Projeler) ---------- */
.sheet--divider { background: var(--ink-900); color: var(--ink-100); }
.divider__inner { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 6cqw 8cqw; position: relative; }
.divider__no {
  font-size: 16cqw; font-weight: 700; line-height: 1;
  -webkit-text-stroke: 1px var(--ink-500); color: transparent;
}
.sheet--divider h2 {
  font-family: var(--font-display); font-size: 8.6cqw; line-height: .98; letter-spacing: -0.02em;
  color: #fff; margin: 1.6cqw 0 3cqw;
}
.divider__sum { font-size: 1.8cqw; letter-spacing: .14em; color: var(--brand-copper); margin: 0 0 2cqw; }
.divider__hint { color: var(--ink-400); font-size: 1.9cqw; max-width: 46ch; margin: 0; }

/* ---------- Proje sayfaları ---------- */
.proj-year {
  font-family: var(--font-display); font-size: 3.2cqw; font-weight: 700; color: var(--ink-900);
  display: flex; align-items: center; gap: 1.6cqw; margin: 0 0 1.8cqw;
}
.proj-year::after { content: ""; flex: 1; height: 2px; background: var(--ink-900); }
.proj-year small { font-family: var(--font-mono); font-size: 1.4cqw; color: var(--ink-400); letter-spacing: .12em; }

.proj-list { flex: 1; display: flex; flex-direction: column; gap: 2.6cqw; min-height: 0; }

.cat-proj {
  /* tek projeli sayfada tüm sayfayı kaplamasın: taban %50, gerekirse küçül */
  flex: 0 1 calc(50% - 1.3cqw); min-height: 0;
  display: grid; grid-template-columns: 44% 1fr; gap: 3cqw;
  cursor: pointer; outline: none;
}
.cat-proj:focus-visible .cat-proj__body h4, .cat-proj:hover .cat-proj__body h4 { color: var(--brand-copper-strong); }
.cat-proj__media { position: relative; min-height: 0; background: var(--ink-100); overflow: hidden; }
.cat-proj__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-proj__media .noimg {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-300);
}
.cat-proj__media .noimg svg { width: 18%; height: auto; }
.cat-proj__badge {
  position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 1.2cqw; letter-spacing: .14em;
  background: var(--ink-900); color: #fff; padding: .7cqw 1.3cqw;
}
.cat-proj--ongoing .cat-proj__badge { background: var(--brand-copper-strong); }
.cat-proj__body { min-width: 0; display: flex; flex-direction: column; }
.cat-proj__meta {
  display: flex; gap: 1.6cqw; font-family: var(--font-mono); font-size: 1.3cqw;
  letter-spacing: .12em; color: var(--ink-400); margin-bottom: 1cqw;
}
.cat-proj__meta b { color: var(--brand-copper-strong); font-weight: 700; }
.cat-proj__body h4 {
  font-family: var(--font-display); font-size: 2.6cqw; font-weight: 600; line-height: 1.15;
  color: var(--ink-900); margin: 0 0 1.2cqw; transition: color var(--d-fast) var(--ease);
}
.cat-proj__desc {
  font-size: 1.75cqw; color: var(--ink-500); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-proj__specs {
  margin-top: auto; padding-top: 1.4cqw; border-top: 1px solid var(--ink-100);
  font-size: 1.3cqw; letter-spacing: .1em; color: var(--ink-400);
  display: flex; gap: 2.4cqw; flex-wrap: wrap;
}

/* ---------- Sosyal sorumluluk ---------- */
.social-photo { margin: 0 0 2.6cqw; }
.social-photo img { width: 100%; display: block; }
.social-photo figcaption { font-size: 1.3cqw; letter-spacing: .14em; color: var(--ink-400); margin-top: 1cqw; }

/* ---------- Arka kapak ---------- */
.sheet--back { justify-content: space-between; }
.back__mid { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.sheet--back h2 {
  font-family: var(--font-display); font-size: 7cqw; line-height: 1.02; color: #fff;
  letter-spacing: -0.02em; margin: 0 0 2cqw;
}
.sheet--back .back__mid > p { color: var(--ink-300); font-size: 2cqw; margin: 0 0 4cqw; max-width: 50ch; }
.back__contact { display: grid; gap: 1.8cqw; margin: 0; }
.back__contact div { display: grid; grid-template-columns: 14cqw 1fr; gap: 2cqw; align-items: baseline; }
.back__contact dt { font-size: 1.3cqw; letter-spacing: .2em; color: var(--brand-copper); }
.back__contact dd { margin: 0; font-size: 1.8cqw; color: var(--ink-100); }
.back__contact a { color: var(--ink-100); text-decoration: none; }
.back__contact a:hover { color: var(--brand-copper); }

/* ---------- Ekran araç çubuğu ---------- */
.cat-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(16px, env(safe-area-inset-left, 0px)) 10px max(16px, env(safe-area-inset-right, 0px));
  background: rgba(11,13,16,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-700);
}
.cat-bar__home {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-200); font-size: var(--fs-sm); font-weight: 500; text-decoration: none;
}
.cat-bar__home:hover { color: var(--brand-copper); }
.cat-bar__page { color: var(--ink-400); font-size: var(--fs-xs); letter-spacing: .14em; }
.cat-bar__print {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-copper); color: #fff; font-weight: 600; font-size: var(--fs-sm);
  border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer;
}
.cat-bar__print:hover { background: var(--brand-copper-strong); }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .book { padding: 64px 8px 72px; gap: 16px; }
  .sheet__body { font-size: 2.2cqw; }
  .cat-bar__page { display: none; }
}

/* ---------- BASKI: her yaprak birebir A4 ---------- */
@page { size: A4; margin: 0; }
@media print {
  body.cat { background: #fff; }
  .cat-bar { display: none !important; }
  .book, #projectPages { display: block; padding: 0; }
  .sheet {
    width: 210mm; height: 297mm; aspect-ratio: auto;
    margin: 0; box-shadow: none;
    break-after: page; page-break-after: always;
  }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
  .sheet, .sheet--cover, .sheet--divider, .sheet--back {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .cat-proj { cursor: default; }
}
