/* Mackbear Batıkent — ortak tasarım jetonları ve bileşenler */

:root {
  --night: #14201b;      /* sayfa zemini: gece ormanı */
  --pine: #1c2c25;       /* yükseltilmiş yüzeyler */
  --moss: #2a4035;       /* uzak sırtlar */
  --lichen: #93aa9c;     /* ikincil metin */
  --oat: #f0e9db;        /* birincil metin */
  --honey: #e3a63c;      /* vurgu: bal */
  --honey-hover: #edb453;
  --honey-ink: #231705;  /* bal zemin üstündeki metin */
  --berry: #eb8a9d;      /* şikayet ve hata */
  --line: rgba(240, 233, 219, 0.12);
  --line-strong: rgba(240, 233, 219, 0.26);

  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --gutter: clamp(16px, 5vw, 28px);
  --col: 680px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--night);
  color: var(--oat);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: inherit; font-size: inherit; }
p { margin: 0; }
a { color: var(--honey); text-underline-offset: 3px; }
[hidden] { display: none !important; }

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

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

/* Üst bar ------------------------------------------------------------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--col); margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--oat); text-decoration: none; border-radius: 8px; }
.bear-mark {
  display: block; flex: none;
  background: var(--honey);
  -webkit-mask: url(/images/bear-mark.svg) center / contain no-repeat;
  mask: url(/images/bear-mark.svg) center / contain no-repeat;
}
.brand-mark { width: 44px; height: 26px; }
.brand-text { display: grid; gap: 1px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; line-height: 0.9; letter-spacing: 0.01em; }
.brand-sub { color: var(--lichen); font-size: 0.82rem; line-height: 1.1; }

/* Butonlar ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--honey); color: var(--honey-ink); }
.btn-primary:hover { background: var(--honey-hover); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--oat); }
.btn-ghost:hover { border-color: var(--oat); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }

.icon-btn {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 50%;
  cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--oat); }

.link-btn {
  padding: 8px 4px; background: none; border: 0;
  color: var(--lichen); font-size: 0.9rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { color: var(--oat); }
.link-btn.danger { color: var(--berry); }

/* Form alanları ------------------------------------------------------- */

.field { display: grid; gap: 6px; min-width: 0; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 0.95rem; font-weight: 600; }
.field-hint { color: var(--lichen); font-size: 0.82rem; font-weight: 400; }

.input {
  width: 100%;
  padding: 12px 14px;
  background: var(--night);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-size: 1rem; line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: rgba(147, 170, 156, 0.8); }
.input:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px rgba(227, 166, 60, 0.22); }
textarea.input { min-height: 120px; resize: vertical; }

.form-error { color: var(--berry); font-size: 0.92rem; font-weight: 600; }

/* Etiketler ----------------------------------------------------------- */

.tag {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border: 1px solid; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; line-height: 1.5;
}
.tag-complaint { color: var(--berry); border-color: rgba(235, 138, 157, 0.45); }
.tag-suggestion { color: var(--honey); border-color: rgba(227, 166, 60, 0.45); }

/* Bildirim balonu ----------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 60;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  background: var(--oat); color: var(--night);
  border-radius: 999px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  font-weight: 600; text-align: center;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
