/* =========================================================
   İletişim — dijital klaket (seçilen: iletisim-ornekleri-2.html #03)
   Solda açık iletişim bilgisi, sağda form olan klaket: tahtanın satırları alanlar,
   LED'de o anın 25 fps zaman kodu. Kol, alana girilince açılır; gönderince vurur.
   Hareket: assets/js/contact.js
   ========================================================= */

.contact__grid {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 6vw, 104px); align-items: center;
}
.contact__lead {
  margin: 22px 0 0; max-width: 34ch; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4;
  font-weight: 500; letter-spacing: -.012em; color: var(--sub);
}
html[dir="rtl"] .contact__lead { letter-spacing: 0; }

/* Kanallar: etiketli satırlar (e-posta / telefon / Instagram) */
.contact__channels { margin: clamp(32px, 4vw, 48px) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--hairline); }
.contact__channels li { border-bottom: 1px solid var(--hairline); }
.contact__channels a {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: baseline; gap: 12px;
  padding: 16px 0;
}
.contact__k { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
html[dir="rtl"] .contact__k { letter-spacing: 0; font-size: 13px; }
.contact__v { overflow-wrap: anywhere; font-size: clamp(18px, 1.5vw, 22px); font-weight: 600; letter-spacing: -.02em; color: var(--text); }
html[dir="rtl"] .contact__v { text-align: end; justify-self: start; }
.contact__channels svg {
  width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; color: var(--soft);
  transition: transform .5s var(--ease), color .3s;
}
.contact__channels a:hover svg { transform: translate(2px, -2px); color: var(--text); }
html[dir="rtl"] .contact__channels svg { transform: scaleX(-1); }
html[dir="rtl"] .contact__channels a:hover svg { transform: scaleX(-1) translate(2px, -2px); }

/* ---------- Klaket ---------- */
.slate {
  --open: -5deg; --hinge: clamp(14px, 1.6vw, 22px);
  --stripe: clamp(20px, 2.4vw, 34px); --ink: #141318; --chalk: #f3f1ec;
  position: relative; padding-top: clamp(40px, 5vw, 72px);
}
.slate.is-ready { --open: -13deg; }
.slate__sticks { position: relative; height: clamp(52px, 5.6vw, 76px); }
.slate__stick {
  position: absolute; left: 0; right: 0; height: calc(50% - 2px); border-radius: 5px; overflow: hidden;
  background: repeating-linear-gradient(-56deg, var(--ink) 0 var(--stripe), #f6f5f1 0 calc(var(--stripe) * 2));
  box-shadow: inset 0 0 0 2px var(--ink);
}
.slate__stick--base { bottom: 0; background: repeating-linear-gradient(56deg, var(--ink) 0 var(--stripe), #f6f5f1 0 calc(var(--stripe) * 2)); }
.slate__stick--arm { top: 0; transform-origin: var(--hinge) 100%; transform: rotate(var(--open)); transition: transform .6s var(--ease); }
html[dir="rtl"] .slate__stick--arm { transform-origin: calc(100% - var(--hinge)) 100%; transform: rotate(calc(var(--open) * -1)); }
.slate__hinge {
  position: absolute; z-index: 2; inset-inline-start: clamp(6px, .8vw, 11px); top: 50%;
  width: clamp(16px, 1.8vw, 24px); aspect-ratio: 1; border-radius: 50%; transform: translateY(-50%);
  background: radial-gradient(circle at 40% 35%, #8a8990, #2a292f 60%); box-shadow: 0 0 0 2px var(--ink);
}

.slate__board {
  position: relative; margin-top: 3px; overflow: hidden; border-radius: 4px 4px 16px 16px;
  background: radial-gradient(120% 90% at 30% 0%, #1f1e24, #121116 70%); color: var(--chalk);
  box-shadow: 0 50px 80px -40px rgba(20, 16, 30, .6), 0 16px 34px -20px rgba(20, 16, 30, .5);
}
.slate__board::after { /* akrilik doku */
  content: ""; position: absolute; inset: 0; opacity: .07; mix-blend-mode: screen; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Tahtaya basılı üst satır: logo + sahne / çekim / tarih */
.slate__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  padding: clamp(14px, 1.4vw, 18px) clamp(14px, 1.6vw, 22px); border-bottom: 1.5px solid rgba(243, 241, 236, .2);
}
.slate__logo { width: auto; height: clamp(15px, 1.3vw, 18px); filter: brightness(0) invert(.95); }
.slate__meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(243, 241, 236, .5);
}
.slate__meta b { margin-inline-start: 4px; color: var(--chalk); font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
html[dir="rtl"] .slate__meta { letter-spacing: 0; font-size: 13px; }

/* Alanlar */
.slate__grid { display: grid; grid-template-columns: 1fr 1fr; }
.slate__cell {
  position: relative; display: grid; align-content: start; gap: 6px; min-width: 0;
  padding: clamp(12px, 1.3vw, 18px) clamp(14px, 1.6vw, 22px);
  border-bottom: 1.5px solid rgba(243, 241, 236, .2); cursor: text; transition: background-color .3s;
}
.slate__cell--full { grid-column: 1 / -1; }
.slate__cell:not(.slate__cell--full) + .slate__cell:not(.slate__cell--full) { border-inline-start: 1.5px solid rgba(243, 241, 236, .2); }
.slate__cell:focus-within { background: rgba(243, 241, 236, .04); }
.slate__k { font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(243, 241, 236, .62); }
html[dir="rtl"] .slate__k { letter-spacing: 0; font-size: 13px; }
.slate__cell input,
.slate__cell textarea {
  display: block; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; outline: none; resize: none; overflow: hidden;
  color: #f7f5f0; caret-color: #ff3b30; font: inherit; font-size: clamp(18px, 1.7vw, 24px); font-weight: 600; letter-spacing: -.02em; line-height: 1.3;
}
html[dir="rtl"] .slate__cell input, html[dir="rtl"] .slate__cell textarea { letter-spacing: 0; }
.slate__cell input::placeholder,
.slate__cell textarea::placeholder { color: rgba(243, 241, 236, .26); opacity: 1; }
.slate__cell textarea { min-height: 2.6em; }

/* Alt satır: LED zaman kodu + gönder */
.slate__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(14px, 1.6vw, 20px) clamp(14px, 1.6vw, 22px);
}
.slate__led {
  position: relative; direction: ltr; padding: 8px 14px 7px; border-radius: 8px; background: #08080a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  font-family: "Inter Tight", system-ui, sans-serif; font-size: clamp(24px, 2.6vw, 36px); font-weight: 600;
  letter-spacing: .02em; line-height: 1; font-variant-numeric: tabular-nums;
}
.slate__led-ghost { color: rgba(255, 59, 48, .08); }
.slate__led-on {
  position: absolute; left: 14px; top: 8px; color: #ff3b30;
  text-shadow: 0 0 10px rgba(255, 59, 48, .7), 0 0 26px rgba(255, 59, 48, .35);
}
.slate.is-sent .slate__led-on { animation: slate-blink 1s steps(2) 3; }
@keyframes slate-blink { 50% { opacity: .25; } }
.slate__send {
  display: inline-flex; align-items: center; gap: 12px; height: 54px; padding: 0 26px 0 22px; border-radius: 999px;
  background: #f6f5f1; color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  transition: transform .5s var(--ease), background-color .3s;
}
.slate__send:hover { background: #fff; }
.slate__send:active { transform: scale(.97); }
.slate__send i { width: 11px; height: 11px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 4px rgba(255, 59, 48, .18); }
.slate.is-sent .slate__send { pointer-events: none; opacity: .6; }
.slate__flash { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }

/* Gönderim durumu (contact.js → Supabase "contact" işlevi) ve bot tuzağı */
.slate__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.slate.is-busy .slate__send { pointer-events: none; opacity: .6; }

/* Durum şeridi (gönderiliyor / hata): tahtanın son satırı, hücrelerle aynı iç boşluk */
.slate__status { margin: 0; }
.slate__status:not(:empty) {
  display: flex; align-items: center; gap: 12px;
  padding: 14px clamp(14px, 1.6vw, 22px) 16px; border-top: 1.5px solid rgba(243, 241, 236, .2);
  font-size: 15px; font-weight: 500; line-height: 1.4; letter-spacing: -.005em; color: rgba(243, 241, 236, .78);
}
.slate__status:not(:empty)::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(243, 241, 236, .5);
}
.slate__status[data-kind="busy"]::before { background: #ff3b30; box-shadow: 0 0 10px rgba(255, 59, 48, .7); animation: slate-blink 1s steps(2) infinite; }
.slate__status[data-kind="err"] { color: #ffb4ab; }
.slate__status[data-kind="err"]::before { background: #ff5a4f; box-shadow: 0 0 0 4px rgba(255, 90, 79, .16); }
.slate__result-k, .slate__again { display: none; }

/* Başarı: tahtanın üstüne açılan katman; logo satırı görünür kalır, LED donmuş hâliyle altta */
.slate__head { position: relative; z-index: 3; }
.slate.is-done .slate__result {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 16px;
  padding: clamp(72px, 7vw, 96px) clamp(20px, 4vw, 48px) clamp(32px, 4vw, 48px); text-align: center;
  background: radial-gradient(120% 90% at 30% 0%, #1f1e24, #121116 70%); animation: slate-done .7s var(--ease) both;
}
@keyframes slate-done { from { opacity: 0; } to { opacity: 1; } }
.slate.is-done .slate__result > * { animation: slate-rise .9s var(--ease) both; }
.slate.is-done .slate__result > :nth-child(2) { animation-delay: .08s; }
.slate.is-done .slate__result > :nth-child(3) { animation-delay: .16s; }
@keyframes slate-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.slate.is-done .slate__result-k {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: rgba(243, 241, 236, .6);
}
html[dir="rtl"] .slate.is-done .slate__result-k { letter-spacing: 0; font-size: 13px; }
.slate.is-done .slate__result-k::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: #34c759; box-shadow: 0 0 12px rgba(52, 199, 89, .75), 0 0 0 4px rgba(52, 199, 89, .16);
}
.slate.is-done .slate__status {
  display: block; max-width: 24ch; padding: 0; border: 0; text-wrap: balance;
  font-size: clamp(24px, 2.5vw, 36px); font-weight: 600; line-height: 1.2; letter-spacing: -.03em; color: #f7f5f0;
}
html[dir="rtl"] .slate.is-done .slate__status { letter-spacing: 0; line-height: 1.45; }
.slate.is-done .slate__status::before { display: none; }
.slate.is-done .slate__again {
  display: inline-flex; align-items: center; height: 46px; margin-top: 6px; padding: 0 22px; border-radius: 999px;
  background: rgba(243, 241, 236, .1); color: #f3f1ec; font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  transition: background-color .3s;
}
.slate.is-done .slate__again:hover { background: rgba(243, 241, 236, .18); }

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 560px) {
  .slate__grid { grid-template-columns: 1fr; }
  .slate__cell:not(.slate__cell--full) + .slate__cell:not(.slate__cell--full) { border-inline-start: 0; }
  .contact__channels a { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .slate__send { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .slate__stick--arm { transition: none; }
}
