/* Idiots Party tanıtım sayfası. Tasarım A: Salona gir.
   Tam ekran salon, kaydırmaya bağlı derinlik; kağıt notlar yalnızca süs. Renkler yalnız tokens.css'ten. */

:root {
  --kenar: clamp(16px, 3.4vw, 48px);
  --genis: 1600px;
  --golge-kagit: 0 14px 22px -12px color-mix(in srgb, var(--night) 85%, transparent),
                 0 2px 4px color-mix(in srgb, var(--night) 35%, transparent);
  /* Bölümlerin iç kenarı: ekran dar ise --kenar, geniş ise içerik 1600 px'te ortalanır */
  --ic-kenar: max(var(--kenar), calc(50% - var(--genis) / 2 + var(--kenar)));
}

html { scrollbar-color: var(--panel-hi) var(--night); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
::selection { background: var(--yellow); color: var(--ink-on-toy); }

.atla {
  position: absolute;
  z-index: 20;
  left: 16px;
  top: -100px;
  padding: 10px 16px;
  font-weight: 700;
  color: var(--ink-on-toy);
  background: var(--yellow);
  border-radius: 8px;
}
.atla:focus { top: 16px; }

a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Giriş sahnesi ---------- */

.giris {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--night);
}

.sahne {
  position: absolute;
  inset: 0;
  container-type: size;
}

/* Yazının altındaki düz koyuluk: fotoğraf üstünde metin için tek izinli geçiş */
.sahne::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 62%;
  background: linear-gradient(color-mix(in srgb, var(--night) 74%, transparent), transparent);
  pointer-events: none;
}

/* Dört katman aynı kutuda: kutu sahneyi 16:9 olarak örter, katmanlar üst üste oturur.
   Kutu sabit; telefonda kaydırma yalnızca transform ile yapılır (layout'a girmez). */
.kutu {
  --fx: 0.5;
  --fy: 0.5;
  position: absolute;
  width: max(100cqw, 177.778cqh);
  height: max(100cqh, 56.25cqw);
  left: calc((100cqw - max(100cqw, 177.778cqh)) * var(--fx));
  top: calc((100cqh - max(100cqh, 56.25cqw)) * var(--fy));
  will-change: transform;
}

.k {
  position: absolute;
  inset: 0;
  transform-origin: 50% 62%;
}

.k img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.ust {
  position: absolute;
  z-index: 2;
  top: 0;
  left: var(--kenar);
  right: var(--kenar);
  padding-top: clamp(16px, 4.5vh, 44px);
}

.logo { margin: 0 0 0 -0.9%; line-height: 0; }
.logo img { width: clamp(300px, 44vw, 660px); }

.cumle {
  max-width: 23ch;
  margin: clamp(4px, 1vh, 14px) 0 clamp(18px, 3vh, 28px);
  font-size: clamp(20px, 1.15vw + 12px, 30px);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
  text-shadow: 0 1px 2px color-mix(in srgb, var(--night) 70%, transparent);
}

.dugmeler {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  margin: 0;
}

.dugme {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 26px;
  font-family: "Boldonse", "Bricolage Grotesque", sans-serif;
  font-size: 17px;
  line-height: 1;
  color: var(--ink-on-toy);
  background: var(--yellow);
  border: 3px solid var(--ink-on-toy);
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--paper) 45%, transparent);
  text-decoration: none;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.dugme:hover { background: color-mix(in srgb, var(--yellow) 80%, var(--paper)); }
.dugme:active { transform: scale(0.97); }

.baglanti {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-shadow: 0 1px 2px color-mix(in srgb, var(--night) 80%, transparent);
}
.baglanti:hover { color: var(--yellow); }

/* ---------- Kağıt not (süs) ---------- */

.not {
  position: absolute;
  margin: 0;
  padding: 12px 18px 10px;
  font-family: "Patrick Hand", "Bricolage Grotesque", sans-serif;
  font-size: 22px;
  line-height: 1.15;
  color: var(--paper-ink);
  background: var(--paper);
  box-shadow: var(--golge-kagit);
}

/* Bant: yarı saydam, uçları tırtıklı */
.not::before,
.adim::before,
.davetiye::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 76px;
  height: 24px;
  translate: -50% 0;
  rotate: -4deg;
  background: color-mix(in srgb, var(--paper-edge) 64%, transparent);
  clip-path: polygon(0 12%, 3% 0, 97% 0, 100% 14%, 97% 32%, 100% 50%, 97% 68%, 100% 86%, 97% 100%, 3% 100%, 0 88%, 3% 70%, 0 50%, 3% 30%);
}

/* İpucu notu yalnızca hareket varken ve içeri yürüme kurulduğunda görünür */
.not-ipucu {
  display: none;
  z-index: 3;
  right: var(--kenar);
  bottom: clamp(20px, 5vh, 44px);
  rotate: 3deg;
}
.hareket .not-ipucu { display: block; }
.not-ipucu .tel { display: none; }

/* ---------- Bölüm ortakları ---------- */

