/* ---- fontlar (self-hosted, anında yüklensin) ---- */
@font-face {
  font-family: "Patrick Hand";
  font-style: normal; font-weight: 400; font-display: block;
  src: url("assets/fonts/patrick-hand-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Patrick Hand";
  font-style: normal; font-weight: 400; font-display: block;
  src: url("assets/fonts/patrick-hand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Caveat";
  font-style: normal; font-weight: 700; font-display: block;
  src: url("assets/fonts/caveat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Caveat";
  font-style: normal; font-weight: 700; font-display: block;
  src: url("assets/fonts/caveat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- defter kağıdı ---- */
* { box-sizing: border-box; }

:root {
  --murekkep: #26261f;
  --kirmizi: #d4453a;
  --kagit: #fbf8ef;
  --cizgi: rgba(110, 160, 210, 0.25);
  --el-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  font-size: clamp(17px, 4.4vw, 21px);
  color: var(--murekkep);
  background-color: var(--kagit);
  background-image:
    linear-gradient(to right, transparent 0, transparent calc(8% - 1px), rgba(212, 69, 58, 0.28) calc(8% - 1px), rgba(212, 69, 58, 0.28) 8%, transparent 8%),
    repeating-linear-gradient(to bottom, transparent 0, transparent 31px, var(--cizgi) 31px, var(--cizgi) 32px);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

main {
  min-height: 100vh;  /* dvh bilmeyen tarayıcılar için */
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
  align-content: center;
  place-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  position: relative;
}

/* ---- kartlar ---- */
/* tüm kartlar aynı hücrede üst üste durur: geçişte layout zıplamaz */
.kart {
  display: none;
  grid-row: 1;
  grid-column: 1;
  align-self: center;
  width: 100%;
  background: #fffdf6;
  border: 2.5px solid var(--murekkep);
  border-radius: var(--el-radius);
  padding: clamp(20px, 6vw, 40px) clamp(18px, 5.5vw, 36px);
  box-shadow: 4px 6px 0 rgba(38, 38, 31, 0.14);
  text-align: center;
  position: relative;
  transform: rotate(-0.6deg);
}
.kart:nth-child(even) { transform: rotate(0.5deg); }

.kart.aktif { display: block; animation: gel 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) both; will-change: transform, opacity; }
.kart.gidiyor { display: block; animation: git 0.45s ease-in both; pointer-events: none; will-change: transform, opacity; z-index: 2; }

@keyframes gel {
  from { opacity: 0; transform: translateY(48px) rotate(5deg) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) rotate(-0.6deg) scale(1); }
}
@keyframes git {
  to { opacity: 0; transform: translateX(-70vw) rotate(-18deg); }
}

/* tape strip */
.bant {
  position: absolute;
  top: -14px; left: 50%;
  width: 96px; height: 28px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(240, 225, 160, 0.6);
  border-left: 1px dashed rgba(0,0,0,0.12);
  border-right: 1px dashed rgba(0,0,0,0.12);
}

/* ---- yazılar ---- */
h1, h2 { font-family: "Caveat", cursive; font-weight: 700; margin: 0.2em 0 0.4em; line-height: 1.05; }
.dev { font-size: clamp(64px, 22vw, 120px); }
.dev.kucuk { font-size: clamp(44px, 13vw, 72px); }
h2 { font-size: clamp(34px, 9.5vw, 52px); }
.soru { text-decoration: underline wavy var(--kirmizi) 2.5px; text-underline-offset: 8px; }
.buyuk { font-size: 1.25em; margin: 0.4em 0; }
.minik { font-size: 0.72em; opacity: 0.65; }
p { margin: 0.5em 0; }

.karala {
  text-decoration: line-through;
  text-decoration-color: var(--kirmizi);
  text-decoration-thickness: 2.5px;
}

.liste { list-style: none; text-align: left; padding: 0 0 0 4px; margin: 0.8em 0 1.2em; }
.liste li { margin: 0.55em 0; line-height: 1.35; }

/* ---- düğmeler ---- */
.dugme {
  font: inherit;
  font-size: 1.1em;
  color: var(--murekkep);
  background: #fff;
  border: 2.5px solid var(--murekkep);
  border-radius: 225px 12px 255px 12px / 12px 255px 12px 225px;
  padding: 10px 26px;
  cursor: pointer;
  margin-top: 14px;
  box-shadow: 3px 3px 0 rgba(38, 38, 31, 0.2);
  transition: transform 0.12s, box-shadow 0.12s;
  touch-action: manipulation;
}
.dugme:active { transform: translate(2px, 2px) rotate(-1deg); box-shadow: 0 0 0 rgba(0,0,0,0); }
@media (hover: hover) {
  .dugme:hover { transform: rotate(-1.5deg) scale(1.04); }
}

/* ---- evet veya evet ---- */
.evet-veya-evet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 5vw, 32px);
  margin: 18px 0 6px;
}
.kutu {
  font: inherit;
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--murekkep);
  touch-action: manipulation;
  padding: 8px;
}
.kutucuk {
  width: clamp(56px, 17vw, 84px);
  height: clamp(56px, 17vw, 84px);
  border: 2.5px solid var(--murekkep);
  border-radius: 25px 8px 22px 8px / 8px 22px 8px 25px;
  display: grid; place-items: center;
  background: #fff;
  position: relative;
  transition: transform 0.15s;
}
.kutu:active .kutucuk { transform: scale(0.92) rotate(-3deg); }
.kutucuk.isaretli::after {
  content: "✗";
  font-family: "Caveat", cursive;
  font-size: clamp(52px, 15vw, 80px);
  color: var(--kirmizi);
  line-height: 0;
  transform: rotate(-8deg);
  animation: ciz 0.25s ease-out;
}
@keyframes ciz { from { opacity: 0; transform: scale(2.5) rotate(15deg); } }
.etiket { font-size: 1.3em; }
.veya { font-family: "Caveat", cursive; font-size: 1.5em; opacity: 0.8; }

.kedi { width: clamp(110px, 34vw, 170px); margin-top: 4px; }
.kedi.mutlu { width: clamp(130px, 40vw, 200px); animation: zipla 0.9s ease-in-out infinite alternate; }
@keyframes zipla { from { transform: rotate(-4deg); } to { transform: rotate(4deg) translateY(-6px); } }

/* ---- seçenek kartları ---- */
.secenekler {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 4px;
}
.secenekler.dikey { grid-template-columns: 1fr; }
.secenek {
  font: inherit;
  color: var(--murekkep);
  background: #fff;
  border: 2.5px solid var(--murekkep);
  border-radius: 20px 6px 24px 6px / 6px 24px 6px 20px;
  padding: 12px 8px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 3px 3px 0 rgba(38, 38, 31, 0.15);
  transition: transform 0.12s;
  touch-action: manipulation;
  line-height: 1.2;
}
.secenek:nth-child(1) { transform: rotate(-1.2deg); }
.secenek:nth-child(2) { transform: rotate(0.8deg); }
.secenek:nth-child(3) { transform: rotate(1deg); }
.secenek:nth-child(4) { transform: rotate(-0.7deg); }
.secenek:active { transform: scale(0.94); }
@media (hover: hover) {
  .secenek:hover { transform: rotate(0deg) scale(1.05); background: #fdf3d8; }
}
.secenek img { width: clamp(60px, 18vw, 96px); height: auto; }
.secenek.yazi { padding: 14px 10px; font-size: 1.15em; }

/* ---- form ---- */
.alan { display: block; text-align: left; margin: 12px 0; }
.alan > span { display: block; margin-bottom: 4px; }
.alan > span .minik { display: inline; }
.alan input, .alan textarea {
  font: inherit;
  width: 100%;
  border: none;
  border-bottom: 2.5px solid var(--murekkep);
  background: transparent;
  padding: 6px 4px;
  outline: none;
  border-radius: 0;
  color: var(--murekkep);
}
.alan input:focus, .alan textarea:focus { background: #fdf3d8; }
.alan textarea { resize: none; border: 2.5px solid var(--murekkep); border-radius: 14px 5px 16px 5px / 5px 16px 5px 14px; }

.gonder-satir {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}
.kacak {
  position: relative;
  opacity: 0.75;
  font-size: 0.9em;
  z-index: 30;
  transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.hata { color: var(--kirmizi); }
.sallan { animation: sallan 0.4s ease-in-out; }
@keyframes sallan {
  0%, 100% { transform: translateX(0) rotate(-0.6deg); }
  25% { transform: translateX(-9px) rotate(-1.5deg); }
  75% { transform: translateX(9px) rotate(0.5deg); }
}

/* ---- final ---- */
.linkler { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 6px; }
.linkler a { color: var(--murekkep); text-decoration: underline wavy var(--kirmizi) 2px; text-underline-offset: 5px; font-size: 1.1em; }
/* ---- ufak şeyler ---- */
.gizli { display: none; }

/* boş vesikalık çerçevesi */
.vesikalik {
  width: clamp(110px, 34vw, 150px);
  aspect-ratio: 3 / 4;
  margin: 0 auto 6px;
  border: 2.5px dashed var(--murekkep);
  border-radius: 14px 5px 16px 5px / 5px 16px 5px 14px;
  transform: rotate(2.2deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #fff;
  padding: 8px;
}
.vesikalik-ust {
  font-family: "Caveat", cursive;
  font-size: 1.05em;
  opacity: 0.6;
}
.vesikalik-goz {
  font-family: "Caveat", cursive;
  font-size: clamp(34px, 10vw, 48px);
  color: var(--kirmizi);
  opacity: 0.5;
  line-height: 1;
  animation: zipla 1.6s ease-in-out infinite alternate;
}
.vesikalik-alt { font-size: 0.62em; opacity: 0.65; line-height: 1.3; }

/* uçuşan kalpler */
.kalp {
  position: fixed;
  font-family: "Caveat", cursive;
  pointer-events: none;
  z-index: 90;
  animation: uc 1.1s ease-out forwards;
  user-select: none;
}
@keyframes uc {
  from { opacity: 1; transform: translateY(0) rotate(0deg) scale(0.6); }
  to   { opacity: 0; transform: translateY(-90px) rotate(20deg) scale(1.4); }
}

/* konfeti */
.konfeti {
  position: fixed;
  top: -40px;
  font-family: "Caveat", cursive;
  pointer-events: none;
  z-index: 80;
  animation: dus linear forwards;
  user-select: none;
}
@keyframes dus {
  to { transform: translateY(110vh) rotate(360deg); }
}

/* çok küçük ekranlar (iphone SE ve altı) */
@media (max-width: 350px) {
  body { font-size: 16px; }
  .secenekler { gap: 8px; }
  .kart { padding: 18px 14px; }
}

/* kısa ekranlar: kediyi küçült ki kart sığsın */
@media (max-height: 640px) {
  .kedi { width: 96px; }
  .vesikalik { width: 96px; }
  h2 { font-size: clamp(28px, 8vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  .kart.aktif, .kart.gidiyor, .kedi.mutlu { animation: none; }
}
