/* ==========================================================================
   butterfl.ai — shared site stylesheet
   Design tokens from Brand Guidelines v2.4
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --prussian-darkest: #001233;
  --prussian: #002855;
  --regal-navy: #023E7D;
  --sapphire: #0353A4;
  --smart-blue: #0466C8;
  --twilight: #33415C;
  --blue-slate: #5C677D;
  --slate-grey: #7D8597;
  --lavender-grey: #979DAC;
  --paper: #F7F8FA;
  --white: #FFFFFF;
  --gold: #C9A227;

  --heading-font: 'Poppins', 'Century Gothic', ui-sans-serif, system-ui, sans-serif;
  --body-font: 'Inter', Calibri, ui-sans-serif, system-ui, sans-serif;

  --max-width: 1600px;
  --shadow-soft: 0 1px 2px rgba(0,18,51,0.04), 0 10px 30px rgba(0,18,51,0.07);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--paper);
  color: var(--prussian);
  font-family: var(--body-font);
  line-height: 1.6;
  font-size: 16px;
}
img{ max-width: 100%; display: block; }
a{ color: var(--sapphire); text-decoration: none; }
a:hover{ color: var(--smart-blue); }

h1,h2,h3,h4{
  font-family: var(--heading-font);
  color: var(--regal-navy);
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1{ font-size: clamp(2.1rem, 4vw, 3.1rem); font-weight: 700; }
h2{ font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3{ font-size: 1.2rem; }
p{ margin: 0 0 1.1em; color: var(--twilight); max-width: 62ch; }
.lede{ font-size: 1.15rem; color: var(--twilight); }

.wrap{ max-width: var(--max-width); margin: 0 auto; padding: 0 32px; }
section{ padding: 88px 0; }
section.tight{ padding: 56px 0; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 8px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s ease;
}
.btn-primary{ background: var(--smart-blue); color: #fff; }
.btn-primary:hover{ background: var(--sapphire); color: #fff; }
.btn-secondary{ background: transparent; color: var(--regal-navy); border-color: var(--lavender-grey); }
.btn-secondary:hover{ border-color: var(--sapphire); color: var(--sapphire); }
.btn-row{ display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- Header / Nav ---------- */
header.site-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,248,250,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #E1E5EC;
}
.nav-inner{
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  max-width: var(--max-width); margin: 0 auto;
}
.brand{ display: flex; align-items: center; gap: 10px; }
.brand img{ height: 34px; width: auto; }
.brand span{
  font-family: var(--heading-font); font-weight: 600; font-size: 1.15rem;
  color: var(--prussian);
}
.brand span b{ color: var(--smart-blue); font-weight: 600; }
nav.primary-nav{ display: flex; align-items: center; gap: 30px; }
nav.primary-nav a{
  font-size: 0.92rem; font-weight: 500; color: var(--twilight);
}
nav.primary-nav a:hover{ color: var(--smart-blue); }
nav.primary-nav a.current{ color: var(--regal-navy); font-weight: 600; }
nav.primary-nav a.nav-cta{ color: #fff; }
nav.primary-nav a.nav-cta:hover{ color: #fff; }
.nav-cta{ margin-left: 6px; }
.nav-toggle{ display: none; }

@media (max-width: 900px){
  nav.primary-nav{
    position: fixed; inset: 64px 0 0 0; background: var(--paper);
    flex-direction: column; align-items: flex-start; gap: 22px;
    padding: 32px; transform: translateX(100%); transition: transform .25s ease;
    overflow-y: auto;
  }
  nav.primary-nav.open{ transform: translateX(0); }
  .nav-toggle{
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--lavender-grey);
    background: none; cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
    content: ''; display: block; width: 18px; height: 2px; background: var(--prussian);
    position: relative; transition: all .15s ease;
  }
  .nav-toggle span::before{ position: absolute; top: -6px; }
  .nav-toggle span::after{ position: absolute; top: 6px; }
}

/* ---------- Hero / full-bleed photo section (Warm Narrative Advisory) ----------
   Reused for every "big photo + text" moment on any page — the homepage hero,
   an interior page's top hero, and any further photo break lower on a page.
   The photo column has no outer padding on its bleed side, so it runs to the
   actual edge of the viewport (not just the .wrap column) — this is also the
   fix for the site reading too narrow on very wide monitors: text stays at a
   readable measure, aligned to the standard .wrap gutter, while photography
   is free to fill whatever width the screen actually has. Add `.reverse` to
   flip the photo to the left edge instead of the right. */
.hero{
  display: grid; grid-template-columns: minmax(320px, 620px) 1fr; align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding: 56px 0;
  padding-left: max(32px, calc((100vw - var(--max-width)) / 2 + 32px));
  padding-right: 0;
}
.hero.reverse{
  grid-template-columns: 1fr minmax(320px, 620px);
  padding-left: 32px;
  padding-right: max(32px, calc((100vw - var(--max-width)) / 2 + 32px));
}
.hero.reverse .hero-figure{ order: -1; }
.hero-copy{ padding-right: 12px; }
.hero.reverse .hero-copy{ padding-right: 0; padding-left: 12px; }
.hero-kicker{
  display: inline-block; font-family: var(--heading-font); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sapphire); margin-bottom: 18px;
}
.hero h1{ margin-bottom: 22px; }
.hero .lede{ margin-bottom: 32px; max-width: 46ch; }
.hero-figure{
  position: relative; align-self: stretch; overflow: hidden;
  height: min(66vh, 620px); min-height: 380px;
}
.hero-figure img{
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(to left, black 55%, transparent 100%);
  mask-image: linear-gradient(to left, black 55%, transparent 100%);
}
.hero.reverse .hero-figure img{
  -webkit-mask-image: linear-gradient(to right, black 55%, transparent 100%);
  mask-image: linear-gradient(to right, black 55%, transparent 100%);
}
@media (max-width: 900px){
  .hero, .hero.reverse{
    grid-template-columns: 1fr; padding: 40px 32px;
  }
  .hero-figure, .hero.reverse .hero-figure{
    order: -1; height: 42vh; min-height: 260px; margin: 0 0 8px;
  }
  .hero-figure img, .hero.reverse .hero-figure img{
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  }
}

