/* YD Hesapla — tasarım sistemi v2 (premium) */

:root {
  --yd-bg: #f6f8fb;
  --yd-bg-soft: #eef2f7;
  --yd-surface: #ffffff;
  --yd-surface-2: #f8fafc;
  --yd-text: #0f172a;
  --yd-text-soft: #334155;
  --yd-muted: #5b6879;
  --yd-border: #e3e9f1;
  --yd-border-strong: #cdd7e3;
  --yd-accent: #0f766e;
  --yd-accent-strong: #115e59;
  --yd-accent-soft: #ccfbf1;
  --yd-accent-contrast: #ffffff;
  --yd-error: #b91c1c;
  --yd-error-soft: #fee2e2;
  --yd-radius-sm: 8px;
  --yd-radius: 14px;
  --yd-radius-lg: 22px;
  --yd-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --yd-shadow: 0 6px 20px -8px rgba(15, 23, 42, 0.18);
  --yd-shadow-lg: 0 18px 44px -20px rgba(15, 23, 42, 0.35);
  --yd-space-1: 0.35rem;
  --yd-space-2: 0.65rem;
  --yd-space-3: 1rem;
  --yd-space-4: 1.5rem;
  --yd-space-5: 2.5rem;
  --yd-focus: 0 0 0 3px rgba(15, 118, 110, 0.32);
  --yd-header-h: 3.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --yd-bg: #0b1220;
    --yd-bg-soft: #0f172a;
    --yd-surface: #131c2e;
    --yd-surface-2: #182235;
    --yd-text: #e8eef7;
    --yd-text-soft: #cbd5e1;
    --yd-muted: #94a3b8;
    --yd-border: #24314a;
    --yd-border-strong: #35476a;
    --yd-accent: #2dd4bf;
    --yd-accent-strong: #5eead4;
    --yd-accent-soft: rgba(45, 212, 191, 0.14);
    --yd-accent-contrast: #04211d;
    --yd-error: #fca5a5;
    --yd-error-soft: rgba(252, 165, 165, 0.14);
    --yd-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --yd-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.7);
    --yd-shadow-lg: 0 22px 50px -24px rgba(0, 0, 0, 0.85);
    --yd-focus: 0 0 0 3px rgba(45, 212, 191, 0.4);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--yd-text);
  background: var(--yd-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--yd-accent);
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: none;
  box-shadow: var(--yd-focus);
  border-radius: 4px;
}

.yd-skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 60;
  background: var(--yd-accent);
  color: var(--yd-accent-contrast);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--yd-radius-sm) var(--yd-radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: top 0.18s ease;
}

.yd-skip:focus {
  top: 0;
}

.yd-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: var(--yd-header-h);
  padding: 0.5rem 1rem;
  background: color-mix(in srgb, var(--yd-surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--yd-border);
}

.yd-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--yd-text);
  white-space: nowrap;
}

.yd-brand::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.25rem;
  background: linear-gradient(140deg, var(--yd-accent), var(--yd-accent-strong));
  box-shadow: var(--yd-shadow-sm);
}

.yd-nav {
  display: flex;
  gap: 0.15rem;
  font-size: 0.86rem;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
}

.yd-nav a {
  text-decoration: none;
  color: var(--yd-muted);
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.yd-nav a:hover,
.yd-nav a[aria-current="page"] {
  color: var(--yd-accent-strong);
  background: var(--yd-accent-soft);
}

.yd-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 3.5rem;
}

.yd-breadcrumb {
  font-size: 0.84rem;
  color: var(--yd-muted);
  margin: 0 0 0.6rem;
}

.yd-breadcrumb a {
  color: var(--yd-muted);
  text-decoration: none;
}

.yd-breadcrumb a:hover {
  color: var(--yd-accent);
}

h1 {
  font-size: clamp(1.65rem, 5vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 750;
  margin: 0 0 0.85rem;
  text-wrap: balance;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.yd-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--yd-surface) 0%, var(--yd-surface-2) 100%);
  border: 1px solid var(--yd-border);
  border-radius: var(--yd-radius-lg);
  box-shadow: var(--yd-shadow);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.yd-hero::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.35), transparent 70%);
  pointer-events: none;
}

.yd-hero-badge {
  display: inline-block;
  margin: 0 0 0.7rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--yd-accent-soft);
  color: var(--yd-accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.yd-hero p {
  margin: 0 0 0.7rem;
  color: var(--yd-text-soft);
}

.yd-hero p:last-child {
  margin-bottom: 0;
}

.yd-article > p,
.yd-article > nav + h1 + p {
  color: var(--yd-text-soft);
}

.yd-article > p {
  margin: 0 0 0.75rem;
}

.yd-form {
  background: var(--yd-surface);
  border: 1px solid var(--yd-border);
  border-radius: var(--yd-radius);
  box-shadow: var(--yd-shadow);
  padding: clamp(1rem, 3vw, 1.4rem);
  margin: 1.4rem 0;
}

.yd-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

@media (min-width: 560px) {
  .yd-fields {
    grid-template-columns: 1fr 1fr;
  }
}

.yd-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.yd-field.is-hidden {
  display: none;
}

.yd-field-label {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--yd-muted);
}

.yd-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--yd-border-strong);
  border-radius: var(--yd-radius-sm);
  background: var(--yd-surface-2);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.yd-input-wrap:focus-within {
  border-color: var(--yd-accent);
  background: var(--yd-surface);
  box-shadow: var(--yd-focus);
}

