/* ==========================================================================
   Thomas Data Design — 2026 "Flowchart" theme
   ========================================================================== */

:root {
  /* Brand palette (carried over from the 2023 site) */
  --brown-900: #432b20;
  --brown-700: #53463c;
  --brown-600: #7f6653;
  --brown-400: #9b918a;
  --sand:      #d1c0b3;
  --blue:      #4890ed;
  --blue-100:  #c7dbf5;
  --blue-50:   #eaf2fd;
  --blue-700:  #3e5899;
  --navy:      #073571;
  --navy-900:  #14123f;
  --cream:     #fffffd;
  --paper:     #f7f3ee;

  /* Roles */
  --bg: var(--cream);
  --bg-alt: var(--paper);
  --ink: var(--brown-900);
  --ink-body: var(--brown-700);
  --ink-muted: var(--brown-600);
  --accent: var(--blue);
  --line: #e4dbd2;

  /* Mutes the bright flash in the header artwork without removing it */
  --flash-mute: radial-gradient(ellipse 34% 46% at 26% 57%, rgba(20,18,63,.82) 0%, rgba(20,18,63,.55) 40%, rgba(20,18,63,0) 78%),
                linear-gradient(rgba(20,18,63,.18), rgba(20,18,63,.18));
  --flash-mute-banner: radial-gradient(ellipse 34% 90% at 26% 85%, rgba(20,18,63,.82) 0%, rgba(20,18,63,.55) 40%, rgba(20,18,63,0) 78%),
                linear-gradient(rgba(20,18,63,.18), rgba(20,18,63,.18));

  --font-head: 'Raleway', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(67,43,32,.06), 0 8px 24px rgba(67,43,32,.08);
  --shadow-lg: 0 2px 4px rgba(67,43,32,.08), 0 18px 48px rgba(67,43,32,.14);
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--blue-700); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.5rem; font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: .6em; margin-bottom: .75rem;
}
.lead { font-size: 1.3rem; line-height: 1.6; color: var(--ink); font-weight: 400; max-width: 62ch; }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.5em; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(72,144,237,.35); }
.btn-primary:hover { background: #3a7fd9; }
.btn-ghost { border-color: rgba(255,255,253,.5); color: var(--cream); }
.btn-ghost:hover { background: rgba(255,255,253,.1); border-color: var(--cream); }
.btn-dark { background: var(--brown-900); color: var(--cream); }
.btn-dark:hover { background: var(--navy); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Header ---------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { background: rgba(20,18,63,.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(72,144,237,.4); }
.nav { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.nav-logo img { height: 40px; width: auto; }
.nav-links { display: flex; gap: .25rem; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a {
  display: block; padding: .5em .9em; border-radius: 999px;
  color: var(--cream); text-decoration: none; font-family: var(--font-head);
  font-weight: 600; font-size: .95rem; transition: background-color .15s ease, color .15s ease;
}
.nav-links a:hover, .nav-links a.active { background: rgba(72,144,237,.2); color: #fff; }
.nav-links .nav-cta { background: var(--blue); color: #fff; margin-left: .5rem; }
.nav-links .nav-cta:hover { background: #3a7fd9; }
.nav-social { display: flex; gap: .9rem; }
.nav-social a { color: var(--blue-100); font-size: 1.1rem; transition: color .15s ease; }
.nav-social a:hover { color: var(--blue); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--cream); font-size: 1.5rem; cursor: pointer; padding: .4rem; }

/* Hero ------------------------------------------------------------------ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--flash-mute), url('../img/bkgd1op80.jpg') center / cover no-repeat var(--navy-900);
  color: var(--cream); overflow: hidden; padding: 120px 0 64px;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 160px;
  background: linear-gradient(to bottom, transparent, rgba(20,18,63,.6));
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: center; }
.hero h1 {
  color: var(--cream); font-size: clamp(2.3rem, 4.6vw, 3.9rem); font-weight: 800;
  letter-spacing: -.02em; line-height: 1.08; margin-bottom: 1.25rem;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p.hero-sub { font-size: 1.25rem; color: var(--blue-100); max-width: 46ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-logo { justify-self: end; width: min(100%, 380px); filter: drop-shadow(0 10px 40px rgba(72,144,237,.35)); }
.hero-logo img { animation: drop-in 1s cubic-bezier(.2,.8,.2,1) both; }

/* Flowchart of services (under hero) */
.flow {
  position: relative; z-index: 1; margin-top: clamp(3rem, 8vh, 5rem);
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0;
}
.flow-node {
  display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem;
  background: rgba(255,255,253,.06); border: 1px solid rgba(199,219,245,.22);
  border-radius: var(--radius); color: var(--cream); text-decoration: none;
  backdrop-filter: blur(6px);
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.flow-node:hover { background: rgba(72,144,237,.18); border-color: var(--blue); transform: translateY(-3px); }
.flow-node svg { flex: none; width: 46px; height: 46px; }
.flow-node strong { display: block; font-family: var(--font-head); font-size: 1.05rem; }
.flow-node span { font-size: .92rem; color: var(--blue-100); line-height: 1.4; display: block; }
.flow-link { align-self: center; width: clamp(16px, 3vw, 40px); height: 3px; background: var(--blue); position: relative; }
.flow-link::after {
  content: ""; position: absolute; right: -2px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: var(--blue); border-right: 0;
}

/* Section scaffolding with flowchart rail ------------------------------- */
.section { position: relative; padding: clamp(4rem, 9vw, 7rem) 0; }
.section.alt { background: var(--bg-alt); }
.rail { position: relative; padding-left: 88px; }
.rail::before {
  content: ""; position: absolute; left: 27px; top: 64px; bottom: -7rem;
  width: 3px; background: linear-gradient(var(--blue), var(--blue-100));
  border-radius: 3px;
}
.section:last-of-type .rail::before { bottom: 0; }
.rail-node { position: absolute; left: 0; top: 0; width: 58px; height: 58px; }
.rail-node svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 10px rgba(72,144,237,.35)); }

.section-head { margin-bottom: 2.5rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; margin: 3rem 0; }
.split.flip > :first-child { order: 2; }
.media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16/10; background: var(--navy-900); }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin: 2.5rem 0; }
/* Four cards read better as a 2×2 grid than 3 + 1 */
.cards:has(> .card:nth-child(4):last-child) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.25rem; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--blue-100); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue); font-size: 1.25rem; margin-bottom: 1rem;
}
.card h4 { margin-bottom: .6rem; }
.card p { font-size: 1rem; }
.card details summary {
  cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: .9rem;
  color: var(--blue-700); list-style: none; display: inline-flex; align-items: center; gap: .4em; margin-bottom: .75rem;
}
.card details summary::-webkit-details-marker { display: none; }
.card details summary::after { content: "+"; font-size: 1.1rem; line-height: 1; }
.card details[open] summary::after { content: "−"; }

/* Stat callouts (replace the pie charts) */
.stat-callout {
  display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
  background: var(--navy); color: var(--blue-100); border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem); margin: 3rem 0; position: relative; overflow: hidden;
}
.stat-callout::before {
  content: ""; position: absolute; inset: 0; background: url('../img/bkgd1op80.jpg') left center / cover;
  opacity: .35; pointer-events: none;
}
.stat-callout > * { position: relative; }
.stat-big { font-family: var(--font-head); font-weight: 800; font-size: clamp(3.5rem, 9vw, 6rem); line-height: 1; color: #fff; letter-spacing: -.03em; }
.stat-big small { display: block; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--blue); margin-top: .75rem; }
.stat-callout p { margin-bottom: .75rem; }
.stat-callout .src { font-size: .85rem; color: var(--blue-100); opacity: .8; }
.stat-callout .src a { color: #fff; text-underline-offset: 2px; }
.stat-callout .src a:hover { color: var(--blue-100); }
.roi .src { font-size: .85rem; color: var(--ink-muted); margin: 1rem 0 0; }
.roi .src a { color: var(--blue-700); text-underline-offset: 2px; }
.stat-callout .btn { margin-top: .5rem; }

/* ROI meters */
.roi { margin: 3rem 0; }
.roi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.meter {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow);
}
.meter-value { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--ink); }
.meter-label { font-size: .95rem; color: var(--ink-muted); margin: .4rem 0 1rem; line-height: 1.4; }
.meter-track { height: 10px; border-radius: 999px; background: var(--blue-50); overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 999px; background: var(--blue); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.meter-scale { font-size: .78rem; color: var(--ink-muted); margin-top: .5rem; }
.roi-group + .roi-group { margin-top: 2.5rem; }
.roi-group h4 { color: var(--ink-muted); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; }

/* Photo strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; }
.strip figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.strip figure:hover img { transform: scale(1.06); }
.strip figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2rem .9rem .8rem;
  background: linear-gradient(transparent, rgba(20,18,63,.85));
  color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
}

/* CTA block inside sections */
.cta-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  border-top: 1px solid var(--line); padding-top: 2rem; margin-top: 3rem;
}
.cta-row p { max-width: 60ch; margin: 0; }
.cta-row h3 { margin-bottom: .4rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.values { display: grid; gap: 1rem; margin-top: 1.5rem; }
.value { display: flex; gap: .9rem; align-items: flex-start; }
.value i { color: var(--blue); margin-top: .35rem; }

/* Contact band + footer */
.contact-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-900) 100%);
  color: var(--blue-100); padding: clamp(3.5rem, 8vw, 5.5rem) 0; text-align: center; position: relative; overflow: hidden;
}
.contact-band h2 { color: #fff; }
.contact-band p { max-width: 56ch; margin: 0 auto 2rem; font-size: 1.2rem; }
.contact-band .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

.site-footer { background: var(--brown-900); color: var(--sand); padding: 3rem 0 2rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: center; list-style: none; margin: 0; padding: 0; }
.footer-links a, .site-footer a { color: var(--cream); text-decoration: none; }
.footer-links a:hover, .site-footer a:hover { color: var(--blue); }
.footer-social { display: flex; gap: 1rem; font-size: 1.25rem; }
.footer-bottom { border-top: 1px solid rgba(209,192,179,.2); margin-top: 2rem; padding-top: 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--brown-400); }

