/* epictwsusa.com — site stylesheet
 *
 * Every color and font is a custom property in :root. Rules below reference
 * the tokens only; do not add raw hex values outside :root.
 * Brand tokens come from design/DESIGN_BRIEF.md. Supporting tints are the
 * extra values used by the approved mockup (design/mockup-home.html).
 */

:root {
  /* Brand tokens (DESIGN_BRIEF.md) */
  --teal: #1C6275;
  --deep-teal: #0F3540;
  --darkest: #0A2730;
  --green: #3A7B22;
  --gold: #E0A400;
  --on-gold: #0F2A33;        /* text on gold; never gold text on white */
  --ink: #17303A;
  --muted: #3F5A62;
  --light-ground: #F2F5F6;
  --border: #DCE5E8;
  --white: #FFFFFF;

  /* Supporting tints (mockup) */
  --label: #5A747B;          /* small labels, table headers */
  --rule: #E4EBED;           /* inner dividers in cards and tables */
  --tint-teal: #E3EEF1;
  --tint-teal-soft: #F2F8FA;
  --tint-green: #E6F0E1;
  --yes: #2F6A1B;
  --no: #A32F1F;

  /* On-dark text */
  --utility-text: #CFE0E5;
  --on-dark-text: #D3E3E7;
  --on-teal-text: #E1EEF1;
  --chip-bg: #16444F;
  --chip-check: #9BD07A;
  --figure-bg: #0A2C35;
  --figure-border: #1F5361;
  --figure-caption: #9FBAC1;
  --footer-text: #B9CED4;
  --footer-rule: #1F4652;
  --footer-fine: #8FAAB2;

  /* Fonts */
  --font-body: 'Barlow', 'Segoe UI', sans-serif;
  --font-head: 'Barlow Condensed', sans-serif;
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }

/* Zero specificity so any classed link color wins, as in the mockup. */
:where(a) { color: var(--teal); }
:where(a):hover { color: var(--deep-teal); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Shared pieces ---------- */

.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2.5px;
  color: var(--green);
}
.eyebrow--gold { color: var(--gold); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
}
.section-head--wide { max-width: 720px; }

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.05;
  color: var(--deep-teal);
}
.section-title--md { font-size: 42px; }
.section-title--xl { font-size: 52px; line-height: 1.02; }

.section-lead {
  font-size: 18px;
  color: var(--muted);
}

.section-body {
  padding-top: 88px;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.section-body--gap-lg { gap: 48px; }

.section--light { background: var(--light-ground); }
.section--dark { background: var(--deep-teal); color: var(--white); }
.section--teal { background: var(--teal); color: var(--white); }
.section--dark .section-title,
.section--teal .section-title { color: inherit; }
.section--dark .section-lead { color: var(--on-dark-text); }

.text-muted { color: var(--muted); }

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
}
.btn--gold,
.btn--gold:hover { background: var(--gold); color: var(--on-gold); }
.btn--outline,
.btn--outline:hover { border: 2px solid var(--white); color: var(--white); }
.btn--sm { padding: 12px 22px; min-height: 44px; }
.btn--lg { padding: 15px 28px; font-size: 17px; }
.btn--xl { padding: 16px 30px; font-size: 17px; }
/* Outline buttons shave 2px of padding to match the gold button's box. */
.btn--outline.btn--lg { padding: 13px 26px; }
.btn--outline.btn--xl { padding: 14px 28px; }

.link-arrow {
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}
.link-arrow:hover { color: var(--deep-teal); }
.link-arrow--tap {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  color: var(--deep-teal);
}
.card__title--lg { font-size: 28px; }
.card__title--xl { font-size: 30px; }
.card__link { margin-top: auto; }
/* Card with no photo yet: a teal top rule instead of an image frame, so it
 * reads as a deliberate text card next to photo cards. */
.card--text { border-top: 4px solid var(--teal); }

