@font-face {
  font-family: UNCAGE;
  src: url(brand/uncage.woff) format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Gilroy;
  src: url(brand/gilroy-regular.woff) format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Gilroy;
  src: url(brand/gilroy-medium.woff) format("woff");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Gilroy;
  src: url(brand/gilroy-bold.woff) format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #2a2e42;
  --muted: #585d76;
  --white: #fff;
  --page: #e9ebf1;
  --blue: #2643d1;
  --pale-blue: #eef1ff;
  --line: #a2a9c2;
  --blue-line: #8497f3;
  --focus: #2643d1;
  --error: #9b241b;
  --display: UNCAGE, Arial, sans-serif;
  font-family: Gilroy, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.hero :focus-visible, .contacts :focus-visible { outline-color: var(--white); }

.shell {
  width: min(100% - 3rem, 82.5rem);
  margin-inline: auto;
}

.hero {
  position: relative;
  isolation: isolate;
  margin: 0.75rem;
  border-radius: 1.5rem;
  overflow: hidden;
  color: var(--white);
  background: var(--blue);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  inset: 0;
  background: url(brand/gradient.webp) left top / 100% 100% no-repeat;
}
.hero::after {
  width: min(35%, 31rem);
  height: 82%;
  right: 4.5%;
  top: 5.4rem;
  background: url(brand/arrow.webp) right center / contain no-repeat;
}
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem 0;
}
.brand {
  font: 400 clamp(1rem, 2vw, 1.45rem)/1 var(--display);
  text-decoration: none;
  text-transform: uppercase;
  justify-self: start;
}
.masthead-nav { display: flex; gap: clamp(1rem, 4vw, 3rem); }
.masthead-nav a { text-decoration: none; }
.masthead-nav a:hover { text-decoration: underline; }
.masthead > .button { justify-self: end; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.15;
}
.button-white {
  background: var(--white);
  color: var(--ink);
}
.button-white:hover { background: var(--pale-blue); }

.hero-copy {
  position: relative;
  width: min(74%, 66rem);
  padding: clamp(3.4rem, 5.1vw, 5.2rem) 0 clamp(3.6rem, 5.6vw, 5.4rem);
  margin-left: clamp(1.55rem, 5.15vw, 5rem);
}
h1 {
  font: 400 clamp(2.05rem, 4.35vw, 4.3rem)/1.02 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.035em;
}
.hero p {
  max-width: 38rem;
  margin-top: 1.35rem;
  font-size: clamp(1rem, 1.75vw, 1.4rem);
  line-height: 1.35;
}
.hero-button {
  margin-top: 1.7rem;
  width: min(100%, 20rem);
  min-height: 3.65rem;
}
.section-title {
  margin-block: clamp(2.1rem, 4.8vw, 4.2rem) 1.35rem;
  scroll-margin-top: 1rem;
}
.section-title h2 {
  display: inline-block;
  position: relative;
  padding-right: 1.9rem;
  font: 400 clamp(1.55rem, 3.25vw, 2.9rem)/1.1 var(--display);
  text-transform: uppercase;
}
.section-title h2::after {
  content: "";
  position: absolute;
  top: -0.52rem;
  right: 0;
  width: 1.65rem;
  height: 1.65rem;
  background: url(brand/plus.png) center / contain no-repeat;
}

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  background: var(--white);
  border-radius: 1.5rem;
}
.inputs, .comparison { padding: clamp(1.15rem, 2.45vw, 2rem); min-width: 0; }
.inputs h3, .comparison h3 {
  font: 400 clamp(1.25rem, 2.4vw, 2.05rem)/1.14 var(--display);
  text-transform: uppercase;
}
.inputs h3 { margin-bottom: 1.35rem; }
.equipment { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}
.field { min-width: 0; }
.field label {
  display: block;
  margin-bottom: 0.42rem;
  font-size: clamp(0.875rem, 1.34vw, 1.12rem);
  font-weight: 700;
  line-height: 1.22;
}
input, select {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.52rem;
  background: var(--white);
  padding: 0.53rem 0.8rem;
  font-size: clamp(1rem, 1.44vw, 1.25rem);
}
.number-wrap { position: relative; display: block; }
.select-wrap { position: relative; display: block; }
select { appearance: none; padding-right: 2rem; cursor: pointer; }
.select-wrap::after, summary::after {
  content: "";
  display: block;
  pointer-events: none;
  width: 0.62rem;
  height: 0.62rem;
  border: solid currentColor;
  border-width: 0 0.12rem 0.12rem 0;
  transform: rotate(45deg);
}
.select-wrap::after { position: absolute; top: 0.95rem; right: 0.95rem; }
.number-wrap input { padding-right: 2.25rem; }
.number-wrap > span {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
input[aria-invalid="true"] { border-color: var(--error); }
.error { margin-top: 0.7rem; font-size: 0.9rem; color: var(--error); }
.benchmark {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--pale-blue);
  border-radius: 0.55rem;
  font-weight: 700;
  line-height: 1.35;
}
.benchmark strong { margin-inline-start: 0.15em; white-space: nowrap; }

fieldset { margin: 1.25rem 0 0; border: 0; padding: 0; min-width: 0; }
legend {
  margin-bottom: 0.78rem;
  padding: 0;
  font-size: clamp(1.24rem, 2.14vw, 1.85rem);
  line-height: 1.12;
  font-weight: 700;
}
.reset {
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  padding: 0.15rem 0;
  min-height: 2.75rem;
  margin-top: 0.35rem;
  cursor: pointer;
  font-weight: 500;
}

