/* ==========================================================================
   UNIDES KİMYA — Tasarım Sistemi (temel katman)
   Token'lar, reset, tipografi, butonlar, formlar, yardımcı sınıflar
   ========================================================================== */

:root {
  /* Marka renkleri */
  --navy-900: #08202F;
  --navy-800: #0D2C40;
  --navy-700: #16405A;
  --navy-600: #1E5573;

  --accent-700: #1F5470;
  --accent-600: #2A6C8F;
  --accent-500: #3480A8;
  --accent-400: #4FA0C8;
  --accent-100: #D7E8F1;
  --accent-050: #EEF5F9;

  /* Nötr */
  --ink: #0B1E2B;
  --body: #46566B;
  --muted: #6E7E92;
  --line: #E4E9EF;
  --line-2: #CFD8E3;
  --surface: #FFFFFF;
  --surface-2: #F5F8FA;
  --surface-3: #EDF2F6;

  /* Durum */
  --good: #0F8A3D;
  --good-bg: #E7F6EC;
  --warn: #B7791F;
  --warn-bg: #FDF3E0;
  --crit: #C0392F;
  --crit-bg: #FCEDEB;
  --info: #1C63B8;
  --info-bg: #E9F1FC;

  /* Ölçü */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --container: 1240px;

  --shadow-xs: 0 1px 2px rgba(10, 24, 38, .05);
  --shadow-sm: 0 2px 8px rgba(10, 24, 38, .06);
  --shadow-md: 0 12px 32px -12px rgba(10, 24, 38, .18);
  --shadow-lg: 0 28px 64px -28px rgba(10, 24, 38, .32);

  /* Marka sarısı (logo) */
  --gold: #F9C800;
  --gold-soft: #FFF4CE;

  --ease: cubic-bezier(.22, .61, .36, 1);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss01" 1;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-100); color: var(--navy-900); }

/* ---------- Tipografi ---------- */
h1, h2, h3, h4, h5 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.021em;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.1vw, 3.05rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.6rem, 1.1rem + 1.7vw, 2.35rem); letter-spacing: -0.026em; }
h3 { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); }
h4 { font-size: 1.03rem; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1rem, .96rem + .3vw, 1.135rem); color: var(--body); max-width: 64ch; }
strong { font-weight: 600; color: var(--ink); }
small { font-size: .8125rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent-600);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--gold); }
.eyebrow--light { color: var(--accent-400); }
.eyebrow--light::before { background: var(--gold); }

/* ---------- Yerleşim ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 7vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 68px); }
.section--alt { background: var(--surface-2); }
.section--dark { background: var(--navy-900); color: #B8C6D4; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head > h2 { margin-top: 14px; }
.section-head > p { margin-top: 14px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* İki sütunlu, farklı ağırlıklı bölmeler — 720px altında tek sütuna iner */
.grid-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid-split--wide-left { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.grid-split--narrow-right { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stack { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
/* hidden özniteliği, display kuralı olan öğelerde de (ör. .field, .btn, .notice) gizlesin */
[hidden] { display: none !important; }

/* ---------- Butonlar ---------- */
.btn {
  --btn-bg: var(--navy-800);
  --btn-fg: #fff;
  --btn-bd: var(--navy-800);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .78rem 1.35rem;
  font-size: .9rem; font-weight: 600; letter-spacing: -.006em;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: 999px;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--accent { --btn-bg: var(--accent-600); --btn-bd: var(--accent-600); }
.btn--accent:hover { --btn-bg: var(--accent-700); --btn-bd: var(--accent-700); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-2); }
.btn--ghost:hover { --btn-bd: var(--ink); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--navy-900); --btn-bd: #fff; }
.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.28); }
.btn--outline-light:hover { --btn-bd: #fff; }
.btn--sm { padding: .5rem .9rem; font-size: .82rem; }
.btn--lg { padding: .95rem 1.7rem; font-size: .96rem; }
.btn--block { width: 100%; }
.btn--square { border-radius: var(--radius-sm); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: .89rem; color: var(--accent-600);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-3); color: var(--body);
  border: 1px solid transparent;
}
.badge--good { background: var(--good-bg); color: var(--good); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--crit { background: var(--crit-bg); color: var(--crit); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--accent { background: var(--accent-050); color: var(--accent-700); }
.badge--outline { background: transparent; border-color: var(--line-2); color: var(--muted); }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: .42rem; }
.field > label { font-size: .82rem; font-weight: 600; color: var(--ink); }
.field > label:not(.switch) > span { color: var(--crit); }
.input, .select, .textarea {
  width: 100%; padding: .72rem .9rem;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: .9rem; transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #9AA7B7; }
.input:hover, .select:hover, .textarea:hover { border-color: #B6C2D0; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent-500);
  box-shadow: 0 0 0 3px var(--accent-100);
}
.textarea { min-height: 128px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E7E92' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 16px;
  padding-right: 2.3rem; cursor: pointer;
}
.field-error { font-size: .78rem; color: var(--crit); display: none; }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--crit); }
.field.is-invalid .field-error { display: block; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .84rem; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent-600); flex: none; }
.form-note { font-size: .78rem; color: var(--muted); }

.search-input { position: relative; }
.search-input svg { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search-input .input { padding-left: 2.5rem; }

/* ---------- Kart ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card--pad-lg { padding: 32px; }
.card--flat { border-radius: var(--radius-sm); padding: 18px; }
.card-hover { transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }

/* ---------- Tablo ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { font-size: .875rem; min-width: 640px; }
.table th {
  text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .14s var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .strong { color: var(--ink); font-weight: 600; }
.table .cell-sub { display: block; font-size: .74rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.table tfoot td { background: var(--surface-2); border-bottom: 0; border-top: 1px solid var(--line-2); }

/* ---------- Etiket (chip) ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: .38rem .78rem; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: .8rem; font-weight: 500; color: var(--body); background: var(--surface);
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ---------- Uyarı kutusu ---------- */
.notice { display: flex; gap: 13px; padding: 15px 17px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); font-size: .855rem; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice b { display: block; color: var(--ink); }
.notice--warn { background: var(--warn-bg); border-color: #F5E0B8; color: #7A5410; }
.notice--warn svg, .notice--warn b { color: var(--warn); }
.notice--crit { background: var(--crit-bg); border-color: #F6D5D1; color: #8E2C24; }
.notice--crit svg, .notice--crit b { color: var(--crit); }
.notice--accent { background: var(--accent-050); border-color: var(--accent-100); color: var(--accent-700); }
.notice--accent svg, .notice--accent b { color: var(--accent-700); }

/* ---------- Boş durum ---------- */
.empty { text-align: center; padding: 46px 20px; }
.empty .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); color: var(--muted); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.empty .ic svg { width: 24px; height: 24px; }
.empty b { display: block; color: var(--ink); font-size: .96rem; }
.empty p { font-size: .855rem; margin-top: 5px; }

/* ---------- Yardımcı ---------- */
.divider { height: 1px; background: var(--line); border: 0; }
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4,
  .grid-split, .grid-split--wide-left, .grid-split--narrow-right { grid-template-columns: minmax(0, 1fr); }
  .container { padding-inline: 20px; }
  .card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
