/* =========================================================
   Uzm. Dr. Şule Koçyiğit — Hasta Memnuniyet Anketi
   ========================================================= */

:root {
  --ink:        #143a52;   /* koyu lacivert — başlık/metin */
  --ink-soft:   #5b7180;   /* ikincil metin */
  --ink-faint:  #8a9aa6;   /* üçüncül */
  --brand:      #1f7fc2;   /* logodaki orta mavi — birincil */
  --brand-dk:   #17679f;
  --brand-soft: #e8f2f9;   /* seçili zemin / bölüm tonu */
  --amber:      #e0912f;   /* logodaki nöral kıvılcım — tek sıcak vurgu */
  --good:       #2f8f6f;
  --danger:     #c23b3b;
  --danger-bg:  #fbeaea;

  --paper:      #ffffff;
  --ground:     #eef3f6;
  --line:       #d9e2e8;
  --line-soft:  #eef2f5;

  --radius:     14px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(20,58,82,.06), 0 12px 32px -12px rgba(20,58,82,.14);

  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #e7eef3;
    --ink-soft:   #a7b8c2;
    --ink-faint:  #7f929d;
    --brand:      #4aa3dd;
    --brand-dk:   #368fca;
    --brand-soft: #10314a;
    --amber:      #e6a23c;
    --paper:      #12222e;
    --ground:     #0c1720;
    --line:       #24404f;
    --line-soft:  #1c333f;
    --danger:     #ef8a8a;
    --danger-bg:  #3a1f22;
    --shadow:     0 1px 2px rgba(0,0,0,.3), 0 18px 40px -16px rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1100px 420px at 50% -160px, var(--brand-soft), transparent 70%),
    var(--ground);
  min-height: 100dvh;
  padding: clamp(14px, 4vw, 48px) 0 64px;
}

.wrap {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 24px);
}

/* ---------- Kart ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 44px);
}

/* ---------- Başlık ---------- */
.head { text-align: center; }

.logo {
  width: min(320px, 78%);
  height: auto;
  margin: 4px auto 22px;
  display: block;
}

.head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.4rem, 5.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--ink);
}

.subtitle {
  margin: 0 0 18px;
  color: var(--brand);
  font-weight: 500;
  font-size: .95rem;
}

.intro {
  margin: 0 auto;
  max-width: 54ch;
  text-align: left;
  color: var(--ink);   /* TR ve EN paragraflar aynı koyulukta */
  font-size: .96rem;
}
.intro + .intro { margin-top: 8px; }
@media (max-width: 420px) { .intro { font-size: .92rem; } }

/* İngilizce metinler Türkçe ile aynı ağırlık ve renkte —
   "/" ayıracı dışında görsel fark yok. */
.en { color: inherit; font-weight: inherit; }

/* ---------- Bölümler ---------- */
.block {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}
.block:first-of-type { border-top: 0; }

.block > h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  margin: 0 0 16px;
  color: var(--ink);
}
.block > h2 .en { font-weight: 600; }

/* ---------- Alanlar ---------- */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 520px) {
  .row { grid-template-columns: 1fr; gap: 0; }
  .row .field { margin-bottom: 16px; }
}

label {
  display: block;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--ink);
}
label .en { font-weight: 500; }

.req { color: var(--amber); font-weight: 700; margin-left: 1px; }
.opt { color: var(--ink-faint); font-weight: 400; font-size: .85em; }

/* Güvenlik sorusu */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.captcha-row .q {
  font-weight: 600;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: .02em;
}
.captcha-row input[type="number"] {
  max-width: 130px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
input[type="date"],
input[type="number"] { min-height: 48px; }  /* iOS dokunma alanı */

textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
}

input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);   /* color-mix desteklemeyen tarayıcılar için */
  outline-offset: 1px;
  border-color: var(--brand);
}
@supports (color: color-mix(in srgb, red, blue)) {
  input:focus-visible,
  textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
  }
}

