/* ============================================================
   Redhill Business Solutions Ltd — design system
   Palette:  Primary Red #9D212E · Deep Red #6B1219
             Charcoal Navy #373C42 · Ink #24262B
             Light Neutral #F5F6F7 · White #FFFFFF
   Type:     Montserrat (display) · Open Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Open+Sans:wght@400;500;600;700&display=swap');

:root{
  --red: #9D212E;
  --red-deep: #6B1219;
  --navy: #373C42;
  --ink: #24262B;
  --neutral: #F5F6F7;
  --white: #FFFFFF;
  --line: #E2E4E6;
  --grey-text: #63666C;

  --display: 'Montserrat', sans-serif;
  --body: 'Open Sans', sans-serif;

  --max: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4{
  font-family: var(--display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1{ font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.01em; }
h2{ font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3{ font-size: 1.25rem; }

p{ margin: 0 0 1em; max-width: 62ch; color: var(--navy); }
p.lede{ font-size: 1.15rem; color: var(--grey-text); max-width: 58ch; }

a{ color: var(--red); text-decoration: none; }
a:hover{ text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

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

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85em 1.6em;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover{ text-decoration: none; }
.btn-primary{
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover{ background: var(--red-deep); }
.btn-outline{
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline:hover{ background: var(--navy); color: var(--white); }
.btn-outline-light{
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline-light:hover{ background: var(--white); color: var(--navy); }

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand img{ height: 34px; width: auto; }
.brand-word{
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--navy);
  line-height: 1.1;
}
.brand-word span{ color: var(--red); }

nav.primary-nav ul{
  list-style: none;
  display: flex;
  gap: 1.9rem;
  margin: 0;
  padding: 0;
}
nav.primary-nav a{
  color: var(--navy);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
}
nav.primary-nav a:hover{ text-decoration: none; border-bottom-color: var(--red); }
nav.primary-nav a.active{ border-bottom-color: var(--red); color: var(--red); }

.nav-toggle{
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span{
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
}

@media (max-width: 860px){
  nav.primary-nav{
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  nav.primary-nav.open{ display: block; }
  nav.primary-nav ul{
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.2rem;
  }
  nav.primary-nav li{ border-top: 1px solid var(--line); }
  nav.primary-nav a{ display: block; padding: 0.9em 0; }
  .nav-toggle{ display: block; }
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  overflow: hidden;
  background: var(--neutral);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}
.hero .wrap{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-eyebrow{
  color: var(--red);
  font-weight: 700;
  font-family: var(--display);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}
.hero h1{ margin-bottom: 0.55em; }
.hero .lede{ margin-bottom: 1.6rem; }
.hero-actions{ display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-diagram{ width: 100%; height: auto; }

@media (max-width: 860px){
  .hero .wrap{ grid-template-columns: 1fr; }
  .hero-diagram{ max-width: 380px; margin: 0 auto; }
}

/* ---------- Page header (non-home) ---------- */
.page-header{
  background: var(--navy);
  color: var(--white);
  padding: clamp(2.6rem, 6vw, 4rem) 0;
  position: relative;
  overflow: hidden;
}
.page-header h1{ color: var(--white); margin-bottom: 0.4em; }
.page-header p{ color: rgba(255,255,255,0.78); }
.page-header .motif{
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 340px;
  opacity: 0.14;
  pointer-events: none;
}

/* ---------- Sections ---------- */
section{ padding: clamp(3rem, 7vw, 5rem) 0; }
section.alt{ background: var(--neutral); }
.section-head{ max-width: 640px; margin-bottom: 2.4rem; }
.section-head h2{ margin-bottom: 0.4em; }

/* ---------- Grids / cards ---------- */
.grid{
  display: grid;
  gap: 1.75rem;
}
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px){
  .grid-3, .grid-2{ grid-template-columns: 1fr; }
}

.card{
  border: 1px solid var(--line);
  padding: 1.9rem;
  background: var(--white);
}
.card h3{ margin-bottom: 0.5em; }
.card p{ color: var(--grey-text); margin-bottom: 0; }