/* Reveal-on-scroll ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-logo img { animation: none; }
  * { transition: none !important; }
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo { justify-self: start; order: -1; width: 220px; }
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow-link { width: 3px; height: 20px; justify-self: 40px; margin-left: 42px; }
  .flow-link::after { right: auto; left: 50%; top: auto; bottom: -2px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--blue); border-bottom: 0; }
  .strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links, .nav-social { display: none; }
  .nav-toggle { display: block; }
  .hero-logo { display: none; }
  .site-header.open { background: rgba(20,18,63,.97); }
  .site-header.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(20,18,63,.97); padding: .5rem var(--gutter) 1.25rem; gap: .25rem;
  }
  .site-header.open .nav-links .nav-cta { margin-left: 0; text-align: center; }
  .split, .about-grid { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .stat-callout { grid-template-columns: 1fr; gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; line-height: 1.65; }
  h2 { font-size: 1.85rem; }
  h3 { font-size: 1.3rem; }
  .section { padding: 3.25rem 0; }
  .section-head { margin-bottom: 1.75rem; }
  .split { margin: 2rem 0; }
  .rail { padding-left: var(--gutter); }
  .rail::before { display: none; }
  .rail-node { position: static; width: 40px; height: 40px; margin-bottom: .75rem; }
  .lead { font-size: 1.08rem; line-height: 1.6; }
  .cards { grid-template-columns: 1fr; }
  .strip { gap: .6rem; }
  .footer-bottom { justify-content: center; text-align: center; }
}