.has-error input,
.has-error textarea { border-color: var(--danger); }
.has-error .captcha-row .q { color: var(--danger); }

.err {
  color: var(--danger);
  font-size: .85rem;
  margin: 6px 0 0;
}
.block-err { margin-bottom: 12px; }

/* ---------- Ölçek açıklaması ---------- */
.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 16px;
  font-size: .86rem;
  color: var(--ink-soft);
}
.legend b { color: var(--brand); font-weight: 700; }
.legend .ar { color: var(--ink-faint); }
.legend .sep {
  width: 1px; height: 14px;
  background: var(--line);
}

/* ---------- Anket maddeleri ---------- */
.items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.item {
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}
.item:first-child { border-top: 0; padding-top: 4px; }

.item-label {
  display: flex;
  gap: 11px;
  margin-bottom: 11px;
}
.num {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dk);
  font-size: .82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.item-label .txt {
  font-weight: 500;
  font-size: .98rem;
  line-height: 1.35;
}
.item-label .en {
  display: block;
  font-weight: 500;
  font-size: inherit;
  margin-top: 2px;
}

/* ---------- Puan düğmeleri (asıl kahraman) ---------- */
.scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
@media (max-width: 460px) {
  .scale { grid-template-columns: repeat(6, 1fr); gap: 5px; }
}

.opt-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-weight: 600;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  transition: transform .08s ease, background-color .12s, border-color .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
}
.opt-btn.na { font-size: .92rem; }

.opt-btn input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}

@media (hover: hover) {
  .opt-btn:hover { border-color: var(--brand); color: var(--brand-dk); }
}

.opt-btn.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 60%, transparent);
}
.opt-btn.na.is-on {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
  box-shadow: none;
}
.opt-btn:active { transform: scale(.94); }

.opt-btn input:focus-visible + span::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 12px;
  border: 2px solid var(--brand);
}

/* ---------- Alt / gönder ---------- */
.foot { margin-top: 30px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 54px;
  padding: 14px 24px;
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color .15s, transform .08s;
}
.btn .en { color: #fff; font-weight: 600; }
.btn:hover { background: var(--brand-dk); }
.btn:active { transform: scale(.99); }
.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
@supports (color: color-mix(in srgb, red, blue)) {
  .btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent);
  }
}
.btn[disabled] { opacity: .6; cursor: progress; }

.btn.ghost {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--line);
  margin-top: 20px;
  text-decoration: none;
}
.btn.ghost:hover { background: var(--brand-soft); }

.privacy {
  margin: 14px 0 0;
  text-align: center;
  font-size: .82rem;
  color: var(--ink-faint);
}
.privacy .en { display: block; }

.colophon {
  text-align: center;
  margin: 22px 0 0;
  font-size: .82rem;
  color: var(--ink-faint);
}

/* ---------- Uyarı kutusu ---------- */
.alert {
  margin: 22px 0 0;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  color: var(--danger);
  font-size: .92rem;
}
.alert .debug {
  display: block;
  margin-top: 6px;
  font-size: .78rem;
  opacity: .8;
  word-break: break-word;
}

/* ---------- Bal küpü ---------- */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
}

/* ---------- Teşekkür ekranı ---------- */
.thanks { text-align: center; }
.thanks .logo { margin-bottom: 26px; }
.thanks h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 6vw, 2rem);
  margin: 6px 0 10px;
}
.thanks p {
  margin: 0 auto 6px;
  max-width: 46ch;
  color: var(--ink-soft);
}
.thanks .note {
  margin-top: 14px;
  font-size: .82rem;
  color: var(--amber);
}

.tick {
  width: 64px; height: 64px;
  display: block;
  margin: 0 auto 4px;
}
.tick circle { stroke: var(--good); stroke-width: 3; opacity: .35; }
.tick path {
  stroke: var(--good);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: draw .5s .15s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Sayfa açılışı ---------- */
@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise .45s ease both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .tick path { animation: none; stroke-dashoffset: 0; }
}
