/*
 * Pipeline Orchard: site styles. Mobile-first; breakpoints 48em (768px) and 64em (1024px).
 * Changelog:
 *   2026-10-18  Created.
 */

/* Fonts: Google Fonts files (latin subset) hosted here so pages don't wait on a
   third-party stylesheet. Lora is a variable font (400 to 700). */
@font-face {
  font-family: "Rye";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/rye.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/lora.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lora-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Colors (from the brief) */
  --color-bg: #F7F3EC;          /* warm off-white page background */
  --color-surface: #EFE7DA;     /* light tan: alternating sections, form box */
  --color-text: #2A1D15;        /* dark brown body text, never pure black */
  --color-text-muted: #5C4A3D;  /* captions, form labels, small print */
  --color-heading: #A4552B;     /* rust copper: large headings ONLY */
  --color-link: #8A4422;        /* deep rust: text links */
  --color-accent: #3E6B2A;      /* orchard green: dividers, icons, callouts */
  --color-cta: #C8202A;         /* apple red: buttons ONLY */
  --color-cta-hover: #A51A22;
  --color-cta-text: #FFFFFF;
  --color-footer-bg: #2A1D15;
  --color-footer-text: #F7F3EC;
  --color-border: #D9CBB5;      /* hairlines on tan and off-white */
  --color-error: #A51A22;
  --color-pipe: #8E4A27;        /* the copper pipeline behind the steps */

  --font-display: "Rye", Georgia, serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;

  --font-size-body: 1.125rem;   /* 18px */
  --font-size-small: 1rem;      /* the floor */
  --font-size-lede: clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem);
  --font-size-h1: clamp(2.125rem, 1.4rem + 3.2vw, 3.75rem);
  --font-size-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.625rem);
  --font-size-h3: 1.3125rem;
  --line-height-body: 1.7;
  --line-height-heading: 1.2;
  --measure: 40rem;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: clamp(3.5rem, 2.5rem + 4vw, 6rem);

  --radius: 6px;
  --container-max: 72rem;
  --gutter: 1.25rem;
}

/* ---- Base --------------------------------------------------------------- */

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  flex: 1;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-heading);
  line-height: var(--line-height-heading);
  letter-spacing: 0.01em;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }

h3 {
  font-size: var(--font-size-h3);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--color-link);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: var(--radius);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---- Buttons (apple red is for buttons only) ------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-cta);
  color: var(--color-cta-text);
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.button:hover {
  background: var(--color-cta-hover);
  color: var(--color-cta-text);
}

.button:focus-visible {
  outline-color: var(--color-text);
}

.button--large {
  min-height: 3.5rem;
  padding-inline: 2rem;
  font-size: 1.125rem;
}

/* ---- Header and navigation ---------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 4.5rem;
  padding-block: 0.5rem;
}

.header-logo {
  display: block;
  flex-shrink: 0;
}

.header-logo img {
  width: auto;
  height: 2.75rem; /* about 44px on phones */
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: var(--color-text);
  border-radius: var(--radius);
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

html:not(.js) .nav-toggle {
  display: none;
}

.site-nav {
  display: none;
}

html:not(.js) .site-nav,
.site-nav.is-open {
  display: block;
}

.site-nav.is-open {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  padding: var(--space-sm) var(--gutter) var(--space-md);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 12px 24px -16px rgb(42 29 21 / 0.35);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
}

.nav-list a:not(.button) {
  display: block;
  padding: 0.6rem 0;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

.nav-list a:not(.button):hover,
.nav-list a:not(.button)[aria-current="page"] {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.nav-list .button {
  margin-top: var(--space-xs);
  width: 100%;
}

@media (min-width: 48em) {
  .header-inner {
    min-height: 5.5rem;
  }

  .header-logo img {
    height: 4rem;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav,
  .site-nav.is-open {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
  }

  .nav-list .button {
    margin-top: 0;
    width: auto;
  }
}

/* ---- Sections --------------------------------------------------------------- */

.section {
  padding-block: var(--space-xl);
}

.section--surface {
  background: var(--color-surface);
}

.section-intro {
  max-width: var(--measure);
  margin-bottom: var(--space-lg);
}

.section-intro p {
  margin-top: var(--space-xs);
}

.center {
  text-align: center;
  margin-inline: auto;
}

/* ---- Home hero ---------------------------------------------------------------- */

.hero {
  padding-block: var(--space-lg) var(--space-xl);
  text-align: center;
}

.hero-logo {
  width: min(100%, 34rem);
  margin-inline: auto;
}

.hero h1 {
  margin-top: var(--space-md);
}

.hero h1 span {
  display: block;
}

.hero-sub {
  margin-top: var(--space-sm);
  font-size: var(--font-size-lede);
  color: var(--color-text);
}

.hero .button {
  margin-top: var(--space-md);
}

/* ---- Steps: three stops on a copper pipeline -------------------------------- */

.steps {
  --stop: 3.25rem;
  position: relative;
  display: grid;
  gap: var(--space-md);
  list-style: none;
  counter-reset: step;
}

/* The pipe: a copper segment from each stop to the next. It runs down the
   left on phones and across the stops on wider screens, and ends at the last stop. */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--stop) / 2);
  left: calc(var(--stop) / 2 - 4px);
  width: 8px;
  height: calc(100% + var(--space-md));
  background: linear-gradient(90deg, #6E3519, var(--color-pipe) 35%, #B4683D 55%, var(--color-pipe) 75%, #6E3519);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: var(--stop) 1fr;
  column-gap: var(--space-sm);
  align-items: start;
  align-content: start;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--stop);
  height: var(--stop);
  border-radius: 50%;
  border: 5px solid var(--color-pipe);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1;
}

