/* EV Reporting — site styles */

:root {
  --ink: #1a2c40;        /* logo navy */
  --blue: #1f5fbf;
  --blue-deep: #143f80;
  --amber: #d9961a;
  --paper: #f6f8fb;
  --white: #ffffff;
  --rule: #dde3ec;
  --muted: #566274;

  --sans: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 70rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

h1, h2, h3 { margin: 0 0 0.6em; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1.1em; max-width: 66ch; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--blue); color: var(--white); padding: 0.6rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */

.site-header { background: var(--white); border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; padding-top: 1rem; padding-bottom: 1rem;
}

.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.brand { line-height: 0; }
.brand img { height: 88px; width: auto; border-radius: 4px; }
@media (max-width: 30rem) { .brand img { height: 68px; } }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; }
.site-nav a {
  font-size: 0.98rem; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--amber); }

/* ---------- Hero with the data-flow diagram ---------- */

.hero { background: var(--white); border-bottom: 1px solid var(--rule); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem;
  align-items: center; padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: clamp(3rem, 7vw, 5rem);
}
@media (min-width: 58rem) { .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }

.hero .kicker { color: var(--blue); font-weight: 600; margin-bottom: 0.9rem; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.flow { width: 100%; height: auto; display: block; }
.flow .src { fill: var(--muted); opacity: 0.55; }
.flow .src.b { fill: var(--blue); opacity: 0.7; }
.flow .src.a { fill: var(--amber); opacity: 0.85; }
.flow .wire { fill: none; stroke: #c3cddb; stroke-width: 1.2; }
.flow .main { fill: none; stroke: var(--blue); stroke-width: 2.5; }
.flow .node { fill: var(--white); stroke: var(--blue); stroke-width: 2.5; }
.flow .panel { fill: var(--paper); stroke: var(--rule); stroke-width: 1.5; }
.flow .bar { fill: var(--blue); transform-box: fill-box; transform-origin: bottom; }
.flow .bar.hi { fill: var(--amber); }
.flow .trend { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow text { font-family: var(--sans); font-size: 14px; fill: var(--muted); }
.flow .step-num { font-size: 11px; font-weight: 600; fill: var(--blue); }

@media (prefers-reduced-motion: no-preference) {
  .flow .bar { animation: grow 0.9s cubic-bezier(.2,.7,.2,1) both; }
  .flow .bar:nth-of-type(2) { animation-delay: 0.08s; }
  .flow .bar:nth-of-type(3) { animation-delay: 0.16s; }
  .flow .bar:nth-of-type(4) { animation-delay: 0.24s; }
  .flow .bar:nth-of-type(5) { animation-delay: 0.32s; }
  @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}

/* Short hero for inner pages */
.page-head { background: var(--white); border-bottom: 1px solid var(--rule); }
.page-head .wrap { padding-top: 3rem; padding-bottom: 2.5rem; }
.page-head h1 { margin-bottom: 0.4em; }
.page-head p { font-size: 1.15rem; color: var(--muted); max-width: 56ch; margin: 0; }

/* ---------- Buttons ---------- */

.button {
  display: inline-block; background: var(--blue); color: var(--white);
  font-family: var(--sans); font-weight: 600; font-size: 1rem; text-decoration: none;
  padding: 0.8rem 1.5rem; border: 2px solid var(--blue); border-radius: 6px; cursor: pointer;
}
.button:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--white); }
.button--outline { background: transparent; color: var(--blue); }
.button--outline:hover { background: var(--blue); color: var(--white); }
.button:disabled { opacity: 0.7; cursor: wait; }

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section--white { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem 3rem; }
@media (min-width: 52rem) { .intro { grid-template-columns: 18rem minmax(0, 1fr); } }

/* The four-step process (a real sequence, so it is numbered) */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; counter-reset: step; }
@media (min-width: 46rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { counter-increment: step; padding: 1.5rem 1.5rem 1.5rem 0; border-top: 3px solid var(--rule); }
.steps li:last-child { border-top-color: var(--amber); }
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: 50%; margin-bottom: 0.9rem;
  border: 2px solid var(--blue); color: var(--blue); font-weight: 600; font-size: 0.95rem;
}
.steps li:last-child::before { border-color: var(--amber); color: #8a5d0b; }
.steps h3 { margin-bottom: 0.35em; }
.steps p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Benefits */
.benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2.5rem; }
@media (min-width: 46rem) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.benefits li { display: flex; gap: 0.85rem; align-items: baseline; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); font-weight: 500; }
.benefits li::before { content: ""; flex: none; width: 0.6rem; height: 0.6rem; background: var(--amber); transform: translateY(-0.1rem); }

/* Two audiences */
.audiences { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 3rem; margin-top: 1.5rem; }
@media (min-width: 46rem) { .audiences { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.audiences > div { border-left: 3px solid var(--blue); padding-left: 1.25rem; }
.audiences p { margin: 0; color: var(--muted); }

.cta-band { background: var(--ink); color: #dfe6f0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 3rem; padding-bottom: 3rem; }
.cta-band h2 { color: var(--white); margin: 0 0 0.3em; }
.cta-band p { margin: 0; }
.cta-band .button { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.cta-band .button:hover { background: #f0b64a; border-color: #f0b64a; color: var(--ink); }
.cta-band :focus-visible { outline-color: var(--white); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
@media (min-width: 52rem) { .contact-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }

.form { display: grid; gap: 1.2rem; max-width: 36rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.98rem; }
.field .req { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #a7b3c4; border-radius: 6px; padding: 0.7rem 0.8rem; width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--blue); }

.hidden { position: absolute; left: -9999px; }
.form-status { margin: 0; font-weight: 600; color: #a1260d; }

.side-note { border-top: 3px solid var(--blue); padding-top: 1.25rem; align-self: start; }
.side-note p { color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer { background: var(--white); border-top: 1px solid var(--rule); padding: 2rem 0; font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; }
.site-footer p { margin: 0; }
.side-note h2 { font-size: 1.3rem; }

/* About: benefit details */
.details-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 3rem; margin-top: 1.5rem; }
@media (min-width: 46rem) { .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.details-grid > div { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.details-grid h3 { display: flex; gap: 0.75rem; align-items: baseline; margin-bottom: 0.4em; }
.details-grid h3::before { content: ""; flex: none; width: 0.6rem; height: 0.6rem; background: var(--amber); transform: translateY(-0.1rem); }
.details-grid p { margin: 0; color: var(--muted); }

/* FAQ accordion */
.faq-list { max-width: 50rem; border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem;
  align-items: center; padding: 1.2rem 0; font-weight: 600; font-size: 1.1rem; line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 0.65rem; height: 0.65rem; margin-right: 0.3rem;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg) translateY(-0.2rem);
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-0.1rem); }
.faq-item summary:hover { color: var(--blue); }
.faq-answer { padding: 0 2.5rem 1.25rem 0; color: var(--muted); }
.faq-answer p:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: no-preference) { .faq-item summary::after { transition: transform 0.2s ease; } }
a[href^="mailto:"] { white-space: nowrap; }
@media (max-width: 30rem) {
  .site-nav ul { gap: 0.25rem 0.85rem; }
  .site-nav a { font-size: 0.92rem; }
}