.bolum-baslik {
  margin: 0 0 clamp(28px, 4vw, 56px);
  font-size: clamp(34px, 6.2vw, 88px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.ozet {
  margin: 0 0 32px;
  font-size: clamp(20px, 0.9vw + 12px, 26px);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

/* ---------- Tanıtım ---------- */

.tanitim {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  max-width: var(--genis);
  margin: 0 auto;
  padding: clamp(80px, 11vw, 170px) var(--kenar) clamp(40px, 6vw, 96px);
  overflow: clip;
}

.tanitim-baslik {
  grid-column: 1 / -1;
  margin: 0 0 clamp(28px, 4vw, 56px);
  font-size: clamp(30px, 5.4vw, 78px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.tanitim-yazi { grid-column: 1 / span 6; }
.tanitim-yazi p { margin: 0 0 18px; font-size: 18px; }
.tanitim-yazi .ozet { margin-bottom: 24px; }

.sayilar {
  grid-column: 8 / -1;
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sayilar li { display: grid; grid-template-columns: minmax(96px, auto) 1fr; align-items: center; gap: 0 20px; }
.sayilar strong {
  font-family: "Boldonse", "Bricolage Grotesque", sans-serif;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--yellow);
}
.sayilar span { font-size: 18px; color: var(--ink-dim); }

/* ---------- Modlar ---------- */

.modlar { max-width: var(--genis); margin: 0 auto; overflow: clip; }

.modlar-not { margin: 0; padding: clamp(24px, 4vw, 56px) var(--kenar) 0; }
.not-akis { position: relative; display: inline-block; rotate: -2deg; font-size: 24px; }

.mod {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding: clamp(56px, 7vw, 110px) var(--kenar) clamp(64px, 8vw, 130px);
  overflow: clip;
}

.mod-baslik {
  --olcek: 1;
  grid-column: 1 / -1;
  margin: 0 0 clamp(20px, 3vw, 44px);
  font-size: calc(clamp(46px, 9vw, 128px) * var(--olcek));
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--yellow);
  white-space: nowrap;
}
.mod-baslik-uzun { --olcek: 0.8; }

.mod-resim,
.mod-yazi { grid-row: 2; }

.mod-resim {
  grid-column: 1 / span 7;
  position: relative;
  align-self: start;
  margin: 0;
}

.cerceve {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel);
}
.cerceve video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.not-resim {
  top: -18px;
  right: -12px;
  rotate: 5deg;
  font-size: 26px;
}

.mod-yazi { grid-column: 9 / -1; }

.mod-ters .mod-resim { grid-column: 6 / span 7; }
.mod-ters .mod-yazi { grid-column: 1 / span 4; }
.mod-ters .not-resim { right: auto; left: -12px; rotate: -4deg; }

.roller { display: grid; gap: 20px; margin: 0 0 28px; }
.rol dt { font-size: 20px; font-weight: 700; line-height: 1.2; }
.rol dd { margin: 4px 0 0; font-size: 18px; }
.rol-kirmizi dt { color: var(--red); }
.rol-sonuk dt { color: var(--ink-dim); }
.rol-sari dt { color: var(--yellow); }

.kazanan { margin: 0; font-size: 18px; }
.kazanan strong { color: var(--lamp); }

/* ---------- Nasıl katılırım ---------- */

.nasil {
  max-width: var(--genis);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 110px) var(--kenar) clamp(72px, 9vw, 140px);
  overflow: clip;
}

.adimlar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.adim {
  position: relative;
  padding: 34px 28px 30px;
  color: var(--paper-ink);
  background: var(--paper);
  box-shadow: var(--golge-kagit);
}
.adim:nth-child(1) { rotate: -1.6deg; }
.adim:nth-child(2) { rotate: 1deg; margin-top: 20px; }
.adim:nth-child(3) { rotate: -0.8deg; }

.adim-no {
  display: block;
  font-family: "Boldonse", "Bricolage Grotesque", sans-serif;
  font-size: 54px;
  line-height: 1.2;
  color: var(--red);
}
.adim h3 {
  margin: 4px 0 8px;
  font-family: "Patrick Hand", "Bricolage Grotesque", sans-serif;
  font-size: 36px;
  line-height: 1.1;
}
.adim p { margin: 0; font-size: 18px; }

/* ---------- Kontroller ---------- */

.kontroller {
  padding: clamp(64px, 8vw, 120px) var(--ic-kenar) clamp(64px, 8vw, 120px);
  background: var(--panel);
  overflow: clip;
}

.kontrol-giris { margin: -12px 0 clamp(24px, 3vw, 40px); font-size: 20px; color: var(--ink-dim); }

.tuslar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 0 clamp(24px, 4vw, 64px);
  margin: 0;
}

.tus {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-hi);
}
.tus dt { display: flex; flex: 0 0 11rem; flex-wrap: wrap; gap: 6px; }
.tus dd { margin: 0; font-size: 18px; }

kbd {
  display: inline-block;
  min-width: 38px;
  padding: 4px 10px 3px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
  background: var(--panel-hi);
  border: 2px solid var(--ink-dim);
  border-bottom-width: 5px;
  border-radius: 8px;
}

/* ---------- İndir: kağıt davetiye ---------- */

