/* ==========================================================================
   Components — tekrar kullanılabilir yapı taşları
   btn · link-arrow · tag · status · meta-list · section-head · ticks · device
   ========================================================================== */

/* ---------- Button ---------- */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding: 0 18px;
  border-radius: var(--radius-s);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  transition:
    background-color var(--dur-s) ease,
    color var(--dur-s) ease,
    border-color var(--dur-s) ease;
}
.btn__arrow { width: 14px; height: 14px; transition: transform 0.35s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn--dark { background: var(--c-ink); color: var(--c-paper); }
.btn--dark:hover { background: #000; }

.btn--line { border: 1px solid var(--c-line-strong); color: var(--c-ink); }
.btn--line:hover { border-color: var(--c-ink); }

.btn--light { background: var(--c-paper); color: var(--c-ink); }
.btn--light:hover { background: #fff; }

.btn--sm { --btn-h: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- Link with arrow ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  width: fit-content;
  font-size: var(--fs-small);
  font-weight: 500;
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease-out);
}
.link-arrow svg { width: 14px; height: 14px; transition: transform 0.4s var(--ease-out); }
.link-arrow:hover { background-size: 0 1px; background-position: 100% 100%; }
.link-arrow:hover svg { transform: translate(2px, -2px); }

/* ---------- Tag ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 8px 4px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-xs);
  color: var(--c-ink-2);
}
.on-dark .tag { border-color: var(--c-line-dark-strong); color: var(--c-on-dark-2); }

/* ---------- Status dot ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; }
.status__dot {
  position: relative;
  width: 6px; height: 6px;
  background: var(--c-accent);
  border-radius: 1px;
}
.status__dot::after {
  content: "";
  position: absolute; inset: -3px;
  border: 1px solid var(--c-accent);
  border-radius: 2px;
  opacity: 0;
  animation: status-ping 2.4s var(--ease-out) infinite;
}
@keyframes status-ping {
  0% { opacity: 0.8; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ---------- Meta list (dt/dd satırları) ---------- */
.meta-list { display: grid; }
.meta-list > div {
  display: grid;
  grid-template-columns: minmax(96px, 0.8fr) 1.4fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-small);
}
.meta-list > div:last-child { border-bottom: 1px solid var(--c-line); }
.meta-list dt {
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-ink-3);
  padding-top: 2px;
}
.meta-list dd { color: var(--c-ink); }
.on-dark .meta-list > div { border-color: var(--c-line-dark); }
.on-dark .meta-list dt { color: var(--c-on-dark-3); }
.on-dark .meta-list dd { color: var(--c-on-dark); }

/* ---------- Section head ---------- */
.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 24px;
  align-items: end;
}
.section-head__index {
  grid-column: 1 / span 3;
  align-self: start;
  display: flex;
  gap: 12px;
  padding-top: 0.6em;
  color: var(--c-ink-3);
}
.section-head__index b { color: var(--c-accent); font-weight: 500; }
.section-head__title {
  grid-column: 4 / span 6;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.section-head__aside {
  grid-column: 10 / span 3;
  font-size: var(--fs-small);
  color: var(--c-ink-3);
  max-width: 30ch;
}
.on-dark .section-head__index,
.on-dark .section-head__aside { color: var(--c-on-dark-3); }

@media (max-width: 1024px) {
  .section-head__index { grid-column: 1 / -1; padding-top: 0; }
  .section-head__title { grid-column: 1 / span 9; }
  .section-head__aside { grid-column: 10 / span 3; }
}
@media (max-width: 720px) {
  .section-head__title,
  .section-head__aside { grid-column: 1 / -1; }
}

/* ---------- Corner ticks (geometrik detay) ---------- */
.ticks { position: absolute; inset: 0; pointer-events: none; }
.ticks i {
  position: absolute;
  width: 11px; height: 11px;
  color: var(--c-ink);
}
.ticks i::before, .ticks i::after {
  content: ""; position: absolute; background: currentColor;
}
.ticks i::before { left: 5px; top: 0; width: 1px; height: 11px; }
.ticks i::after { top: 5px; left: 0; height: 1px; width: 11px; }
.ticks i:nth-child(1) { top: -6px; left: -6px; }
.ticks i:nth-child(2) { top: -6px; right: -6px; }
.ticks i:nth-child(3) { bottom: -6px; left: -6px; }
.ticks i:nth-child(4) { bottom: -6px; right: -6px; }
.on-dark .ticks i { color: var(--c-on-dark-3); }

/* ==========================================================================
   Device mockups
   Cihaz kendi container'ıdır: içerideki tüm ölçüler cqw (cihaz genişliği %)
   cinsindendir; böylece cihaz hangi boyutta olursa olsun orantılı ölçeklenir.
   Kullanım: <figure class="device device--phone" style="--w: 240px">
   ========================================================================== */
.device {
  position: relative;
  width: var(--w, 260px);
  flex: none;
  container-type: inline-size;
  margin: 0;
}
.device__frame {
  position: relative;
  background: #0C0D0F;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07) inset, var(--shadow-device);
}
.device__screen {
  position: relative;
  overflow: hidden;
  background: var(--c-white);
  color: var(--c-ink);
}

/* Phone */
.device--phone .device__frame { border-radius: 14cqw; padding: 3.4cqw; }
.device--phone .device__screen { border-radius: 11cqw; aspect-ratio: 9 / 19.5; }
.device--phone .device__screen::before {
  content: "";
  position: absolute; z-index: 5;
  top: 2.8cqw; left: 50%;
  width: 28cqw; height: 7.6cqw;
  transform: translateX(-50%);
  background: #0C0D0F;
  border-radius: 4cqw;
}

/* Tablet */
.device--tablet .device__frame { border-radius: 5.5cqw; padding: 3.4cqw; }
.device--tablet .device__screen { border-radius: 2.6cqw; aspect-ratio: 3 / 4; }

/* Laptop */
.device--laptop .device__frame {
  border-radius: 2.6cqw 2.6cqw 0 0;
  padding: 1.8cqw 1.8cqw 2.6cqw;
  background: #121316;
}
.device--laptop .device__screen { border-radius: 0.5cqw; aspect-ratio: 16 / 10; }
.device__base {
  position: relative;
  width: 114%;
  margin-left: -7%;
  height: 2.2cqw;
  background: #2C2F36;
  border-radius: 0 0 1.6cqw 1.6cqw;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 30px 50px -24px rgba(0, 0, 0, 0.55);
}
.device__base::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  width: 15%; height: 45%;
  transform: translateX(-50%);
  background: #1D1F24;
  border-radius: 0 0 1cqw 1cqw;
}

/* Ortak ekran parçaları (cihaz-göreli) */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; font-family: var(--f-body); }
.scr__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4.2cqw 8cqw 0;
  height: 12cqw;
  font-size: 3.6cqw;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: none;
}
.scr__status-icons { display: flex; gap: 1.4cqw; align-items: center; }
.scr__status-icons i { display: block; width: 3.4cqw; height: 2.2cqw; background: currentColor; border-radius: 0.5cqw; }
.scr__status-icons i:last-child { width: 5.6cqw; }
