/* Onest (değişken font, 100-900). Türkçe karakterler latin-ext içinde. */
@font-face {
  font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/onest-latin.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/onest-latin-ext.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/fonts/mono-latin.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/fonts/mono-latin-ext.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #ebe8e1;
  --text: #161514;
  --muted: #6b675f;
  --faint: #a29e95;
  --line: #e3dfd6;
  --primary: #161514;
  --on-primary: #ffffff;
  --accent: #9a7431;
  --accent-soft: #f1e8d6;
  --free: #2f8f57;
  --danger: #c8372d;
  --danger-bg: #fbebe8;
  --ok-bg: #e7f3eb;

  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: 16px;
  --r-card: 20px;
  --r-ctl: 14px;
  --tap: 48px;
  --shadow: 0 1px 2px rgba(22, 21, 20, .04), 0 8px 24px rgba(22, 21, 20, .05);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0d0d0c;
    --surface: #171715;
    --surface-2: #22211e;
    --text: #f3f1ec;
    --muted: #a19e96;
    --faint: #6a675f;
    --line: #2a2925;
    --primary: #f3f1ec;
    --on-primary: #121211;
    --accent: #d6b26e;
    --accent-soft: #2b2417;
    --free: #6fcf8e;
    --danger: #f2837a;
    --danger-bg: #36191a;
    --ok-bg: #14281b;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0d0d0c;
  --surface: #171715;
  --surface-2: #22211e;
  --text: #f3f1ec;
  --muted: #a19e96;
  --faint: #6a675f;
  --line: #2a2925;
  --primary: #f3f1ec;
  --on-primary: #121211;
  --accent: #d6b26e;
  --accent-soft: #2b2417;
  --free: #6fcf8e;
  --danger: #f2837a;
  --danger-bg: #36191a;
  --ok-bg: #14281b;
  --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Butonlar */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  border: 0; border-radius: var(--r-ctl);
  background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 1rem; letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap;
  transition: transform .12s var(--ease), opacity .12s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: 12px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.icon-btn {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none;
}
.icon-btn svg { width: 20px; height: 20px; }

/* ---- Form alanları */

.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: .9rem; color: var(--muted); }
.field .hint { font-size: .85rem; color: var(--muted); }
.input {
  width: 100%; min-height: 54px; padding: 14px 16px;
  border: 0; border-radius: var(--r-ctl);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 1.0625rem; /* iOS 16px altında zoom yapar */
  transition: box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--text); }
.input[aria-invalid='true'] { box-shadow: inset 0 0 0 2px var(--danger); }
.field-error { color: var(--danger); font-size: .875rem; }
.field-error:empty { display: none; }

.notice {
  padding: 14px 16px; border-radius: var(--r-ctl);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-size: .95rem;
}
.notice.is-error { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
.notice.is-ok { background: var(--ok-bg); color: var(--free); box-shadow: none; }
.notice:empty { display: none; }

.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--text);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}
