/* "Why it matters" missed-call section. Chart colors validated on --surface (#0d1117).
   Fonts follow the live site: Palatino for headings/numbers/prose, DM Mono (body) for labels. */
#why-it-matters {
  --mc-answered: #3a4d61;   /* recessive: the part that already works */
  --mc-voicemail: #9070ee;
  --mc-missed: #0aa5c8;
  --mc-sarah: #00d4ff;
}
.mc-wrap { display: grid; gap: .875rem; margin: 1.25rem auto 0; max-width: 760px; }
@media (min-width: 760px) { .mc-wrap { grid-template-columns: 1fr 1fr; } }

.mc-panel {
  background: rgba(13, 17, 23, 0.4); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.25rem; position: relative; overflow: hidden; min-width: 0;
}
.mc-kicker { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mc-hero {
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, 'URW Palladio L', serif; font-weight: 700; line-height: 1;
  font-size: clamp(2.25rem, 6vw, 2.75rem); color: var(--text); margin: .3rem 0 .25rem;
  font-variant-numeric: tabular-nums;
}
.mc-hero small { font-size: .45em; color: var(--mc-missed); }
.mc-hero-sub { font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, 'URW Palladio L', serif; color: var(--muted); line-height: 1.7; font-size: .82rem; }

/* Stacked bar */
.mc-bar { display: flex; gap: 2px; height: 18px; margin: .8rem 0 .55rem; border-radius: 6px; overflow: hidden; background: var(--surface2); }
.mc-seg {
  height: 100%; width: 0; position: relative; cursor: default; outline: none;
  transition: width 1.2s cubic-bezier(.2,.8,.2,1), filter .2s;
}
.mc-seg:first-child { border-radius: 4px 0 0 4px; }
.mc-seg:last-child  { border-radius: 0 4px 4px 0; }
.mc-seg:hover, .mc-seg:focus-visible { filter: brightness(1.25); }
.mc-seg[data-k="answered"]  { background: var(--mc-answered); }
.mc-seg[data-k="voicemail"] { background: var(--mc-voicemail); }
.mc-seg[data-k="missed"]    { background: var(--mc-missed); }

.mc-legend { list-style: none; display: grid; gap: .35rem; font-size: .76rem; }
.mc-legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: .6rem; align-items: center; color: var(--text); }
.mc-legend .sw { width: 12px; height: 12px; border-radius: 4px; }
.mc-legend b { font-variant-numeric: tabular-nums; font-weight: 500; }
.mc-legend .note { grid-column: 2 / 4; color: var(--muted); font-size: .75rem; margin-top: -.35rem; }

/* 100-call waffle */
.mc-waffle-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.mc-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--bg); }
.mc-toggle button {
  font: inherit; font-size: .72rem; border: 0; background: transparent; color: var(--muted);
  padding: .3rem .7rem; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s;
}
.mc-toggle button[aria-pressed="true"] { background: var(--surface2); color: var(--text); }
.mc-toggle button[aria-pressed="true"].sarah { color: var(--mc-sarah); }

.mc-waffle {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px;
  margin: .7rem 0 .5rem; max-width: 170px;
}
.mc-cell {
  aspect-ratio: 1; border-radius: 3px; background: var(--surface2);
  transform: scale(.4); opacity: 0;
  transition: transform .45s cubic-bezier(.3,1.6,.5,1), opacity .3s, background-color .5s, box-shadow .5s;
}
.mc-cell.on { transform: scale(1); opacity: 1; }
.mc-cell[data-k="answered"].on  { background: var(--mc-answered); }
.mc-cell[data-k="voicemail"].on { background: var(--mc-voicemail); }
.mc-cell[data-k="missed"].on    { background: var(--mc-missed); }
.mc-cell[data-k="sarah"].on     { background: var(--mc-sarah); box-shadow: 0 0 10px rgba(0,212,255,.45); }
.mc-cell:hover { transform: scale(1.18); }
.mc-cell[data-k="missed"].on { animation: mc-ring 1.6s ease-in-out infinite; }
.mc-cell[data-k="sarah"].on  { animation: mc-pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes mc-ring { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes mc-pop  { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }

.mc-readout { font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, 'URW Palladio L', serif; min-height: 3em; font-size: .82rem; line-height: 1.6; color: var(--text); }
.mc-readout strong { color: var(--mc-sarah); font-weight: 500; }

.mc-source { margin: .75rem auto 0; max-width: 760px; font-size: .72rem; color: var(--muted); line-height: 1.5; }
.mc-source a { color: var(--muted); }

/* Bridge to consulting: the graph is one example, not the whole offer */
.mc-bridge {
  margin: 1.25rem auto 0; max-width: 760px; padding: 1rem 1.25rem;
  border: 1px solid var(--border); border-radius: 12px; background: rgba(13, 17, 23, 0.4);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 1.25rem;
}
.mc-bridge-text {
  flex: 1 1 320px; margin: 0; color: var(--muted); line-height: 1.65; font-size: .86rem;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, 'URW Palladio L', serif;
}
.mc-bridge-text strong { color: var(--text); font-weight: 700; }
.mc-bridge-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.mc-bridge-actions a { white-space: nowrap; }

.mc-tip {
  position: fixed; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  padding: .55rem .75rem; font-size: .78rem; color: var(--text); max-width: 240px; line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.mc-tip b { font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, 'URW Palladio L', serif; display: block; font-size: .95rem; margin-bottom: .1rem; }

.mc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .mc-seg, .mc-cell { transition: none; animation: none !important; }
}

/* Centered layout for the whole missed-call section */
#why-it-matters .mc-panel { text-align: center; }
#why-it-matters .mc-legend { width: fit-content; min-width: 220px; max-width: 100%; margin-left: auto; margin-right: auto; text-align: left; }
#why-it-matters .mc-legend li { column-gap: .75rem; }
#why-it-matters .mc-legend b { padding-left: 1.25rem; }
#why-it-matters .mc-waffle-head { flex-direction: column; align-items: center; gap: .6rem; }
#why-it-matters .mc-waffle { margin-left: auto; margin-right: auto; }
#why-it-matters .mc-source { text-align: center; }
.mc-bridge { flex-direction: column; text-align: center; }
.mc-bridge-text { flex: none; }
.mc-bridge-actions { justify-content: center; }

/* Book Now: same sweeping light band as the headings (hero-shine keyframes in index.html), over the solid button fill. */
.btn-shine {
  background-image:
    linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .85) 50%, transparent 60%),
    linear-gradient(var(--accent), var(--accent));
  background-size: 250% 100%, 100% 100%;
  background-repeat: no-repeat;
  animation: hero-shine 4.5s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .btn-shine { animation: none; background-position: 150% 0, 0 0; } }
