/* ============================================================
   GROUNDWORK ADVOCATES — DESIGN SYSTEM
   ============================================================ */

/* ------------------------------------------------------------
   CUSTOM PROPERTIES
   ------------------------------------------------------------ */

:root {
  /* Colors */
  --color-green:       #2D5F4F;
  --color-linen:       #F0EAE0;
  --color-terracotta:  #B5705A;
  --color-terracotta-dark: #9E5F4A;
  --color-slate:       #4A7FA5;
  --color-text:        #2D5F4F;
  --color-white:       #FFFFFF;
  --color-surface:     #FAF7F2;

  /* Typography */
  --font-heading: 'Spectral', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;

  /* Sizes */
  --text-base:  17px;
  --lh-base:    1.75;

  --h1: 3rem;       /* 48px */
  --h2: 2.25rem;    /* 36px */
  --h3: 1.5rem;     /* 24px */
  --h4: 1.25rem;    /* 20px */

  /* Spacing */
  --section-pad: 80px;
  --section-pad-mobile: 48px;
  --container:   1100px;

  /* Radii */
  --radius-card:   12px;
  --radius-button:  8px;
  --radius-input:   8px;

  /* Borders */
  --border: 1px solid rgba(45, 95, 79, 0.18);
}

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--text-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-linen);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-slate);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

a:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
}

/* ------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-green);
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }

p {
  font-weight: 400;
  margin-bottom: 1.1em;
}

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

.label {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-green);
}

/* ------------------------------------------------------------
   LAYOUT
   ------------------------------------------------------------ */

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

section {
  padding-block: var(--section-pad);
}

/* ------------------------------------------------------------
   LOGO
   ------------------------------------------------------------ */

.logo {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  text-decoration: none;
  color: inherit;
}

.logo:hover {
  color: inherit;
}

.logo:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 4px;
  border-radius: 2px;
}

.logo__name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--color-green);
  white-space: nowrap;
}

.logo__sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-green);
  line-height: 1;
}

/* Logo on dark background */
.logo--light .logo__name,
.logo--light .logo__sub {
  color: var(--color-white);
}

/* ------------------------------------------------------------
   NAVIGATION
   ------------------------------------------------------------ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-linen);
  border-bottom: var(--border);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 58px;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.site-nav__links a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-green);
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-button);
  transition: background-color 0.15s ease;
  white-space: nowrap;
}

.site-nav__links a:hover {
  background-color: rgba(45, 95, 79, 0.08);
  color: var(--color-green);
}

.site-nav__links a.active {
  font-weight: 400;
  background-color: rgba(45, 95, 79, 0.1);
}

.site-nav__links a:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 2px;
}

.site-nav__cta {
  flex-shrink: 0;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--color-green);
  border-radius: var(--radius-button);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 2px;
}

.nav-toggle svg {
  display: block;
}

/* Mobile overlay nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: var(--color-green);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-white);
  padding: 0.4rem;
  border-radius: var(--radius-button);
}

.mobile-nav__close:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.mobile-nav__links a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-white);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-button);
  transition: background-color 0.15s ease;
}

.mobile-nav__links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-nav__links a:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-button);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1;
}

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

/* Hero buttons (on dark green background) */
.btn--hero-primary {
  background-color: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn--hero-primary:hover {
  background-color: var(--color-white);
  color: var(--color-green);
}

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

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

/* Standard buttons (on linen / light backgrounds) */
.btn--primary {
  background-color: var(--color-terracotta);
  border-color: var(--color-terracotta);
  color: var(--color-white);
}

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

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

.btn--secondary:hover {
  background-color: var(--color-terracotta-dark);
  border-color: var(--color-terracotta-dark);
  color: var(--color-white);
}

/* Nav CTA */
.btn--nav {
  background-color: var(--color-terracotta);
  border-color: var(--color-terracotta);
  color: var(--color-white);
  padding: 10px 20px;
  font-size: 0.82rem;
}

.btn--nav:hover {
  background-color: var(--color-terracotta-dark);
  border-color: var(--color-terracotta-dark);
  color: var(--color-white);
}

/* ------------------------------------------------------------
   CARDS
   ------------------------------------------------------------ */

.card {
  background-color: var(--color-white);
  border: var(--border);
  border-radius: var(--radius-card);
  padding: 2rem;
}

.card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  color: var(--color-terracotta);
}

