/* ==========================================================================
   Maslow Murphy — 2026
   One responsive stylesheet. Mobile-first; breakpoints at 600 / 900 / 1100 /
   1280px. Type and spacing scale fluidly with clamp(), so there is a single
   copy of the markup instead of a phone tree and a desktop tree.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Color */
  --navy:            #14213D;
  --navy-deep:       #0E172B;
  --ink:             #22252B;
  --ink-soft:        #3A3E45;
  --ink-mute:        #585D66;
  --accent:          #7A5F2E;
  --gold:            #C9B48A;
  --paper:           #F7F5F0;
  --surface:         #FFFFFF;
  --rule:            #D9D4C7;
  --on-navy:         #F7F5F0;
  --on-navy-mute:    #C9CDD6;
  --on-navy-faint:   #B7BCC7;

  /* Families */
  --display: "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --serif:   "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans:    "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Fluid type — min at 375px, max at 1280px */
  --fs-h1:        clamp(2.75rem,  1.87rem + 3.76vw, 4.875rem);  /* 44 → 78 */
  --fs-h2:        clamp(2.125rem, 1.71rem + 1.77vw, 3.125rem);  /* 34 → 50 */
  --fs-h3:        clamp(1.5rem,   1.40rem + 0.44vw, 1.75rem);   /* 24 → 28 */
  --fs-h3-sm:     clamp(1.375rem, 1.30rem + 0.33vw, 1.5625rem); /* 22 → 25 */
  --fs-group:     clamp(1.625rem, 1.50rem + 0.44vw, 1.875rem);  /* 26 → 30 */
  --fs-stat:      clamp(3.25rem,  2.89rem + 1.55vw, 4.125rem);  /* 52 → 66 */
  --fs-stat-sm:   clamp(3rem,     2.79rem + 0.88vw, 3.5rem);    /* 48 → 56 */
  --fs-numeral:   clamp(2.25rem,  2.14rem + 0.44vw, 2.5rem);    /* 36 → 40 */
  --fs-lead:      clamp(1.125rem, 1.05rem + 0.33vw, 1.3125rem); /* 18 → 21 */
  --fs-lead-sm:   clamp(1.0625rem,1.01rem + 0.22vw, 1.1875rem); /* 17 → 19 */
  --fs-body:      clamp(1.0625rem,1.02rem + 0.11vw, 1.125rem);  /* 17 → 18 */
  --fs-wordmark:  clamp(1.5rem,   1.33rem + 0.66vw, 1.875rem);  /* 24 → 30 */
  --fs-client:    clamp(1.25rem,  1.17rem + 0.33vw, 1.4375rem); /* 20 → 23 */
  --fs-label:     clamp(0.75rem,  0.73rem + 0.11vw, 0.8125rem); /* 12 → 13 */

  /* Fluid space */
  --gutter:    clamp(1.5rem, 0.6rem  + 3.80vw, 4rem);     /* 24 → 64, then 120 ≥1280 */
  --section-y: clamp(5rem,   3.71rem + 5.53vw, 8.125rem); /* 80 → 130 */
  --hero-top:  clamp(4.5rem, 2.48rem + 8.62vw, 9.375rem); /* 72 → 150 */
  --header-y:  clamp(1.25rem,0.94rem + 1.33vw, 2rem);     /* 20 → 32 */
  --band-y:    clamp(2.5rem, 2.29rem + 0.88vw, 3rem);     /* 40 → 48 */
}

