/* Frugal vs. Infracost (/resources/frugalvsinfracost/). The design handoff's comparison page in
 * the Frugal design system: white ground, Aeonik display, Inter 600 body, a painterly hero with
 * frugal.co's pixel edge, a cost table, an SDLC pipeline with coverage bars, and attribution. */

/* On main, not body: inherited type would cross into the frugal.co header and footer. */
body.compare { background: #FFFFFF; }
/* The footer's pixel edge sits on white here, not frugal.co's grey (see frugal-chrome.js). */
body.compare { --frugal-footer-edge-bg: #FFFFFF; }
.compare main { color: #212121; font-weight: 600; letter-spacing: -0.02em; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 2000;
  background: #000; color: #fff; padding: 8px 12px; border-radius: 6px; text-decoration: none;
}
.skip:focus { left: 16px; color: #fff; }

.cmp-wrap { max-width: 1200px; margin: 0 auto; }
.cmp-section { padding: 112px 24px; }
.cmp-section--beige { background: #F2F0EA; }
.cmp-section--last { padding-bottom: 128px; }

.cmp-eyebrow {
  margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 13px; line-height: 1.2;
  letter-spacing: .04em; text-transform: uppercase; color: #014715;
}
.cmp-h1, .cmp-h2 {
  margin: 0; font-family: var(--font-head); font-weight: 500; letter-spacing: -0.02em;
  color: #000; text-wrap: balance;
}
.cmp-h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }
.cmp-h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; }

/* ───── button: brand green, large ───── */

.cmp-btn {
  height: 48px; padding: 0 20px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 8px;
  background: #00CE3E; color: #000; text-decoration: none;
  font: 600 16px var(--font-body); letter-spacing: -0.02em;
  transition: background-color 160ms cubic-bezier(.2, 0, 0, 1), transform 120ms cubic-bezier(.2, 0, 0, 1);
}
.cmp-btn:hover { background: #00B836; color: #000; }
.cmp-btn:active { transform: translateY(1px); }
.cmp-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 206, 62, .35); }

/* ───── hero ───── */

.cmp-hero { padding: 24px 24px 0; }
.cmp-hero-frame {
  position: relative; max-width: 1400px; margin: 0 auto; overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #CFE3F2 url("/resources/assets/frugalvsinfracost/backdrop-blue-clouds-grass.jpg") center / cover no-repeat;
  padding: 120px 24px 168px; display: flex; justify-content: center;
}
.cmp-hero-card {
  position: relative; z-index: 1;
  max-width: 820px; width: 100%; background: #fff; border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10), 0 0 0 1px rgba(0, 0, 0, .06);
  padding: 56px 48px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px;
}
.cmp-lede { margin: 0; max-width: 640px; font-size: 18px; line-height: 1.5; color: #2F2F2F; text-wrap: pretty; }
.cmp-hero-card .cmp-btn { margin-top: 8px; }
/* The strip's solid white is at its top, so it is flipped; the bar covers its soft last rows. */
.cmp-hero-edge {
  position: absolute; left: -2px; right: -2px; bottom: -2px;
  display: block; width: calc(100% + 4px); max-width: none; height: auto;
  transform: scaleY(-1); pointer-events: none;
}
.cmp-hero-bar { position: absolute; left: -2px; right: -2px; bottom: -2px; height: 8px; background: #fff; }
@media (max-width: 600px) {
  .cmp-hero { padding: 12px 12px 0; }
  .cmp-hero-frame { padding: 64px 16px 96px; border-radius: 16px 16px 0 0; }
  .cmp-hero-card { padding: 36px 22px; gap: 20px; }
  .cmp-h1 { font-size: 34px; }
  .cmp-lede { font-size: 17px; }
}

/* ───── cost coverage ───── */

.cmp-cost {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 48px 72px; align-items: start;
}
.cmp-cost-head { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 731px) { .cmp-cost-head { position: sticky; top: 120px; } }

.cmp-table-card { border: 1px solid #D5D4CE; border-radius: 16px; overflow: hidden; background: #fff; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.4; }
.cmp-table thead tr { background: #F2F0EA; }
.cmp-table thead th {
  padding: 18px 16px; font-family: var(--font-head); font-weight: 500; font-size: 13px;
  letter-spacing: .04em; text-transform: uppercase; color: #2F2F2F; width: 136px;
}
.cmp-table thead th:first-child { text-align: left; padding: 18px 24px; width: auto; }
.cmp-table thead th.is-frugal { background: #014715; color: #fff; }
.cmp-table tbody tr { border-top: 1px solid #D5D4CE; }
.cmp-table tbody th { text-align: left; padding: 20px 24px; font-weight: 600; color: #000; }
.cmp-table td { padding: 20px 16px; }
.cmp-table td.is-frugal { background: rgba(0, 206, 62, .08); }
.cmp-yes, .cmp-no { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cmp-yes { color: #014715; }
.cmp-yes img { display: block; flex: none; }
.cmp-no { color: #2F2F2F; }
.cmp-no-mark {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #C0BFB9;
  display: inline-flex; align-items: center; justify-content: center; color: #7D7D7D;
}
@media (max-width: 480px) {
  .cmp-table thead th { width: 92px; padding: 16px 8px; }
  .cmp-table thead th:first-child, .cmp-table tbody th { padding-left: 16px; padding-right: 12px; }
  .cmp-table tbody th { font-size: 15px; }
  .cmp-table td { padding: 18px 8px; }
}

/* ───── lifecycle coverage ───── */

.cmp-sdlc { display: flex; flex-direction: column; gap: 56px; }
.cmp-sdlc-head { display: flex; flex-direction: column; gap: 20px; align-items: center; text-align: center; }
.cmp-sdlc-head .cmp-h2 { max-width: 760px; }

.cmp-sdlc-card {
  margin: 0; background: #fff; border: 1px solid #D5D4CE; border-radius: 16px;
  padding: 40px 40px 44px; overflow-x: auto;
}
.cmp-sdlc-grid { min-width: 760px; display: grid; grid-template-columns: 168px repeat(4, minmax(0, 1fr)); row-gap: 14px; }
.cmp-sdlc-row { display: contents; }
.cmp-sdlc-corner {
  align-self: end; padding-bottom: 24px;
  font-family: var(--font-head); font-weight: 500; font-size: 13px; letter-spacing: .04em;
  text-transform: uppercase; color: #2F2F2F;
}
.cmp-stage { padding: 0 12px 18px; display: flex; flex-direction: column; gap: 14px; }
.cmp-stage:not(:nth-child(2)) .cmp-track { margin-left: -12px; }
.cmp-track { display: flex; align-items: center; height: 18px; color: #C0BFB9; }
.cmp-track .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #000; }
.cmp-track .line { height: 1px; background: #C0BFB9; flex: 1; }
.cmp-track .line:first-child { flex: 0 0 12px; }
.cmp-track .chev { flex: none; margin-left: -4px; }
.cmp-stage-name { font-family: var(--font-head); font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; color: #000; }
.cmp-sdlc-label { display: flex; align-items: center; padding-right: 24px; }
.cmp-sdlc-label img { display: block; height: 18px; width: auto; }
.cmp-sdlc-label--text { font-family: var(--font-head); font-weight: 500; font-size: 20px; color: #2F2F2F; }

.cmp-bar { height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 16px; line-height: 1.2; }
.cmp-bar svg { flex: none; }
.cmp-bar--yes { background: #014715; color: #fff; border-right: 1px solid rgba(255, 255, 255, .18); }
.cmp-bar--yes:nth-child(2) { border-radius: 10px 0 0 10px; }
.cmp-bar--yes:last-child { border-radius: 0 10px 10px 0; border-right: 0; }
.cmp-bar--partial { background: #D5D4CE; color: #000; }
.cmp-bar--partial:nth-child(3) { border-radius: 10px 0 0 10px; border-right: 1px solid #C0BFB9; }
.cmp-bar--partial:nth-child(4) { border-radius: 0 10px 10px 0; }
.cmp-bar--no { border: 1.5px dashed #C0BFB9; border-radius: 10px; color: #2F2F2F; }
.cmp-bar--first { margin-right: 8px; }
.cmp-bar--last { margin-left: 8px; }
@media (max-width: 600px) { .cmp-sdlc-card { padding: 28px 24px 32px; } }

/* Phones: stack the stages. Frugal and Infracost head two columns; each stage is a name above its pair of bars. */
@media (max-width: 730px) {
  .cmp-sdlc-card { overflow: visible; padding: 24px 20px 28px; }
  .cmp-sdlc-grid { min-width: 0; grid-template-columns: 1fr 1fr; column-gap: 8px; row-gap: 8px; }
  .cmp-sdlc-corner {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .cmp-sdlc-label { grid-row: 1; padding: 0 0 4px; }
  .cmp-sdlc-row:nth-child(2) .cmp-sdlc-label { grid-column: 1; }
  .cmp-sdlc-row:nth-child(3) .cmp-sdlc-label { grid-column: 2; }
  .cmp-sdlc-label--text { font-size: 18px; }

  .cmp-stage {
    grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px;
    padding: 16px 0 2px; border-top: 1px solid #E6E5E0;
  }
  .cmp-stage:nth-child(2) { grid-row: 2; }
  .cmp-stage:nth-child(3) { grid-row: 4; }
  .cmp-stage:nth-child(4) { grid-row: 6; }
  .cmp-stage:nth-child(5) { grid-row: 8; }
  .cmp-stage:not(:nth-child(2)) .cmp-track { margin-left: 0; }
  .cmp-track .line, .cmp-track .chev { display: none; }
  .cmp-stage-name { font-size: 18px; }

  .cmp-sdlc-row:nth-child(2) .cmp-bar { grid-column: 1; }
  .cmp-sdlc-row:nth-child(3) .cmp-bar { grid-column: 2; }
  .cmp-bar:nth-child(2) { grid-row: 3; }
  .cmp-bar:nth-child(3) { grid-row: 5; }
  .cmp-bar:nth-child(4) { grid-row: 7; }
  .cmp-bar:nth-child(5) { grid-row: 9; }
  .cmp-bar { height: auto; min-height: 52px; padding: 10px 12px; font-size: 15px; margin: 0; }
  .cmp-bar--yes, .cmp-bar--yes:nth-child(2), .cmp-bar--yes:last-child,
  .cmp-bar--partial:nth-child(3), .cmp-bar--partial:nth-child(4) { border-radius: 10px; border-right: 0; }
}

/* ───── cost attribution ───── */

.cmp-attr { display: flex; flex-direction: column; gap: 80px; }
.cmp-attr-head { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.cmp-attr-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px 48px; }
.cmp-attr-item { padding-top: 40px; border-top: 1px solid #D5D4CE; display: flex; flex-direction: column; gap: 20px; }
.cmp-attr-title { margin: 0; display: flex; align-items: baseline; gap: 12px; }
.cmp-attr-title .num { font-family: var(--font-head); font-weight: 400; font-size: 56px; line-height: 1; letter-spacing: -0.02em; color: #00CE3E; }
.cmp-attr-title .label { font-family: var(--font-head); font-weight: 500; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #000; }
.cmp-attr-body { margin: 0; font-size: 20px; line-height: 1.45; color: #212121; text-wrap: pretty; }
@media (max-width: 730px) { .cmp-section { padding: 80px 24px; } .cmp-attr { gap: 48px; } }

@media (prefers-reduced-motion: reduce) { .cmp-btn { transition: none; } }
