/* ==========================================================================
   CRAWFORD & CO  ·  SHARED STYLESHEET
   --------------------------------------------------------------------------
   This single file styles every page on the site. If you want to change how
   something looks everywhere at once (a colour, a font, the spacing), this is
   the place. Each section is labelled in plain English so you can find things.

   THE FIVE BRAND COLOURS live in the ":root" block immediately below. To change
   a colour across the whole site, edit it once there and every page updates.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. BRAND COLOURS  (change a colour here and it updates site-wide)
   -------------------------------------------------------------------------- */
:root {
  --midnight:  #1C2B3A;  /* Headings, logo, navigation */
  --slate:     #4A5568;  /* Body text, subheadings */
  --parchment: #C9B99A;  /* Accents, dividers, rules */
  --linen:     #F5F3EF;  /* Page background, cards */
  --white:     #FFFFFF;  /* Content areas, text blocks */

  /* A few soft tints derived from the brand colours, used for borders and
     subtle hover states. These keep everything within the palette. */
  --midnight-hover: #14202c;          /* Slightly darker Midnight for button hover */
  --parchment-line: rgba(201,185,154,0.55); /* Softer Parchment for fine rules */

  /* Page width and rhythm. Adjust --content-width to make the site wider or
     narrower; adjust --section-gap to add or remove vertical breathing room. */
  --content-width: 1080px;
  --section-gap: 6.5rem;   /* Vertical space between major sections */
}


/* --------------------------------------------------------------------------
   2. RESET  (a clean, predictable starting point across browsers)
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--linen);
  color: var(--slate);
  /* DM Sans is the workhorse font for all body text. Cormorant is reserved
     for headlines only (see the headings section below). */
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;     /* 17px, sits in the brand's 16-18px body range */
  line-height: 1.75;        /* The brand's specified line-height for body text */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}


/* --------------------------------------------------------------------------
   3. LAYOUT HELPERS  (centre content, control width, add spacing)
   -------------------------------------------------------------------------- */

/* .container centres content and caps its width for comfortable reading. */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 1.5rem;   /* Side gutters on smaller screens */
}

/* A standard vertical-padding section. */
.section {
  padding-block: var(--section-gap);
}

/* A narrower column for long-form reading passages (About, intros). */
.measure {
  max-width: 680px;
}


/* --------------------------------------------------------------------------
   4. TYPOGRAPHY  (the two brand typefaces, used with intention)
   --------------------------------------------------------------------------
   Cormorant Garamond  -> display headlines only (28px and up)
   DM Sans             -> everything else
   -------------------------------------------------------------------------- */

/* H1 / hero and major section headlines. Cormorant Garamond, Medium 500.
   The clamp() keeps it between 28px (small screens) and 60px (large screens). */
h1,
.h1 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  color: var(--midnight);
  font-size: clamp(2.25rem, 1.4rem + 3.5vw, 3.75rem);  /* ~36px to 60px */
  line-height: 1.1;
  letter-spacing: 0.005em;
}

/* Mid-weight section headlines (smaller than the hero H1 but still Cormorant). */
.section-title {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  color: var(--midnight);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);     /* ~28px to 40px */
  line-height: 1.15;
}

/* H2 / eyebrow label. DM Sans, Medium 500, uppercase, tracked +8%.
   These sit above a headline as a small all-caps label ("WHAT WE DO"). */
.eyebrow {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 0.8125rem;     /* 13px */
  text-transform: uppercase;
  letter-spacing: 0.08em;   /* The brand's +8% tracking */
  color: var(--slate);
  margin-bottom: 1rem;
}

/* The eyebrow turns Parchment when it sits on a dark Midnight background. */
.on-midnight .eyebrow {
  color: var(--parchment);
}

/* H3 / subheading. DM Sans SemiBold 600, 18-24px. Stays crisp at small sizes. */
h3,
.h3 {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  color: var(--midnight);
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);  /* ~18px to 22px */
  line-height: 1.3;
}

/* Standard body paragraph spacing. */
p {
  margin-bottom: 1.25rem;
}
p:last-child {
  margin-bottom: 0;
}

/* A slightly larger intro / lead paragraph used under hero headlines. */
.lead {
  font-size: 1.1875rem;     /* ~19px */
  line-height: 1.7;
  color: var(--slate);
}

/* Captions, labels and metadata. DM Sans Medium, uppercase, tracked +6%, Slate.
   Used for the testimonial source line and similar fine print. */
.caption {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 0.75rem;       /* 12px */
  text-transform: uppercase;
  letter-spacing: 0.06em;   /* The brand's +6% tracking */
  color: var(--slate);
}

/* Cormorant Garamond italic. The brand's "secret weapon" for hero emphasis.
   Use sparingly: only inside a hero headline. */
.italic-accent {
  font-style: italic;
  font-weight: 500;
}


