/* kozalak.net
   Sıcak beyaz zemin, mürekkep siyahı, kozalak turuncusu. Fontlar yerel (OFL). */

@font-face { font-family: "Bricolage"; src: url("/fonts/Bricolage-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/Onest-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/Onest-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/Onest-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #FFFBF6;
  --ink: #191410;
  --body: #4A423B;
  --muted: #6E655C;
  --line: #EADFD3;
  --accent: #E05A12;      /* yalnız büyük yazı ve süs; küçük yazıda kontrast yetmez */
  --accent-soft: #FFEBDD;
  --pad: clamp(20px, 5vw, 56px);
  --display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --text: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent-soft); color: var(--ink); }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(224, 90, 18, .5); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 800 24px/1 var(--display);
  letter-spacing: -.035em;
}
.logo img { width: auto; height: 34px; display: block; }

/* ---------------------------------------------------------------- 3D sahne (anasayfa) */

.sahne-sayfa {
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 42%, #FFFDF9 0%, var(--bg) 55%, #F7EEE3 100%);
}

.sahne { position: fixed; inset: 0; }
.sahne canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;           /* sürükleme sayfayı kaydırmasın */
  cursor: grab;
  outline: none;
  opacity: 0;                   /* ilk kare çizilince belirir (.hazir) */
  transition: opacity 1.2s var(--ease);
}
.sahne canvas.hazir { opacity: 1; }
.sahne canvas.pulda { cursor: pointer; }
.sahne canvas.tutuyor { cursor: grabbing; }
.sahne canvas:focus-visible { box-shadow: inset 0 0 0 3px rgba(224, 90, 18, .45); }
.sahne.desteksiz { display: grid; place-items: center; color: var(--muted); }

.sahne-ust {
  position: fixed;
  top: max(var(--pad), env(safe-area-inset-top));
  left: max(var(--pad), env(safe-area-inset-left));
  z-index: 2;
}

/* Sol sütun: başlık, tek satır açıklama, e-posta. Geniş ekranda solda dikey ortalı;
   telefonda başlık üstte, form altta, arada kozalak (kap dokunmaları geçirir). */
.sahne-sol {
  position: fixed;
  z-index: 1;
  left: max(var(--pad), env(safe-area-inset-left));
  top: 50%;
  translate: 0 -50%;
  width: min(27rem, 36vw);
  pointer-events: none;
}
.sahne-sol .sahne-form, .sahne-sol a { pointer-events: auto; }
.sahne-baslik {
  margin: 0;
  font: 800 clamp(2.6rem, 5.2vw, 5rem)/1.0 var(--display);
  letter-spacing: -.035em;
  animation: rise 1s .2s var(--ease) both;
}
.sahne-alt {
  margin: 18px 0 26px;
  max-width: 24rem;
  color: var(--body);
  font-size: 17px;
  line-height: 1.5;
  animation: rise 1s .3s var(--ease) both;
}
.sahne-form { animation: rise 1s .4s var(--ease) both; }

@media (max-width: 899px) {
  .sahne-sol {
    inset: 0;
    translate: none;
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(max(var(--pad), env(safe-area-inset-top)) + 56px) var(--pad) max(16px, env(safe-area-inset-bottom));
  }
  .sahne-baslik { font-size: clamp(2rem, 9vw, 2.8rem); }
  .sahne-alt { margin: 10px 0 0; max-width: 20rem; font-size: 15px; line-height: 1.45; }
}

/* ---------------------------------------------------------------- form */

.join, .done { width: 100%; max-width: 27rem; }

.field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(25, 20, 16, .03), 0 18px 40px -22px rgba(143, 50, 7, .35);
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(224, 90, 18, .16), 0 18px 40px -22px rgba(143, 50, 7, .35); }
.join.bad-email .field { border-color: var(--danger); }