/* Service card with node marker */
.service-card{
  border-left: 3px solid var(--red);
  padding: 1.7rem 1.9rem;
  background: var(--neutral);
}
.service-card h3{ margin-bottom: 0.45em; }
.service-card p{ color: var(--grey-text); margin-bottom: 0; font-size: 0.97rem; }

/* ---------- Programme lifecycle steps (genuinely sequential) ---------- */
.steps{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.step{
  background: var(--white);
  padding: 1.4rem 1.1rem;
  position: relative;
}
.step .num{
  font-family: var(--display);
  font-weight: 800;
  color: var(--red);
  font-size: 1.4rem;
  display: block;
  margin-bottom: 0.5rem;
}
.step h4{ font-family: var(--display); font-size: 0.92rem; color: var(--navy); margin: 0 0 0.3em; }
.step p{ font-size: 0.85rem; color: var(--grey-text); margin: 0; }
@media (max-width: 960px){
  .steps{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px){
  .steps{ grid-template-columns: 1fr 1fr; }
}

/* ---------- Case studies ---------- */
.case-list{ display: flex; flex-direction: column; gap: 0; }
.case{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  padding: 2.4rem 0;
  border-top: 1px solid var(--line);
}
.case:last-child{ border-bottom: 1px solid var(--line); }
.case-meta{ }
.case-meta .client{
  font-family: var(--display);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.case-meta .tag{
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 0.18rem 0.6rem;
  border-radius: 2px;
  margin-top: 0.4rem;
}
.case-body dl{ margin: 0; }
.case-body dt{
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--red);
  margin-top: 1rem;
}
.case-body dt:first-child{ margin-top: 0; }
.case-body dd{ margin: 0.25rem 0 0; color: var(--navy); }
@media (max-width: 760px){
  .case{ grid-template-columns: 1fr; gap: 0.8rem; }
}

/* ---------- Testimonials ---------- */
.quote-card{
  background: var(--neutral);
  border-left: 3px solid var(--red);
  padding: 1.9rem 2rem;
}
.quote-card p{ font-size: 1.05rem; color: var(--navy); font-style: italic; }
.quote-card .attr{
  font-style: normal;
  font-weight: 600;
  font-family: var(--display);
  font-size: 0.88rem;
  color: var(--grey-text);
  margin-top: 0.8rem;
  display: block;
}

/* ---------- Blog ---------- */
.post-card{ border-top: 1px solid var(--line); padding: 2rem 0; }
.post-card:last-child{ border-bottom: 1px solid var(--line); }
.post-date{ font-size: 0.85rem; color: var(--grey-text); font-weight: 600; }
.post-card h3{ margin: 0.35rem 0 0.5rem; }
.post-card p{ color: var(--grey-text); }
.read-more{ font-weight: 700; font-size: 0.92rem; }

.post-full .post-date{ margin-bottom: 0.6rem; }
.post-full h1{ margin-bottom: 0.3em; }
.post-full .lede{ margin-bottom: 2rem; }
.post-full h2{ font-size: 1.35rem; margin-top: 1.6em; }
.post-full p{ max-width: 68ch; }

/* ---------- Links page ---------- */
.link-list{ display: flex; flex-direction: column; gap: 0; max-width: 640px; }
.link-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
}
.link-list .link-row:last-child{ border-bottom: 1px solid var(--line); }
.link-row .label{ font-weight: 700; color: var(--navy); font-family: var(--display); font-size: 1rem; }
.link-row .desc{ color: var(--grey-text); font-size: 0.9rem; margin-top: 0.15rem; }
.link-row .btn{ flex-shrink: 0; margin-left: 1.5rem; }

/* ---------- Contact ---------- */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.contact-detail{ margin-bottom: 1.6rem; }
.contact-detail .label{
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--red);
  margin-bottom: 0.3rem;
}
.contact-detail a, .contact-detail div{ color: var(--navy); font-size: 1.05rem; }
@media (max-width: 760px){
  .contact-grid{ grid-template-columns: 1fr; }
}