/* --------------------------------------------------------------------------
   5. DIVIDERS AND RULES  (always Parchment, never grey or black)
   -------------------------------------------------------------------------- */

/* A short decorative rule, used under hero headlines and as a section accent. */
.rule {
  border: 0;
  width: 64px;
  height: 2px;
  background-color: var(--parchment);
  margin: 1.75rem 0;
}

/* A full-width hairline divider between sections, in soft Parchment. */
.divider {
  border: 0;
  height: 1px;
  background-color: var(--parchment-line);
  width: 100%;
}


/* --------------------------------------------------------------------------
   6. BUTTONS AND CTAs  (square corners, no border radius)
   --------------------------------------------------------------------------
   Two styles only:
     .btn            -> Midnight background, white text (primary)
     .btn-outline    -> White background, Midnight border and text (secondary)
   -------------------------------------------------------------------------- */
.btn,
.btn-outline {
  display: inline-block;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;     /* 15px */
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.95rem 2rem;
  border-radius: 0;         /* Square corners, as the brand requires */
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Primary button: Midnight with white text. */
.btn {
  background-color: var(--midnight);
  color: var(--white);
  border: 1px solid var(--midnight);
}
.btn:hover {
  background-color: var(--midnight-hover);
  border-color: var(--midnight-hover);
}

/* Secondary button: white with a Midnight border and text. */
.btn-outline {
  background-color: transparent;
  color: var(--midnight);
  border: 1px solid var(--midnight);
}
.btn-outline:hover {
  background-color: var(--midnight);
  color: var(--white);
}

/* On a Midnight background, the outline button flips to a light outline. */
.on-midnight .btn-outline {
  color: var(--white);
  border-color: var(--parchment);
}
.on-midnight .btn-outline:hover {
  background-color: var(--white);
  color: var(--midnight);
  border-color: var(--white);
}


/* --------------------------------------------------------------------------
   7. ACCESSIBILITY  (visible, on-brand focus states; never teal)
   --------------------------------------------------------------------------
   When someone navigates by keyboard, the element they are on gets a clear
   Parchment outline so they always know where they are.
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.btn-outline:focus-visible {
  outline: 3px solid var(--parchment);
  outline-offset: 3px;
}

/* "Skip to content" link, hidden until focused, for keyboard and screen readers. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--midnight);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}


/* --------------------------------------------------------------------------
   8. NAVIGATION  (shared Midnight bar at the top of every page)
   -------------------------------------------------------------------------- */
.site-nav {
  background-color: var(--midnight);
  border-bottom: 1px solid rgba(201,185,154,0.25); /* faint Parchment underline */
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
}

/* The text wordmark logo, set in Cormorant Garamond. */
.wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* The navigation links. */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--parchment); /* Parchment underline marks the active/hovered page */
}

/* The mobile menu button, hidden on larger screens (see the responsive block). */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  font-family: "DM Sans", sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
}


/* --------------------------------------------------------------------------
   9. HERO  (top section of each page)
   -------------------------------------------------------------------------- */

/* The standard hero sits on the Linen page background. */
.hero {
  padding-block: clamp(4rem, 3rem + 6vw, 7rem);
}
.hero .lead {
  max-width: 640px;
  margin-top: 1.5rem;
}
.hero .btn,
.hero .btn-outline {
  margin-top: 2.25rem;
}


/* --------------------------------------------------------------------------
   10. CARDS AND GRIDS  (used for "what makes us different", services, steps)
   -------------------------------------------------------------------------- */

/* A simple two- or three-column grid that stacks on mobile. */
.grid {
  display: grid;
  gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* A Linen/White card with a quiet Parchment top rule. */
.card {
  background-color: var(--white);
  padding: 2rem;
  border-top: 3px solid var(--parchment); /* the brand's "thread of Parchment" */
}
.card h3 {
  margin-bottom: 0.75rem;
}

/* When cards sit on the White content background, give them a Linen fill so
   they still read as distinct panels. */
.bg-white .card {
  background-color: var(--linen);
}


/* --------------------------------------------------------------------------
   11. BACKGROUND UTILITIES  (switch a section's background colour)
   -------------------------------------------------------------------------- */
.bg-linen    { background-color: var(--linen); }
.bg-white    { background-color: var(--white); }
.bg-midnight { background-color: var(--midnight); color: rgba(255,255,255,0.85); }

/* Inside a Midnight section, headlines go white and rules stay Parchment. */
.bg-midnight h1,
.bg-midnight .section-title,
.bg-midnight h3 {
  color: var(--white);
}


/* --------------------------------------------------------------------------
   12. TESTIMONIAL  (the quote block used on Home and About)
   -------------------------------------------------------------------------- */
.testimonial {
  max-width: 760px;
}
.testimonial blockquote {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-style: italic;
  color: var(--midnight);
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);  /* ~22px to 30px */
  line-height: 1.4;
  border-left: 3px solid var(--parchment);
  padding-left: 1.75rem;
}
.bg-midnight .testimonial blockquote {
  color: var(--white);
}
.testimonial .caption {
  margin-top: 1.25rem;
  padding-left: 1.75rem;
}


