/* Renk, tipografi, yerleşim ve hareket token'ları tokens.css içinde (stil sayfasıyla ortak) */

:root {
  /* Ortadaki maskot kutusu: kareler bu kutuya alttan hizalı oturur */
  --mh: min(42svh, 340px);
  --mw: calc(var(--mh) * 0.68);

  --dock-h: clamp(72px, 7vw, 96px); /* sabitlenmiş maskot (logo) yüksekliği */
  --dock-top: 10px;
  --head-h: calc(var(--dock-h) + var(--dock-top) * 2); /* sabit başlığın kapladığı alan */
}

* { box-sizing: border-box; }

html, body { margin: 0; }
html { scroll-padding-top: calc(var(--head-h) + 16px); }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }
a { color: inherit; }

::selection { background: var(--lime); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--pink-dark);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =========================================================
   Giriş sahnesi
   ========================================================= */

.stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.mascot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--mw);
  height: var(--mh);
  margin: calc(var(--mh) / -2) 0 0 calc(var(--mw) / -2);
  padding: 0;
  border: 0;
  background: none;
  cursor: default;
  transform-origin: 50% 0%;
  -webkit-tap-highlight-color: transparent;
}

.frames,
.frames img,
.pink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.frames img,
.pink {
  object-fit: contain;
  object-position: 50% 100%;
}

.frames img { visibility: hidden; }
.frames img.is-on { visibility: visible; }

.pink { opacity: 0; }

.cloud {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 175%;
  width: auto;
  max-width: none;
  translate: -50% -52%;
  z-index: -1;
  opacity: 0;
}

.hey {
  position: absolute;
  left: 82%;
  top: -4%;
  width: 62%;
  max-width: none;
  opacity: 0;
  transform-origin: 0% 100%;
}

.is-docked .mascot {
  pointer-events: auto;
  cursor: pointer;
}
.is-docked .mascot:focus-visible {
  outline: 2px solid var(--pink-dark);
  outline-offset: 6px;
  border-radius: 8px;
}