@media (min-width: 80em) {
  :root { --gutter: 7.5rem; } /* 120px */
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

h1 {
  max-width: 65rem; /* 1040px */
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: 1.08;
  color: var(--navy);
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.15;
  color: var(--navy);
}

a {
  color: var(--navy);
  text-decoration: none;
}
a:hover { color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

p { color: var(--ink-soft); }

.measure    { max-width: 47.5rem; } /* 760px */
.measure-h2 { max-width: 51.25rem; } /* 820px */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: var(--on-navy);
}
.skip-link:focus {
  left: 0;
  color: var(--on-navy);
}

/* --------------------------------------------------------------------------
   3. Shared pieces
   -------------------------------------------------------------------------- */

.label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.label--accent { color: var(--accent); }
.label--gold   { color: var(--gold); }

.section {
  padding: var(--section-y) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
}
.section--surface     { background: var(--surface); }
.section--rule-top    { border-top: 1px solid var(--rule); }
.section--rule-y      { border-block: 1px solid var(--rule); }

.section__head {
  display: flex;
  flex-direction: column;
  gap: clamp(0.875rem, 0.79rem + 0.33vw, 1.25rem);
}

.grid { display: grid; gap: 2rem; }

.grid--two,
.grid--three,
.grid--stats { grid-template-columns: minmax(0, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.card--ruled {
  padding-top: 1.25rem;
  border-top: 1px solid var(--navy);
}
.card--faint { border-top-color: var(--rule); }

.card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1.3;
  color: var(--navy);
}
.card--faint h3 { font-size: var(--fs-h3-sm); }

/* Buttons and text links --------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem; /* 44px touch target */
  padding: 0 1.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
}
.btn--outline {
  border: 1px solid var(--navy);
  color: var(--navy);
}
.btn--outline:hover {
  background: var(--navy);
  color: var(--on-navy);
}
.btn--primary {
  min-height: 3.5rem;
  padding: 0 2rem;
  background: var(--navy);
  color: var(--on-navy);
  font-size: 1rem;
}
.btn--primary:hover {
  background: var(--navy-deep);
  color: var(--on-navy);
}
.btn--text {
  padding: 0;
  font-size: 1rem;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: var(--header-y) var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--display);
  font-size: var(--fs-wordmark);
  letter-spacing: 0.02em;
  color: var(--navy);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.125rem, 0.2rem + 1.5vw, 2.5rem);
  font-size: clamp(0.8125rem, 0.75rem + 0.22vw, 0.9375rem);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.site-nav > a:not(.btn) { color: #454A52; }
.site-nav > a:not(.btn):hover { color: var(--accent); }

/* Section links are hidden on phones; the Contact button stays. */
.site-nav > a:not(.btn) { display: none; }
@media (min-width: 56.25em) {
  .site-nav > a:not(.btn) { display: inline; }
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: var(--hero-top);
  gap: clamp(1.5rem, 1.1rem + 1.7vw, 2.25rem);
}
.hero .lead { max-width: 47.5rem; } /* 760px */

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
}
@media (min-width: 37.5em) {
  .hero__actions {
    flex-direction: row;
    align-items: center;
    gap: 2.25rem;
    padding-top: 0.75rem;
  }
  .hero__actions .btn { flex: 0 0 auto; }
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
}
.lead--sm { font-size: var(--fs-lead-sm); }

/* --------------------------------------------------------------------------
   6. Client band
   -------------------------------------------------------------------------- */

.clients {
  padding-block: var(--band-y);
  gap: 1.25rem;
}

.clients__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  font-family: var(--serif);
  font-size: var(--fs-client);
  color: var(--navy);
}
@media (min-width: 56.25em) {
  .clients__list {
    display: flex;
    flex-wrap: wrap;
    /*
    justify-content: space-between;
    */
    align-items: baseline;
    gap: 0.75rem 2.5rem;
  }
}

.clients__logos {
  width: 100%;
  max-width: 400px;
  margin-top: 0.375rem;
}

/* --------------------------------------------------------------------------
   7. Stats
   -------------------------------------------------------------------------- */

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--navy);
}

.stat__figure {
  font-family: var(--display);
  font-size: var(--fs-stat);
  line-height: 1;
  color: var(--navy);
}
.stat--sm .stat__figure { font-size: var(--fs-stat-sm); }

.stat__note {
  font-size: 1rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   8. Engagements
   -------------------------------------------------------------------------- */

.matters__group {
  display: flex;
  flex-direction: column;
}
.matters__group + .matters__group { margin-top: 1.5rem; }

.group-title {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-group);
  color: var(--accent);
}

