/* =============================================================================
   mailping — stil
   Estetik: "posta denetim istasyonu". Koyu mürekkep hero + serin kağıt çalışma
   alanı, teal sinyal aksanı, REGEX→MX→SMTP rota görseli, postmark durum rozetleri.
   ============================================================================= */

:root {
  --paper:      #e9eef2;   /* serin kağıt zemin */
  --card:       #ffffff;
  --ink:        #132029;   /* koyu panel + ana metin */
  --ink-2:      #24384a;
  --muted:      #5c6b78;
  --line:       #d6dee5;
  --brand:      #0fa3a3;   /* teal sinyal */
  --brand-deep: #0a7d7d;
  --brand-soft: #e2f4f3;

  --ok:      #2e9e5a;      /* GECERLI */
  --bad:     #d6453f;      /* GECERSIZ */
  --warn:    #dca016;      /* RISKLI */
  --unknown: #7c8a97;      /* BILINMIYOR */

  --r: 14px;               /* köşe yarıçapı */
  --shadow: 0 1px 2px rgba(19,32,41,.06), 0 12px 32px -18px rgba(19,32,41,.35);
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }

/* `hidden` özniteliği her zaman gizlesin. Aksi halde .probe__out gibi
   display:flex tanımlı yazar stilleri UA'nın [hidden]{display:none} kuralını
   geçersiz kılar ve öğe yanlışlıkla görünür kalır. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); }
code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--brand-soft);
  color: var(--brand-deep);
  padding: .1em .4em;
  border-radius: 5px;
}

/* ---------- Üst bar ---------- */
.top {
  display: flex; align-items: baseline; gap: 18px;
  padding: 18px clamp(18px, 5vw, 56px);
  background: var(--ink);
  color: #fff;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em;
  color: #fff; text-decoration: none;
}
.wordmark__dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(15,163,163,.25);
}
.wordmark__deg { color: var(--brand); font-weight: 500; }
.top__tag {
  margin: 0; color: #9fb2bd; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(15,163,163,.20), transparent 55%),
    var(--ink);
  color: #eef4f6;
  padding: clamp(40px, 7vw, 84px) clamp(18px, 5vw, 56px) clamp(52px, 7vw, 92px);
  border-bottom: 1px solid #0a141b;
}
.hero__grid {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.eyebrow {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .18em;
  color: var(--brand); display: inline-block; margin-bottom: 20px;
}
.hero__title {
  font-size: clamp(2.3rem, 6vw, 4rem); line-height: .98;
  letter-spacing: -.03em; font-weight: 700; margin: 0 0 18px;
}
.hero__title em {
  font-style: normal; color: var(--brand);
  position: relative;
}
.hero__title em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: 3px;
  background: var(--brand); opacity: .5;
}
.hero__lede {
  max-width: 42ch; color: #b9c9d1; font-size: 1.02rem; margin: 0;
}