.yd-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0.72rem 0.75rem;
  font-size: 1.05rem;
  background: transparent;
  color: var(--yd-text);
}

.yd-suffix {
  padding: 0 0.75rem;
  color: var(--yd-muted);
  font-size: 0.92rem;
}

.yd-field select {
  border: 1px solid var(--yd-border-strong);
  border-radius: var(--yd-radius-sm);
  padding: 0.7rem 0.6rem;
  font-size: 1rem;
  background: var(--yd-surface-2);
  color: var(--yd-text);
  min-height: 44px;
}

.yd-field select:focus-visible {
  border-color: var(--yd-accent);
}

.yd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--yd-accent), var(--yd-accent-strong));
  color: var(--yd-accent-contrast);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--yd-shadow);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.yd-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: var(--yd-shadow-lg);
}

.yd-btn:active {
  transform: translateY(0);
}

.yd-btn--inline {
  width: auto;
  padding: 0.7rem 1.4rem;
  margin-top: 0.5rem;
  text-decoration: none;
}

.yd-result {
  background: var(--yd-surface-2);
  border: 1px solid var(--yd-border);
  border-radius: var(--yd-radius);
  padding: 0.35rem 1rem 0.75rem;
  margin-bottom: 1.25rem;
  min-height: 3rem;
}

.yd-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.58rem 0;
  border-bottom: 1px dashed var(--yd-border);
  font-size: 0.98rem;
}

.yd-row:last-of-type {
  border-bottom: 0;
}

.yd-row strong {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.yd-row--strong {
  font-size: 1.08rem;
}

.yd-row--strong strong {
  color: var(--yd-accent-strong);
  font-size: 1.25rem;
}

.yd-note {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--yd-muted);
}

.yd-error {
  margin: 0.75rem 0;
  padding: 0.6rem 0.8rem;
  background: var(--yd-error-soft);
  border: 1px solid color-mix(in srgb, var(--yd-error) 35%, transparent);
  border-radius: var(--yd-radius-sm);
  color: var(--yd-error);
  font-weight: 650;
  font-size: 0.92rem;
}

.yd-faq-item {
  background: var(--yd-surface);
  border: 1px solid var(--yd-border);
  border-radius: var(--yd-radius-sm);
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.6rem;
  box-shadow: var(--yd-shadow-sm);
}

.yd-faq-item summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.yd-faq-item summary::-webkit-details-marker {
  display: none;
}

.yd-faq-item summary::after {
  content: "+";
  color: var(--yd-accent);
  font-size: 1.15rem;
  line-height: 1;
}

.yd-faq-item[open] summary::after {
  content: "–";
}

.yd-faq-item p {
  margin: 0.55rem 0 0.25rem;
  color: var(--yd-muted);
}

.yd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.yd-chips a {
  background: var(--yd-surface);
  border: 1px solid var(--yd-border-strong);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--yd-text-soft);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.yd-chips a:hover {
  border-color: var(--yd-accent);
  color: var(--yd-accent-strong);
  transform: translateY(-1px);
}

.yd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .yd-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.yd-card {
  display: block;
  position: relative;
  background: var(--yd-surface);
  border: 1px solid var(--yd-border);
  border-radius: var(--yd-radius);
  box-shadow: var(--yd-shadow-sm);
  padding: 1.1rem 1.1rem 1.15rem;
  text-decoration: none;
  color: var(--yd-text);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}

.yd-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--yd-radius) 0 0 var(--yd-radius);
  background: linear-gradient(180deg, var(--yd-accent), transparent);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.yd-card:hover {
  border-color: color-mix(in srgb, var(--yd-accent) 45%, var(--yd-border));
  box-shadow: var(--yd-shadow);
  transform: translateY(-2px);
}

.yd-card:hover::before {
  opacity: 1;
}

.yd-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.06rem;
  color: var(--yd-accent-strong);
}

.yd-card p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--yd-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yd-footer {
  background: var(--yd-surface);
  border-top: 1px solid var(--yd-border);
  padding: 1.5rem 1rem 2.5rem;
  font-size: 0.85rem;
  color: var(--yd-muted);
  text-align: center;
}

.yd-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.9rem;
  margin-bottom: 0.9rem;
}

.yd-footer-nav a {
  color: var(--yd-muted);
  text-decoration: none;
}

.yd-footer-nav a:hover {
  color: var(--yd-accent);
}

.yd-footer p {
  margin: 0.35rem 0 0;
}

.yd-footer-meta {
  color: var(--yd-muted);
  opacity: 0.85;
}

.yd-main--home {
  max-width: 960px;
}

.yd-search {
  margin-top: 1rem;
}

.yd-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.yd-search-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--yd-border-strong);
  border-radius: 12px;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  font-size: 1.05rem;
  background: var(--yd-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235b6879' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 0.9rem center;
  color: var(--yd-text);
}

.yd-search-input:focus {
  outline: none;
  border-color: var(--yd-accent);
  box-shadow: var(--yd-focus);
}

.yd-search-count {
  margin: 0.4rem 0 0;
  font-size: 0.84rem;
  color: var(--yd-muted);
}

.yd-chips--popular {
  margin-top: 0.8rem;
}

.yd-category {
  margin-top: 2rem;
}

.yd-category-title {
  margin-bottom: 0.15rem;
}

.yd-category-desc {
  margin: 0 0 0.25rem;
  color: var(--yd-muted);
  font-size: 0.92rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