/* Aşağı kaydırma ipucu (egehanlayik.com'daki fare animasyonundan esinlenildi) */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px));
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  opacity: 0;
}
.scroll-hint__text {
  font: 500 var(--fs-label)/1 var(--font-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Fare: ince mürekkep kenarlı kapsül, tekerlek aşağı kayıp kaybolur */
.scroll-hint__mouse {
  position: relative;
  width: 26px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 14px;
}
.scroll-hint__wheel {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--ink);
  animation: wheel 1.6s var(--ease) infinite;
}
@keyframes wheel {
  0%   { opacity: 0; transform: translateY(0); }
  15%  { opacity: 1; }
  70%  { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* Dokunmatik: fare yerine sırayla yanan iki ok */
.scroll-hint__arrows { display: none; flex-direction: column; align-items: center; }
.scroll-hint__arrows i {
  display: block;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  rotate: 45deg;
  animation: arrow 1.6s var(--ease) infinite;
}
.scroll-hint__arrows i:last-child { animation-delay: 0.2s; }
@keyframes arrow {
  0%, 100% { opacity: 0.15; transform: translate(-3px, -3px); }
  40%      { opacity: 1;    transform: translate(0, 0); }
}
@media (hover: none), (pointer: coarse) {
  .scroll-hint__mouse { display: none; }
  .scroll-hint__arrows { display: flex; }
}

.skip {
  position: absolute;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  padding: 8px 14px;
  font: 600 0.8125rem/1 var(--font-body);
  color: var(--ink);
  background: var(--lime);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  pointer-events: auto;
  transition: opacity .3s, visibility .3s;
}
body:not(.is-loading) .skip { opacity: 0; visibility: hidden; }

/* Yükleme sırasında sayfa kaydırılamasın; kaydırma denemesi yüklemeyi atlar */
body.is-loading { overflow: hidden; touch-action: none; }

.intro { height: 400svh; } /* yedek değer; asıl yükseklik main.js içinde CONFIG aşamalarından hesaplanır */

/* =========================================================
   Üst menü: solda maskot + isim (logo), sağda tek hap
   ========================================================= */

.nav {
  position: absolute;
  top: 0;
  left: 0; right: 0;
  height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  /* İnce kâğıt bar: altından geçen içerik maskot ve menüyle karışmaz */
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  opacity: 0; /* maskot yerleşirken zaman çizelgesiyle belirir */
}
.is-docked .nav__brand,
.is-docked .nav__pill { pointer-events: auto; }

/* Aşağı kaydırırken menü yukarı saklanır, yukarı kaydırınca geri gelir (nav-hide.js).
   Ana sayfada yalnızca maskot menüye yerleştikten sonra. */
.nav, .case-nav { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.is-docked.is-nav-hidden .nav,
.is-nav-hidden .case-nav { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .nav, .case-nav { transition: none; }
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
/* Maskotun yerleştiği yuva: ölçüsü main.js'te okunur */
.nav__slot {
  flex: none;
  width: calc(var(--dock-h) * 0.68);
  height: var(--dock-h);
}
.nav__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%; /* sahnedeki pembe maskotla aynı hizalama */
  opacity: 0;
  transition: transform 0.4s var(--ease);
}
.nav__brand:hover .nav__logo { transform: translateY(-2px) rotate(-5deg); }
.nav__name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 0.7vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav__pill {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  padding: 10px clamp(14px, 2vw, 22px);
  background: color-mix(in srgb, var(--white) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.3;
}

.lang {
  display: flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}
.lang button {
  font: 500 0.6875rem/1 var(--font-label);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 5px 8px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

@media (max-width: 520px) {
  .nav__name { display: none; } /* dar ekranda logo yalnızca maskot */
  .nav__pill { font-size: 0.8125rem; gap: 12px; padding: 8px 12px; white-space: nowrap; }
}

/* =========================================================
   Tipografi
   ========================================================= */

.display, .h1, .h2, .h3, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}
.display { font-size: var(--fs-display); font-weight: 800; }
.h1 { font-size: var(--fs-h1); }
.h2, h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; }
.h3, h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
.lead { font-size: var(--fs-lead); line-height: 1.5; text-wrap: pretty; }
.small { font-size: var(--fs-small); color: var(--ink-soft); }

.label {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* =========================================================
   Yerleşim
   ========================================================= */

.content {
  position: relative;
  z-index: 1;
  background-color: var(--paper);
  /* Çok silik ızgara */
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(72px, 10vw, 140px) 0;
  border-top: 1px solid var(--line);
}
.section--white { background-color: color-mix(in srgb, var(--white) 70%, transparent); }
.section__head { margin-bottom: clamp(32px, 5vw, 64px); }
.section__head .label { display: block; margin-bottom: 12px; }
.section__head .small { margin: 12px 0 0; }

/* ---------- Tanıtım ---------- */

.section--hero {
  border-top: 0;
  padding-top: clamp(32px, 4vw, 64px);
}
.hero-line {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.035em;
  max-width: 19ch;
  margin: 16px 0 clamp(32px, 4vw, 48px);
  text-wrap: balance;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; }

/* ---------- Etiket kutuları ve küçük etiketler ---------- */

.tag {
  display: inline-block;
  padding: 0.02em 0.28em 0.06em;
  margin: 0 0.04em;
  color: var(--ink);
  background: var(--lime);
  border: 1.5px solid var(--ink);
  border-radius: 0.22em;
  line-height: 1.05;
  transform: rotate(-1.2deg);
  transition: transform 0.35s var(--ease);
}
.tag--pink { background: var(--pink); transform: rotate(1.4deg); }
.tag:hover { transform: rotate(0) translateY(-2px); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  font: 500 var(--fs-label)/1 var(--font-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--white);
}
.chip--lime { background: var(--lime); border-color: var(--ink); }

/* ---------- Butonlar ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  font: 600 1rem/1 var(--font-body);
  color: var(--ink);
  text-decoration: none;
  background: var(--lime);
  border: 1.5px solid var(--ink); /* limon beyazdan ayrışmadığı için kenar şart */
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn--ghost { background: var(--white); }

/* ---------- Linkler ---------- */

.link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--pink-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-thickness 0.2s, text-underline-offset 0.2s;
}
.link:hover { text-decoration-thickness: 4px; text-underline-offset: 3px; }

/* Hover'da karalamayla çizilen alt çizgi */
.squiggle-link {
  text-decoration: none;
  padding-bottom: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='8' viewBox='0 0 40 8'%3E%3Cpath d='M0 5 Q5 0 10 4 T20 4 T30 4 T40 4' fill='none' stroke='%23EC4982' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 100%;
  background-size: 0% 8px;
  transition: background-size 0.45s var(--ease);
}
.squiggle-link:hover,
.squiggle-link:focus-visible,
.squiggle-link[aria-current="true"] { background-size: 100% 8px; }

/* ---------- Projeler: sticker ---------- */

.project {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 4vw, 48px) 0;
}
@media (min-width: 860px) {
  .project { grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 80px); }
  .project--flip .project__stage { order: 2; }
}

.project__stage {
  position: relative;
  aspect-ratio: 5 / 4;
  display: grid;
  place-items: center;
}

.sticker {
  position: relative;
  display: block;
  width: 84%;
  aspect-ratio: 4 / 3;
  padding: 10px;
  background: var(--white);
  border-radius: 22px;
  box-shadow:
    0 1px 0 var(--line),
    0 18px 40px -18px color-mix(in srgb, var(--ink) 45%, transparent);
  rotate: var(--tilt);
  transition: rotate 0.6s var(--ease), translate 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.sticker:hover {
  rotate: 0deg;
  translate: 0 -6px;
  box-shadow: 0 1px 0 var(--line), 0 28px 50px -20px color-mix(in srgb, var(--ink) 50%, transparent);
}
.sticker__art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--art);
}
/* Gerçek proje görseli: kartı doldurur */
.sticker__art > img { width: 100%; height: 100%; object-fit: cover; }

/* Köşesi kalkan sticker */
.sticker__peel {
  position: absolute;
  right: 0; bottom: 0;
  width: 0; height: 0;
  border-radius: 0 0 22px 0;
  background: linear-gradient(135deg, var(--paper) 45%, #e6e6e3 50%, var(--white) 60%);
  box-shadow: -3px -3px 8px -2px color-mix(in srgb, var(--ink) 25%, transparent);
  transition: width 0.4s var(--ease), height 0.4s var(--ease);
}
.sticker:hover .sticker__peel { width: 46px; height: 46px; }

/* "Concept design" sticker: lime yıldız, beyaz kesik kenar, yamuk yapıştırılmış.
   Üstüne gelince düzleşip biraz büyür. Yerini kullanan yer belirler (vaka başlığı, proje kartı). */
.concept-tag {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  rotate: 12deg;
  filter: drop-shadow(0 6px 10px rgba(11, 23, 67, 0.2));
  transition: rotate 0.3s var(--ease), scale 0.3s var(--ease);
}
.concept-tag:hover { rotate: 0deg; scale: 1.06; }
.concept-tag svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--lime); stroke: var(--white); stroke-width: 5; stroke-linejoin: round; }
.concept-tag span {
  position: relative;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
}
@media (prefers-reduced-motion: reduce) {
  .concept-tag { transition: none; }
}
/* Proje kartında: sağ üst köşeye yapıştırılmış */
.sticker .concept-tag { top: -30px; right: -28px; }