/* --------------------------------------------------------------------------
   13. NUMBERED LISTS  (services and the "how it works" steps)
   -------------------------------------------------------------------------- */

/* The large Parchment number that leads a service or step. */
.step-number {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--parchment);
  display: block;
  margin-bottom: 0.75rem;
}

/* A service block: number, heading, body, and an optional sub-list. */
.service {
  padding-block: 2.5rem;
}
.service + .service {
  border-top: 1px solid var(--parchment-line); /* Parchment divider between services */
}
.service .eyebrow {
  margin-bottom: 0.5rem;
}

/* The "three core programmes" sub-items inside Signature Workshops. */
.subitem {
  margin-top: 1.5rem;
}
.subitem h4 {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--midnight);
  margin-bottom: 0.25rem;
}


/* --------------------------------------------------------------------------
   14. "WHO WE WORK WITH" and editorial image placeholders
   -------------------------------------------------------------------------- */

/* A clearly-marked placeholder where a real editorial photo will go later.
   It is intentionally plain so the site looks finished without images. To
   replace it, see the README ("How to swap a placeholder image"). */
.image-placeholder {
  background-color: var(--linen);
  border: 1px solid var(--parchment-line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
  padding: 2rem;
}
.bg-linen .image-placeholder {
  background-color: var(--white);
}
.image-placeholder span {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  max-width: 220px;
}

/* A real editorial portrait (used on the About page). The thin Parchment
   frame ties it to the brand. To swap the photo, replace the image file at
   images/hannah-crawford.jpg (see the README). */
.portrait {
  margin: 0;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--parchment-line);
}
.portrait figcaption {
  margin-top: 0.85rem;
}

/* The two-column "intro + portrait" band at the top of the About page.
   Text sits on the left, the portrait on the right, and they stack on mobile. */
.intro-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}


/* --------------------------------------------------------------------------
   15. CONTACT FORM  (styled within the design system)
   -------------------------------------------------------------------------- */
.form {
  max-width: 640px;
}
.form-row {
  margin-bottom: 1.5rem;
}
.form label {
  display: block;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--midnight);
  margin-bottom: 0.5rem;
}
.form input,
.form textarea {
  width: 100%;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  color: var(--midnight);
  background-color: var(--white);
  border: 1px solid var(--slate);
  border-radius: 0;          /* Square corners, matching the buttons */
  padding: 0.85rem 1rem;
  line-height: 1.5;
}
.form input:focus,
.form textarea:focus {
  border-color: var(--midnight);
}
.form textarea {
  min-height: 150px;
  resize: vertical;
}

/* The honeypot field is a spam trap. It is hidden from real visitors and
   should always be left empty. Bots that fill it in are silently rejected. */
.hidden-field {
  position: absolute;
  left: -9999px;
}

/* The thank-you message shown after a successful submission. Hidden by default;
   the small script on the contact page reveals it and hides the form. */
.form-thankyou {
  display: none;
  background-color: var(--linen);
  border-top: 3px solid var(--parchment);
  padding: 2.5rem;
}
.form-thankyou.is-visible {
  display: block;
}


/* --------------------------------------------------------------------------
   16. FOOTER  (shared Midnight footer on every page)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--midnight);
  color: rgba(255,255,255,0.75);
  padding-block: 3.5rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer .wordmark {
  font-size: 1.75rem;
}
.footer-tagline {
  font-family: "DM Sans", sans-serif;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.5rem;
  max-width: 320px;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links a {
  font-family: "DM Sans", sans-serif;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--parchment);
}
.footer-contact a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--parchment);
}
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201,185,154,0.25);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
}


/* --------------------------------------------------------------------------
   17. RESPONSIVE  (how the layout adapts on tablets and phones)
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
  /* Stack all multi-column grids into a single column on smaller screens. */
  .grid-2,
  .grid-3,
  .intro-split {
    grid-template-columns: 1fr;
  }
  /* On mobile, the portrait moves above the text so the face leads. */
  .intro-split .portrait {
    order: -1;
    max-width: 420px;
  }

  /* Show the mobile menu button and hide the inline links until opened. */
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: var(--midnight);
    border-top: 1px solid rgba(201,185,154,0.25);
    padding: 0.5rem 1.5rem 1.5rem;
    z-index: 50;
  }
  /* When the menu is open (toggled by the small nav script), show the links. */
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a {
    padding-block: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .site-nav .container {
    position: relative;
  }
}
