/* ==========================================================================
   Cape Cod Business Presence
   techmgmt/static/css/techmgmt.css

   § 1  Design tokens
   § 2  Reset & base
   § 3  Focus styles
   § 4  Layout primitives
   § 5  Richtext content
   § 6  Button system
   § 7  Hero
   § 8  Text section block
   § 9  Service cards block
   § 10 Process steps block
   § 11 CTA section block
   § 12 Page header (shared inner-page chrome)
   § 13 Service detail page
   § 14 About page
   § 15 Contact form
   § 16 Contact landing
   § 17 Service index page
   § 18 Site header & navigation
   § 19 Site footer
   § 20 Media queries
   ========================================================================== */


/* ==========================================================================
   § 1 · Design tokens
   ========================================================================== */

:root {

  /* Colors --------------------------------------------------------------- */

  --color-navy:          #1a2a3a;   /* site anchor — header, footer, hero, dark CTAs */
  --color-blue:          #2563eb;   /* action color — buttons, links, step numbers */
  --color-blue-dark:     #1d4ed8;   /* action hover */
  --color-sand:          #f4efe6;   /* warm accent — page headers */
  --color-sand-border:   #ddd5c5;   /* border on sand surfaces */
  --color-white:         #ffffff;
  --color-surface:       #f7f6f3;   /* warm off-white — card grid section background */
  --color-border:        #e2dfd8;   /* general border — warm, not cool gray */
  --color-border-strong: #b5b0a8;   /* border on hover / active states */
  --color-text:          #1f2937;   /* primary body text */
  --color-text-muted:    #6b7280;   /* secondary / supporting text */
  --color-error:         #b91c1c;   /* form error states */
  --color-focus:         #2563eb;   /* focus ring — matches action blue */
  --color-focus-ring:    rgba(37, 99, 235, 0.2);


  /* Typography ----------------------------------------------------------- */

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --text-xs:   0.8125rem;   /* 13px — legal, micro labels */
  --text-sm:   0.875rem;    /* 14px — captions, small labels, card descriptions */
  --text-base: 1rem;        /* 16px — base body */
  --text-md:   1.0625rem;   /* 17px — bumped body for comfortable reading */
  --text-lg:   1.125rem;    /* 18px — intro text, lead copy */

  --leading-tight:   1.2;   /* headings */
  --leading-base:    1.65;  /* body */
  --leading-relaxed: 1.8;   /* prose-heavy sections */


  /* Spacing -------------------------------------------------------------- */

  --space-2:  0.5rem;    /*  8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */

  --space-section: var(--space-16);   /* standard section padding-block */


  /* Layout --------------------------------------------------------------- */

  --container-max:    1100px;
  --container-narrow: 720px;
  --hero-copy-max:    660px;


  /* UI chrome ------------------------------------------------------------ */

  --radius-sm: 3px;
  --radius:    5px;
  --radius-md: 8px;

  --shadow-card:       0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 18px rgba(0, 0, 0, 0.11);

  --transition: 0.18s ease;
}


/* ==========================================================================
   § 2 · Reset & base
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-navy);
  font-weight: 700;
  line-height: var(--leading-tight);
}

a {
  color: var(--color-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-blue-dark);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Browsers do not inherit font in form controls by default */
input, button, textarea, select {
  font: inherit;
}

/* Remove browser default button chrome */
button {
  cursor: pointer;
  border: none;
  background: none;
}


/* ==========================================================================
   § 3 · Focus styles

   :focus-visible shows the ring for keyboard / sequential navigation only,
   not on mouse click. Correct modern approach, supported in all evergreen
   browsers. Form inputs override this with border + ring (see § 15).
   ========================================================================== */

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

:focus:not(:focus-visible) {
  outline: none;
}


/* ==========================================================================
   § 4 · Layout primitives
   ========================================================================== */

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

/* Narrower column for prose-heavy pages: About, Contact */
.container--narrow {
  max-width: var(--container-narrow);
}


/* ==========================================================================
   § 4b · Skip navigation link
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.1s;
}
.skip-link:focus {
  top: var(--space-2);
}


/* ==========================================================================
   § 5 · Richtext content

   Wagtail wraps |richtext filter output and RichTextBlock values in
   <div class="rich-text">. Style that class directly — do not rely on
   a hand-applied .richtext class that templates don't emit.

   Contextual prose rules (p, ul, etc.) are also written per-section in
   §§ 8–14 so they work whether or not the .rich-text wrapper is present.
   ========================================================================== */

.rich-text {
  line-height: var(--leading-relaxed);
}

.rich-text p {
  margin-bottom: 0.9em;
}

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

.rich-text h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-top: 1.8em;
  margin-bottom: 0.45em;
}

