/* ===================================================================
   Sherrard Solutions — site styles
   Brand colours sampled from the logo: navy #215179, green #64B566
   No frameworks, no build step, no external font requests.
   =================================================================== */

:root {
  --navy:       #215179;
  --navy-dark:  #183C5A;
  --navy-deep:  #112C43;
  --navy-light: #2E6A9E;
  --green:      #64B566;
  --green-dark: #4E9B50;

  --ink:        #17242E;
  --body:       #41525F;
  --muted:      #6E8092;
  --line:       #DEE6EC;
  --bg:         #FFFFFF;
  --bg-soft:    #F4F8FB;

  --wrap: 1080px;
  --radius: 10px;
  --shadow: 0 2px 4px rgba(17,44,67,.04), 0 12px 32px rgba(17,44,67,.07);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  font-family: var(--sans);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 740px; }

/* Interior pages: the article on the left, the contact box on the right.
   minmax(0, 1fr) rather than plain 1fr so a long unbroken string in the
   article can never push the column wider than its share. */
.page-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 46px; align-items: start;
}

section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.soft { background: var(--bg-soft); }

/* ---------- type ---------- */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.22; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.015em; margin-bottom: 18px; }
h3 { font-size: 1.2rem; margin-bottom: 10px; }

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy-light); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }

strong { color: var(--ink); font-weight: 650; }

.lede { font-size: 1.16rem; color: var(--body); }
.eyebrow {
  display: inline-block; font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-dark); margin-bottom: 12px;
}

/* a short green rule used under headings */
.rule { width: 54px; height: 4px; background: var(--green); border-radius: 2px; margin: 0 0 22px; }
.rule.center { margin-left: auto; margin-right: auto; }

/* ---------- header ----------
   The logo and the navigation sit side by side in one band across the top,
   with the navigation stacked vertically immediately to the logo's right.
   The green line underneath separates the header from the page.

   The logo is 900x307 natively, so 150px tall still renders at just over
   2x — sharp on a retina screen. Going much past 170px would start to
   soften it. */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--green);
}
.header-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 38px; padding-top: 22px; padding-bottom: 22px;
}
.header-logo { display: block; flex-shrink: 0; }
.header-logo:hover { text-decoration: none; }
.header-logo img { height: 150px; width: auto; display: block; }

/* stacked, and only as wide as the longest label needs */
.header-nav { display: grid; gap: 9px; justify-items: stretch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-weight: 650; font-size: 1rem;
  padding: 13px 28px; border-radius: 8px; border: 2px solid transparent;
  transition: transform .12s, background .18s, border-color .18s, color .18s;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); color: #10251A; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- hero ---------- */
