/* ============================================================
   STRATEGIC PIXEL — shared design system  v2 (2026-07-29)
   Pure-white editorial system. Inspiration: Pentagram,
   Wolff Olins, Lippincott. Same fonts (Georgia serif /
   Helvetica Neue sans), same brand palette on white.
   ============================================================ */
:root {
  --ink: #11100e;
  --warm-black: #171511;
  --paper: #ffffff;          /* was cream — now pure white so media pops */
  --paper-deep: #f5f4f1;     /* quiet neutral band */
  --line: #e3e1dc;           /* hairline */
  --rule: #11100e;           /* strong editorial rule */
  --muted: #66625a;
  --red: #a5201d;
  --brick: #7d2d25;
  --gold: #b98632;
  --sage: #6b7161;
  --white: #ffffff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
}

::selection { background: var(--red); color: var(--white); }

/* ---------- scroll progress bar ---------- */
.scroll-progress {
  background: var(--red);
  height: 2px;
  left: 0;
  position: fixed;
  top: 0;
  transform-origin: left;
  transform: scaleX(0);
  width: 100%;
  z-index: 60;
}

/* ---------- header ---------- */
.site-header {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 80px;
  padding: 16px clamp(20px, 5vw, 80px);
  position: sticky;
  top: 0;
  transition: transform 0.35s var(--ease);
  z-index: 50;
}

.site-header.hidden { transform: translateY(-100%); }

.brand-mark {
  align-items: center;
  display: inline-flex;
  gap: clamp(10px, 1.2vw, 14px);
}

.wordmark {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  line-height: 0.9;
  text-transform: lowercase;
}

.logo-mark {
  flex: 0 0 auto;
  transition: transform 0.6s var(--ease);
  width: clamp(40px, 3.8vw, 52px);
}

.brand-mark:hover .logo-mark { transform: rotate(180deg) scale(1.06); }

.logo-footer {
  background: var(--white);
  padding: 12px;
  transition: transform 0.9s var(--ease);
  width: clamp(70px, 8vw, 100px);
}

.site-footer > div:first-child:hover .logo-footer { transform: rotate(360deg); }

@media (max-width: 640px) {
  .logo-mark { width: 36px; }
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px clamp(14px, 2.4vw, 38px);
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .site-nav { gap: 6px 16px; justify-content: flex-start; }
  .site-nav a { font-size: 11px; padding: 4px 0; }
}

.site-nav a,
.kicker,
.tag,
.btn,
.chip {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav a {
  padding: 8px 0;
  position: relative;
}

.site-nav a::after {
  background: var(--red);
  bottom: 0;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
  width: 100%;
}

.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); transform-origin: left; }
.site-nav a.active { color: var(--red); }

.btn {
  align-items: center;
  border: 1px solid var(--ink);
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
  padding: 16px 32px;
  position: relative;
  overflow: hidden;
  transition: color 0.3s var(--ease);
}

.btn::before {
  background: var(--ink);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateY(101%);
  transition: transform 0.35s var(--ease);
  z-index: 0;
}

.btn span { position: relative; z-index: 1; }
.btn:hover { color: var(--white); }
.btn:hover::before { transform: translateY(0); }

.btn--red { border-color: var(--red); color: var(--red); }
.btn--red::before { background: var(--red); }
.btn--light { border-color: var(--white); color: var(--white); }
.btn--light::before { background: var(--white); }
.btn--light:hover { color: var(--ink); }

/* ---------- layout primitives ---------- */
.section { padding: clamp(64px, 9vw, 140px) clamp(20px, 5vw, 80px); }

.kicker { color: var(--red); display: block; margin: 0 0 28px; }
.kicker--gold { color: var(--gold); }
.kicker--paper { color: rgba(255, 255, 255, 0.85); }

.section-intro {
  display: grid;
  gap: clamp(24px, 5vw, 76px);
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  margin-bottom: clamp(40px, 6vw, 88px);
}

.section-intro h2 {
  font-size: clamp(36px, 5vw, 76px);
  line-height: 1.02;
  margin-bottom: 0;
  max-width: 980px;
}

