/* Kaydırma hikâyesi: hero sahnesi sabit kalır, kaydırdıkça kamera iner ve masa katmanı gelir. */
/* --hold: animasyon bittikten sonra telefon bir süre yerinde kalır, footer biraz daha kaydırınca gelir */
.story { --hold: 80svh; position: relative; height: calc(380svh + var(--hold)); }
.story > .hero { position: sticky; top: 0; }
.story__end { position: absolute; left: 0; bottom: 0; width: 1px; height: calc(100svh + var(--hold)); pointer-events: none; }

/* Masa katmanı: tepeden kare, telefona yakınlaşmış halde yerleşir (telefon ekran yüksekliğinin ~%88'i).
   Yakınlaşma öncesi tam kare görünümü JS'in transform'uyla verilir; düzen hep aynı kalır. */
.desk {
  --u: max(calc(88svh / 407), calc(100vw / 1440));
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #120c08;
  opacity: 0;
  pointer-events: none;
}
.desk.is-interactive { pointer-events: auto; }
.desk__frame {
  position: absolute;
  width: calc(1440 * var(--u));
  height: calc(810 * var(--u));
  left: calc(50% - 718.5 * var(--u));
  top: calc(50% - 516.7 * var(--u));
  transform-origin: calc(718.5 * var(--u)) calc(516.7 * var(--u));
  will-change: transform;
}
.desk__plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; user-select: none; }
.desk__screen { position: absolute; inset: 0; }

/* Telefon arayüzü: 390×870 px tuval, JS matrix3d ile ekranın köşelerine oturur.
   Sitenin açık/koyu temasından bağımsız, hep koyu. */
.phone-ui {
  --surface: #141c36;
  --surface-2: #1b2445;
  --border: rgba(148, 163, 184, .16);
  --border-strong: rgba(148, 163, 184, .32);
  --text: #e6ebf5;
  --muted: #9aa6bf;
  --accent: #22d3ee;
  --accent-ink: #04252c;
  --accent-soft: rgba(34, 211, 238, .12);
  --accent-2: #f472b6;
  --accent-2-ink: #4a0d2a;
  --ios-blue: #0a84ff;
  position: absolute;
  left: 0;
  top: 0;
  width: 390px;
  height: 870px;
  transform-origin: 0 0;
  overflow: hidden;
  /* Görseldeki camın köşe yarıçapı ~58px (bu tuvalde). Gerçek iPhone gibi ekranla kasa arasında
     ~8px siyah çerçeve kalır; altındaki fotoğrafın siyah camı görünür */
  clip-path: inset(8px round 50px);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font);
  font-size: 15px;
  line-height: 1.45;
  /* duvar kağıdı; ana ekranda iOS gibi biraz karartılmış */
  background: #2c4652 url("../assets/desk/wallpaper.webp") center / cover no-repeat;
  -webkit-font-smoothing: antialiased;
  /* gerçek telefondaki gibi: sürüklerken metin seçilmez (uygulama gövdeleri hariç) */
  user-select: none;
  -webkit-user-select: none;
}
.phone-ui .app__body { user-select: text; -webkit-user-select: text; }
.phone-ui button { font: inherit; color: inherit; }

.phone-ui__status {
  position: absolute;
  z-index: 5;
  top: 11px;
  left: 0;
  right: 0;
  /* iPhone gibi: saat ve simgeler adanın iki yanındaki boşluğun ortasında, adayla aynı hizada */
  display: grid;
  grid-template-columns: 1fr 126px 1fr;
  justify-items: center;
  align-items: center;
  height: 59px;
  padding: 0 16px 0 22px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  pointer-events: none;
}
.phone-ui__icons { grid-column: 3; }
/* Dynamic Island: kilit ekranı ve uygulamalar dahil her şeyin üstünde */
.phone-ui__island {
  position: absolute;
  z-index: 7;
  top: 22px;
  left: 50%;
  width: 126px;
  height: 37px;
  margin-left: -63px;
  border-radius: 19px;
  background: #000;
  pointer-events: none;
}
.phone-ui__icons { display: flex; gap: 6px; align-items: center; }
/* gerçek iOS durum çubuğu simgeleri: sinyal çubukları, Wi-Fi yayları, pil */
.phone-ui__icons svg { display: block; height: 12px; fill: currentColor; }
.phone-ui__icons .sb-signal { width: 19px; }
.phone-ui__icons .sb-wifi { width: 17px; }
.phone-ui__icons .sb-battery { width: 27px; height: 13px; }
.phone-ui__homebar {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 16px;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .7);
  pointer-events: none;
}

