/* ==========================================================================
   Chad Wable — Insights & Case Studies
   Modern flat design system. No gradients, no drop shadows, no skeuomorphism.
   ========================================================================== */

:root {
  --navy: #0F2A43;
  --navy-700: #16385A;
  --gold: #C8963C;
  --gold-100: #FBF0DC;
  /* Accessible gold: use for gold TEXT on light backgrounds (paper/cream).
     --gold itself only meets WCAG AA contrast as text when placed on --navy,
     or when used as a background/border rather than text color. */
  --gold-text: #8A6421;
  --cream: #F4F1EA;
  --paper: #FFFFFF;
  --ink: #16202A;
  --slate: #55636E;
  --line: #DDD8CC;
  --line-strong: #16202A;
  --radius-sm: 4px;
  --radius: 8px;
  --heading-font: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1160px;
  /* A slow, confident ease-out — the curve behind every "luxury" micro-interaction on this site */
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.25s;
  --dur-med: 0.5s;
  --dur-slow: 0.9s;
}

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

/* ---- Scroll reveal ----
   Progressive enhancement: content is fully visible by default. The
   ".js-reveal" class is added by main.js only once JavaScript has run, so
   nothing ever depends on JS to be readable. An IntersectionObserver then
   adds ".is-visible" as each element scrolls into view. */
.js-reveal .reveal {
  transition: opacity var(--dur-slow) var(--ease-luxury), transform var(--dur-slow) var(--ease-luxury);
}
.js-reveal .reveal:not(.is-visible) { opacity: 0; transform: translateY(28px); }
.js-reveal .reveal.is-visible { opacity: 1; transform: translateY(0); }

.grid-3 .reveal:nth-child(2), .grid-2 .reveal:nth-child(2) { transition-delay: 0.1s; }
.grid-3 .reveal:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal .reveal:not(.is-visible) { opacity: 1; transform: none; }
  .js-reveal .reveal { transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
/* Inline links within body copy must not rely on color alone (WCAG 1.4.1) */
p a, li a, .article a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, h4 {
  font-family: var(--heading-font);
  color: var(--navy);
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 16px; color: var(--slate); }
.eyebrow {
  font-family: var(--body-font);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-text); /* accessible on the light backgrounds this appears on by default */
  margin-bottom: 12px;
  display: inline-block;
}
/* On solid navy backgrounds, the brighter --gold passes contrast and reads better */
.hero .eyebrow, .cta-band .eyebrow, .testimonial .eyebrow, .compare-col.yes .eyebrow {
  color: var(--gold);
}
/* Small angled accent tick — recurring geometric motif, decorative only */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 9px;
  margin-right: 8px;
  margin-bottom: 1px;
  background: var(--gold-text);
  transform: skewX(-18deg);
  vertical-align: middle;
}
.hero .eyebrow::before, .cta-band .eyebrow::before, .testimonial .eyebrow::before, .compare-col.yes .eyebrow::before {
  background: var(--gold);
}

/* ---- Accessibility: skip link + focus visibility ---- */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  z-index: 1000;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
/* Fallback for browsers without :focus-visible support */
.js-focus-fallback:focus { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---- Buttons: flat fills, subtle lift on hover ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-luxury),
              color var(--dur-fast) var(--ease-luxury),
              border-color var(--dur-fast) var(--ease-luxury),
              transform var(--dur-fast) var(--ease-luxury);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: 0.1s; }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: #B6842E; }
.btn-outline { border-color: #ffffff; color: #fff; background: transparent; }
.btn-outline:hover { background: #ffffff; color: var(--navy); }
.btn-outline-navy { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--paper); border-bottom: 2px solid var(--line-strong); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { height: 40px; width: auto; transition: transform var(--dur-med) var(--ease-luxury); }
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.04); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--heading-font); font-size: 1.1rem; color: var(--navy); }
.brand-text span { font-size: 0.65rem; letter-spacing: 1.2px; color: var(--slate); text-transform: uppercase; }

nav.main-nav { display: flex; align-items: center; gap: 28px; }
nav.main-nav a {
  position: relative;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 4px 0;
}
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-med) var(--ease-luxury);
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--navy); }
nav.main-nav a:hover::after, nav.main-nav a.active::after { transform: scaleX(1); transform-origin: left; }

/* ---- Disabled / coming-soon nav + footer items ---- */
.nav-disabled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 4px 0;
  cursor: default;
  opacity: 0.65;
}
.footer-disabled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate);
  opacity: 0.65;
  cursor: default;
}
.coming-soon-tag {
  display: inline-block;
  font-family: var(--body-font);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--gold-text);
  background: var(--gold-100);
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: super;
  margin-left: 2px;
}

.header-cta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-link { font-weight: 700; font-size: 0.88rem; color: var(--navy); text-decoration: none; white-space: nowrap; transition: color var(--dur-fast) var(--ease-luxury); }
.header-link:hover { color: var(--gold-text); }
.header-link--secondary { font-weight: 500; font-size: 0.82rem; color: var(--slate); }
.header-link--secondary:hover { color: var(--navy); }