.dark { background: var(--warm-black); color: var(--white); }
.dark .muted-text { color: rgba(255, 255, 255, 0.72); }
.deep { background: var(--paper-deep); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
.brick-bg { background: var(--brick); color: var(--white); }
.muted-text { color: var(--muted); }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- marquee ticker ---------- */
.ticker {
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 20px 0;
  white-space: nowrap;
}

.ticker-track {
  animation: ticker 32s linear infinite;
  display: inline-flex;
  gap: 52px;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-track span {
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 27px);
  letter-spacing: -0.01em;
}

.ticker-track em {
  color: var(--red);
  font-style: normal;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- stats ---------- */
.stat-grid {
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-grid article {
  border-right: 1px solid var(--line);
  padding: clamp(28px, 3.6vw, 52px) clamp(18px, 2.6vw, 38px);
}

.stat-grid article:first-child { padding-left: 0; }
.stat-grid article:last-child { border-right: 0; }

.stat-num {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 96px);
  letter-spacing: -0.03em;
  line-height: 0.9;
}

.stat-num sup { color: var(--red); font-size: 0.42em; }
.stat-grid p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 16px 0 0; }

/* ---------- accordion ---------- */
.accordion { border-top: 1px solid var(--rule); }

.accordion-item { border-bottom: 1px solid var(--line); }

.accordion-head {
  align-items: baseline;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: clamp(18px, 3vw, 48px);
  grid-template-columns: 60px minmax(0, 1fr) 40px;
  padding: clamp(26px, 3.6vw, 48px) 0;
  text-align: left;
  width: 100%;
}

.accordion-head .idx { color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; }

.accordion-head h3 {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 62px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.94;
  margin: 0;
  transition: color 0.3s;
}

.accordion-head:hover h3 { color: var(--red); }

.accordion-head .toggle-mark {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  justify-self: end;
  line-height: 1;
  transition: transform 0.4s var(--ease), color 0.3s;
}

.accordion-head:hover .toggle-mark { color: var(--red); }
.accordion-item.open .toggle-mark { transform: rotate(45deg); }

.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}

.accordion-item.open .accordion-body { grid-template-rows: 1fr; }
.accordion-body > div { overflow: hidden; }

.accordion-inner {
  display: grid;
  gap: clamp(22px, 4vw, 60px);
  grid-template-columns: 60px minmax(0, 0.8fr) minmax(240px, 0.5fr);
  padding: 0 0 clamp(30px, 4vw, 56px);
}

.accordion-inner p {
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 21px);
  grid-column: 2;
  line-height: 1.5;
  margin: 0;
}

.accordion-inner ul {
  border-left: 1px solid var(--line);
  list-style: none;
  margin: 0;
  padding: 0 0 0 clamp(20px, 3vw, 36px);
}

.accordion-inner li {
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 11px 0;
  text-transform: uppercase;
}

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  gap: clamp(20px, 3vw, 44px);
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 320px;
  padding: clamp(26px, 3.6vw, 48px) clamp(24px, 3vw, 40px);
  position: relative;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

/* immersive hover: card inverts to ink, type flips light.
   .invert is the touch-device equivalent — added by shared.js via
   IntersectionObserver when a card reaches mid-viewport (hover:none only). */
.card:hover, .card.invert { background: var(--ink); border-color: var(--ink); border-top-color: var(--red); color: var(--white); }
.card:hover p, .card.invert p { color: rgba(255, 255, 255, 0.74); }
.card:hover .tag, .card.invert .tag { color: var(--gold); }
.card p, .card .tag { transition: color 0.35s var(--ease); }

.deep .card--dark { background: var(--ink); }
.deep .card--dark:hover { background: var(--warm-black); }
.brick-bg .card { border: 0; }
.brick-bg .card:hover { background: rgba(17, 16, 14, 0.4); border-top-color: transparent; }