/* Ana ekran */
.home { position: absolute; inset: 0; padding: 74px 24px 20px; display: flex; flex-direction: column; }
.home__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 4px; margin-top: 14px; }
/* iOS 17 ana ekranındaki "Ara" kutusu: dock'un hemen üstünde, yalnız görünüş */
.home__search {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: auto auto 16px;
  padding: 6px 13px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.home__search svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* Dock: buzlu cam şerit, ikonlar etiketsiz */
.home__dock {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 0 -8px;
  padding: 16px 0;
  border-radius: 34px;
  background: rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  backdrop-filter: blur(28px) saturate(1.6);
}
.home__dock .app-icon { gap: 0; }
.home__dock .app-icon__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.app-icon__tile {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 15px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px -6px rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: transform .15s ease;
}
.app-icon__tile svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-icon__tile--avatar { overflow: hidden; background: #e2e8f0; }
.app-icon__tile--avatar img { width: 100%; height: 100%; object-fit: cover; }
.app-icon:active .app-icon__tile { transform: scale(.9); }
.app-icon:focus-visible .app-icon__tile { outline: 3px solid #fff; outline-offset: 3px; }
.app-icon__label { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

/* Uygulama ekranları */
.apps { position: absolute; inset: 0; pointer-events: none; }
.app {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #0b1020;
  pointer-events: auto;
}
.app[hidden] { display: none; }
.app__bar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  height: 109px;
  padding: 59px 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.app__back {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px 6px 2px;
  border: 0;
  background: none;
  color: var(--ios-blue) !important;
  font-size: 17px !important;
  cursor: pointer;
}
.app__back svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.app__title {
  position: absolute;
  left: 90px;
  right: 90px;
  bottom: 12px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app__body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 40px; overscroll-behavior: contain; }

/* iOS dili: siyah zemin, gruplu listeler, gri bölüm başlıkları, tek vurgu rengi (iOS mavisi) */
.app { background: #000; }
.app__bar { background: rgba(28, 28, 30, .94); border-bottom: .5px solid rgba(84, 84, 88, .65); }
.app__body { padding: 8px 16px 40px; font-size: 16px; }
.ios-sec {
  margin: 26px 16px 7px;
  font-size: 13px;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.ios-group { list-style: none; margin: 0; padding: 0; border-radius: 12px; overflow: hidden; background: #1c1c1e; }
.ios-group + .ios-group { margin-top: 16px; }
.row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 11px 16px;
  font-size: 16px;
  line-height: 1.3;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid rgba(84, 84, 88, .65); }
.row__value { color: #8e8e93; font-variant-numeric: tabular-nums; }
/* sayma animasyonu için stat__num sınıfı taşınıyor; sitenin büyük rakam stilini ezer */
.phone-ui .row__value.stat__num { display: inline; font: inherit; letter-spacing: 0; line-height: inherit; color: #8e8e93; }
.row--stack { flex-direction: column; align-items: flex-start; gap: 2px; }
.row__sub { font-size: 14px; color: #8e8e93; line-height: 1.35; }
.row__label { font-size: 13px; color: #fff; }
.row--text { display: block; font-size: 15px; line-height: 1.4; color: #e5e5ea; }
.row__link { color: var(--ios-blue); text-decoration: none; font-size: 16px; }
.row__link--full { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.row__chev { width: 18px; height: 18px; fill: none; stroke: #48484a; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ios-note { margin: 4px 4px 0; font-size: 15px; line-height: 1.45; color: #aeaeb2; }

/* Kişi kartı (Hakkımda, İletişim) */
.contact-card { text-align: center; padding: 18px 0 14px; }
.contact-card__avatar { width: 128px; height: 128px; border-radius: 50%; margin: 0 auto 10px; background: #2c2c2e; object-fit: cover; }
.contact-card__name { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.contact-card__sub { margin: 2px 20px 0; font-size: 15px; color: #8e8e93; }
.ios-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 18px; }
.ios-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0 9px;
  border-radius: 12px;
  background: #1c1c1e;
  color: var(--ios-blue);
  text-decoration: none;
  font-size: 12px;
}
.ios-action svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Deneyim başlığı */
.exp-head { display: flex; gap: 14px; align-items: center; padding: 16px 4px 2px; }
.exp-head__logo {
  flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 13px;
  background: #0a66c2; font-size: 24px; font-weight: 700; color: #fff;
}
.exp-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.exp-head p { margin: 1px 0 0; font-size: 15px; color: #e5e5ea; }
.exp-head .exp-head__meta { font-size: 13px; color: #8e8e93; }

/* Proje bilgi sayfası (App Store sayfası gibi) */
.store-head { display: flex; gap: 14px; align-items: center; padding: 16px 4px 10px; }
.store-head .app-icon__tile { width: 72px; height: 72px; border-radius: 16px; font-size: 26px; }
.store-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.store-head p { margin: 2px 0 0; font-size: 14px; color: #8e8e93; }
.store-head + .ios-note { margin-bottom: 16px; }

/* Kilit ekranı: ana ekranın üstünde; yukarı sürüklenince açılır */
.lock {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 86px 22px 0;
  /* gerçek kilit ekranı gibi duvar kağıdı neredeyse olduğu gibi; çok hafif karartma */
  background:
    linear-gradient(rgba(4, 16, 22, .12), rgba(4, 16, 22, .12)),
    #2c4652 url("../assets/desk/wallpaper.webp") center / cover no-repeat;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.lock[hidden] { display: none; }
.lock:active { cursor: grabbing; }
.lock__date { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; color: rgba(214, 240, 246, .95); text-shadow: 0 1px 6px rgba(6, 30, 40, .3); }
/* iOS 26 kilit saati: uzun, dar, duvar kağıdının renginden camsı rakamlar. Gerçek ekranda
   rakamlar ekran yüksekliğinin ~%22'si, "23:13" genişliğin ~%80'i; dar yazı tipiyle uzatmadan */
.lock__time {
  /* harf aralığı son rakamın sağında da boşluk bırakır; ortalı kalsın diye geri alınır */
  margin: -3px -.02em 0 0;
  font-family: "Roboto Flex", "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 270px;
  font-stretch: 25%;
  font-weight: 500;
  line-height: .76;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: rgba(176, 222, 236, .86);
  text-shadow: 0 2px 10px rgba(6, 30, 40, .3);
}
.lock__bottom { width: 100%; margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 0 29px 59px; }
.lock__btn {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.lock__btn svg { width: 26px; height: 26px; fill: #fff; fill-rule: evenodd; }
/* Gerçek kilit ekranında yazı yok; düğme klavye ve ekran okuyucu için yerinde, odaklanınca görünür */
.lock__unlock {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 8px 4px;
  border: 0;
  background: none;
  font-size: 14px !important;
  font-weight: 500;
  color: rgba(255, 255, 255, .85) !important;
  cursor: pointer;
  animation: shimmer 2.4s ease-in-out infinite;
}
@keyframes shimmer { 50% { opacity: .45; } }

.lock__unlock:focus-visible { clip: auto; clip-path: none; }
@media (prefers-reduced-motion: reduce) {
  .app-icon__tile { transition: none; }
  .lock__unlock { animation: none; }
}

.phone-ui__homebar { pointer-events: none; }
.phone-ui.has-app .phone-ui__homebar { pointer-events: auto; cursor: pointer; touch-action: none; }
.phone-ui__homebar::before { content: ""; position: absolute; inset: -16px -24px -9px; }

/* Mağazadaki gerçek uygulama ikonları */
.app-icon__tile--img { overflow: hidden; padding: 0; background: #fff; }
.app-icon__tile--img img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Ana ekranda duvar kağıdı net, iOS gibi yalnız biraz karartılmış; kilit ekranındaki saat zaten büyük olduğu için durum çubuğundaki saat gizlenir */
.home::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../assets/desk/wallpaper.webp") center / cover no-repeat;
  filter: brightness(.78);
}
/* Gerçek iPhone ana ekranda ev çubuğu göstermez; yalnız kilitte ve uygulama açıkken */
.phone-ui.is-unlocked:not(.has-app) .phone-ui__homebar { opacity: 0; }
/* Ekran camı: masadaki ışıktan hafif çapraz parlama ve kenarlara doğru kararma */
.phone-ui::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .07) 42%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(130% 90% at 50% 45%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, .28));
}
.home { isolation: isolate; }
.phone-ui:not(.is-unlocked) .phone-ui__clock { opacity: 0; }