.matter {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.matter:first-of-type { border-top-color: var(--navy); }
.matters__group > .matter:last-of-type { border-bottom: 1px solid var(--rule); }

.matter__client {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.matter__name {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.3;
  color: var(--navy);
}

.matter__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.matter__title {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.matter__result {
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.45;
  color: var(--navy);
}

/* --------------------------------------------------------------------------
   9. Governance
   -------------------------------------------------------------------------- */

.governance__intro {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* --------------------------------------------------------------------------
   10. Process
   -------------------------------------------------------------------------- */

.step {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.step__numeral {
  font-family: var(--display);
  font-size: var(--fs-numeral);
  line-height: 1.2;
  color: var(--accent);
}
.step h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.44rem + 0.22vw, 1.625rem);
  line-height: 1.3;
  color: var(--navy);
}

/* --------------------------------------------------------------------------
   11. Profile
   -------------------------------------------------------------------------- */

.profile { gap: 2rem; }

.portrait {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 19 / 24;
  object-fit: cover;
  object-position: center 30%;
  border: 1px solid var(--rule);
}

.profile__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.profile__name {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.profile__role {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.125rem, 1.05rem + 0.22vw, 1.25rem);
  color: #454A52;
}
.profile__body p { line-height: 1.7; }

/* --------------------------------------------------------------------------
   12. Contact and footer
   -------------------------------------------------------------------------- */

.contact {
  background: var(--navy);
  gap: 2rem;
}
.contact h2 {
  max-width: 42.5rem; /* 680px */
  color: var(--on-navy);
}

/* Contact form ------------------------------------------------------------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 400px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field > label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-navy-mute);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid rgba(201, 180, 138, 0.45);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--on-navy);
  font-family: var(--sans);
  font-size: 1rem; /* 16px — stops iOS zooming the page on focus */
  line-height: 1.5;
}
.field textarea {
  min-height: 7.5rem;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--navy);
  box-shadow: inset 0 0 0 100px var(--paper);
}

.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}
.field--check input {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.25rem;
  accent-color: var(--gold);
}
.field--check label {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--on-navy-mute);
}

/* Spam trap — off-screen rather than display:none, which bots skip. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn--submit {
  align-self: flex-start;
  min-height: 3.5rem;
  padding: 0 2rem;
  border: 1px solid var(--paper);
  background: var(--paper);
  color: var(--navy);
  font-size: 1rem;
}
.btn--submit:hover:not([disabled]) {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
.btn--submit[disabled] {
  opacity: 0.55;
  cursor: default;
}

.form-error {
  max-width: 400px;
  font-size: 1rem;
  color: #F2CFCF;
}

/* The reCAPTCHA v3 badge stays visible and carries Google's attribution. */
.form-note {
  max-width: 400px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--on-navy-mute);
}

.form-thanks {
  max-width: 400px;
  font-size: var(--fs-lead-sm);
  line-height: 1.6;
  color: var(--on-navy);
}
.form-thanks:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.site-footer {
  padding: clamp(2rem, 1.8rem + 0.9vw, 2.5rem) var(--gutter);
  background: var(--navy-deep);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--on-navy-faint);
}
.site-footer p { color: inherit; }
.site-footer__name {
  margin-bottom: 0.25rem;
  font-family: var(--display);
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  color: var(--on-navy);
}

/* --------------------------------------------------------------------------
   13. Breakpoints
   -------------------------------------------------------------------------- */

/* 600px — stats pair up */
@media (min-width: 37.5em) {
  .grid--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 900px — the former "desktop" layout begins */
@media (min-width: 56.25em) {
  .grid { gap: 2.5rem; }
  .grid--two   { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4.5rem; row-gap: 2.5rem; }
  .grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .card--ruled { padding-top: 1.5rem; }
  .stat        { padding-top: 1.75rem; gap: 1.125rem; }
  .stat__note  { font-size: 1.0625rem; line-height: 1.55; }

  .matter {
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr) minmax(0, 200px);
    gap: 1.75rem;
    padding: 2rem 0;
    align-items: start;
  }
  .matter__result { font-size: 1.25rem; }
  .matters__group + .matters__group { margin-top: 2.5rem; }
  .group-title { margin-bottom: 1.25rem; }

  .governance__intro {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
    align-items: end;
  }

  .profile {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }
  .portrait { max-width: none; }
  .profile__body { gap: 1.5rem; }

  .step { gap: 1rem; }
}

/* 1100px — wider rails */
@media (min-width: 68.75em) {
  .grid--stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--three { gap: 3rem; }

  .matter {
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 240px);
    gap: 2.25rem;
  }

  .governance__intro { gap: 6rem; }

  .profile { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 4rem; }
}

/* 1280px — full measure */
@media (min-width: 80em) {
  .grid--two { column-gap: 4.5rem; row-gap: 3.5rem; }

  .matter {
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr) minmax(0, 300px);
    gap: 3rem;
  }

  .profile { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 6rem; }

  .steps { gap: 3.5rem; }
}

/* --------------------------------------------------------------------------
   14. Preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