.comparison {
  background: var(--blue);
  color: var(--white);
  border-radius: 0 1.5rem 1.5rem 0;
}
.result { margin: 1.35rem 0 1.7rem; }
.result-label { color: var(--white); font-weight: 700; font-size: clamp(1rem, 1.85vw, 1.5rem); }
.result-value {
  margin-top: 0.25rem;
  font-size: clamp(2.5rem, 6.9vw, 6.2rem);
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.055em;
  color: var(--white);
  overflow-wrap: anywhere;
}
.result-caption { margin-top: 0.4rem; font-size: clamp(1rem, 1.65vw, 1.35rem); line-height: 1.35; }
.result-note { margin-top: 1rem; color: #e2e8ff; font-size: 0.86rem; line-height: 1.45; }
.table-frame { border: 1px solid var(--blue-line); border-radius: 0.55rem; overflow: hidden; }

table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: clamp(0.9rem, 1.42vw, 1.19rem);
  line-height: 1.25;
}
th, td { padding: 0.78rem 0.85rem; text-align: left; overflow-wrap: anywhere; }
th:first-child { width: 47%; }
th + th, th + td, td + td { border-left: 1px solid var(--blue-line); }
tbody tr { border-top: 1px solid var(--blue-line); }
tbody tr:last-child { font-weight: 700; background: #1c36b3; }
tbody td:last-child { color: var(--white); }
thead th { font-weight: 700; }
tbody th { font-weight: 500; }
td { font-variant-numeric: tabular-nums; }

.method {
  margin-top: 1.35rem;
  background: var(--white);
  border-radius: 1.15rem;
}
summary {
  position: relative;
  min-height: 3.75rem;
  padding: 0.85rem 2.6rem 0.85rem 1.5rem;
  font-size: clamp(1.15rem, 1.85vw, 1.55rem);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary::after { position: absolute; top: 1.4rem; right: 1.4rem; }
.method[open] summary::after { transform: translateY(0.2rem) rotate(225deg); }
.metric-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  padding: 0.6rem 1.5rem 1.25rem;
}
.metric-breakdown > div { padding: 0.95rem; border-radius: 0.5rem; background: var(--pale-blue); }
.metric-breakdown dt { font-weight: 700; }
.metric-breakdown dd { margin-top: 0.5rem; }
.metric-breakdown small { display: block; font-size: 0.87rem; color: var(--muted); }
.metric-breakdown strong { font-size: 1.2rem; overflow-wrap: anywhere; }
.method > p { padding: 0 1.5rem 1.25rem; color: var(--muted); line-height: 1.45; }

.contacts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-block: 1.35rem 1rem;
  padding: 1.3rem 1.5rem;
  background: var(--blue) url(brand/gradient.webp) left center / cover no-repeat;
  color: var(--white);
  border-radius: 1.5rem;
}
.contacts h2 {
  font: 400 clamp(1.15rem, 2vw, 1.84rem)/1.18 var(--display);
  text-transform: uppercase;
}
.contact-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0.65rem 1.25rem; }
.contact-links a:not(.button) {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 700;
}
.contact-links a:not(.button):hover { text-decoration-thickness: 2px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 850px) {
  .shell { width: min(100% - 2rem, 42rem); }
  .calculator { grid-template-columns: 1fr; }
  .comparison { border-radius: 0 0 1.5rem 1.5rem; }
  .hero-copy { width: min(80%, 36rem); }
  .hero::after { width: 38%; right: 3%; }
}

@media (max-width: 560px) {
  .hero { border-radius: 1.5rem; }
  .masthead {
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
    padding: 1.1rem 0.8rem 0;
  }
  .masthead-nav { grid-row: 2; grid-column: span 2; gap: 1rem; font-size: 0.88rem; }
  .masthead .button { min-height: 2.45rem; padding-inline: 0.85rem; font-size: 0.72rem; }
  .hero-copy { width: auto; margin-inline: 1.45rem; padding-block: 3.65rem 2.3rem; }
  h1 { max-width: 21rem; font-size: clamp(1.7rem, 7.2vw, 2.35rem); }
  .hero p { max-width: 19rem; margin-top: 1rem; }
  .hero::before { background-size: auto 100%; }
  .hero::after { width: 42%; height: 6.5rem; top: 4.5rem; right: 0.8rem; opacity: 0.55; }
  .hero-button { margin-top: 1.3rem; width: 100%; min-height: 3.4rem; }
  .shell { width: calc(100% - 1.5rem); }
  .inputs, .comparison { padding: 1rem; }
  .field-grid { gap: 0.8rem 0.6rem; }
  .field label { min-height: 2.1rem; display: flex; align-items: end; }
  .equipment { grid-template-columns: 1fr; }
  .equipment .field label { min-height: 0; }
  input { padding-left: 0.65rem; }
  th, td { padding: 0.65rem 0.38rem; }
  th:first-child { width: 37%; }
  td { font-size: 0.85rem; }
  .metric-breakdown { grid-template-columns: 1fr; }
  .contacts { padding: 1.15rem; }
  .contact-links { column-gap: 1rem; }
  .contact-links .button { width: 100%; }
}

@media (max-width: 350px) {
  .field-grid { grid-template-columns: 1fr; }
  .field label { min-height: auto; }
  th, td { font-size: 0.79rem; }
}
