/* ==========================================================================
   KatCode – Design-System (v1)
   ========================================================================== */

:root {
  --color-primary: #0e9f6e;
  --color-primary-dark: #0b7f58;
  --color-ink: #0b1f3a;
  --color-text: #1f2937;
  --color-text-muted: #5b6472;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f7f6;
  --color-border: #e2e8e6;

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

  --container-width: 1160px;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(11, 31, 58, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  color: var(--color-ink);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
  color: var(--color-text);
}

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.btn-outline:hover {
  background: var(--color-ink);
  color: #fff;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-ink);
}

.logo:hover {
  text-decoration: none;
}

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.main-nav > ul > li > a {
  color: var(--color-ink);
  font-weight: 600;
}

.main-nav > ul > li > a:hover {
  color: var(--color-primary-dark);
  text-decoration: none;
}

.has-dropdown {
  position: relative;
}

.dropdown-parent {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.dropdown-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-ink);
  border-bottom: 2px solid var(--color-ink);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.has-dropdown.is-open .dropdown-caret {
  transform: rotate(-135deg);
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  flex-direction: column;
  gap: 0;
}

.has-dropdown.is-open .dropdown {
  display: flex;
}

.dropdown li a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--color-text);
  font-weight: 500;
}

.dropdown li a:hover {
  background: var(--color-bg-alt);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-ink);
}

.header-cta {
  flex-shrink: 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: var(--color-bg-alt);
  padding: 4.5rem 0;
}

.hero-inner {
  max-width: 760px;
}

.hero .eyebrow {
  display: inline-block;
  color: var(--color-primary-dark);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-header p {
  color: var(--color-text-muted);
}

/* ---------- Card grids ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.section-alt .card {
  background: var(--color-bg);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
}

/* ---------- Process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 3rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Blog teaser ---------- */

.article-teaser h3 {
  margin-bottom: 0.4rem;
}

.article-teaser .meta {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

/* ---------- Final CTA band ---------- */

.cta-band {
  background: var(--color-ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
}

.cta-band h2,
.cta-band p {
  color: #fff;
}

.cta-band .btn-outline {
  border-color: #fff;
  color: #fff;
}

.cta-band .btn-outline:hover {
  background: #fff;
  color: var(--color-ink);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-ink);
  color: #cbd5d9;
  padding-top: 3.5rem;
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
}

.site-footer a {
  color: #cbd5d9;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-brand .logo {
  color: #fff;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
}

.footer-legal ul {
  display: flex;
  gap: 1.25rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 0;
  }

  .main-nav > ul > li > a {
    display: block;
    padding: 0.6rem 0;
  }

  .has-dropdown .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .header-cta {
    order: 2;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    padding: 2rem 1.25rem;
  }
}