.section--surface .step::before {
  background: var(--color-surface);
}

.step-body {
  padding-top: 0.55rem;
}

.step-body p {
  margin-top: 0.25rem;
}

@media (min-width: 48em) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .step:not(:last-child)::after {
    top: calc(var(--stop) / 2 - 4px);
    left: 50%;
    width: calc(100% + var(--space-lg));
    height: 8px;
    background: linear-gradient(180deg, #6E3519, var(--color-pipe) 35%, #B4683D 55%, var(--color-pipe) 75%, #6E3519);
  }

  .step {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .step-body {
    position: relative;
    z-index: 1;
    padding-top: var(--space-sm);
    max-width: 19rem;
  }
}

.steps-more {
  margin-top: var(--space-lg);
  text-align: center;
}

/* ---- Callout: one professional per industry, per area ------------------------ */

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-sm) var(--space-md);
  align-items: start;
  max-width: 52rem;
  margin-inline: auto;
  padding: var(--space-md);
  background: var(--color-surface);
  border-left: 8px solid var(--color-accent);
  border-radius: var(--radius);
}

.section--surface .callout {
  background: var(--color-bg);
}

.callout-mark {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--color-accent);
}

.callout h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem);
}

.callout p {
  margin-top: var(--space-xs);
}

@media (min-width: 48em) {
  .callout {
    padding: var(--space-lg);
  }

  .callout-mark {
    width: 3.5rem;
    height: 3.5rem;
  }
}

/* ---- Closing CTA ---------------------------------------------------------------- */

.closing {
  text-align: center;
}

.closing p {
  margin-top: var(--space-xs);
  font-size: var(--font-size-lede);
}

.closing .button {
  margin-top: var(--space-md);
}

/* ---- Inner pages ------------------------------------------------------------------ */

.page-header {
  padding-block: var(--space-xl) var(--space-lg);
}

.page-header .lede {
  margin-top: var(--space-sm);
  max-width: var(--measure);
  font-size: var(--font-size-lede);
}

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: var(--space-sm);
}

.prose h2 {
  margin-top: var(--space-lg);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.details {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.detail {
  padding-top: var(--space-md);
  border-top: 2px solid var(--color-accent);
}

.detail p {
  margin-top: var(--space-xs);
}

@media (min-width: 64em) {
  .details {
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--space-xl);
  }
}

.page-cta {
  margin-top: var(--space-xl);
}

.updated {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

/* ---- Contact form ------------------------------------------------------------------ */

.contact-wrap {
  padding-bottom: var(--space-xl);
}

.contact-form,
.form-success {
  max-width: 44rem;
  padding: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius);
}

@media (min-width: 48em) {
  .contact-form,
  .form-success {
    padding: var(--space-lg);
  }

  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-md);
  }
}

.field {
  margin-bottom: var(--space-md);
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-text);
  font-weight: 600;
}

.optional,
.hint {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: var(--font-size-small);
}

.hint {
  display: block;
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1.5px solid #8F7A66;
  border-radius: var(--radius);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--color-link);
  outline-offset: 1px;
}

.field [aria-invalid="true"] {
  border-color: var(--color-error);
  border-width: 2px;
}

.field-error {
  margin-top: 0.35rem;
  color: var(--color-error);
  font-size: var(--font-size-small);
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  margin-top: var(--space-sm);
}

.form-status {
  margin-top: var(--space-sm);
  color: var(--color-error);
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-success h2 {
  font-size: var(--font-size-h2);
}

.form-success p {
  margin-top: var(--space-xs);
}

.form-success:focus {
  outline: none;
}

/* ---- 404 ------------------------------------------------------------------------- */

.not-found {
  padding-block: var(--space-xl);
  text-align: center;
}

.not-found-mark {
  width: 5rem;
  height: 5rem;
  margin-inline: auto;
  margin-bottom: var(--space-md);
  transform: rotate(-14deg);
}

.not-found p {
  margin-top: var(--space-sm);
  font-size: var(--font-size-lede);
}

.not-found .button {
  margin-top: var(--space-md);
}

/* ---- Footer ------------------------------------------------------------------------ */

.site-footer {
  padding-block: var(--space-lg);
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
}

.footer-inner {
  display: grid;
  gap: var(--space-md);
}

.footer-brand img {
  width: auto;
  height: 3.5rem;
}

.footer-slogan {
  margin-top: var(--space-xs);
  font-style: italic;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem var(--space-md);
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding-block: 0.6rem;
  color: var(--color-footer-text);
}

.site-footer :focus-visible {
  outline-color: var(--color-footer-text);
}

.copyright {
  font-size: var(--font-size-small);
  opacity: 0.85;
}

@media (min-width: 48em) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .copyright {
    grid-column: 1 / -1;
  }
}

/* ---- Motion -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Bold step and callout titles where the brief has bold text, not headings. */
.step-title,
.callout-heading {
  font-size: var(--font-size-h3);
  font-weight: 700;
  line-height: 1.3;
}

.callout-heading {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
}

.section-tight {
  padding-bottom: var(--space-xl);
}