.card__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--h4);
  color: var(--color-green);
  margin-bottom: 0.6rem;
}

.card__body {
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.card__link {
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--color-slate);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.card__link:hover {
  color: var(--color-green);
  text-decoration: underline;
}

/* ------------------------------------------------------------
   GRID UTILITIES
   ------------------------------------------------------------ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ------------------------------------------------------------
   SECTION HEADINGS
   ------------------------------------------------------------ */

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

.section-header--centered {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.section-header .label {
  display: block;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.05rem;
  font-weight: 400;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */

.site-footer {
  background-color: var(--color-green);
  color: var(--color-white);
  padding-block: 60px 40px;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.site-footer__brand .logo__name {
  color: var(--color-white);
  font-size: 1.2rem;
}

.site-footer__brand .logo__sub {
  color: rgba(255, 255, 255, 0.65);
}

.site-footer__tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 1rem;
}

.site-footer__col-title {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.site-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.site-footer__col ul a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
}

.site-footer__col ul a:hover {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__col ul a:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
  border-radius: 2px;
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 2rem;
}

.site-footer__legal {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  max-width: 700px;
}

.site-footer__copy {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ------------------------------------------------------------
   FORM ELEMENTS
   ------------------------------------------------------------ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--color-green);
}

.form-input,
.form-textarea,
.form-select {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--color-text);
  background-color: var(--color-white);
  border: 1px solid rgba(45, 95, 79, 0.3);
  border-radius: var(--radius-input);
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color 0.15s ease;
  line-height: var(--lh-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(45, 95, 79, 0.12);
}

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

.form-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 400;
  font-size: 0.95rem;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(45, 95, 79, 0.4);
  border-radius: 3px;
  accent-color: var(--color-green);
  cursor: pointer;
  flex-shrink: 0;
}

/* Inline email capture */
.email-capture {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.email-capture .form-input {
  flex: 1;
  min-width: 200px;
}

/* ------------------------------------------------------------
   INLINE LEGAL DISCLAIMER
   ------------------------------------------------------------ */

.disclaimer {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.82rem;
  color: rgba(45, 95, 79, 0.65);
  line-height: 1.6;
  border-left: 3px solid rgba(45, 95, 79, 0.2);
  padding-left: 1rem;
  margin-top: 2rem;
}

/* ------------------------------------------------------------
   TEXT LINK ARROW
   ------------------------------------------------------------ */

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-weight: 400;
  color: var(--color-slate);
  text-decoration: none;
}

.arrow-link:hover {
  color: var(--color-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.arrow-link:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------
   PAGE HERO (inner pages)
   ------------------------------------------------------------ */

.page-hero {
  background-color: var(--color-green);
  padding-block: 72px;
  text-align: center;
}

.page-hero h1 {
  color: var(--color-white);
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 1rem;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   ACCORDION
   ------------------------------------------------------------ */

.accordion {
  border: var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.accordion__item {
  border-bottom: var(--border);
}

.accordion__item:last-child {
  border-bottom: none;
}

.accordion__trigger {
  width: 100%;
  background: var(--color-white);
  border: none;
  text-align: left;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  color: var(--color-green);
  transition: background-color 0.15s ease;
}

.accordion__trigger:hover {
  background-color: var(--color-surface);
}

.accordion__trigger:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: -2px;
}

.accordion__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-terracotta);
  transition: transform 0.2s ease;
}

.accordion__trigger[aria-expanded="true"] .accordion__icon {
  transform: rotate(45deg);
}

.accordion__panel {
  background-color: var(--color-surface);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
}

.accordion__panel[hidden] {
  display: none;
}

/* ------------------------------------------------------------
   STEP FLOW
   ------------------------------------------------------------ */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: steps;
}

.step {
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: var(--color-white);
  border: var(--border);
  border-radius: var(--radius-card);
  position: relative;
}

.step::before {
  counter-increment: steps;
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-green);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  margin: 0 auto 1.25rem;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.9rem;
  font-weight: 300;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 900px) {
  :root {
    --h1: 2.4rem;
    --h2: 1.85rem;
    --h3: 1.3rem;
    --h4: 1.1rem;
    --section-pad: var(--section-pad-mobile);
  }

  .site-nav__links,
  .site-nav__cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .site-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --h1: 2rem;
    --h2: 1.6rem;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .email-capture {
    flex-direction: column;
  }

  .email-capture .btn {
    width: 100%;
    text-align: center;
  }
}