/* ---------- Probe (canlı tek doğrulama) ---------- */
.probe {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r);
  padding: 22px;
  backdrop-filter: blur(2px);
}
.probe__label {
  display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: #93a7b1; margin-bottom: 10px;
}
.probe__row { display: flex; gap: 8px; }
.probe__input {
  flex: 1; min-width: 0;
  background: #0d171e; border: 1px solid rgba(255,255,255,.16);
  color: #fff; border-radius: 10px; padding: 12px 14px;
  font-family: var(--mono); font-size: .95rem;
}
.probe__input::placeholder { color: #5f717c; }
.probe__input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Rota görseli: REGEX -> MX -> SMTP */
.route {
  display: flex; align-items: center; gap: 6px;
  margin: 22px 4px 4px;
}
.route__node { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.route__ring {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #3a4d59; background: #0d171e;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.route__name {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em;
  color: #9fb4bf;
}
.route__wire {
  flex: 1; height: 2px; background: #2b3b46; position: relative; overflow: hidden;
}
.route__wire::after {
  content: ""; position: absolute; inset: 0; width: 0;
  background: var(--brand); transition: width .4s ease;
}
/* aşama aydınlatma */
.route[data-state="regex"] .route__node[data-node="regex"] .route__ring,
.route[data-state="mx"]    .route__node[data-node="regex"] .route__ring,
.route[data-state="mx"]    .route__node[data-node="mx"] .route__ring,
.route[data-state="smtp"]  .route__ring {
  border-color: var(--brand); background: var(--brand);
  box-shadow: 0 0 0 4px rgba(15,163,163,.22);
}
.route[data-state="mx"]   .route__wire:nth-of-type(2)::after,
.route[data-state="smtp"] .route__wire::after { width: 100%; }
.route.busy .route__ring { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(15,163,163,.30); } }

.probe__out { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.probe__reason { color: #b9c9d1; font-size: .9rem; }

/* ---------- Postmark durum rozeti ---------- */
.stamp {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .04em; padding: 5px 11px 5px 8px; border-radius: 999px;
  border: 1px dashed currentColor; white-space: nowrap;
}
.stamp::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor;
}
.stamp--ok      { color: var(--ok);      background: rgba(46,158,90,.10); }
.stamp--bad     { color: var(--bad);     background: rgba(214,69,63,.10); }
.stamp--warn    { color: var(--warn);    background: rgba(220,160,22,.12); }
.stamp--unknown { color: var(--unknown); background: rgba(124,138,151,.12); }

/* ---------- Buton ---------- */
.btn {
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  border-radius: 10px; padding: 12px 18px; cursor: pointer;
  border: 1px solid transparent; transition: transform .06s, background .2s, box-shadow .2s;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: translateY(1px); }
.btn--signal { background: var(--brand); color: #04211f; box-shadow: 0 8px 20px -8px var(--brand); }
.btn--signal:hover { background: var(--brand-deep); color: #fff; }
.btn--signal:disabled { background: #b4c2c8; color: #6a7780; box-shadow: none; cursor: not-allowed; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn--wide { width: 100%; margin-top: 22px; padding: 14px; }

/* ---------- Çalışma alanı ---------- */
.stage {
  max-width: 1000px; margin: 0 auto;
  padding: clamp(28px, 5vw, 52px) clamp(18px, 5vw, 24px) 40px;
}
.tabs { display: flex; gap: 6px; margin-bottom: 22px; }
.tab {
  flex: 1; background: transparent; border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: .98rem; color: var(--muted);
  display: flex; align-items: center; gap: 10px; transition: all .18s;
}
.tab__no { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.tab:hover { border-color: #b9c6cf; color: var(--ink-2); }
.tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab.is-active .tab__no { color: var(--brand); }

.panel { display: none; }
.panel.is-active { display: block; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Kart ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: clamp(20px, 4vw, 30px); box-shadow: var(--shadow);
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.card__title { margin: 0; font-size: 1.32rem; letter-spacing: -.02em; }
.card__hint { color: var(--muted); font-size: .92rem; margin: 12px 0 22px; }

/* ---------- Dosya bırakma ---------- */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1.5px dashed #bcc9d1; border-radius: var(--r);
  padding: 34px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop:hover, .drop.dragover { border-color: var(--brand); background: var(--brand-soft); }
.drop:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.drop.filled { border-style: solid; border-color: var(--ok); background: rgba(46,158,90,.06); }
.drop__icon { font-size: 1.7rem; color: var(--brand); line-height: 1; }
.drop__main { font-weight: 600; }
.drop__sub { font-size: .82rem; color: var(--muted); }

/* ---------- Ayraç + liste yapıştırma ---------- */
.ayirac {
  display: flex; align-items: center; gap: 14px;
  margin: 18px 0 14px; color: var(--muted);
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
}
.ayirac::before, .ayirac::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.liste-alan { display: flex; flex-direction: column; gap: 6px; }
.liste-alan textarea {
  width: 100%; resize: vertical; min-height: 92px;
  font-family: var(--mono); font-size: .9rem; line-height: 1.6;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfd; color: var(--ink);
}
.liste-alan textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.liste-alan__ipucu { font-size: .8rem; color: var(--muted); }

/* ---------- Ayarlar ---------- */
.ayar { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 8px; }
.ayar summary {
  cursor: pointer; font-size: .9rem; color: var(--muted); padding: 8px 0;
  font-weight: 500; user-select: none;
}
.ayar summary:hover { color: var(--brand-deep); }
.ayar__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; padding: 10px 0 4px;
}
.ayar__grid label { font-size: .82rem; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.ayar__grid input[type="text"], .ayar__grid input[type="number"] {
  font-family: var(--mono); font-size: .9rem; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd;
}
.ayar__grid input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.ayar__check { flex-direction: row !important; align-items: center; gap: 8px !important; }

/* ---------- Lead formu ---------- */
.lead-form { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.lead-form__field { display: flex; flex-direction: column; gap: 7px; font-size: .86rem; color: var(--ink-2); font-weight: 500; }
.lead-form__field input {
  font-family: var(--mono); font-size: .95rem; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd;
}
.lead-form__field input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.opt { color: var(--muted); font-weight: 400; }

/* ---------- Çalışma çıktısı ---------- */
.run { margin-top: 22px; }
.runbar {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.runbar__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.runbar__phase { font-size: .92rem; color: var(--ink-2); font-weight: 500; }
.runbar__count { font-family: var(--mono); font-size: .88rem; color: var(--muted); }
.progress { height: 8px; border-radius: 99px; background: #e3e9ee; overflow: hidden; margin-top: 12px; }
.progress__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-deep)); transition: width .3s ease; }
.progress.indet .progress__fill { width: 35% !important; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

/* Özet çipleri */
.ozet { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  font-family: var(--mono); font-size: .8rem; font-weight: 500;
  padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff;
  display: inline-flex; gap: 7px; align-items: center;
}
.chip b { font-weight: 700; }
.chip[data-k="GECERLI"]   { border-color: rgba(46,158,90,.4);  color: var(--ok); }
.chip[data-k="GECERSIZ"]  { border-color: rgba(214,69,63,.4);  color: var(--bad); }
.chip[data-k="RISKLI"]    { border-color: rgba(220,160,22,.5); color: var(--warn); }
.chip[data-k="BILINMIYOR"]{ border-color: rgba(124,138,151,.4);color: var(--unknown); }

.run__download { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; flex-wrap: wrap; }
.run__note { color: var(--muted); font-size: .85rem; }

/* Sonuç tablosu */
.tablo-sar { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table.tablo { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.tablo thead th {
  text-align: left; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--card);
}
.tablo tbody td { padding: 11px 14px; border-bottom: 1px solid #eef2f5; vertical-align: middle; }
.tablo tbody tr:last-child td { border-bottom: none; }
.rrow { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
.rrow__email { color: var(--ink); }
.rrow__sebep { color: var(--muted); font-size: .84rem; }
.rrow__sirket, .rrow__ad { color: var(--ink-2); }

.hata-kutu {
  background: rgba(214,69,63,.08); border: 1px solid rgba(214,69,63,.35);
  color: #9c2a25; border-radius: var(--r); padding: 14px 18px; font-size: .92rem;
}

/* ---------- Alt bilgi ---------- */
.foot {
  max-width: 1000px; margin: 0 auto; padding: 30px clamp(18px,5vw,24px) 48px;
  color: var(--muted); font-size: .84rem; border-top: 1px solid var(--line);
}
.foot strong { color: var(--ink-2); }

/* ---------- Duyarlılık ---------- */
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; }
  .lead-form { grid-template-columns: 1fr; }
  .tab { flex-direction: column; align-items: flex-start; gap: 4px; }
  /* iOS Safari 16px altı input fontlarında odakta otomatik zoom yapar. */
  input, select, textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* Animasyon kapalıyken belirsiz çubuk sahte %35 ilerleme gibi durmasın. */
  .progress.indet .progress__fill { width: 100% !important; opacity: .35; margin-left: 0 !important; }
}
