/* ===========================================
   Clairvant Consulting — Base Styles
   Foundational static site v1.0 — light + dark mode
=========================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap');

:root {
  /* Brand constants — do not change between light/dark */
  --navy: #081C3F;
  --orange: #FB4F14;
  --orange-hover: #E24712;
  --white: #FFFFFF;
  --footer-text: #C9D3E6;
  --max-width: 1120px;

  /* Semantic tokens — light mode defaults */
  --page-bg: #FFFFFF;
  --section-alt-bg: #EEF2F8;
  --header-bg: #FFFFFF;
  --heading: #081C3F;
  --body-text: #3A3F4A;
  --border-color: #DCE2EC;
  --secondary-border: #081C3F;
}

/* Dark mode — applied automatically if the OS prefers dark and the user
   hasn't explicitly picked a theme, or explicitly via [data-theme="dark"] */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page-bg: #0A1526;
    --section-alt-bg: #142338;
    --header-bg: #0A1526;
    --heading: #F2F5FB;
    --body-text: #C3CCDC;
    --border-color: #263752;
    --secondary-border: #C3CCDC;
  }
}

[data-theme="dark"] {
  --page-bg: #0A1526;
  --section-alt-bg: #142338;
  --header-bg: #0A1526;
  --heading: #F2F5FB;
  --body-text: #C3CCDC;
  --border-color: #263752;
  --secondary-border: #C3CCDC;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Verdana, Geneva, sans-serif;
  color: var(--body-text);
  background: var(--page-bg);
  line-height: 1.6;
  font-size: 17px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', Verdana, Geneva, sans-serif;
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 0.5em 0;
}

h1 { font-size: 2.75rem; font-weight: 700; }
h2 { font-size: 1.9rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1rem 0; max-width: 68ch; }

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

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  border-bottom: 2px solid var(--orange);
  z-index: 100;
  transition: background-color 0.2s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}

.site-header img.logo {
  height: 40px;
  width: auto;
}

.site-header nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.site-header nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--heading);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--heading);
  font-weight: 700;
  border-bottom-color: var(--orange);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--heading);
  margin: 5px 0;
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--heading);
}

.theme-toggle:hover {
  border-color: var(--orange);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

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

.hero {
  padding: 88px 0 80px 0;
  overflow: hidden;
  position: relative;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-eyebrow {
  color: var(--heading);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 12px;
  font-family: 'Montserrat', sans-serif;
}

.hero h1 { margin-bottom: 20px; }

.hero p.lede {
  font-size: 1.15rem;
  color: var(--body-text);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-graphic {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-graphic img {
  width: 100%;
  max-width: 340px;
  opacity: 0.92;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
}

/* Orange background always paired with navy text — passes AA regardless of
   site theme, so these two stay literal rather than themed. */
.btn-primary {
  background: var(--orange);
  color: var(--navy);
}

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

.btn-secondary {
  background: transparent;
  color: var(--heading);
  border-color: var(--secondary-border);
}

.btn-secondary:hover {
  background: var(--heading);
  color: var(--page-bg);
}

/* ---------- Sections ---------- */

section {
  padding: 72px 0;
}

.section-alt {
  background: var(--section-alt-bg);
  transition: background-color 0.2s ease;
}

.section-heading {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-heading p { margin-bottom: 0; }

/* ---------- Feature list (home) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-item {
  border-left: 3px solid var(--orange);
  padding-left: 20px;
}

.feature-item h3 { margin-bottom: 8px; }

.feature-item p { font-size: 0.97rem; margin-bottom: 0; }

/* ---------- Service blocks ---------- */

.service-block {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
}

.service-block:last-child { border-bottom: none; }

.service-block h2 {
  display: inline-block;
  border-bottom: 3px solid var(--orange);
  padding-bottom: 6px;
  margin-bottom: 18px;
}

/* ---------- About page ---------- */

.timeline {
  border-left: 2px solid var(--border-color);
  margin-left: 4px;
  padding-left: 28px;
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
}

.timeline-item .role-years {
  font-size: 0.85rem;
  color: var(--heading);
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}

.cert-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-detail {
  margin-bottom: 20px;
}

.contact-detail .label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: var(--heading);
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-detail .value {
  font-size: 1.05rem;
  color: var(--heading);
  font-weight: 500;
}

.contact-note {
  background: var(--section-alt-bg);
  border-radius: 4px;
  padding: 20px 24px;
  font-size: 0.92rem;
  margin-top: 24px;
}

/* ---------- Footer ---------- */
/* Footer stays brand navy in both themes — it already passes contrast and
   keeps a consistent brand anchor regardless of site theme. */

.site-footer {
  background: var(--navy);
  color: var(--footer-text);
  padding: 48px 0 32px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.site-footer img.logo { height: 34px; margin-bottom: 12px; }

.site-footer a { color: var(--footer-text); }

.site-footer a:hover { color: var(--orange); }

.footer-meta {
  font-size: 0.85rem;
  text-align: right;
}

.footer-tagline {
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  font-style: italic;
}

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

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-graphic { order: -1; margin-bottom: 12px; }
  .hero-graphic img { max-width: 180px; }
  .feature-grid { grid-template-columns: 1fr; }
  .cert-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.1rem; }

  .site-header nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-bottom: 2px solid var(--orange);
    display: none;
  }

  .site-header nav.open { display: block; }

  .site-header nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px 24px;
  }

  .site-header nav ul li { padding: 10px 0; border-bottom: 1px solid var(--border-color); }

  .nav-toggle { display: block; }

  .site-footer .container { flex-direction: column; }
  .footer-meta { text-align: left; }
}

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

/* ---------- Nav area wrapper (groups nav + toggles on the right) ---------- */

.nav-area {
  display: flex;
  align-items: center;
  gap: 24px;
}

@media (max-width: 860px) {
  .nav-area { gap: 8px; }
}
