:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --muted: #f1f0ee;
  --fg: #111110;
  --fg-2: #56554f;
  --fg-3: #8d8c85;
  --line: #e7e5e1;
  --accent: #6f207e;
  --shadow: 0 1px 2px rgb(17 17 16 / 0.04), 0 8px 24px -12px rgb(17 17 16 / 0.12);
  --shadow-hover: 0 2px 4px rgb(17 17 16 / 0.05), 0 18px 40px -16px rgb(17 17 16 / 0.22);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --surface: #171716;
    --muted: #1e1e1c;
    --fg: #f2f1ee;
    --fg-2: #b4b3ad;
    --fg-3: #7d7c76;
    --line: #2a2a27;
    --accent: #c98bd6;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.5);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 40px -16px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.55 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Üst bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { display: block; width: auto; height: 20px; }
.brand-label {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  color: var(--fg-3);
}
.topbar-meta { margin: 0; font-size: 13px; color: var(--fg-3); font-variant-numeric: tabular-nums; }

/* ---------- Sayfa ---------- */
.page { max-width: 1480px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 64px; }

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); max-width: 720px; }
.hero h1 {
  margin: 0 0 12px;
  font: 800 clamp(34px, 5.2vw, 60px)/1.02 Manrope, sans-serif;
  letter-spacing: -0.035em;
}
.hero p { margin: 0; font-size: clamp(15px, 1.4vw, 17px); color: var(--fg-2); max-width: 56ch; }

/* ---------- Filtreler ---------- */
.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 28px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.chip:hover { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 22%, var(--line)); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip-count { font-size: 12px; opacity: 0.6; font-variant-numeric: tabular-nums; }

/* ---------- Çerçeveli bölüm (ör. Envanter pilotları) ---------- */
.group {
  margin: 0 0 48px;
  padding: clamp(18px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: color-mix(in srgb, var(--surface) 70%, var(--bg));
}
.group-head { margin: 0 0 24px; max-width: 72ch; }
.group-head h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px;
  font: 700 clamp(20px, 2.2vw, 26px)/1.15 Manrope, sans-serif;
  letter-spacing: -0.02em;
}
.group-head p { margin: 0; font-size: 14px; color: var(--fg-2); }
.group-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.group-link:hover { text-decoration: underline; }

/* ---------- Tasarım kartları ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 40px 28px;
}
.card { min-width: 0; }
.card-frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--muted);
  box-shadow: var(--shadow);
  transition: box-shadow 300ms var(--ease), transform 300ms var(--ease);
}
.card-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
  pointer-events: none;
}
.card-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  transition: transform 500ms var(--ease), opacity 400ms var(--ease);
}
.card-frame img.loaded { opacity: 1; }
.card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}
.card-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: flex-end;
  padding: 56px 14px 14px;
  background: linear-gradient(to top, rgb(10 10 10 / 0.5), rgb(10 10 10 / 0));
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  background: rgb(255 255 255 / 0.95);
  color: #111;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  pointer-events: auto;
  transition: transform 160ms var(--ease);
}
.card-cta:active { transform: scale(0.96); }
.card-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.card-cta svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  .card-frame:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
  .card-frame:hover img { transform: scale(1.015); }
  .card-frame:hover .card-overlay { opacity: 1; transform: none; }
}
.card-frame:focus-within .card-overlay { opacity: 1; transform: none; }
@media (hover: none) {
  .card-overlay { opacity: 1; transform: none; background: none; }
}

.card-body { display: flex; align-items: center; gap: 10px; padding: 14px 2px 0; min-width: 0; cursor: pointer; }
.project-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #fff;
  font: 800 12px/1 Manrope, sans-serif;
  box-shadow: inset 0 -6px 12px rgb(0 0 0 / 0.14), inset 0 1px 0 rgb(255 255 255 / 0.22);
}
.card-text { min-width: 0; }
.card-text h2 {
  margin: 0;
  font: 700 15px/1.3 Manrope, sans-serif;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-text p { margin: 1px 0 0; font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-text b { font-weight: 500; color: var(--fg-2); }

/* ---------- Ortak ---------- */
html.locked { overflow: hidden; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--fg) 86%, var(--bg)); }
.btn svg { width: 14px; height: 14px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease);
}
.icon-btn:hover { border-color: color-mix(in srgb, var(--fg) 25%, var(--line)); }
.icon-btn:active { transform: scale(0.94); }
.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--muted);
  font-size: 12px;
  color: var(--fg-2);
}
.beta {
  flex: none;
  height: 18px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* ---------- Drawer (alttan açılan detay) ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer[hidden] { display: none; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(10 10 10 / 0.55);
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.drawer-sheet {
  position: absolute;
  inset: auto 0 0 0;
  height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -20px 60px -20px rgb(0 0 0 / 0.35);
  transform: translateY(100%);
  transition: transform 360ms cubic-bezier(0.32, 0.72, 0, 1);
  outline: none;
}
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer.is-open .drawer-sheet { transform: none; }

.drawer-grip {
  width: 40px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: var(--line);
}
.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.drawer-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.drawer-id .project-avatar { width: 40px; height: 40px; border-radius: 11px; font-size: 14px; }
.drawer-id h2 { font-size: 18px; }
.drawer-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.drawer-body { max-width: 1200px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 64px; }
.drawer-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 48px;
  align-items: start;
  padding: 8px 0 28px;
}
.drawer-desc { grid-column: 1; margin: 0; max-width: 68ch; font-size: 16px; color: var(--fg-2); }
.drawer-facts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 28px; margin: 0; }
.drawer-facts dt { font-size: 12px; color: var(--fg-3); }
.drawer-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; white-space: nowrap; }
.drawer-tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px; }

