/* Keir Maltby Consulting — shared stylesheet */

:root {
  --color-blue-900: #0b2545;
  --color-blue-700: #1d4e89;
  --color-blue-600: #2563eb;
  --color-blue-500: #3b82f6;
  --color-blue-100: #e8f0fe;

  --color-steel-900: #1f2933;
  --color-steel-700: #3e4c59;
  --color-steel-500: #7b8794;
  --color-steel-300: #cbd2d9;
  --color-steel-100: #f4f6f8;
  --color-white: #ffffff;

  --color-text: var(--color-steel-900);
  --color-text-muted: var(--color-steel-700);
  --color-bg: var(--color-white);
  --color-bg-alt: var(--color-steel-100);
  --color-border: var(--color-steel-300);
  --color-link: var(--color-blue-600);
  --color-link-hover: var(--color-blue-500);
  --color-cta-bg: var(--color-blue-600);
  --color-cta-bg-hover: var(--color-blue-700);
  --color-cta-text: var(--color-white);
  --color-header-bg: var(--color-white);
  --color-footer-bg: var(--color-blue-900);
  --color-footer-text: var(--color-steel-300);

  --logo-gradient: linear-gradient(135deg, #8a95a5 0%, #4b5563 45%, #1f2933 100%);

  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1120px;
}

* {
  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;
}

h1, h2, h3, h4 {
  color: var(--color-blue-900);
  line-height: 1.25;
  margin-top: 0;
}

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

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

p {
  margin-top: 0;
}

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

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

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-blue-600);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

/* Buttons */

.btn {
  display: inline-block;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 0.4rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
}

.btn-cta {
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
}

.btn-cta:hover {
  background: var(--color-cta-bg-hover);
  color: var(--color-cta-text);
}

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

.btn-outline:hover {
  background: var(--color-blue-100);
  color: var(--color-blue-700);
}

/* Header / Logo */

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-right: auto;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  color: transparent;
  background-image: var(--logo-gradient);
  -webkit-background-clip: text;
  background-clip: text;
}

@supports not (background-clip: text) {
  .logo-mark {
    color: var(--color-steel-700);
  }
}

.logo-mark-sm {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1.1rem;
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-blue-900);
  white-space: nowrap;
}

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-blue-900);
  border-radius: 1px;
}

/* Primary nav */

.primary-nav {
  display: flex;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.4rem 0;
}

.nav-link:hover {
  color: var(--color-blue-600);
}

.nav-link.is-active {
  color: var(--color-blue-600);
  font-weight: 700;
}

.dropdown-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 2px;
}

.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 0.4rem;
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.12);
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  z-index: 200;
}

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

.dropdown-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 0.3rem;
  color: var(--color-text);
  font-weight: 500;
  white-space: nowrap;
}

.dropdown-link:hover {
  background: var(--color-blue-100);
  color: var(--color-blue-700);
}

/* Focus states */

.nav-link:focus-visible,
.dropdown-link:focus-visible,
.nav-toggle:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-blue-600);
  outline-offset: 2px;
}

/* Sections */

main {
  display: block;
}

.section {
  padding: 4rem 0;
}

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

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

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Hero */

.hero {
  padding: 4.5rem 0;
  background: linear-gradient(180deg, var(--color-blue-100) 0%, var(--color-white) 100%);
}

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

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

/* CTA band */

.cta-band {
  background: var(--color-blue-900);
  color: var(--color-white);
  padding: 3rem 0;
  text-align: center;
}

.cta-band h2 {
  color: var(--color-white);
}

.cta-band p {
  color: var(--color-steel-300);
  margin-bottom: 1.5rem;
}

/* Card grids */

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

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

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

.card p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  background: var(--color-blue-100);
  color: var(--color-blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 1rem;
}

.card ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
}

.card-meta {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--color-blue-700);
  background: var(--color-blue-100);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  margin-bottom: 0.75rem;
}

/* Stack badges */

.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.badge {
  background: var(--color-steel-100);
  border: 1px solid var(--color-border);
  color: var(--color-steel-700);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Forms */

.form-row {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 0.4rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: 2px solid var(--color-blue-600);
  outline-offset: 1px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
  font-weight: 400;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  margin-bottom: 0;
}

.form-note {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

.form-fallback {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* Footer */

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 2.5rem 0;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--color-white);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a,
.footer-contact a {
  color: var(--color-steel-300);
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--color-white);
}

.footer-copyright {
  width: 100%;
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-steel-500);
}

/* Responsive */

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

  .primary-nav {
    display: none;
    width: 100%;
    order: 4;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    padding: 0.5rem 0;
  }

  .nav-list > li {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 0.7rem 0;
    justify-content: space-between;
  }

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

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

  .btn-cta {
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