.field input {
  flex: 1;
  width: 0;        /* doğal genişliği satırı esnetmesin */
  min-width: 0;
  height: 46px;
  padding: 0 6px 0 18px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: 500 16px/1 var(--text);   /* 16px: iOS odaklanınca yakınlaştırmasın */
}
.field input::placeholder { color: #9C9188; }
.field .btn { height: 46px; padding: 0 18px 0 20px; gap: 8px; border: 0; cursor: pointer; position: relative; flex: none; }
.arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.join.busy .btn { cursor: progress; }
.join.busy .btn > * { opacity: 0; }
.join.busy .btn::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border: 2.2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* Onay satırı: e-postaya odaklanınca ya da yazı varken görünür. */
.consent {
  position: relative;
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 4px 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
  animation: rise .35s var(--ease) both;
}
.join:focus-within .consent, .join.dolu .consent, .join.bad-onay .consent { display: flex; }
.consent input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.box {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border: 1.5px solid #C8BBAD;
  border-radius: 6px;
  background: #fff;
  transition: background .15s, border-color .15s;
}
.box::after {
  content: "";
  width: 10px; height: 5.5px;
  border: 2.2px solid #fff;
  border-top: 0; border-right: 0;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform .18s var(--ease);
}
.consent input:checked + .box { background: var(--ink); border-color: var(--ink); }
.consent input:checked + .box::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.consent input:focus-visible + .box { outline: 3px solid rgba(224, 90, 18, .5); outline-offset: 2px; }
.join.bad-onay .box { border-color: var(--danger); }
.consent a { color: var(--ink); font-weight: 500; text-underline-offset: 2px; white-space: nowrap; }

.status { margin: 8px 4px 0; font-size: 14px; line-height: 1.45; color: var(--danger); }
.status:empty { display: none; }

/* Bal tuzağı: ekran dışında, ekran okuyucudan da gizli. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.done {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px 12px 12px;
  border-radius: 24px;
  background: #fff;
  border: 1.5px solid var(--line);
  box-shadow: 0 18px 40px -22px rgba(143, 50, 7, .35);
  outline: none;
  animation: pop .55s cubic-bezier(.2, 1.3, .4, 1) both;
}
.done-ust svg {
  flex: none;
  width: 42px; height: 42px;
  padding: 10px;
  border-radius: 50%;
  background: var(--accent);
  fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.done-ust path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s .25s var(--ease) forwards; }
.done p { margin: 0; color: var(--body); font-size: 15px; line-height: 1.4; }
.done strong { display: block; color: var(--ink); font-weight: 600; font-size: 16px; }
.done { flex-wrap: wrap; }
.done-ust { display: flex; align-items: center; gap: 14px; flex: 1 1 100%; }
.done-eylem { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; padding-left: 56px; margin-top: 2px; }
.done-eylem:empty, .done-eylem[hidden] { display: none; }
.hafif {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: 600 14px/1 var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.hafif[hidden] { display: none; }
.hafif:hover { border-color: #D9C8B6; background: #fff; }
.hafif:focus-visible { outline: 3px solid rgba(224, 90, 18, .45); outline-offset: 2px; }
.hafif svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hafif.secili { border-color: var(--accent); background: var(--accent-soft); color: #8F3207; cursor: default; }
.done-not { flex: 1 1 100%; padding-left: 56px; font-size: 13.5px !important; color: var(--muted) !important; }
.done-not:empty { display: none; }

@media (max-width: 359px) {
  .done-eylem, .done-not { padding-left: 0; }
  .done-eylem { gap: 6px; }
  .hafif { padding: 0 12px; font-size: 13.5px; }
  .kart-kategori { font-size: 11px; letter-spacing: .1em; }
  .kart-sayi { display: none; }
  .field input { padding-left: 14px; }
  .field .btn { padding: 0 14px; }
  .field .btn .arrow { display: none; }
}

/* Seçilen pulun etiketi.
   Dar ekranda: altta cam kart. Geniş ekranda (.yanda): pulun ucuna ince bir çizgiyle bağlı,
   kozalağın sağında serbest duran yazı; konumu (--x, --y, --metin) her karede JS'ten gelir. */
.kart {
  --kart-alt: max(28px, env(safe-area-inset-bottom));
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: var(--kart-alt);
  translate: -50% 0;
  min-width: min(300px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  padding: 15px 26px 18px;
  border-radius: 22px;
  background: rgba(255, 253, 250, .95);   /* bulanıklık yok: telefonda her kare yeniden hesaplanır */
  border: 1px solid rgba(234, 223, 211, .9);
  box-shadow: 0 24px 48px -24px rgba(90, 40, 10, .35);
  text-align: center;
  opacity: 0;
  transform: translateY(12px) scale(.97);
  transition: opacity .25s var(--ease), transform .35s var(--ease);
  pointer-events: none;
}
.kart.acik { opacity: 1; transform: none; }
.kart-nokta, .kart-cizgi { display: none; }
@media (max-width: 899px) {
  .kart { bottom: calc(var(--form-boy, 64px) + max(16px, env(safe-area-inset-bottom)) + 12px); padding: 12px 20px 14px; width: max-content; }
  .kart-kategori { letter-spacing: .1em; }
}

.kart-kategori {
  margin: 0 0 4px;
  font: 600 12px/1.3 var(--text);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #A8430D;                       /* koyu turuncu: küçük yazıda yeterli kontrast */
}
.kart-kategori-ad::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}
.kart-sayi {
  white-space: nowrap;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  letter-spacing: .06em;
}
.kart-meslek {
  margin: 0;
  font: 800 clamp(1.7rem, 5.4vw, 2.2rem)/1.06 var(--display);
  letter-spacing: -.03em;
  color: var(--ink);
}
.kart-harfler .kelime { display: inline-block; white-space: nowrap; }
.kart-harfler .kelime > span { display: inline-block; }
.kart.acik .kart-kategori { animation: kayarak .5s .08s var(--ease) both; }
.kart.acik .kart-harfler .kelime > span {
  animation: harf .6s var(--ease) both;
  animation-delay: calc(.16s + var(--i) * 26ms);
}

/* Geniş ekran: pula bağlı etiket */
.kart.yanda {
  left: 0;
  top: 0;
  bottom: auto;
  translate: none;
  min-width: 0;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: left;
  transform: translate3d(var(--x, 0), var(--y, 0), 0);
  transition: opacity .3s var(--ease);
}
.kart.yanda.arkada { opacity: 0; }
.kart.yanda .kart-nokta {
  display: block;
  position: absolute;
  left: -5px; top: -5px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 251, 246, .85);
}
.kart.yanda .kart-cizgi {
  display: block;
  position: absolute;
  left: 9px; top: -.75px;
  width: calc(var(--metin, 60px) - 21px);
  height: 1.5px;
  background: var(--ink);
  transform-origin: left center;
}
.kart.yanda .kart-govde {
  position: absolute;
  left: var(--metin, 60px);
  top: 0;
  translate: 0 -50%;
  width: max-content;
  max-width: min(22rem, calc(100vw - var(--x, 0px) - var(--metin, 60px) - 24px));
}
.kart.yanda .kart-meslek { font-size: clamp(2.2rem, 3.4vw, 3.4rem); line-height: 1; }
.kart.yanda.acik .kart-nokta { animation: nokta .35s var(--ease) both; }
.kart.yanda.acik .kart-cizgi { animation: cizgi .45s .05s var(--ease) both; }

