/* ═══════════════════════════════════════════════════════════════════════════
   Kapilka Consulting — main.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --color-primary:      #4787A2;
  --color-secondary:    #C6E3E9;
  --color-accent:       #4787A2;
  --color-bg:           #FAF5F0;
  --color-bg-alt:       #E8F2FF;
  --color-text:         #000000;
  --color-text-light:   #7A7A7A;
  --color-border:       #000000;

  --color-link:         #000000;
  --color-link-visited: #4787A2;
  --color-link-hover:   #7A7A7A;

  --font-body:          "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading:       "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-size-base:     1rem;
  --line-height:        1.6;

  --spacing-xs:   0.25rem;
  --spacing-sm:   0.5rem;
  --spacing-md:   1rem;
  --spacing-lg:   2rem;
  --spacing-xl:   4rem;

  --max-width:    950px;
}

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

* {
  margin: 0;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

:where(ul, ol):not(nav ul, nav ol) {
  list-style: none;
  padding: 0;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@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;
  }
}

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

/* ── Typography ─────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 300;
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.2;
}

a {
  color: var(--color-link);
  text-decoration: underline;
}

a:visited { color: var(--color-link-visited); }
a:hover   { color: var(--color-link-hover); }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
}

/* ── Site header ────────────────────────────────────────────────────────── */
.site-header {
  padding-top: 60px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 100px;
}

.page-title {
  flex: 1 1 57%;
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1.2;
}

.header-toggle {
  all: unset;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: inherit;
}

.logo-link {
  flex: 0 1 43%;
  text-align: end;
}

.site-logo {
  width: 350px;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-top: 6px;
}

/* ── Main navigation (dropdown) ─────────────────────────────────────────── */
.site-nav {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: -15px;
  transition: grid-template-rows 0.4s ease;
}

.site-nav.is-open {
  grid-template-rows: 1fr;
}

.site-nav-inner {
  overflow: hidden;
}

.site-nav ul {
  list-style: none;
  padding: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-nav.is-open ul {
  opacity: 1;
  transition-delay: 0.1s;
}

@media (prefers-reduced-motion: reduce) {
  .site-nav {
    transition: none;
  }

  .site-nav ul {
    transition: none;
  }
}

.site-nav a {
  display: block;
  padding: 20px 0;
  font-size: 1.8125rem;
  font-weight: 300;
  color: var(--color-text-light);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: var(--color-text);
}

/* ── Main content ───────────────────────────────────────────────────────── */
.page-content {
  padding-top: 30px;
  padding-bottom: 0px;
}

.content ul,
.content ol {
  margin: 20px 0;
  padding-left: 17px;
}

.content ul {
  list-style: disc;
}

.content ol {
  list-style: decimal;
}

.content h2 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

.content p + p {
  margin-top: var(--spacing-md);
}

.content a {
  text-decoration: underline;
}

/* ── Site footer ────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 30px;
  margin-bottom: 40px;
}

.footer-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  width: 40%;
  margin: 0 0 30px;
}

.footer-logo {
  width: 150px;
  height: auto;
  margin-top: 0;
}

.footer-address {
  font-style: normal;
  font-size: 0.875rem;
  margin-top: var(--spacing-md);
}

.footer-address p {
  line-height: var(--line-height);
}

.footer-nav {
  margin-top: var(--spacing-md);
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
}

.footer-nav a {
  font-size: 0.875rem;
  text-decoration: underline;
}

#cn-badge {
  margin-top: var(--spacing-lg);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .site-header {
    padding-top: 30px;
  }

  .container {
    padding: 0 20px;
  }

  .page-content {
    padding-top: 30px;
  }
}

@media (max-width: 767px) {
  .header-top {
    flex-direction: column-reverse;
    align-items: stretch;
    padding-bottom: 30px;
  }

  .page-title {
    flex: none;
  }

  .logo-link {
    flex: none;
    text-align: start;
  }

  .site-logo {
    width: 100%;
    margin-left: 0;
  }

  .page-content {
    padding-top: 40px;
  }
}

/* ── Utilities ──────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}