/*
 * common.css
 * Ortak stiller: base reset, layout, header/navbar, drawer
 * Kullanan: index.html, hakkimizda.html, referanslar.html, katalog.html
 * ─────────────────────────────────────────────────────────────── */

/* ========================
   CSS DEĞIŞKENLERI
   ======================== */
:root {
  --bg0: #0b0b0d;
  --bg1: #101014;

  --text: #f6f2ec;
  --muted: rgba(246, 242, 236, .72);
  --line: rgba(246, 242, 236, .12);

  --accent: #FFC107;

  --radius: 18px;
  --radius2: 24px;

  --container: 1160px;
  --pad-x: clamp(28px, 4vw, 56px);
  --section-y: clamp(44px, 5.2vw, 84px);

  --h1: clamp(30px, 4.2vw, 54px);
  --h2: clamp(22px, 2.3vw, 34px);

  --shadow: 0 20px 60px rgba(0, 0, 0, .55);
  --shadow2: 0 12px 34px rgba(0, 0, 0, .38);

  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --font-brand: "Space Grotesk", "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* ========================
   BASE RESET
   ======================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(255, 193, 7, .08), transparent 70%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========================
   LAYOUT YARDIMCıLARI
   ======================== */
.wrap {
  padding-inline: max(var(--pad-x), 24px);
  min-width: 0;
}

@media (max-width: 520px) {
  .wrap {
    padding-inline: 24px;
  }
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  min-width: 0;
  width: 100%;
}

.section {
  padding-block: var(--section-y);
}

/* ========================
   HEADER / NAVBAR
   ======================== */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background .22s ease, border-bottom-color .22s ease, box-shadow .22s ease;
}

.header .container.nav {
  max-width: none !important;
  width: 100%;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  min-width: 0;
}

/* BRAND */
.brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
  min-height: 64px;
  height: auto;
  min-width: 0;
}

.brandIcon {
  height: 56px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .45));
  transform: translateZ(0);
  flex: 0 0 auto;
}

.brandText {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.0;
  min-width: 0;
  min-height: 56px;
  height: auto;
  font-family: var(--font-brand);
}

.brandTop {
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 23px;
  color: rgba(246, 242, 236, .96);
  white-space: nowrap;
  line-height: 0.95;
  transition: font-size .22s ease;
}

.brandBottom {
  margin-top: -1px;
  font-weight: 800;
  letter-spacing: .25px;
  font-size: 23px;
  color: rgba(255, 193, 7, .98);
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(255, 193, 7, .12);
  line-height: 0.95;
  transition: font-size .22s ease;
}

.brandSince {
  margin-top: 2px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .10px;
  color: rgba(246, 242, 236, .48);
  white-space: nowrap;
  line-height: 1.0;
  max-height: 1.5em;
  overflow: hidden;
  transition: opacity .22s ease, max-height .22s ease, margin-top .22s ease;
}

/* Orta menü pill */
.links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246, 242, 236, .08);
  background: rgba(255, 255, 255, .02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .20);
  transition: background .22s ease, border-color .22s ease, box-shadow .22s ease, padding .22s ease;
  max-width: 100%;
  min-width: 0;
}

.links a {
  position: relative;
  font-size: 14px;
  color: rgba(246, 242, 236, .88);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    transform .18s ease,
    background .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    color .2s ease,
    filter .2s ease;
  will-change: transform;
  white-space: nowrap;
}

.links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 193, 7, .95);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .20s ease, opacity .20s ease;
  opacity: 0;
}

.links a:hover {
  background: rgba(255, 193, 7, .10);
  border-color: rgba(255, 193, 7, .18);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .22);
  filter: saturate(1.05);
}

.links a:hover::after {
  transform: scaleX(1);
  opacity: .95;
}

.links a:active {
  transform: translateY(0) scale(.985);
}

/* Sağ aksiyon grubu */
.actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246, 242, 236, .08);
  background: rgba(255, 255, 255, .02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .20);
  transition: background .22s ease, border-color .22s ease, box-shadow .22s ease, padding .22s ease;
  flex-wrap: nowrap;
  max-width: 100%;
  min-width: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(246, 242, 236, .12);
  background: rgba(255, 255, 255, .02);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  color: var(--text);
  white-space: nowrap;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease,
    background .2s ease,
    border-color .2s ease;
  will-change: transform;
}

.btn:hover {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(246, 242, 236, .20);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
  filter: saturate(1.05);
}

.btn:active {
  transform: translateY(0) scale(.985);
}

