/* ===========================
   BASE — Fonts, Variables, Reset
   =========================== */

/* Titillium Font Family */
@font-face {
  font-family: 'Titillium';
  src: url('../assets/fonts/titillium/Titillium-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium';
  src: url('../assets/fonts/titillium/Titillium-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium';
  src: url('../assets/fonts/titillium/Titillium-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #121212;
  --muted: rgba(18, 18, 18, .70);
  --line: rgba(18, 18, 18, .12);
  --surface: rgba(0, 0, 0, .02);
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --r-12: 12px;
  --r-16: 16px;
  --r-18: 18px;
  --t: 180ms;
  --gutter-x: 168px; /* Desktop gutter */
}

@media (max-width: 1200px) {
  :root {
    --gutter-x: 48px;
  }
}

@media (max-width: 900px) {
  :root {
    --gutter-x: 24px;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter-x: 16px;
  }
}

* { box-sizing: border-box; }

html,
body {
  overflow-x: clip;
  max-width: 100vw;
  height: 100%;
}

html {
  /* Intro kapanırken scrollbar kaynaklı layout shift olmasın */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: 'Titillium', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  min-height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  transition: background-color 1000ms cubic-bezier(.22, .61, .36, 1);
}

main {
  flex: 1 0 auto;
  overflow-x: hidden;
  width: 100%;
}

/* Index sayfasında içerik `.page` içinde: aynı sticky footer davranışı */
.page {
  min-height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  opacity: 1;
  transition: opacity 900ms cubic-bezier(.22, .61, .36, 1);
  will-change: opacity;
}

.page > main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(var(--vh, 1vh) * 100 - 72px);
}

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

.container {
  max-width: 1600px;
  width: 100%;
  padding-left: var(--gutter-x);
  padding-right: var(--gutter-x);
  margin: 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none !important; }
}

/* ===========================
   Skeleton Loading Animation
   =========================== */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--line) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite linear;
  border-radius: 4px;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
  min-height: 1em;
  display: inline-block;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton::before,
.skeleton::after,
.skeleton * {
  visibility: hidden;
}

/* Fade in for content */
.fade-in {
  animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