.rich-text h3 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-top: 1.5em;
  margin-bottom: 0.4em;
}

.rich-text ul,
.rich-text ol {
  padding-left: 1.4em;
  margin-bottom: 0.9em;
}

.rich-text li {
  margin-bottom: 0.3em;
}

.rich-text a {
  color: var(--color-blue);
}

.rich-text strong {
  font-weight: 600;
}


/* ==========================================================================
   § 6 · Button system

   One base, two variants. Context overrides for dark backgrounds are
   written in-context (§ 7, § 11) — no extra class on the element needed.
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 0.75rem 1.625rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition);
}

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

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

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

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

/* Secondary button on dark backgrounds — applied by context, not by modifier */
.hero__ctas .btn--secondary,
.cta-section .btn--secondary {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-white);
}

.hero__ctas .btn--secondary:hover,
.cta-section .btn--secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
  color: var(--color-white);
}


/* ==========================================================================
   § 7 · Hero
   ========================================================================== */

.hero {
  position: relative;
  background-color: var(--color-navy);
  color: var(--color-white);
  padding-block: var(--space-32);
  overflow: hidden;
}

/* Optional background image — rendered decoratively at low opacity */
.hero__image-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
}

/* Copy sits above the image layer */
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.hero__copy {
  max-width: var(--hero-copy-max);
}

.hero__headline {
  font-size: clamp(1.875rem, 5vw, 3rem);
  line-height: 1.1;
  color: var(--color-white);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-4);
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  max-width: 54ch;
  margin-bottom: var(--space-10);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}


/* ==========================================================================
   § 8 · Text section block

   Used for trust framing, reputation copy, and local context sections.
   Consecutive text sections share padding — avoids doubling vertical space
   when two stack directly.
   ========================================================================== */

.text-section {
  padding-block: var(--space-section);
}

.text-section + .text-section {
  padding-top: 0;
}

.text-section__heading {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  color: var(--color-navy);
  margin-bottom: var(--space-4);
  max-width: 42ch;
}

.text-section__body {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  max-width: 66ch;
}

.text-section__body p,
.text-section__body .rich-text p {
  margin-bottom: 0.9em;
}

.text-section__body p:last-child,
.text-section__body .rich-text p:last-child {
  margin-bottom: 0;
}


/* ==========================================================================
   § 9 · Service cards block

   Homepage: dark navy section, glassy cards with blue top-accent stripe.
   Service index page: light cards scoped via .service-list context.
   Card element styles are shared; colors are context-scoped.
   ========================================================================== */

/* --- Section (homepage block) ------------------------------------------- */

.service-cards {
  background-color: var(--color-navy);
  padding-block: var(--space-section);
}

.service-cards__heading {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.service-cards__intro {
  font-size: var(--text-md);
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-10);
  max-width: 58ch;
}

/* --- Grid (shared) ------------------------------------------------------- */

.service-cards__grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

/* --- Card base (structural — shared by homepage and service index) ------- */

.service-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

/* Card with a page link set in admin */
.service-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-6);
  text-decoration: none;
  color: inherit;
}

.service-card__link:hover {
  color: inherit;
}

/* Card with no page link */
.service-card__content {
  padding: var(--space-6);
}

.service-card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.service-card__description {
  font-size: var(--text-sm);
  line-height: var(--leading-base);
  flex: 1;
}

.service-card__description p,
.service-card__description .rich-text p {
  margin-bottom: 0.5em;
}

.service-card__description p:last-child,
.service-card__description .rich-text p:last-child {
  margin-bottom: 0;
}

.service-card__more {
  margin-top: var(--space-4);
}

/* --- Dark cards (homepage .service-cards context) ----------------------- */

.service-cards .service-card {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--color-blue);
}

.service-cards .service-card:has(.service-card__link:hover) {
  background-color: rgba(255, 255, 255, 0.11);
  border-top-color: var(--color-sand);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.service-cards .service-card.is-hovered {
  background-color: rgba(255, 255, 255, 0.11);
  border-top-color: var(--color-sand);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.service-cards .service-card__title {
  color: var(--color-white);
}

.service-cards .service-card__description {
  color: rgba(255, 255, 255, 0.7);
}

/* "Learn more" as a pronounced pill badge */
.service-cards .service-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  background-color: var(--color-blue);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 999px;
  align-self: flex-start;
  transition: background-color var(--transition);
}

.service-cards .service-card:has(.service-card__link:hover) .service-card__more {
  background-color: var(--color-sand);
  color: var(--color-navy);
}

.service-cards .service-card.is-hovered .service-card__more {
  background-color: var(--color-sand);
  color: var(--color-navy);
}

/* --- Light cards (service index .service-list context) ------------------ */

.service-list .service-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-blue);
  box-shadow: var(--shadow-card);
}