.hero {
  background: var(--navy);   /* flat — no gradient wash */
  color: #E8F1F8;
  /* Less at the top than the bottom, deliberately. The old layout had a
     separate navigation bar sitting above this, and the generous top
     padding was spacing away from it. With the navigation now up in the
     header, that much space just reads as a missing bar. */
  padding: 52px 0 76px;
}
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero .lede { color: #C6DAE9; font-size: 1.22rem; max-width: 620px; }
.hero-grid {
  display: grid; grid-template-columns: 1.35fr .65fr;
  gap: 56px; align-items: center;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* Contact details kept above the scroll on the home page. Only the layout
   is here — the links themselves are styled in the contact section below,
   shared with the box on the interior pages so the two cannot drift apart. */
.hero-contact { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
/* The box is there to set the photo off from the navy, not to frame it in
   space — so the padding is kept to a thin margin and the photo fills the
   width it leaves. The photo is 560x560 natively, so even at the widest
   this box gets (~293px) it still renders at nearly 2x. */
.hero-badge {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 12px; text-align: center;
}
.hero-badge img { width: 100%; height: auto; border-radius: 8px; display: block; }
.hero-badge p { color: #AFC8DB; font-size: .9rem; margin: 9px 0 1px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-3px); border-color: #C3D4E1;
              box-shadow: 0 4px 8px rgba(17,44,67,.06), 0 18px 44px rgba(17,44,67,.10); }
.card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 16px;
}
.card .num.green { background: var(--green); color: #10251A; }

/* ---------- page header (interior pages) ---------- */
.page-head { background: var(--navy); color: #fff; padding: 58px 0 52px; }
.page-head h1 { color: #fff; margin-bottom: 10px; }
.page-head h1:last-child { margin-bottom: 0; }   /* when there is no subtitle */
.page-head p { color: #BDD3E4; margin: 0; }

/* ---------- article / prose ---------- */
.prose { font-size: 1.06rem; }
.prose p { margin-bottom: 1.25em; }
.prose h2 { margin-top: 1.6em; margin-bottom: .55em; }
.prose h4 { font-size: 1.05rem; margin: 1.4em 0 .5em; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.3em 1.4em; }
.prose li { margin-bottom: .6em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

.portrait {
  float: right; width: 210px; margin: 4px 0 22px 28px;
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- blog ---------- */
.post-list { display: grid; gap: 20px; }
.post-item {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: var(--radius); padding: 26px 28px;
  transition: transform .18s, box-shadow .18s;
}
.post-item:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.post-item h3 { margin-bottom: 8px; }
.post-item h3 a { color: var(--ink); }
.post-item h3 a:hover { color: var(--navy-light); text-decoration: none; }
.post-meta { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.post-excerpt { color: var(--body); font-size: .98rem; margin: 0; }

.post-nav {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line);
  font-size: .95rem;
}

.archive-note {
  background: #FFF8E6; border: 1px solid #F0DFAE; border-left: 4px solid #D9A62B;
  border-radius: 8px; padding: 16px 20px; margin-bottom: 32px;
  font-size: .94rem; color: #6B5518;
}
.archive-note strong { color: #5A4612; }

/* ---------- contact ----------
   The same details appear in two places: the hero on the home page, and a
   box in the right-hand column of the interior pages. Both are drawn from
   the shared rules below, so they always match each other.

   The box takes the hero's colour, which is what makes it read as part of
   the page rather than a panel bolted onto the side. It followed the hero
   when the gradient wash came off, so both are flat navy now. */
.contact-box {
  background: var(--navy);
  color: #C6DAE9;
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  /* follows the reader down a long page. If it is ever taller than the
     window, sticky simply stops applying — it cannot trap content. */
  position: sticky; top: 28px;
}
.contact-box h2 { color: #fff; font-size: 1.3rem; margin-bottom: 14px; }
.contact-box .rule { margin-bottom: 18px; }

.contact-stack { display: grid; gap: 12px; }

/* The pill links, shared by all three placements: the hero's email and
   phone, the sidebar box, and the header navigation. One definition, so
   the green left edge and everything around it stays identical across the
   site however any one of them is later tweaked. */
.hero-contact a,
.contact-stack a,
.header-nav a {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.22);
  border-left: 4px solid var(--green);
  border-radius: 9px; color: #fff;
  font-weight: 700; line-height: 1.3;
  transition: background .18s, border-color .18s, transform .12s;
}
.hero-contact a { padding: 14px 24px; font-size: 1.12rem; }
/* the sidebar column is narrow, so the long email address is set smaller
   and allowed to break rather than spill outside the box */
.contact-stack a { padding: 13px 18px; font-size: .95rem; overflow-wrap: anywhere; }
.header-nav a   { padding: 12px 24px; font-size: 1.02rem; white-space: nowrap; }

.hero-contact a:hover,
.contact-stack a:hover,
.header-nav a:hover {
  background: rgba(100,181,102,.22); border-color: var(--green);
  text-decoration: none; transform: translateY(-1px);
}

/* the page you are on, held in the hover state rather than moved */
.header-nav a.active {
  background: rgba(100,181,102,.28);
  border-color: var(--green);
}
.hero-contact span,
.contact-stack span {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: #A8C6DC; margin-bottom: 5px;
}

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #9DB8CC; padding: 46px 0 34px; font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.site-footer a { color: #C9DCEA; }
.site-footer a:hover { color: var(--green); }
.site-footer img { height: 46px; width: auto; opacity: .92; margin-bottom: 14px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-bottom {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem; color: #7E9AB0;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-badge { max-width: 300px; }
  .hero { padding: 38px 0 54px; }
  section { padding: 56px 0; }

  /* one column: the contact box drops below the article and stops
     sticking, and its links get their full size back now that there
     is room for them */
  .page-grid { grid-template-columns: 1fr; gap: 34px; }
  .contact-box { position: static; }
  .contact-stack a { padding: 14px 22px; font-size: 1.05rem; }

  /* header still side by side here, just tighter */
  .header-inner { gap: 26px; }
  .header-logo img { height: 118px; }
  .header-nav a { padding: 11px 18px; font-size: .95rem; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  /* A phone is too narrow to hold a readable logo and the buttons side by
     side, so the logo goes on top with the buttons stacked beneath it —
     still stacked, just below rather than beside. */
  .header-inner {
    flex-direction: column; gap: 18px;
    padding-top: 18px; padding-bottom: 18px;
  }
  .header-logo img { height: auto; width: 100%; max-width: 300px; }
  .header-nav { width: 100%; max-width: 300px; }
  .header-nav a { padding: 12px 20px; font-size: 1rem; }
  .portrait { float: none; display: block; margin: 0 auto 24px; width: 180px; }
  .footer-inner { flex-direction: column; gap: 22px; }
  .hero-contact { flex-direction: column; }
  .hero-contact a { font-size: 1.05rem; }
}