.btn.primary {
  border: 0;
  color: #120b07;
  font-weight: 900;
  background: rgba(255, 193, 7, .98);
  box-shadow: 0 18px 50px rgba(255, 193, 7, .16);
  position: relative;
  overflow: hidden;
}

.btn.primary::after {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .38), transparent 55%);
  opacity: .65;
  transform: translateZ(0);
  pointer-events: none;
}

.btn.primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 72px rgba(255, 193, 7, .22);
  filter: brightness(1.02);
}

.menuBtn {
  display: none;
}

/* Navbar duyarlı kırılma noktaları */
@media (max-width: 1120px) {
  .links {
    display: none !important;
  }

  .menuBtn {
    display: inline-flex !important;
  }

  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .actions {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .brand {
    min-height: 62px;
    height: auto;
  }

  .brandIcon {
    height: 54px;
  }

  .brandText {
    min-height: 54px;
    height: auto;
  }

  .brandTop,
  .brandBottom {
    font-size: 18px;
  }
  .header.scrolled .brandTop,
  .header.scrolled .brandBottom {
    font-size: 20px;
  }
}

@media (max-width: 520px) {
  .brand {
    min-height: 60px;
    height: auto;
  }

  .brandIcon {
    height: 50px;
  }

  .brandText {
    min-height: 50px;
    height: auto;
  }

  .brandTop,
  .brandBottom {
    font-size: 17px;
  }
  .header.scrolled .brandTop,
  .header.scrolled .brandBottom {
    font-size: 19px;
  }
}

@media (max-width: 420px) {
  :root {
    --pad-x: 22px;
  }

  .brandTop,
  .brandBottom {
    font-size: 16px;
  }
  .header.scrolled .brandTop,
  .header.scrolled .brandBottom {
    font-size: 18px;
  }

  .brandIcon {
    height: 48px;
  }

  .brandText {
    min-height: 48px;
    height: auto;
  }
}

/* ========================
   DRAWER (MOBİL MENÜ)
   ======================== */
.drawerBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: none;
  z-index: 80;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 92vw);
  background: rgba(16, 16, 20, .92);
  border-left: 1px solid rgba(246, 242, 236, .10);
  box-shadow: -18px 0 50px rgba(0, 0, 0, .35);
  transform: translateX(100%);
  transition: transform .18s ease;
  z-index: 90;
  padding: 16px;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawerBackdrop.open {
  display: block;
}

.drawer.open {
  transform: translateX(0);
}

.drawer a {
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(246, 242, 236, .08);
  background: rgba(255, 255, 255, .02);
  color: rgba(246, 242, 236, .84);
  font-size: 13px;
}

.drawerTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.xbtn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(246, 242, 236, .10);
  background: rgba(255, 255, 255, .02);
  color: var(--text);
  cursor: pointer;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(246, 242, 236, .10);
  background: rgba(0, 0, 0, .18);
  color: rgba(246, 242, 236, .86);
  font-size: 12px;
  white-space: nowrap;
}

/* ========================
   FOOTER
   ======================== */
footer {
  border-top: 1px solid rgba(246, 242, 236, .10);
  padding: 26px 0 30px;
  color: rgba(246, 242, 236, .72);
  font-size: 13px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ========================
   NAVBAR SCROLL GÖRÜNÜMÜ
   ======================== */
.header.scrolled {
  background:
    linear-gradient(90deg,
      rgba(11, 11, 13, .96) 0%,
      rgba(11, 11, 13, .94) 50%,
      rgba(11, 11, 13, .92) 100%);
  border-bottom-color: rgba(246, 242, 236, .14);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

.header.scrolled .brandSince {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
}

.header.scrolled .brandTop,
.header.scrolled .brandBottom {
  font-size: 25px;
}

/* body scroll lock when mobile menu is open */
body.drawer-open {
  overflow: hidden;
}

/* mobile action hiding in header to prevent overflow */
@media (max-width: 520px) {
  .header .actions .btn:not(.menuBtn) {
    display: none !important;
  }
}

/* section headers mobile vertical stacking to prevent button squeezing */
@media (max-width: 768px) {
  .head {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .head > .btn,
  .head > a.btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================
   ACCESSIBILITY
   ========================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================
   PRINT STYLESHEET
   ========================= */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .header,
  .fabCall,
  .drawerBackdrop,
  .drawer,
  footer,
  .heroBtn,
  .heroDots,
  noscript {
    display: none !important;
  }

  main {
    padding-top: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  .section {
    page-break-inside: avoid;
  }
}