.service-list .service-card:has(.service-card__link:hover) {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.service-list .service-card.is-hovered {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.service-list .service-card__title {
  color: var(--color-navy);
}

.service-list .service-card__description {
  color: var(--color-text-muted);
}

.service-list .service-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  background-color: var(--color-blue);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 999px;
  align-self: flex-start;
  transition: background-color var(--transition);
}

.service-list .service-card:has(.service-card__link:hover) .service-card__more {
  background-color: var(--color-blue-dark);
}

.service-list .service-card.is-hovered .service-card__more {
  background-color: var(--color-blue-dark);
}


/* ==========================================================================
   § 10 · Process steps block

   Four numbered steps. Flexbox per step aligns the circle with the text.
   ========================================================================== */

.process-steps {
  padding-block: var(--space-section);
}

.process-steps__heading {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  margin-bottom: var(--space-10);
}

.process-steps__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.process-step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.process-step__number {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  background-color: var(--color-blue);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  /* Optical alignment: circle top sits at text cap-height, not ascender */
  margin-top: 0.15rem;
}

.process-step__title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.3rem;
}

.process-step__body {
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--color-text-muted);
}


/* ==========================================================================
   § 11 · CTA section block

   Dark background mirrors the hero — bookends the homepage content.
   Centered, generous vertical space, intentionally calm tone.
   ========================================================================== */

.cta-section {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding-block: var(--space-24);
  text-align: center;
}

.cta-section__heading {
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  color: var(--color-white);
  margin-bottom: var(--space-4);
  max-width: 40ch;
  margin-inline: auto;
}

.cta-section__body {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  max-width: 50ch;
  margin-inline: auto;
  margin-bottom: var(--space-10);
}

.cta-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}


/* ==========================================================================
   § 12 · Page header — shared inner-page chrome

   Used on: service pages, about page, contact page.
   Sand background anchors each inner page; distinguishes from white below.
   ========================================================================== */

.page-header {
  background-color: var(--color-sand);
  border-bottom: 1px solid var(--color-sand-border);
  padding-block: var(--space-16) var(--space-10);
}

.page-header h1 {
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  color: var(--color-navy);
  letter-spacing: -0.01em;
  max-width: 24ch;
}

.page-header__tagline {
  font-size: var(--text-lg);
  line-height: var(--leading-base);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  max-width: 56ch;
}

.page-header__intro {
  margin-top: var(--space-4);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  max-width: 60ch;
}

.page-header__intro p,
.page-header__intro .rich-text p {
  margin-bottom: 0.75em;
}

.page-header__intro p:last-child,
.page-header__intro .rich-text p:last-child {
  margin-bottom: 0;
}


/* ==========================================================================
   § 13 · Service detail page
   ========================================================================== */

.service-detail {
  padding-block: var(--space-section);
}

/* Intro — larger text, sets the tone before the detailed body */
.service-detail__intro {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  max-width: 66ch;
  margin-bottom: var(--space-10);
}

.service-detail__intro p,
.service-detail__intro .rich-text p {
  margin-bottom: 0.85em;
}

.service-detail__intro p:last-child,
.service-detail__intro .rich-text p:last-child {
  margin-bottom: 0;
}

/* Body — standard prose, may include lists */
.service-detail__body {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  max-width: 66ch;
}

.service-detail__body p,
.service-detail__body .rich-text p {
  margin-bottom: 0.9em;
}

.service-detail__body p:last-child,
.service-detail__body .rich-text p:last-child {
  margin-bottom: 0;
}

.service-detail__body ul,
.service-detail__body ol,
.service-detail__body .rich-text ul,
.service-detail__body .rich-text ol {
  padding-left: 1.4em;
  margin-bottom: 0.9em;
}

.service-detail__body li,
.service-detail__body .rich-text li {
  margin-bottom: 0.35em;
}

/* CTA — ruled off from body copy */
.service-detail__cta {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}


/* ==========================================================================
   § 14 · About page
   ========================================================================== */

.about-body {
  padding-block: var(--space-section);
}

/* Optional intro — larger text, ruled off from main content */
.about-body__intro {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  padding-bottom: var(--space-10);
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--color-border);
}

.about-body__intro p,
.about-body__intro .rich-text p {
  margin-bottom: 0.85em;
}

.about-body__intro p:last-child,
.about-body__intro .rich-text p:last-child {
  margin-bottom: 0;
}

/* Main content */
.about-body__content {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

.about-body__content p,
.about-body__content .rich-text p {
  margin-bottom: 0.9em;
}

.about-body__content p:last-child,
.about-body__content .rich-text p:last-child {
  margin-bottom: 0;
}

.about-body__content h2,
.about-body__content .rich-text h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-top: 2em;
  margin-bottom: 0.45em;
}

