/* ========================================================
   Xidmətim.az — əsas stil faylı
   Konsept: loqodan gələn qızıl–qara–ağ palitra, "reyestr/dəftər"
   ruhlu strukturla birləşdirilib. İşıq və qaranlıq rejim dəstəklənir
   ([data-theme="dark"] atributu ilə, bax: assets/js/theme.js).
   ======================================================== */

:root {
  /* Brendə bağlı sabit rənglər — rejimdən asılı olmayaraq eynidir */
  --brand-black: #0d0c0a;
  --brand-white: #fffdf8;
  --brand-gold: #c8912a;
  --brand-gold-soft: #e0ab3f;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --max-width: 1160px;

  /* İşıq rejimi (defolt) */
  --bg: #ffffff;
  --bg-alt: #f8f6f0;
  --bg-deep: #efe9d8;
  --text: #131110;
  --text-soft: #4a453d;
  --gold-label: #8f6417;
  --line: #e4dcc4;
  --line-strong: #cdbd8e;
  --danger: #8a2f2f;
  --shadow: 0 12px 32px rgba(19,17,16,0.08);
}

[data-theme="dark"] {
  --bg: #0e0d0b;
  --bg-alt: #18150f;
  --bg-deep: #221c13;
  --text: #f3efe2;
  --text-soft: #c7bea6;
  --gold-label: #eabb4d;
  --line: #2c2620;
  --line-strong: #4a3c22;
  --danger: #e0918f;
  --shadow: 0 12px 32px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { max-width: 62ch; }
.lede { font-size: 1.15rem; color: var(--text-soft); max-width: 56ch; }

/* ---------- Header / naviqasiya ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 24px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
}

.brand img.logo-mark {
  height: 42px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
  transition: filter 0.25s ease;
}

[data-theme="dark"] .brand img.logo-mark,
[data-theme="dark"] .footer-logo {
  filter: drop-shadow(0 0 10px rgba(224,171,63,0.35));
}

.brand small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.logo-full { max-width: 320px; width: 100%; }
[data-theme="dark"] .logo-full { filter: drop-shadow(0 0 16px rgba(224,171,63,0.3)); }

.footer-logo { height: 46px; width: auto; margin-bottom: 14px; }

nav.main-nav { display: flex; gap: 28px; font-size: 0.95rem; }

nav.main-nav a {
  position: relative;
  padding: 4px 0;
  color: var(--text-soft);
  transition: color 0.15s ease;
}

nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); }

nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--brand-gold);
}

.header-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--text);
  font-size: 0.92rem;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-solid { background: var(--brand-gold); border-color: var(--brand-gold); color: var(--brand-black); font-weight: 500; }
.btn-solid:hover { background: var(--brand-gold-soft); border-color: var(--brand-gold-soft); }

.btn-ghost:hover { background: var(--bg-alt); }

.btn-brass { border-color: var(--brand-gold); color: var(--gold-label); }
.btn-brass:hover { background: var(--brand-gold); color: var(--brand-black); }

/* ---------- Gecə/gündüz keçidi ---------- */

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-alt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gold-label);
  flex-shrink: 0;
}

.theme-toggle:hover { border-color: var(--brand-gold); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */

.hero { padding: 84px 0 64px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.hero-index { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold-label); letter-spacing: 0.03em; margin-bottom: 18px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; }

.ledger { border-top: 1px solid var(--line-strong); }
.ledger-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ledger-row .num { font-family: var(--font-mono); color: var(--line-strong); font-size: 0.85rem; padding-top: 3px; }
.ledger-row h4 { margin: 0 0 4px; font-size: 1.02rem; }
.ledger-row p { margin: 0; font-size: 0.92rem; color: var(--text-soft); max-width: 40ch; }

/* ---------- Bölmələr ---------- */

section { padding: 72px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-bottom: 44px; border-bottom: 1px solid var(--line); padding-bottom: 22px;
}

.section-tag { font-family: var(--font-mono); font-size: 0.75rem; color: var(--gold-label); }

.service-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service-card { background: var(--bg); padding: 32px; }
section.alt .service-card { background: var(--bg-alt); }
.service-card .tag { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-soft); display: block; margin-bottom: 14px; letter-spacing: 0.03em; }
.service-card ul { margin: 16px 0 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--text-soft); }
.service-card li { padding: 6px 0; border-top: 1px solid var(--line); }
.service-card li:first-child { border-top: none; }

/* ---------- Statistika ---------- */

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.stat { padding: 28px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat .num { font-family: var(--font-display); font-size: 2.2rem; color: var(--gold-label); display: block; }
.stat .label { font-size: 0.85rem; color: var(--text-soft); }

/* ---------- Kartlar ---------- */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.plain-card { border-top: 2px solid var(--brand-gold); padding-top: 20px; }
.plain-card .meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-soft); display: block; margin-bottom: 10px; }

/* ---------- Forma (Əlaqə) ---------- */

form.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 640px; }
form.contact-form .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.82rem; color: var(--text-soft); margin-bottom: 6px; font-family: var(--font-mono); }

input, textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong);
  background: var(--bg-alt); font-family: var(--font-body); font-size: 0.95rem; color: var(--text);
}

input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand-gold); outline-offset: 1px; }
textarea { resize: vertical; min-height: 120px; }

.contact-info { display: grid; gap: 18px; align-content: start; }
.contact-info .row { border-top: 1px solid var(--line); padding-top: 14px; }
.contact-info .row:first-child { border-top: none; padding-top: 0; }
.contact-info .row .k { font-family: var(--font-mono); font-size: 0.72rem; color: var(--gold-label); display: block; margin-bottom: 4px; }

/* ---------- Footer (hər zaman tünd, brend rəngi) ---------- */

footer.site-footer { border-top: 1px solid var(--line-strong); background: var(--brand-black); color: var(--brand-white); padding: 52px 0 28px; }
footer.site-footer a { color: var(--brand-white); opacity: 0.85; }
footer.site-footer a:hover { opacity: 1; text-decoration: underline; color: var(--brand-gold-soft); }

.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,253,248,0.18); }
.footer-grid h4 { color: var(--brand-gold-soft); font-family: var(--font-mono); font-size: 0.75rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.9rem; }

.footer-bottom { display: flex; justify-content: space-between; padding-top: 22px; font-size: 0.8rem; opacity: 0.65; font-family: var(--font-mono); }

/* ---------- Daxili səhifə başlığı ---------- */

.page-hero { padding: 56px 0 44px; border-bottom: 1px solid var(--line); }
.crumbs { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-soft); margin-bottom: 16px; }
.crumbs a { color: var(--gold-label); }

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  nav.main-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .service-list, .card-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  form.contact-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .site-header, .brand img.logo-mark { transition: none; }
}