/* Photo, cropped to fill its box. */
.photo {
  display: block;
  width: 100%;
  object-fit: cover;
}
.photo--system { height: 200px; }
.photo--app { height: 180px; }
.photo--feature {
  flex: 1 1 480px;
  min-width: 0;
  height: 380px;
  border-radius: 12px;
}

/* HTML body from a copy slot (e.g. detention.body). */
.slot-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 18px;
  color: var(--muted);
}
.slot-body h3:not(:first-child) { margin-top: 12px; }

/* Small print under a table (e.g. the "* Where applicable." footnote). */
.table-note {
  padding-top: 12px;
  font-size: 13px;
  color: var(--label);
}

/* ---------- Utility bar ---------- */

.utility-bar {
  background: var(--darkest);
  color: var(--utility-text);
  font-size: 13px;
}
.utility-bar__inner {
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
}
.utility-bar__loc {
  display: flex;
  align-items: center;
  gap: 8px;
}
.utility-bar__icon { color: var(--gold); }
.utility-bar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  align-items: center;
}
.utility-bar__links a {
  color: var(--utility-text);
  text-decoration: none;
}
.utility-bar__links .utility-bar__phone {
  color: var(--white);
  font-weight: 600;
}

/* ---------- Header / main nav ---------- */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.site-header__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.wordmark__logo {
  display: block;
  width: auto;
  height: 80px;
}
.wordmark__usa {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: 3px;
  color: var(--green);
  border-left: 2px solid var(--green);
  padding-left: 12px;
}
/* Phone width: smaller header logo. */
@media (max-width: 600px) {
  .site-header .wordmark__logo { height: 56px; }
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  align-items: center;
  font-weight: 600;
  font-size: 16px;
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 44px;
}

/* Desktop only: the white header bar pins to the top and the utility bar
 * scrolls away. Pinned height = 80px logo + 2 x 8px padding + 1px border
 * = 97px. scroll-padding-top (97 + 12) lands /#section jumps below it.
 * Phones keep the static header until the mobile menu exists. */
@media (min-width: 1000px) {
  html { scroll-padding-top: 110px; }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .site-header__inner {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--deep-teal);
  color: var(--white);
}
.hero__inner {
  padding-top: 72px;
  padding-bottom: 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}
.hero__copy {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.5px;
}
.hero__lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--on-dark-text);
  max-width: 560px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
}
.chip svg { color: var(--chip-check); }
ul.chips {
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
}

.hero__figure {
  flex: 1 1 520px;
  min-width: 0;
  background: var(--figure-bg);
  border: 1px solid var(--figure-border);
  border-radius: 12px;
  padding: 24px;
}
@media (max-width: 600px) {
  .hero__figure { padding: 12px; }
}
.hero__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.hero__caption {
  font-size: 13px;
  color: var(--figure-caption);
  padding-top: 12px;
}

/* ---------- Pillars ---------- */