.drawer-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.drawer-shot { margin: 0; min-width: 0; }
.drawer-shot.is-hero { grid-column: 1 / -1; }
.drawer-shot-img {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--muted);
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.drawer-shot-img::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
  pointer-events: none;
}
.drawer-shot-img img { display: block; width: 100%; height: auto; }
.drawer-shot figcaption { display: flex; align-items: center; gap: 8px; padding: 10px 2px 0; font-size: 14px; font-weight: 600; }
.drawer-shot figcaption a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
  text-decoration: none;
}
.drawer-shot figcaption a:hover { color: var(--fg); }
.drawer-shot figcaption svg { width: 13px; height: 13px; }

@media (max-width: 760px) {
  .drawer-intro { grid-template-columns: 1fr; }
  .drawer-facts { grid-column: 1; grid-row: auto; gap: 20px; }
  .drawer-shots { grid-template-columns: 1fr; }
  .drawer-head .btn { padding: 0 10px; }
  .drawer-id h2 { font-size: 15px; }
}

/* Demo / Gerçek etiketi */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font: 700 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.badge--demo { color: #6b5f00; background: #fdf3c4; }
.badge--live { color: #0b6b3a; background: #d9f5e5; }
@media (prefers-color-scheme: dark) {
  .badge--demo { color: #f5dc6b; background: rgb(245 220 107 / 0.14); }
  .badge--live { color: #6ee7a8; background: rgb(110 231 168 / 0.14); }
}
.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  pointer-events: none;
}
/* Ekran görüntüsünün üstünde: temadan bağımsız, dolu ve okunaklı */
.card-badge .badge {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  color: #fff;
  box-shadow: 0 4px 12px -4px rgb(0 0 0 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.18);
}
.card-badge .badge--demo { background: #b45309; }
.card-badge .badge--live { background: #047857; }
.card-text h2 .badge { margin-left: 6px; height: 19px; padding: 0 6px; font-size: 10px; }
.drawer-id h2 .badge { margin-left: 6px; }

/* Giriş animasyonu */
.reveal { animation: rise 520ms var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.empty { padding: 80px 0; text-align: center; color: var(--fg-3); }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 24px clamp(16px, 4vw, 48px) 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-3);
}

@media (max-width: 640px) {
  .topbar-meta { display: none; }
}

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