.nav-toggle { display: none; flex-direction: column; justify-content: space-between; width: 26px; height: 18px; background: none; border: none; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--navy); }

@media (max-width: 900px) {
  nav.main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 18px 28px; border-bottom: 2px solid var(--line-strong); display: none; gap: 14px; }
  nav.main-nav.open { display: flex; }
  .header-link { display: none; }
  .nav-toggle { display: flex; }
}

/* ---- Hero: flat solid block, no gradient, angled bottom edge ---- */
.hero {
  background: var(--navy);
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 44px));
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 50px; align-items: center; padding: 76px 0 96px; }
.hero h1 { color: #fff; }
.hero p.lede { color: #C7D2DB; font-size: 1.1rem; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* Staggered entrance on load — the hero is always above the fold, so this
   runs immediately rather than waiting on a scroll trigger. */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow, .hero h1, .hero p.lede, .hero-actions, .hero-photo-wrap {
  animation: rise-in var(--dur-slow) var(--ease-luxury) both;
}
.hero .eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero p.lede { animation-delay: 0.25s; }
.hero-actions { animation-delay: 0.35s; }
.hero-photo-wrap { animation-delay: 0.3s; }

.hero-photo {
  border: 3px solid var(--gold);
  overflow: hidden;
  position: relative;
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px);
  transition: transform var(--dur-med) var(--ease-luxury);
}
.hero-photo-wrap:hover .hero-photo { transform: translate(-4px, -4px); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero-badge { background: var(--gold); color: var(--navy); padding: 12px 16px; font-size: 0.85rem; font-weight: 700; }
.hero-photo-wrap { position: relative; }
.hero-photo-wrap::before {
  content: "";
  position: absolute;
  top: -16px;
  left: -16px;
  width: 100%;
  height: 100%;
  background: var(--gold);
  z-index: 0;
}
.hero-photo-wrap .hero-photo { position: relative; z-index: 1; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; padding-top: 46px; padding-bottom: 76px; } .hero-photo-wrap { max-width: 340px; margin: 0 auto; } }

/* ---- Sections ---- */
section { padding: 80px 0; }
.section-alt { background: var(--cream); }
.section-head { max-width: 680px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---- Cards: flat border, no drop shadow, subtle lift on hover, clipped top-right corner ---- */
.card {
  background: var(--paper);
  border: 2px solid var(--line);
  padding: 30px;
  transition: border-color var(--dur-med) var(--ease-luxury), transform var(--dur-med) var(--ease-luxury);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}
.card:hover { border-color: var(--navy); transform: translateY(-4px); }
.card .icon { margin-bottom: 12px; display: inline-flex; color: var(--gold-text); }
.card .icon svg { width: 50px; height: 50px; stroke-width: 1.25; }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.tag, .card .stat-tag { display: inline-block; background: var(--gold-100); color: var(--gold-text); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.4px; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-sm); margin-bottom: 12px; }

/* ---- Comparison (peer vs vendor) ---- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .compare { grid-template-columns: 1fr; } }
.compare-col { border-radius: var(--radius); padding: 30px; border: 2px solid var(--line); }
.compare-col.yes { background: var(--navy); color: #fff; border-color: var(--navy); }
.compare-col.yes h3, .compare-col.yes .eyebrow { color: #fff; }
.compare-col ul { list-style: none; margin: 0; padding: 0; }
.compare-col li { padding: 10px 0 10px 28px; position: relative; border-bottom: 1px solid var(--line); }
.compare-col.yes li { border-bottom: 1px solid rgba(255,255,255,0.18); color: #E7ECF0; }
.compare-col li::before { content: "→"; position: absolute; left: 0; font-weight: 700; color: var(--navy); }
.compare-col.yes li::before { color: var(--gold); }

/* ---- Solutions list ---- */
.solutions-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 36px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 700px) { .solutions-list { grid-template-columns: 1fr; } }
.solutions-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---- Service blocks ---- */
.service-block { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 46px; align-items: center; padding: 56px 0; border-bottom: 2px solid var(--line); }
.service-block:last-child { border-bottom: none; }
@media (max-width: 860px) { .service-block { grid-template-columns: 1fr; } }
.service-media { background: var(--navy); border: 2px solid var(--navy); border-radius: var(--radius); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; color: var(--gold); font-family: var(--heading-font); font-size: 2.6rem; }

