/* ============================================
   PivotSystems Consulting — Stylesheet
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-forest: #1B4332;
  --color-emerald: #2D6A4F;
  --color-sage: #40916C;
  --color-mint: #B7E4C7;
  --color-whisper: #D8F3DC;
  --color-charcoal: #1A1A2E;
  --color-slate: #4A4A5A;
  --color-cloud: #F0F0F0;
  --color-white: #FFFFFF;

  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --max-width: 1100px;
  --radius: 8px;
  --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-charcoal);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul {
  list-style: none;
}

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

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

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    box-shadow var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--color-emerald);
  color: var(--color-white);
  border-color: var(--color-emerald);
}

.btn-primary:hover {
  background: var(--color-forest);
  border-color: var(--color-forest);
  color: var(--color-white);
}

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

.btn-secondary:hover {
  background: var(--color-emerald);
  color: var(--color-white);
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-forest);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.nav-logo:hover {
  color: var(--color-mint);
}

.nav-logo-sub {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--color-mint);
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  max-width: 300px;
  height: 100vh;
  background: var(--color-forest);
  padding: 5rem 2rem 2rem;
  transition: right var(--transition);
  z-index: 999;
}

.nav-menu.is-open {
  right: 0;
}

.nav-menu li + li {
  margin-top: 1.5rem;
}

.nav-menu a {
  color: var(--color-mint);
  font-size: 1.125rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--color-white);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
}

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

/* --- Hero Section --- */
.hero {
  padding: 5rem 0 4rem;
  background: var(--color-white);
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-forest);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-slate);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Section Shared --- */
.section {
  padding: 4rem 0;
}

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

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-forest);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.0625rem;
  color: var(--color-slate);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Services --- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-mint);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(27, 67, 50, 0.1);
  transform: translateY(-2px);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-whisper);
  color: var(--color-emerald);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.service-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--color-slate);
  line-height: 1.6;
}

/* --- About --- */
.about-content {
  max-width: 750px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.0625rem;
  color: var(--color-slate);
  line-height: 1.7;
}

.about-content p + p {
  margin-top: 1.25rem;
}

.about-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}

.highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--color-whisper);
  color: var(--color-forest);
  border-radius: 2rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.highlight-badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--color-slate);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-emerald);
  margin-bottom: 1.5rem;
}

.contact-email:hover {
  color: var(--color-forest);
}

.contact-form label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: 0.375rem;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--color-charcoal);
  background: var(--color-whisper);
  border: 1px solid var(--color-mint);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  transition: border-color var(--transition), outline var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-emerald);
  outline-offset: 2px;
  border-color: var(--color-emerald);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  width: 100%;
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.is-visible {
  display: block;
}

.form-success h3 {
  font-size: 1.25rem;
  color: var(--color-forest);
  margin-bottom: 0.5rem;
}

.form-success p {
  color: var(--color-slate);
}

/* --- Footer --- */
.site-footer {
  background: var(--color-forest);
  color: var(--color-mint);
  padding: 2.5rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: var(--color-mint);
  font-size: 0.9375rem;
  transition: color var(--transition);
}

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

.footer-copy {
  font-size: 0.875rem;
  color: var(--color-sage);
}

/* --- Scroll Animations --- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive: Tablet (768px+) --- */
@media (min-width: 768px) {
  .hero h1 {
    font-size: 2.75rem;
  }

  .hero p {
    font-size: 1.25rem;
  }

  .section {
    padding: 5rem 0;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .contact-form button {
    width: auto;
  }

  /* Desktop nav */
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    background: none;
    padding: 0;
    display: flex;
    gap: 2rem;
  }

  .nav-menu li + li {
    margin-top: 0;
  }

  .nav-overlay {
    display: none !important;
  }
}

/* --- Responsive: Desktop (1024px+) --- */
@media (min-width: 1024px) {
  .hero {
    padding: 6rem 0 5rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .section {
    padding: 6rem 0;
  }

  .section-header h2 {
    font-size: 2.25rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Focus Visible --- */
:focus-visible {
  outline: 2px solid var(--color-emerald);
  outline-offset: 2px;
}