/* ---------- Pillars strip ---------- */
.pillars{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 56px);
}
.pillar{ border-top: 2px solid var(--smart-blue); padding-top: 18px; }
.pillar h3{ color: var(--prussian); margin-bottom: 8px; }
.pillar p{ font-size: 0.95rem; margin-bottom: 0; }
@media (max-width: 760px){ .pillars{ grid-template-columns: 1fr; } }

/* ---------- Pull quote ---------- */
.pull-quote{
  border-left: 3px solid var(--smart-blue);
  padding: 6px 0 6px 28px;
  margin: 0;
}
.pull-quote p{
  font-family: var(--heading-font); font-weight: 500; font-style: italic;
  color: var(--regal-navy); font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.45;
  max-width: 52ch; margin: 0;
}
.pull-quote cite{ display:block; margin-top: 16px; font-style: normal; font-size: 0.85rem; color: var(--slate-grey); }

/* ---------- Teaser grid (unboxed — top-rule cards, no border/shadow "modules") ---------- */
.card-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 56px); }
@media (max-width: 900px){ .card-grid{ grid-template-columns: 1fr; } }
.teaser-card{
  border-top: 2px solid var(--smart-blue); padding-top: 18px;
  display: flex; flex-direction: column;
}
.teaser-card h3{ margin-bottom: 10px; color: var(--prussian); }
.teaser-card p{ font-size: 0.94rem; flex: 1; }
.teaser-card a.more, a.more{ font-weight: 600; font-size: 0.9rem; }

/* ---------- Section heading pattern ---------- */
.section-head{ max-width: 62ch; margin-bottom: 44px; }
.section-head .kicker{
  display: block; font-family: var(--heading-font); font-weight: 600;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sapphire); margin-bottom: 12px;
}