/* Yer tutucu proje görseli: telefon / tarayıcı taslağı */
.mock {
  display: grid;
  gap: 6%;
  align-content: start;
  width: 34%;
  aspect-ratio: 9 / 18;
  padding: 8% 7%;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 14px;
  translate: 0 12%;
}
.mock i { display: block; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.mock i:first-child { height: 40px; background: var(--pink); }
.mock--web { width: 74%; aspect-ratio: 16 / 10; border-radius: 10px; translate: 0 8%; }
.mock--web i:first-child { background: var(--lime); height: 34px; }
.mock--alt i:first-child { background: var(--lime); }
.mock--alt i:nth-child(3) { background: var(--pink); }

.project__no {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  margin-bottom: 12px;
}
.project__info .h2 { margin-bottom: 14px; }
.credits {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 8px 28px;
  margin: 20px 0 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.credits dt { margin-bottom: 4px; }
.credits dd { margin: 0; font-weight: 500; }

/* ---------- Hakkımda ---------- */

.about { display: grid; gap: 32px; align-items: center; }
.about__art { width: min(320px, 80%); margin: 0 auto; }

/* Fotoğraf: kendi pembe halkasıyla, olduğu gibi */
.portrait {
  width: min(340px, 78%);
  height: auto;
  margin: 0 auto;
  transition: rotate 0.6s var(--ease), translate 0.6s var(--ease);
}
.portrait:hover { rotate: -3deg; translate: 0 -4px; }
.about .label { margin: 28px 0 10px; }
@media (min-width: 860px) { .about { grid-template-columns: 5fr 7fr; gap: 64px; } }

/* Sena'nın dolduracağı yer: limon zeminli, mürekkep yazılı not */
.todo {
  display: inline;
  padding: 2px 6px;
  background: var(--lime);
  color: var(--ink);
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}
.todo__tag {
  font: 500 var(--fs-label)/1.4 var(--font-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.todo__tag::after { content: " →"; }

/* ---------- Süreç ---------- */

/* Yatay akış: mobilde alt alta (↓), masaüstünde tek sıra (→) */
.process {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}
.step__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}
.step .h3 { margin: 0; }
.step p { margin: 14px 0 0; max-width: 30ch; color: var(--ink-soft); font-size: var(--fs-small); }
.step:not(:last-child)::after {
  content: "↓" / "";
  display: block;
  margin-top: 20px;
  font-size: var(--fs-h3);
  line-height: 1;
}
@media (min-width: 860px) {
  .process { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .step p { padding-right: 24px; }
  .step:not(:last-child)::after { content: none; }
  .step:not(:last-child) .step__head::after {
    content: "→" / "";
    margin-left: auto;
    padding-right: 24px;
    font-size: var(--fs-h3);
    line-height: 1;
  }
}

/* ---------- İletişim: el sallayan maskot ---------- */

.section--contact { padding-bottom: clamp(56px, 8vw, 96px); }
.contact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 16px 0 clamp(32px, 4vw, 48px);
}
.contact .display { max-width: 11ch; }

.waver {
  position: relative;
  flex: none;
  width: clamp(72px, 12vw, 150px);
  margin-right: clamp(40px, 8vw, 110px);
}
.waver__mascot {
  width: 100%;
  transform-origin: 50% 90%;
  animation: wave 2.4s var(--ease) infinite;
}
.waver__hey {
  position: absolute;
  left: 78%;
  top: -10%;
  width: 90%;
  max-width: none;
  transform-origin: 0% 100%;
  animation: pop 2.4s var(--ease) infinite;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-7deg); }
  20%, 40% { transform: rotate(6deg); }
}
@keyframes pop {
  0%, 60%, 100% { transform: scale(1); }
  15% { transform: scale(1.12) rotate(-4deg); }
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
}
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Belirme: JS varsa gizleyip scroll'da gösterir ---------- */

.js .reveal { opacity: 0; }

/* =========================================================
   Azaltılmış hareket: animasyonsuz sade sürüm
   ========================================================= */

.reduced body { overflow: auto; touch-action: auto; }
.reduced .skip,
.reduced .scroll-hint,
.reduced .frames { display: none; }
.reduced .intro { height: 100svh; }
.reduced .section--hero { padding-top: calc(var(--head-h) + 32px); }
.reduced .pink,
.reduced .cloud,
.reduced .hey { opacity: 1; }

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