.pillars {
  padding-top: 64px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.pillar {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pillar__icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pillar__icon--teal { background: var(--tint-teal); color: var(--teal); }
.pillar__icon--green { background: var(--tint-green); color: var(--green); }

/* ---------- How EPIC works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 4px solid var(--teal);
  padding-top: 20px;
}
.step__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  color: var(--teal);
}
.step__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  color: var(--deep-teal);
}
.step--green { border-top-color: var(--green); }
.step--green .step__num { color: var(--green); }

/* ---------- Systems ---------- */

.systems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.system {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.system__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-grow: 1;
}

.spec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.spec dt,
.spec dd {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.spec dt {
  color: var(--label);
  font-size: 14px;
}
.spec dd {
  font-weight: 600;
  text-align: right;
}
.system__note {
  font-size: 14px;
  color: var(--label);
}

/* ---------- Installed cost ---------- */

.cost {
  padding-top: 88px;
  padding-bottom: 88px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}
.cost__copy {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cost__actions { padding-top: 4px; }
.cost__table-wrap {
  flex: 1 1 480px;
  min-width: 0;
  background: var(--white);
  color: var(--ink);
  border-radius: 12px;
  padding: 28px;
  overflow-x: auto;
}

.scope {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 15px;
}
.scope caption {
  text-align: left;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  color: var(--deep-teal);
  padding-bottom: 12px;
}
.scope th {
  padding: 10px 8px;
  border-bottom: 2px solid var(--ink);
  color: var(--label);
  font-weight: 600;
  text-align: center;
}
.scope th:first-child { text-align: left; }
.scope th.scope__epic {
  background: var(--tint-teal);
  color: var(--deep-teal);
  font-weight: 700;
}
.scope td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--rule);
}
.scope tbody tr:last-child td { border-bottom: 0; }
.scope td.scope__epic { background: var(--tint-teal-soft); }
.scope .is-yes,
.scope .is-no {
  text-align: center;
  font-weight: 700;
}
.scope .is-yes { color: var(--yes); }
.scope .is-no { color: var(--no); }

/* Comparison table (Systems page): text cells, row headers on the left. */
.table-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  overflow-x: auto;
}
.scope--compare th { text-align: left; }
.scope--compare tbody th {
  padding: 12px 8px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.scope--compare tbody tr:last-child th { border-bottom: 0; }

/* ---------- Applications ---------- */

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.app-tile {
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.app-tile__label {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
}
.app-tile__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  color: var(--deep-teal);
}
.app-tile__arrow {
  color: var(--teal);
  font-weight: 700;
}
/* Tile with no photo yet: solid deep-teal tile, label pinned to the bottom so
 * it lines up with the photo tiles' labels in the same row. */
.app-tile--text {
  min-height: 120px;
  background: var(--deep-teal);
  border-color: var(--deep-teal);
}
.app-tile--text .app-tile__label {
  flex-grow: 1;
  align-items: flex-end;
  background: transparent;
}
.app-tile--text .app-tile__name { color: var(--white); }
.app-tile--text .app-tile__arrow { color: var(--gold); }

/* ---------- Pro resources ---------- */

.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.role {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Projects page ---------- */

/* auto-fill (not auto-fit) so a one-project group keeps card width. */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.project__meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--label);
}
.project__block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.project__list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

/* ---------- Featured project ---------- */

.feature {
  padding-top: 88px;
  padding-bottom: 88px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}
.feature__copy {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat__value {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  color: var(--teal);
}
.stat__label {
  font-size: 14px;
  color: var(--label);
}

/* ---------- CTA band ---------- */

.cta {
  padding-top: 72px;
  padding-bottom: 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}
.cta__copy {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cta__lead {
  font-size: 18px;
  color: var(--on-teal-text);
  max-width: 620px;
}

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

.site-footer {
  background: var(--darkest);
  color: var(--footer-text);
  font-size: 15px;
}
.site-footer__inner {
  padding-top: 64px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}
.site-footer__brand {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* Below 1200px: brand block full width on top, link columns and contact row
 * full width below (four columns down to ~732px). From 1200px up the two sit
 * side by side. */
@media (max-width: 1199px) {
  .site-footer__brand,
  .site-footer__nav { flex-basis: 100%; }
}
.site-footer__contact,
.site-footer__contact:hover {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}
.site-footer__tagline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  color: var(--white);
}
.wordmark--footer .wordmark__logo { height: 72px; }
.wordmark--footer .wordmark__usa {
  color: var(--footer-text);
  border-left-color: var(--chip-check);
}
/* Right-hand area: link columns, then the contact row under them. */
.site-footer__nav {
  flex: 2 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
/* Shared by the link columns and the contact row: both have four items and
 * the same width, so their columns line up at every viewport width. */
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px;
}
.site-footer__contact-row {
  border-top: 1px solid var(--footer-rule);
  padding-top: 24px;
}
.site-footer__contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-footer__contact-item dt {
  font-size: 13px;
  color: var(--footer-fine);
}
.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer__col a {
  color: var(--footer-text);
  text-decoration: none;
}
.site-footer__col a:hover { color: var(--white); }
.site-footer__heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: var(--white);
}
.site-footer__bottom {
  border-top: 1px solid var(--footer-rule);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--footer-fine);
}
