* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button,
input,
textarea,
select {
  font: inherit;
}

/* ── Butonlar ── */
.btn-primary,
.btn-secondary,
.btn-ghost {
  min-height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition:
    transform  var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #06111d;
  box-shadow: 0 4px 16px rgba(99,179,237,.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 22px rgba(99,179,237,.38);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--border-a);
  background: rgba(255,255,255,0.09);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active {
  transform: scale(0.97) !important;
}

/* ── Header ── */
.sticky-hdr {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7,9,12,0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hdr-row {
  width: min(100%, 520px);
  min-height: 58px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease),
              background   var(--dur-fast) var(--ease);
}

.back-btn:hover {
  border-color: var(--border-a);
  background: rgba(99,179,237,0.08);
}

.brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.step-lbl {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* ── Progress ── */
.prog-track {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
}

.prog-fill {
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(99,179,237,.4);
  transition: width var(--dur-slow) var(--ease);
}

/* ── Screen / wizard adım ── */
.screen {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
  animation: tehai-rise var(--dur-mid) var(--ease) both;
}

/* ── Tipografi ── */
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.heading {
  margin: 8px 0 16px;
  font-size: clamp(22px, 5.5vw, 32px);
  line-height: 1.15;
  letter-spacing: -.01em;
}

/* ── Kartlar ── */
.card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--s1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition:
    background     var(--dur-fast) var(--ease),
    border-color   var(--dur-fast) var(--ease),
    transform      var(--dur-fast) var(--ease),
    box-shadow     var(--dur-fast) var(--ease);
}

.card:hover {
  border-color: var(--border-a);
  background: rgba(99,179,237,0.05);
  transform: translateX(3px);
}

.card:active {
  transform: scale(0.98) !important;
}

.card-ico,
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  flex: 0 0 auto;
  font-size: 20px;
}

.card-body { min-width: 0; flex: 1; }

.card-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.card-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 2px;
}

.card-arr,
.card-arrow {
  color: var(--muted);
  margin-left: auto;
  font-size: 18px;
  transition: color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}

.card:hover .card-arr,
.card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

/* ── Form alanları ── */
.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow   var(--dur-fast) var(--ease);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--border-a);
  box-shadow: 0 0 0 3px rgba(99,179,237,0.12);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

/* ── Checkbox / Radio ── */
.check-item,
.radio-btn {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.04);
}

.check-box {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-a);
  border-radius: 6px;
}

/* ── Tamamlanma ekranı checkmark ── */
.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
  animation: tehai-pulse-ring .6s var(--ease) .2s forwards;
}

.success-icon__check {
  width: 40px;
  height: 40px;
  animation: tehai-fade-in var(--dur-mid) var(--ease) both;
}

.success-icon__check circle {
  fill: rgba(61,220,132,.12);
  stroke: var(--green);
  stroke-width: 2;
}

.success-icon__check polyline {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: tehai-checkmark .4s var(--ease) .25s forwards;
}

/* ── TEHAI canlı bekleme ve tıklama mikro animasyonları ── */
.live-status {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 7px 10px;
  border: 1px solid rgba(61,220,132,0.14);
  border-radius: 999px;
  background: rgba(61,220,132,0.055);
  color: #9fb0c0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61,220,132,0.36);
  animation: tehai-status-pulse 1.8s var(--ease) infinite;
  flex: 0 0 auto;
}

.service-card {
  position: relative;
  overflow: hidden;
}

.service-card.is-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(99,179,237,0.06) 42%, rgba(99,179,237,0.18) 50%, rgba(99,179,237,0.06) 58%, transparent 100%);
  transform: translateX(-120%);
  animation: tehai-idle-scan 4.8s var(--ease) infinite;
  pointer-events: none;
}

.service-card.is-loading {
  border-color: rgba(99,179,237,0.68) !important;
  background: rgba(99,179,237,0.12) !important;
  transform: scale(0.985) !important;
  pointer-events: none;
}

.service-card.is-loading .card-arrow {
  color: var(--accent);
  transform: translateX(5px);
}

.service-card.is-loading .card-desc {
  color: #9fcdf0;
}

/* ── Karşılama / splash katmanı ── */
.welcome-splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 35%, rgba(99,179,237,0.22), transparent 18rem),
    linear-gradient(180deg, #05070a 0%, #07090c 68%, #05070a 100%);
  animation: tehai-splash-out .55s var(--ease) 1.55s forwards;
}

.splash-card {
  width: min(100%, 360px);
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  animation: tehai-splash-rise .7s var(--ease) both;
}

.splash-logo {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(99,179,237,0.28);
  border-radius: 24px;
  background: rgba(255,255,255,0.045);
  box-shadow: 0 18px 54px rgba(99,179,237,0.18);
  position: relative;
  overflow: hidden;
}

.splash-logo::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.18) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: tehai-logo-scan 1.25s var(--ease) .18s both;
}

.splash-logo img {
  width: 48px;
  height: 48px;
  position: relative;
  z-index: 1;
}

.splash-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.splash-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 6vw, 30px);
  line-height: 1.12;
  letter-spacing: -.02em;
}

.splash-subtitle {
  margin: 0;
  color: #91a0af;
  font-size: 13px;
  line-height: 1.45;
}

@keyframes tehai-status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(61,220,132,0.34);
    opacity: .72;
  }
  70% {
    box-shadow: 0 0 0 8px rgba(61,220,132,0);
    opacity: 1;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(61,220,132,0);
    opacity: .72;
  }
}

@keyframes tehai-idle-scan {
  0%, 62% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes tehai-splash-rise {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tehai-logo-scan {
  from { transform: translateX(-120%); }
  to   { transform: translateX(120%); }
}

@keyframes tehai-splash-out {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot,
  .service-card.is-primary::after,
  .screen,
  .success-icon__ring,
  .success-icon__check,
  .success-icon__check polyline,
  .welcome-splash,
  .splash-card,
  .splash-logo::after {
    animation: none !important;
  }

  .welcome-splash {
    display: none !important;
  }

  .service-card,
  .card,
  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    transition: none !important;
  }
}