/* ---- Testimonial: flat block ---- */
.testimonial {
  background: var(--navy);
  color: #fff;
  padding: 48px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 32px 100%, 0 calc(100% - 32px));
}
.testimonial blockquote { font-family: var(--heading-font); font-weight: 500; font-size: 1.4rem; line-height: 1.5; margin: 0 0 22px; color: #fff; }
.testimonial cite { font-style: normal; color: var(--gold); font-weight: 700; display: block; }
.testimonial .role { color: #C7D2DB; font-size: 0.88rem; }

/* ---- CTA band ---- */
.cta-band { background: var(--navy); color: #fff; text-align: center; padding: 72px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #C7D2DB; max-width: 560px; margin: 0 auto 28px; }

/* ---- Footer ---- */
footer.site-footer { background: var(--navy); color: #A9BACB; padding: 56px 0 28px; border-top: 4px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-family: var(--body-font); font-size: 0.8rem; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a, .footer-grid a { color: #A9BACB; text-decoration: none; display: block; margin-bottom: 10px; font-size: 0.9rem; }
.footer-col a:hover, .footer-grid a:hover { color: var(--gold); }
.footer-brand img { height: 36px; margin-bottom: 14px; }
.footer-brand p { color: #A9BACB; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; }
.footer-bottom a { text-decoration: underline; }
.footer-bottom a:hover { color: var(--gold); }

/* ---- Page hero (interior pages) ---- */
.page-hero {
  background: var(--cream);
  padding: 60px 0 78px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), 0 100%);
}
.page-hero--tight { padding: 30px 0; clip-path: none; border-bottom: 2px solid var(--line-strong); }
.breadcrumb { font-size: 0.85rem; color: var(--slate); }
.breadcrumb a { color: var(--slate); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); }

.credentials { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
@media (max-width: 860px) { .credentials { grid-template-columns: 1fr; } }

.video-wrap { border: 2px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.video-wrap video { width: 100%; display: block; }

.source-note { font-size: 0.75rem; color: var(--slate); margin-top: 6px; }

/* ---- Contact / forms ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--paper);
  border: 2px solid var(--line-strong);
  padding: 34px;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
}
.contact-line { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-size: 1.02rem; }
.contact-line .ic { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--cream); color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-line .ic svg { width: 20px; height: 20px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--slate); border-radius: var(--radius-sm); font-family: var(--body-font); font-size: 0.95rem; background: var(--paper); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); }
.field textarea { min-height: 120px; resize: vertical; }

/* ---- Insights / articles ---- */
.meta-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 0.85rem; color: var(--slate); }
.article { max-width: 740px; margin: 0 auto; }
.article p { color: var(--ink); font-size: 1.03rem; }
.article .lede-graf { font-size: 1.15rem; color: var(--navy); font-family: var(--heading-font); font-weight: 500; }
.article blockquote { border-left: 4px solid var(--gold); margin: 26px 0; padding: 4px 0 4px 22px; font-family: var(--heading-font); font-weight: 500; font-size: 1.2rem; color: var(--navy); }
.article-byline { display: flex; align-items: center; gap: 12px; margin: 16px 0 28px; }
.article-byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.article-byline .name { font-weight: 700; color: var(--navy); font-size: 0.92rem; }
.article-byline .role { font-size: 0.78rem; color: var(--slate); }
.back-link { max-width: 740px; margin: 40px auto 0; }
.back-link a { text-decoration: none; font-weight: 700; color: var(--navy); }

.toc { max-width: 740px; margin: 0 auto 50px; background: var(--cream); border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 24px 28px; }
.toc h4 { font-family: var(--body-font); font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--navy); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc a { text-decoration: none; color: var(--slate); font-weight: 600; }
.toc a:hover { color: var(--gold-text); }

.insight-list { max-width: 740px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.insight-list-item { padding: 26px 0; border-bottom: 2px solid var(--line); }
.insight-list-item:first-child { padding-top: 0; }
.insight-list-item h3 { margin-bottom: 8px; }
.insight-list-item a.title-link { text-decoration: none; }
.insight-list-item a.title-link:hover h3 { color: var(--gold-text); }

/* ---- Narrative case-study blocks ---- */
.story {
  border: 2px solid var(--line-strong);
  padding: 34px;
  margin-bottom: 26px;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}
.story-flag { display: inline-block; background: var(--gold); color: var(--navy); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 18px; }
@media (max-width: 800px) { .story-grid { grid-template-columns: 1fr; } }
.story-grid .col h4 { font-family: var(--body-font); font-size: 0.76rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-text); margin-bottom: 8px; }
.story-grid .col p { font-size: 0.94rem; margin-bottom: 0; color: var(--slate); }

/* ---- Cross-brand callout ---- */
.cross-link-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: var(--cream); border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 26px 30px; }
.cross-link-card p { margin: 0; color: var(--ink); }

/* ---- Cookie consent banner ---- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  background: var(--navy);
  color: #fff;
  border-top: 4px solid var(--gold);
  padding: 20px 0;
  transform: translateY(100%);
  opacity: 0;
  transition: transform var(--dur-med) var(--ease-luxury), opacity var(--dur-med) var(--ease-luxury);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cookie-banner p { color: #E7ECF0; margin: 0; font-size: 0.92rem; max-width: 640px; }
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-banner .btn-outline-navy { border-color: #fff; color: #fff; }
.cookie-banner .btn-outline-navy:hover { background: #fff; color: var(--navy); }
@media (max-width: 600px) {
  .cookie-banner-inner { flex-direction: column; align-items: flex-start; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .btn { flex: 1; justify-content: center; }
}