.card h3 {
  font-family: var(--serif);
  font-size: clamp(28px, 2.9vw, 44px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 22px 0 16px;
}

.card p { color: var(--muted); font-size: 16px; line-height: 1.55; margin-bottom: 0; }
.card .tag { color: var(--red); }
.card--dark { background: var(--ink); border-top-color: var(--ink); color: var(--white); padding: clamp(26px, 3.6vw, 48px) clamp(24px, 3vw, 40px); }
.card--dark:hover { background: var(--warm-black); border-top-color: var(--gold); }
.card--dark p { color: rgba(255, 255, 255, 0.72); }
.card--dark .tag { color: var(--gold); }

/* ---------- case study tiles ---------- */
.case-tile {
  border-top: 1px solid var(--rule);
  display: grid;
  gap: clamp(20px, 3vw, 44px);
  grid-template-columns: minmax(160px, 0.3fr) minmax(0, 1fr) minmax(180px, 0.34fr);
  padding: clamp(30px, 4vw, 58px) 0;
  position: relative;
  transition: padding-left 0.35s var(--ease);
}

.case-tile::before {
  background: var(--red);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  transform: scaleY(0);
  transition: transform 0.35s var(--ease);
  width: 3px;
}

.case-tile:hover { padding-left: 26px; }
.case-tile:hover::before { transform: scaleY(1); }

.case-tile .tag { color: var(--red); }

.case-tile h3 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.2vw, 64px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin: 0 0 14px;
}

.case-tile p { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; margin: 0; }

.case-metric {
  border-left: 1px solid var(--line);
  padding-left: clamp(18px, 2.4vw, 34px);
}

.case-metric .stat-num { font-size: clamp(40px, 4.4vw, 64px); }
.case-metric p { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; margin-top: 10px; text-transform: uppercase; }

/* ---------- filter chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(32px, 4vw, 56px); }

.chip {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
  padding: 10px 20px;
  transition: all 0.25s var(--ease);
}

.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------- metric bars (case detail) ---------- */
.metric-bar { margin-bottom: 26px; }