.indir {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
  max-width: var(--genis);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 150px) var(--kenar) clamp(80px, 10vw, 150px);
  overflow: clip;
}

.davetiye {
  grid-column: 1 / span 7;
  position: relative;
  min-height: 300px;
  padding: clamp(32px, 4.4vw, 64px);
  color: var(--paper-ink);
  background: var(--paper);
  box-shadow: var(--golge-kagit);
  rotate: -1.2deg;
}
.davetiye::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed var(--paper-edge);
  pointer-events: none;
}

.davetiye-baslik {
  margin: 0 0 24px;
  font-size: clamp(30px, 4.6vw, 64px);
  line-height: 1.22;
  text-wrap: balance;
}

.yakinda {
  margin: 0;
  font-family: "Patrick Hand", "Bricolage Grotesque", sans-serif;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.15;
}

/* Form Görev 5'te gelir: bekleme durumunda gizli, açık durumda görünür, bekleme yazısı gider */
.indir[data-durum="yakinda"] form { display: none; }
.indir[data-durum="acik"] .yakinda { display: none; }

.davet-form { position: relative; z-index: 1; max-width: 560px; }
.davet-form[hidden], .yakinda[hidden] { display: none; }
.davet-etiket {
  display: block;
  margin-bottom: 8px;
  font-family: "Patrick Hand", "Bricolage Grotesque", sans-serif;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.15;
}
.davet-satir { display: flex; flex-wrap: wrap; gap: 12px; }
.davet-girdi {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 54px;
  padding: 0 16px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 20px;
  color: var(--paper-ink);
  background: var(--paper);
  border: 3px solid var(--paper-ink);
  border-radius: 10px;
}
.davet-girdi:focus-visible, .davet-dugme:focus-visible { outline: 3px solid var(--paper-ink); outline-offset: 3px; }
.davet-dugme { cursor: pointer; }
.davet-dugme:disabled { cursor: progress; opacity: 0.6; }
.davet-sonuc {
  min-height: 1.4em;
  margin: 16px 0 0;
  font-family: "Patrick Hand", "Bricolage Grotesque", sans-serif;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  color: var(--paper-ink);
}

.indir-yan { grid-column: 9 / -1; padding-top: 12px; }

.yan-baslik { margin: 0 0 16px; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--yellow); }

.gereksinim { display: grid; gap: 12px; margin: 0; }
.gereksinim dt { font-size: 16px; color: var(--ink-dim); }
.gereksinim dd { margin: 0; font-size: 18px; }

.not-smart {
  position: relative;
  display: inline-block;
  margin-top: 40px;
  max-width: 30ch;
  rotate: 1.5deg;
}

/* ---------- Alt ---------- */

.alt {
  padding: 32px var(--ic-kenar) 40px;
  border-top: 1px solid var(--panel-hi);
}
.alt p { margin: 0; font-size: 16px; color: var(--ink-dim); }

/* ---------- Telefon ---------- */

@media (max-width: 768px) {
  .kutu { --fx: 0.42; }
  .logo img { width: min(100%, 520px); }
  .hareket .not-ipucu .masa { display: none; }
  .hareket .not-ipucu .tel { display: inline; }
  .not-ipucu { font-size: 20px; }

  .tanitim-yazi,
  .sayilar { grid-column: 1 / -1; }
  .sayilar { margin-top: 36px; }

  .mod-resim,
  .mod-yazi { grid-row: auto; }
  .mod-resim,
  .mod-yazi,
  .mod-ters .mod-resim,
  .mod-ters .mod-yazi { grid-column: 1 / -1; }
  .mod-yazi { margin-top: 40px; }
  .not-resim { right: 10px; top: -16px; font-size: 22px; }
  .mod-ters .not-resim { left: auto; right: 10px; }

  .adimlar { grid-template-columns: 1fr; gap: 36px; }
  .adim:nth-child(2) { margin-top: 0; }
  .adim { padding: 36px 36px 32px; }
  .adim:nth-child(1) { rotate: -0.8deg; }
  .adim:nth-child(2) { rotate: 0.5deg; }
  .adim:nth-child(3) { rotate: -0.4deg; }

  .tus dt { flex-basis: 11rem; }

  .davetiye,
  .indir-yan { grid-column: 1 / -1; }
  .davetiye { padding: 40px 36px; rotate: -0.6deg; }
  .indir-yan { margin-top: 48px; }
}

/* Telefonda içeri yürüme: kamera kutuyu soldan sağa gezer (JS transform ile) */
@media (max-width: 768px) and (min-height: 501px) {
  .hareket .kutu { --fx: 0.2; }
}

/* Alçak ekran (yatay telefon): sabitleme yok, giriş sığar, ipucu notu yok */
@media (max-height: 500px) {
  .giris { min-height: 0; }
  .hareket .not-ipucu { display: none; }
}

/* JS gelene kadar giriş parçaları gizli; JS yoksa ya da hareket azaltılmışsa sınıf hiç eklenmez */
.hareket .logo,
.hareket .cumle,
.hareket .ust .dugmeler,
.hareket .not-ipucu,
.hareket .k-arka img,
.hareket .k-orta img,
.hareket .k-on img { visibility: hidden; }
