/* Flare — saytın ortaq üslubu.
   Rənglər src/theme/colors.ts ilə eynidir; dəyişəndə hər ikisinə bax. */

:root {
  --bg: #0E1116;
  --surface: #171B22;
  --surface2: #1F242D;
  --line: #2A3038;
  --amber: #FFB627;
  --amber-dim: #B8811C;
  --amber-soft: rgba(255, 182, 39, .14);
  --cream: #F5F3EE;
  --dim: #93A0AC;
  --faint: #5B6570;
  --success: #3DD68C;
  --danger: #FF6B57;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px }

a { color: var(--amber); text-decoration: none }
a:hover { text-decoration: underline }

/* --- Başlıq və naviqasiya --- */

header { padding: 26px 0 6px }

.brand { display: flex; align-items: center; gap: 12px }
.brand svg { flex: none }
.brand-name {
  font-family: var(--head); font-weight: 700; font-size: 21px;
  letter-spacing: -.01em; color: var(--cream);
}
a.brand:hover { text-decoration: none }

nav {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  padding: 18px 0 0; font-size: 14px;
}
nav a { color: var(--dim) }
nav a:hover { color: var(--amber); text-decoration: none }
nav a[aria-current="page"] { color: var(--amber) }

/* --- Mətn --- */

h1 {
  font-family: var(--head); font-weight: 700;
  font-size: clamp(26px, 4.6vw, 36px);
  line-height: 1.15; letter-spacing: -.02em; margin: 34px 0 14px;
}
h2 {
  font-family: var(--head); font-weight: 600;
  font-size: clamp(19px, 3vw, 23px);
  letter-spacing: -.01em; margin: 36px 0 10px;
}
h3 { font-family: var(--head); font-weight: 600; font-size: 16.5px; margin: 24px 0 6px }
p { margin: 0 0 14px }
.lede { font-size: clamp(16px, 2.3vw, 18px); color: var(--dim); max-width: 62ch }
.sub { color: var(--dim); margin: 0 0 24px; max-width: 64ch }
.updated { color: var(--faint); font-size: 13.5px; margin: 0 0 8px }

ul, ol { margin: 0 0 14px; padding-left: 22px; color: var(--dim) }
li { margin-bottom: 7px }
li strong { color: var(--cream); font-weight: 600 }

section { padding: 34px 0; border-bottom: 1px solid var(--line) }
section:last-of-type { border-bottom: 0 }
article section:first-of-type { padding-top: 10px }

/* --- Komponentlər --- */

.pill {
  display: inline-block; margin-bottom: 18px; padding: 6px 13px;
  border-radius: 999px; background: var(--amber-soft);
  border: 1px solid var(--amber-dim); color: var(--amber);
  font-size: 12.5px; font-weight: 500; letter-spacing: .02em;
}

table { width: 100%; border-collapse: collapse; font-size: 15px }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line) }
th {
  color: var(--faint); font-weight: 500; font-size: 12.5px;
  letter-spacing: .06em; text-transform: uppercase;
}
td:last-child, th:last-child { text-align: right; white-space: nowrap }
.price { font-variant-numeric: tabular-nums; color: var(--amber); font-weight: 500 }

.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) }
.step, .card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px;
}
.step-n {
  width: 28px; height: 28px; border-radius: 9px; background: var(--amber-soft);
  color: var(--amber); font-family: var(--head); font-weight: 600; font-size: 13.5px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.step p, .card p { color: var(--dim); font-size: 14.5px; margin: 0 }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) }

.note {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--amber); border-radius: 12px;
  padding: 16px 18px; color: var(--dim); font-size: 14.5px; margin: 20px 0 0;
}
.note strong { color: var(--cream); font-weight: 600 }

dl { margin: 0 }
dt { font-family: var(--head); font-weight: 600; font-size: 15.5px; margin: 22px 0 4px }
dt:first-child { margin-top: 0 }
dd { margin: 0; color: var(--dim); font-size: 15px }

footer {
  padding: 30px 0 46px; color: var(--faint); font-size: 13.5px;
  border-top: 1px solid var(--line); margin-top: 20px;
}
footer p { margin: 0 0 6px }
footer nav { padding-top: 10px; font-size: 13.5px }

/* ===========================================================================
   Hərəkət və cilalanma
   ---------------------------------------------------------------------------
   Animasiyalar qəsdən azdır və qısadır. Peşəkar təsir bağışlayan şey hərəkətin
   çoxluğu deyil, azlığı və dəqiqliyidir — və hər şey prefers-reduced-motion
   altında tamamilə dayanır.
   =========================================================================== */

/* Girişdə görünmə. JS `reveal` sinfini qoyur, görünəndə `is-in` əlavə edir;
   JS işləməsə heç biri qoyulmur və məzmun olduğu kimi görünür. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .55s cubic-bezier(.22,.61,.36,1),
              transform .55s cubic-bezier(.22,.61,.36,1);
}

/* Qonşu kartlar eyni anda yox, ardıcıl görünsün — göz hərəkəti təbii olsun. */
.is-in .step:nth-child(1), .is-in .card:nth-child(1) { animation-delay: 0ms }
.is-in .step, .is-in .card {
  animation: rise .5s cubic-bezier(.22,.61,.36,1) backwards;
}
.is-in .step:nth-child(2), .is-in .card:nth-child(2) { animation-delay: 70ms }
.is-in .step:nth-child(3) { animation-delay: 140ms }
.is-in .step:nth-child(4) { animation-delay: 210ms }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px) }
  to   { opacity: 1; transform: none }
}

/* --- Başlıq: səhifə sürüşəndə yapışır --- */

/* Başlıq .wrap-ın kənarındadır: yapışanda fon bütün eni tutsun, yoxsa
   kənarlarda məzmun bulanıqlığın altından görünür. */
header {
  position: sticky;
  top: 0;
  padding: 22px 0 14px;
  z-index: 20;
  background: rgba(14,17,22,.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
header.is-stuck { border-bottom-color: var(--line) }
header .wrap { padding-top: 0; padding-bottom: 0 }

nav a { transition: color .18s ease }

/* --- Hero: arxada çox zəif amber işıq --- */

.hero {
  position: relative;
  padding-top: 18px;
}
.hero::before {
  content: '';
  position: absolute;
  left: -10%;
  top: -30%;
  width: 70%;
  height: 150%;
  background: radial-gradient(closest-side, rgba(255,182,39,.10), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* --- Kartlar: toxunulanda qalxır --- */

.step, .card {
  transition: transform .22s cubic-bezier(.22,.61,.36,1),
              border-color .22s ease, background .22s ease;
}
.step:hover, .card:hover {
  transform: translateY(-3px);
  border-color: var(--surface3);
  background: var(--surface2);
}

/* --- Cədvəl --- */

tbody tr { transition: background .18s ease }
tbody tr:hover { background: var(--surface) }

/* --- Keçidlər --- */

a { transition: color .18s ease, opacity .18s ease }
.note { transition: border-color .22s ease }

/* --- Yuxarı qayıt --- */

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--cream);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.94);
  transition: opacity .3s ease, transform .3s cubic-bezier(.22,.61,.36,1),
              visibility .3s, background .2s ease, border-color .2s ease;
}
.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  background: var(--amber-soft);
  border-color: var(--amber-dim);
  color: var(--amber);
}
.to-top:active { transform: scale(.94) }
.to-top svg { width: 19px; height: 19px }
.to-top:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* --- Klaviatura ilə gəzənlər üçün --- */

a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Hərəkət istənilmirsə, heç nə tərpənmir --- */

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