.about-body__content ul,
.about-body__content ol,
.about-body__content .rich-text ul,
.about-body__content .rich-text ol {
  padding-left: 1.4em;
  margin-bottom: 0.9em;
}

.about-body__content li,
.about-body__content .rich-text li {
  margin-bottom: 0.35em;
}


/* ==========================================================================
   § 14b · Standard page
   ========================================================================== */

.standard-body {
  padding-block: var(--space-section);
}

.standard-body__intro {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  padding-bottom: var(--space-10);
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--color-border);
}

.standard-body__intro p,
.standard-body__intro .rich-text p {
  margin-bottom: 0.85em;
}

.standard-body__intro p:last-child,
.standard-body__intro .rich-text p:last-child {
  margin-bottom: 0;
}


/* ==========================================================================
   § 15 · Contact form

   Calm, low-pressure layout. No decorative chrome. Generous field sizing.
   Targets Wagtail's default widget HTML — no custom input classes needed.
   ========================================================================== */

.contact-trust {
  padding-block: var(--space-section);
  border-bottom: 1px solid var(--color-border);
}

.contact-trust__content h2 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.4em;
}

.contact-trust__content h2:first-child {
  margin-top: 0;
}

.contact-trust__content p {
  margin-bottom: 0.85em;
  line-height: var(--leading-relaxed);
}

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

.contact-form-section {
  padding-block: var(--space-section);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-field__label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.form-field__required {
  color: var(--color-error);
  margin-left: 0.2em;
  font-weight: 400;
}

/* All input types Wagtail contrib form widgets may produce */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background-color: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--color-text);
  transition: border-color var(--transition);
  appearance: none;
}

.contact-form input[type="text"]:hover,
.contact-form input[type="email"]:hover,
.contact-form input[type="tel"]:hover,
.contact-form textarea:hover {
  border-color: var(--color-border-strong);
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form textarea:focus {
  /* Override global :focus-visible — use border+ring pattern for inputs */
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.contact-form textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.form-field__errors {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--color-error);
  font-size: var(--text-sm);
}

.form-actions {
  margin-top: var(--space-2);
}


/* ==========================================================================
   § 16 · Contact landing (thank you page)
   ========================================================================== */

.contact-landing {
  padding-block: var(--space-section);
}

.contact-landing p,
.contact-landing .rich-text p {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  margin-bottom: var(--space-8);
  max-width: 54ch;
}


/* ==========================================================================
   § 17 · Service index page
   ========================================================================== */

.service-list {
  padding-block: var(--space-section);
}

.service-list__grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

/* Cards in this grid inherit all styles from § 9 — no overrides needed */


/* ==========================================================================
   § 18 · Site header & navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-navy);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.18);
}

.site-header__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
  padding-block: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.site-header__brand {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
  line-height: 1.3;
  flex-shrink: 1;
  min-width: 0;
}

.site-header__brand:hover {
  color: var(--color-sand);
}

.site-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.site-nav__link {
  display: inline-block;
  padding: 0.375rem 0.625rem;
  font-size: var(--text-base);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.site-nav__link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

/* Contact item styled as a small button */
.site-nav__link--cta {
  background-color: var(--color-blue);
  color: var(--color-white);
  font-weight: 600;
  padding-inline: 0.875rem;
}

.site-nav__link--cta:hover {
  background-color: var(--color-blue-dark);
  color: var(--color-white);
}


/* ==========================================================================
   § 19 · Site footer
   ========================================================================== */

.site-footer {
  background-color: var(--color-navy);
  color: rgba(255, 255, 255, 0.75);
  margin-top: var(--space-24);
  padding-block: var(--space-16) var(--space-12);
}

.site-footer__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

.site-footer__heading {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.site-footer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__list a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color var(--transition);
}

.site-footer__list a:hover {
  color: var(--color-white);
}

.site-footer__legal {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.38);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}


/* ==========================================================================
   § 20 · Media queries
   ========================================================================== */

/* Tablet — 640px and up */
@media (min-width: 640px) {

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

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

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

  .site-footer__inner {
    grid-template-columns: 2fr 1fr;
  }

  .site-footer__legal {
    grid-column: 1 / -1;
  }
}

/* Desktop — 960px and up */
@media (min-width: 960px) {

  .service-cards__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .process-steps__list {
    /* Tighter gap at 4 columns — steps read as a row, not a stacked list */
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }

  .site-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .site-footer__legal {
    grid-column: 1 / -1;
  }
}

/* Mobile — below 640px */
@media (max-width: 639px) {
  .hero {
    padding-block: var(--space-16);
  }
}

/* Mobile — below 500px */
@media (max-width: 499px) {
  .site-header__brand {
    font-size: 0.8rem;
  }
}