.ipucu {
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: max(34px, env(safe-area-inset-bottom));
  translate: -50% 0;
  margin: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(25, 20, 16, .82);
  color: #fff;
  font: 500 14px/1 var(--text);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .5s var(--ease), bottom .45s var(--ease);
  animation: rise .9s 1.2s var(--ease) both;
}
.ipucu.gizli { opacity: 0; }
/* Kozalak kendi kendine pul gösterirken ipucu kartın üstüne çıkar. */
@media (max-width: 899px) {
  .ipucu { bottom: calc(var(--form-boy, 64px) + max(16px, env(safe-area-inset-bottom)) + 16px); }
  .kart.acik ~ .ipucu { opacity: 0; }
}

/* Karşılama sesi: sağ üstte aç/kapat düğmesi (ses dosyası yoksa görünmez). */
.ses {
  position: fixed;
  z-index: 2;
  top: max(var(--pad), env(safe-area-inset-top));
  right: max(var(--pad), env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 246, .88);
  color: var(--ink);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
  animation: rise .9s .6s var(--ease) both;
}
.ses[hidden] { display: none; }
.ses:hover { background: var(--accent-soft); border-color: #F5C9AA; }
.ses:focus-visible { outline: 3px solid rgba(224, 90, 18, .45); outline-offset: 2px; }
.ses svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ses .hoparlor { fill: currentColor; }
.ses .dalga { opacity: .35; transition: opacity .2s; }
.ses.caliyor { color: var(--accent); border-color: #F5C9AA; }
.ses.caliyor .dalga { opacity: 1; animation: dalga 1.4s ease-in-out infinite; }
.ses.caliyor .dalga + .dalga { animation-delay: .2s; }
@keyframes dalga { 50% { opacity: .35; } }

/* Fareyle üzerine gelince meslek adı */
.etiket {
  position: fixed;
  z-index: 3;
  left: 0; top: 0;
  padding: 6px 11px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font: 600 13px/1.2 var(--text);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4);
}

/* ---------------------------------------------------------------- kısa sayfalar (404) */

.simple { display: grid; place-items: center; padding: var(--pad); }
.note { position: relative; z-index: 1; width: 100%; max-width: 32rem; animation: rise .8s var(--ease) both; }
.note .logo { margin-bottom: 44px; }
.note h1 { margin: 0 0 12px; font: 800 clamp(2.1rem, 8vw, 3rem)/1.05 var(--display); letter-spacing: -.035em; }
.note p { margin: 0 0 26px; color: var(--body); font-size: 17px; line-height: 1.6; }
.note-paylas a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

.note form { margin: 0; }

/* Uzun metin (aydınlatma) */
.simple.long { place-items: start center; }
.doc { max-width: 40rem; padding: 8px 0 40px; }
.doc h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); }
.doc h2 { margin: 30px 0 8px; font: 600 18px/1.35 var(--text); color: var(--ink); }
.doc p, .doc li { margin: 0 0 12px; font-size: 16px; color: var(--body); line-height: 1.65; }
.doc ul { margin: 0 0 12px; padding-left: 20px; }
.doc a { color: var(--ink); font-weight: 500; text-underline-offset: 2px; }
.doc .meta { font-size: 14px; color: var(--muted); }
.doc .todo { padding: 2px 6px; border-radius: 6px; background: #FFF1C2; color: var(--ink); }
.back { display: inline-block; margin-top: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 600 16px/1 var(--text);
  text-decoration: none;
  transition: background .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #000; }
.btn:active { transform: scale(.97); }

/* 404'te arka plandaki kozalak deseni (tabandan bakış, altın açı). */
.cone {
  position: fixed;
  z-index: 0;
  top: 50%;
  right: calc(-1 * min(30vw, 42vh));
  width: min(84vh, 62vw);
  aspect-ratio: 1;
  translate: 0 -50%;
  pointer-events: none;
  animation: cone-in 1.6s var(--ease) both;
}
.cone img { display: block; width: 100%; height: 100%; animation: spin 240s linear infinite; }
@media (max-width: 899px) {
  .cone { top: -45vw; right: -60vw; width: 120vw; translate: none; }
}

/* ---------------------------------------------------------------- yatay telefon
   Yazılar solda, kozalak sağda; kart ve ipucu sağ altta. */
@media (max-width: 899px) and (min-aspect-ratio: 13/10) and (max-height: 559px) {
  .sahne-sol {
    inset: auto;
    left: max(var(--pad), env(safe-area-inset-left));
    top: 50%;
    translate: 0 -50%;
    width: min(23rem, 46vw);
    display: block;
    padding: 0;
  }
  .sahne-ust { top: max(14px, env(safe-area-inset-top)); }
  .sahne-baslik { font-size: clamp(1.7rem, 4.6vw, 2.4rem); }
  .sahne-alt { margin: 8px 0 14px; font-size: 14px; line-height: 1.4; }
  .consent { margin-top: 8px; font-size: 12.5px; }
  .ses { top: max(14px, env(safe-area-inset-top)); width: 40px; height: 40px; }
  .kart, .ipucu {
    left: auto;
    right: max(16px, env(safe-area-inset-right));
    translate: none;
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .kart { min-width: 0; max-width: calc(54vw - 32px); padding: 10px 18px 12px; }
  .kart-meslek { font-size: 1.5rem; }
  .done-eylem, .done-not { padding-left: 0; }
  /* Kayıttan sonra kart uzar; başlık logoya binmesin diye alt yazı çekilir. */
  .sahne-sol:has(.done:not([hidden])) .sahne-alt { display: none; }
  .sahne-sol:has(.done:not([hidden])) .sahne-baslik { margin-bottom: 14px; }
}

/* ---------------------------------------------------------------- hareket */

@keyframes belir { from { opacity: 0; } }
@keyframes harf { from { opacity: 0; transform: translateY(.5em) rotate(8deg); } }
@keyframes kayarak { from { opacity: 0; transform: translateX(-8px); } }
@keyframes cizgi { from { transform: scaleX(0); } }
@keyframes nokta { from { transform: scale(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cone-in { from { opacity: 0; scale: .92; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(6px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .done-ust path { stroke-dashoffset: 0; }
}