/* ---------- CTA band ---------- */
.cta-band{
  background: var(--navy);
  color: var(--white);
  text-align: left;
  position: relative;
  overflow: hidden;
}
.cta-band .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2{ color: var(--white); margin-bottom: 0.3em; }
.cta-band p{ color: rgba(255,255,255,0.78); margin-bottom: 0; }

/* ---------- Footer ---------- */
footer.site-footer{
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem;
}
footer.site-footer .wrap{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
footer .f-brand{ display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
footer .f-brand img{ height: 26px; }
footer .f-brand span{
  font-family: var(--display);
  font-weight: 800;
  color: var(--white);
  font-size: 0.95rem;
}
footer p{ color: rgba(255,255,255,0.6); font-size: 0.92rem; }
footer h4{
  font-family: var(--display);
  color: var(--white);
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}
footer ul{ list-style: none; margin: 0; padding: 0; }
footer li{ margin-bottom: 0.6rem; }
footer a{ color: rgba(255,255,255,0.7); font-size: 0.92rem; }
footer a:hover{ color: var(--white); }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}
@media (max-width: 760px){
  footer.site-footer .wrap{ grid-template-columns: 1fr; }
}

/* ---------- Utility ---------- */
.mt-0{ margin-top: 0; }
.center{ text-align: center; }
.visually-hidden{
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---------- Forms ---------- */
.field{ margin-bottom: 1.3rem; }
.field label{
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.field input,
.field textarea{
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.75em 0.9em;
}
.field input:focus,
.field textarea:focus{
  outline: 3px solid var(--red);
  outline-offset: 1px;
  border-color: var(--red);
}
.field textarea{ resize: vertical; min-height: 140px; }
.field-row{ display: flex; gap: 1.3rem; }
.field-row .field{ flex: 1; }
@media (max-width: 600px){
  .field-row{ flex-direction: column; gap: 0; }
}
.form-note{ font-size: 0.85rem; color: var(--grey-text); margin-top: 0.6rem; }

.contact-form{
  background: var(--neutral);
  border: 1px solid var(--line);
  padding: clamp(1.6rem, 4vw, 2.4rem);
}

/* Inline subscribe form */
.subscribe-box{
  background: var(--navy);
  color: var(--white);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.5rem;
  justify-content: space-between;
}
.subscribe-box .copy{ max-width: 420px; }
.subscribe-box h3{ color: var(--white); margin-bottom: 0.35em; }
.subscribe-box p{ color: rgba(255,255,255,0.75); margin: 0; }
.subscribe-form{
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 280px;
}
.subscribe-form input[type="email"]{
  flex: 1;
  min-width: 200px;
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.8em 1em;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  color: var(--white);
}
.subscribe-form input[type="email"]::placeholder{ color: rgba(255,255,255,0.55); }
.subscribe-form input[type="email"]:focus{
  outline: 3px solid var(--red);
  outline-offset: 1px;
  background: rgba(255,255,255,0.14);
}
.form-success{
  display: none;
  background: var(--neutral);
  border-left: 3px solid var(--red);
  padding: 1rem 1.3rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 1rem;
}
.form-success.show{ display: block; }

/* ---------- History / role timeline ---------- */
.role-list{
  border-left: 2px solid var(--line);
  margin-left: 6px;
}
.role-item{
  position: relative;
  padding: 0 0 2.4rem 2.1rem;
}
.role-item:last-child{ padding-bottom: 0; }
.role-item::before{
  content: '';
  position: absolute;
  left: -7px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--line);
}
.role-item.current::before{ background: var(--navy); }
.role-title{
  font-family: var(--display);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.08rem;
}
.role-employer{
  color: var(--red);
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 0.2rem;
}
.role-dates{
  color: var(--grey-text);
  font-size: 0.83rem;
  font-weight: 600;
  margin-top: 0.15rem;
}
.role-item p{
  margin-top: 0.65rem;
  color: var(--grey-text);
  font-size: 0.96rem;
}