.metric-bar .bar-label {
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.metric-bar .bar-track { background: rgba(17, 16, 14, 0.08); height: 6px; }
.dark .metric-bar .bar-track { background: rgba(255, 255, 255, 0.16); }

.metric-bar .bar-fill {
  background: var(--red);
  height: 100%;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s var(--ease) 0.2s;
  width: var(--w, 50%);
}

.metric-bar.visible .bar-fill { transform: scaleX(1); }
.metric-bar .bar-fill--gold { background: var(--gold); }
.metric-bar .bar-fill--sage { background: var(--sage); }

/* ---------- testimonial rotator ---------- */
.quote-rotator { min-height: 300px; position: relative; }

.quote-slide {
  inset: 0;
  opacity: 0;
  position: absolute;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  visibility: hidden;
}

.quote-slide.active { opacity: 1; transform: none; visibility: visible; }

.quote-slide blockquote {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 28px;
  max-width: 940px;
}

.quote-slide cite { color: var(--gold); font-size: 12px; font-style: normal; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.quote-dots { display: flex; gap: 10px; margin-top: 36px; }

.quote-dots button {
  background: rgba(255, 255, 255, 0.3);
  border: 0;
  cursor: pointer;
  height: 8px;
  padding: 0;
  transition: all 0.3s;
  width: 26px;
}

.quote-dots button.active { background: var(--gold); width: 44px; }

/* ---------- CTA band ---------- */
.cta-band {
  align-items: end;
  background: var(--ink);
  color: var(--white);
  display: grid;
  gap: clamp(28px, 6vw, 100px);
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(56px, 8vw, 120px) clamp(20px, 5vw, 80px);
}

.cta-band h2 { font-size: clamp(36px, 5vw, 80px); line-height: 1; margin: 0; max-width: 900px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  display: grid;
  gap: clamp(28px, 5vw, 70px);
  grid-template-columns: minmax(200px, 0.5fr) repeat(4, minmax(120px, 0.28fr));
  padding: clamp(48px, 6vw, 90px) clamp(20px, 5vw, 80px) 36px;
}

.site-footer h4 { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; margin-bottom: 18px; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a { color: rgba(255, 255, 255, 0.75); font-size: 15px; transition: color 0.25s; }
.site-footer li a:hover { color: var(--white); }
.footer-note { border-top: 1px solid rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.5); font-size: 11px; grid-column: 1 / -1; letter-spacing: 0.1em; margin-top: 18px; padding-top: 22px; text-transform: uppercase; }
.site-footer .wordmark { color: var(--white); }

/* ---------- back to top ---------- */
.to-top {
  align-items: center;
  background: var(--red);
  border: 0;
  bottom: 26px;
  color: var(--white);
  cursor: pointer;
  display: flex;
  font-size: 18px;
  height: 48px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 26px;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(10px);
  width: 48px;
  z-index: 40;
}

.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .section-intro, .cta-band, .case-tile { grid-template-columns: 1fr; }
  .stat-grid, .card-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid article:nth-child(2n) { border-right: 0; }
  .accordion-inner { grid-template-columns: 1fr; }
  .accordion-inner p, .accordion-inner ul { grid-column: 1; }
  .accordion-inner ul { border-left: 0; padding-left: 0; }
  .case-metric { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
  .site-footer { grid-template-columns: 1fr 1fr; }
}

/* Display leading is a large-type trick. The clamp() minimums land around
   30-48px on phones, where a tight line-height makes descenders collide
   with the line beneath. Relax it once the type is at its small end. */
@media (max-width: 760px) {
  .section-intro h2,
  .cta-band h2,
  .accordion-head h3,
  .card h3,
  .case-tile h3 { line-height: 1.08; }
  .stat-num { line-height: 1; }
}

@media (max-width: 640px) {
  .site-header { align-items: flex-start; display: grid; gap: 14px; }
  .stat-grid, .card-grid { grid-template-columns: 1fr; }
  .stat-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .accordion-head { grid-template-columns: 40px 1fr 30px; }
  .accordion-head h3 { font-size: 32px; }
  .case-tile h3 { font-size: 36px; }
  .quote-rotator { min-height: 380px; }
}

/* Four nav items fit one row down to ~430px; below that wrap to a balanced
   2x2 instead of leaving a single orphaned link stranded on row two. */
@media (max-width: 430px) {
  .site-nav { display: grid; gap: 8px 22px; grid-template-columns: repeat(2, max-content); }
}

/* ============================================================
   MOBILE NAV — hamburger ("pancake") toggle  v20 (2026-08-05)
   Icon taken from metlife.com's live mobile header, measured
   in-browser: their SVG sprite icon-menu/icon-close, rendered
   20x20px in MetLife navy #003652, full-width bars swapping to
   an X when open (an icon swap, not a morph — that is how
   MetLife does it). Menu drops as a full-width white panel
   under the sticky header. Desktop nav is untouched.

   These rules sit at the end of the file on purpose: they
   override the earlier <=760px header rules at equal
   specificity by source order.
   ============================================================ */
.nav-toggle {
  align-items: center;
  background: none;
  border: 0;
  cursor: pointer;
  display: none;               /* mobile only */
  height: 44px;                /* comfortable tap target */
  justify-content: center;
  padding: 0;
  width: 44px;
}

.nav-toggle svg {
  display: block;
  fill: #003652;               /* MetLife navy, as measured */
  height: 20px;
  width: 20px;
}

/* open state: menu icon swaps to the close (X) icon */
.nav-toggle .icon-close { display: none; }
body.menu-open .nav-toggle .icon-menu { display: none; }
body.menu-open .nav-toggle .icon-close { display: block; }

@media (max-width: 760px) {
  /* header returns to a single row: brand left, pancake right */
  .site-header { align-items: center; display: flex; flex-direction: row; gap: 0; }
  .nav-toggle { display: flex; }

  /* inline nav hides behind the toggle... */
  .site-nav { display: none; }

  /* ...and reappears as a dropdown panel under the sticky header */
  body.menu-open .site-nav {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(17, 16, 14, 0.10);
    display: flex;
    flex-direction: column;
    gap: 0;
    left: 0;
    padding: 6px 20px 14px;
    position: absolute;
    right: 0;
    top: 100%;
  }

  body.menu-open .site-nav a {
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 15px 0;
  }

  body.menu-open .site-nav a:last-child { border-bottom: 0; }
  body.menu-open .site-nav a::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle .bar { transition: none; }
}