/* ---------- Band (alt background) ---------- */
.band{ background: var(--white); border-top: 1px solid #E1E5EC; border-bottom: 1px solid #E1E5EC; }
.band-navy{ background: var(--prussian); }
.band-navy h2, .band-navy .section-head .kicker{ color: #fff; }
.band-navy p{ color: #C7D3E6; }

/* ---------- CTA band ---------- */
.cta-band{ text-align: center; padding: 90px 0; }
.cta-band h2{ margin-bottom: 18px; }
.cta-band .btn-row{ justify-content: center; margin-top: 28px; }

/* ---------- Footer ---------- */
footer.site-footer{ background: var(--prussian); color: #C7D3E6; padding: 56px 0 32px; }
footer.site-footer .foot-top{
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid #1B3A66;
}
footer.site-footer .brand span{ color: #fff; }
footer.site-footer .brand img{ opacity: 0.96; }
footer.site-footer nav{ column-count: 2; column-gap: 40px; }
footer.site-footer nav a{ display: block; color: #C7D3E6; font-size: 0.92rem; margin-bottom: 10px; break-inside: avoid; }
footer.site-footer nav a:hover{ color: #fff; }
@media (max-width: 480px){ footer.site-footer nav{ column-count: 1; } }
footer.site-footer .foot-bottom{
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 24px; font-size: 0.82rem; color: var(--lavender-grey);
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero{ padding: 64px 0 20px; }
.page-hero .kicker{
  display:block; font-family: var(--heading-font); font-weight:600; font-size:0.8rem;
  letter-spacing:0.08em; text-transform:uppercase; color: var(--sapphire); margin-bottom: 16px;
}
.page-hero p.lede{ max-width: 58ch; }

/* ---------- Numbered process steps (How We Work) ---------- */
.steps{ display: grid; gap: 28px; }
.step{
  display: grid; grid-template-columns: 64px 1fr; gap: 22px;
  padding: 26px 0; border-top: 1px solid #E1E5EC;
}
.step:first-child{ border-top: none; padding-top: 0; }
.step-num{
  font-family: var(--heading-font); font-weight: 700; font-size: 1.3rem;
  color: var(--smart-blue);
}
.step h3{ margin-bottom: 8px; }
.step p{ margin-bottom: 0; }

/* ---------- Connected timeline (How We Work — a journey, not a list) ----------
   Distinct from the full-bleed .hero pattern used on What We Do: photos here
   are small, contained, rounded-corner thumbnails threaded on a connecting
   vertical line, to read as a sequence rather than a set of parallel blocks. */
.timeline{ position: relative; }
.timeline::before{
  content: ''; position: absolute; left: 27px; top: 8px; bottom: 8px; width: 2px;
  background: #E1E5EC;
}
.timeline-item{
  position: relative; display: grid; grid-template-columns: 56px 1fr;
  gap: 28px; padding: 48px 0;
}
.timeline-item:first-child{ padding-top: 0; }
.timeline-item:last-child{ padding-bottom: 0; }
.timeline-num{
  position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--smart-blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--heading-font); font-weight: 700; font-size: 1.1rem;
  color: var(--smart-blue);
}
.timeline-body{
  display: grid; grid-template-columns: 1fr 230px; gap: 36px; align-items: center;
}
.timeline-item.reverse .timeline-body{ grid-template-columns: 230px 1fr; }
.timeline-item.reverse .timeline-photo{ order: -1; }
.timeline-copy h3{ margin-bottom: 8px; }
.timeline-copy p{ margin-bottom: 0; font-size: 0.96rem; }
.timeline-photo{
  border-radius: 16px; overflow: hidden; aspect-ratio: 4/5; position: relative;
}
.timeline-photo img{
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(to top, black 75%, transparent 100%);
  mask-image: linear-gradient(to top, black 75%, transparent 100%);
}
@media (max-width: 760px){
  .timeline::before{ left: 23px; }
  .timeline-item{ grid-template-columns: 48px 1fr; gap: 18px; padding: 32px 0; }
  .timeline-num{ width: 48px; height: 48px; font-size: 1rem; }
  .timeline-body, .timeline-item.reverse .timeline-body{
    grid-template-columns: 1fr; gap: 18px;
  }
  .timeline-photo, .timeline-item.reverse .timeline-photo{
    order: -1; aspect-ratio: 16/9;
  }
}

/* ---------- Editorial value rows (Values — big numerals, not a card list) ---------- */
.value-rows{ display: grid; }
.value-row{
  display: grid; grid-template-columns: 96px 1fr; gap: 28px;
  padding: 40px 0; border-top: 1px solid #E1E5EC;
}
.value-row:first-child{ border-top: none; padding-top: 0; }
.value-num{
  font-family: var(--heading-font); font-weight: 700; font-size: 2.8rem;
  line-height: 1; color: var(--lavender-grey);
}
.value-row h3{ margin-bottom: 10px; }
.value-row .how{
  border-left: 3px solid var(--smart-blue); padding: 2px 0 2px 18px; margin: 16px 0 0;
  font-family: var(--heading-font); font-weight: 500; font-style: italic;
  color: var(--regal-navy); font-size: 1.05rem; max-width: 52ch;
}
@media (max-width: 600px){
  .value-row{ grid-template-columns: 1fr; gap: 8px; }
  .value-num{ font-size: 1.8rem; }
}

/* ---------- Unboxed list block (Values, What We Do — flowing, not modular cards) ---------- */
.list-block{ display: grid; }
.list-item{ padding: 30px 0; border-top: 1px solid #E1E5EC; }
.list-item:first-child{ border-top: none; padding-top: 0; }
.list-item h3{ margin-bottom: 10px; }
.list-item p{ max-width: 62ch; }
.list-item .how{
  font-size: 0.9rem; color: var(--sapphire); font-weight: 500; margin: 4px 0 0;
}
.list-item .small{ margin-top: -4px; }

/* ---------- Fit grid (Who We're For) ---------- */
.fit-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px){ .fit-grid{ grid-template-columns: 1fr; } }
.fit-col{ border-top: 2px solid var(--smart-blue); padding-top: 18px; }
.fit-col.not-fit{ border-top-color: var(--lavender-grey); }
.fit-col h3{ margin-bottom: 14px; }
.fit-col ul{ margin: 0; padding-left: 20px; }
.fit-col li{ color: var(--twilight); margin-bottom: 10px; font-size: 0.96rem; }

/* ---------- Role blocks (Track Record) ---------- */
.note-box{
  border-left: 3px solid var(--smart-blue);
  padding: 4px 0 4px 26px; margin-bottom: 8px;
}
.note-box p{ margin-bottom: 0; max-width: 62ch; font-style: italic; color: var(--twilight); }
.role-block{ padding: 30px 0; border-top: 1px solid #E1E5EC; }
.role-block:first-child{ border-top: none; }
.role-head{ display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.role-head h3{ margin: 0; }
.role-dates{ font-size: 0.85rem; color: var(--slate-grey); white-space: nowrap; }
.role-block ul{ margin: 0 0 1.1em; padding-left: 20px; color: var(--twilight); }
.role-block li{ margin-bottom: 8px; }

/* ---------- Client wordmark strip (Track Record) ---------- */
.client-strip{
  display: flex; justify-content: center;
}
.client-strip img{
  width: 100%; max-width: 760px; height: auto;
}

/* ---------- Form (Get in Touch) ---------- */
.form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 640px; }
.form-grid .field-full{ grid-column: 1 / -1; }
@media (max-width: 640px){ .form-grid{ grid-template-columns: 1fr; } }
.field label{ display: block; font-size: 0.85rem; font-weight: 600; color: var(--regal-navy); margin-bottom: 6px; }
.field input, .field textarea{
  width: 100%; font-family: var(--body-font); font-size: 0.96rem; color: var(--prussian);
  background: var(--white); border: 1.5px solid #D6DBE4; border-radius: 8px;
  padding: 11px 14px; resize: vertical;
}
.field input:focus, .field textarea:focus{ outline: none; border-color: var(--smart-blue); }
.form-status{
  max-width: 640px; margin-top: 4px; font-family: var(--heading-font);
  font-weight: 500; font-size: 1rem;
}
.form-status.success{ color: var(--regal-navy); }
.form-status.error{ color: var(--slate-grey); }

/* ---------- Utility ---------- */
.center{ text-align: center; }
.mt-0{ margin-top: 0; }
.small{ font-size: 0.88rem; color: var(--slate-grey); }
