:root {
  --color-bg: #e9eef2;
  --color-surface: rgba(255, 255, 255, 0.5);
  --color-surface-strong: rgba(255, 255, 255, 0.58);
  --color-text: #16222c;
  --color-muted: #5c6975;
  --color-accent: #27485e;
  --color-border: rgba(39, 72, 94, 0.16);
  --color-shadow: rgba(14, 25, 34, 0.1);
  --color-text-on-image: rgba(255, 255, 255, 0.96);
  --color-muted-on-image: rgba(245, 249, 252, 0.82);
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --content-width: 860px;
  --parallax-offset: 0px;
  --parallax-scale: 1.16;
  --font-price: "Barlow Semi Condensed", "Avenir Next Condensed", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -8vh 0 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background: url("../img/background1.jpg") center top / cover no-repeat;
  filter: blur(2px);
  transform: translate3d(0, var(--parallax-offset), 0) scale(var(--parallax-scale));
  transform-origin: center top;
  will-change: transform;
}

body::after {
  z-index: -1;
  background: transparent;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.hero {
  padding: 40px 20px 88px;
}

.hero__inner,
.footer {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.brand {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 28px;
}

.brand__logo {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.2));
}

.brand__eyebrow {
  margin: 0 0 10px;
  color: var(--color-muted-on-image);
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--color-text-on-image);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}

.brand__lead {
  max-width: 58ch;
  margin-top: 14px;
  color: var(--color-muted-on-image);
  font-size: 1.02rem;
  line-height: 1.6;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.88);
}

.calculator,
.results {
  backdrop-filter: blur(10px);
  background: var(--color-surface);
  border: 0;
  box-shadow: 0 18px 44px var(--color-shadow);
}

.calculator,
.results {
  border-radius: var(--radius-lg);
}

.calculator {
  padding: 28px;
}

.calculator .results {
  margin-top: 22px;
  padding-top: 24px;
  border: 0;
  border-top: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  background: transparent;
}

.calculator .results[hidden] {
  display: none;
}

.calculator__header p,
.results__header p,
.footer p {
  color: var(--color-muted);
  line-height: 1.6;
}

.calculator__header p,
.field span {
  color: rgba(22, 34, 44, 0.72);
}

.calculator__header p {
  margin-top: 8px;
}

.quote-form {
  margin-top: 22px;
}

.quote-form__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(140px, 156px);
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 8px;
}

.field--action {
  min-width: 0;
}

.field__spacer {
  min-height: 22px;
}

.field span {
  font-size: 0.95rem;
}

.field input {
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(22, 34, 44, 0.04);
  color: var(--color-text);
  text-align: center;
}

.field input:focus {
  outline: 2px solid rgba(39, 72, 94, 0.2);
  outline-offset: 2px;
}

.button {
  width: 100%;
  min-height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #f5f8fb;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
}

.results__header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.results__list {
  display: block;
  margin-top: 22px;
}

.results-group {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(18, 28, 34, 0.12);
}

.results-stack {
  background: rgba(252, 252, 251, 0.92);
  backdrop-filter: blur(10px);
}

.result-card {
  --result-pad-y: 18px;
  --result-pad-left: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 28%);
  column-gap: 16px;
  align-items: center;
  padding: var(--result-pad-y) 0 var(--result-pad-y) var(--result-pad-left);
  border: 0;
  background: transparent;
}

.result-card--featured {
  --result-pad-y: 24px;
  --result-pad-left: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 28%);
  padding: var(--result-pad-y) 0 var(--result-pad-y) var(--result-pad-left);
  background: linear-gradient(135deg, rgba(232, 239, 228, 0.98), rgba(214, 227, 208, 0.98));
}

.result-card__provider {
  font-size: 1.02rem;
  font-weight: 600;
}

.result-card--featured .result-card__provider {
  font-size: 1.08rem;
  color: #1f2d24;
}

.result-card__service {
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.result-card__price {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  font-size: 1.12rem;
  font-weight: 600;
  font-family: var(--font-price);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.02em;
  color: rgba(18, 26, 33, 0.88);
  white-space: nowrap;
}

.result-card__amount {
  display: inline-block;
}

.result-card__currency {
  display: inline-block;
  font-size: 0.43em;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  opacity: 0.78;
}

.result-card--featured .result-card__price {
  font-size: clamp(1.6rem, 3.0vw, 2.8rem);
  font-weight: 700;
  line-height: 0.94;
  color: #1e3026;
  letter-spacing: -0.025em;
}

.result-card--featured .result-card__currency {
  font-size: 0.32em;
  font-weight: 700;
  opacity: 0.72;
}

.result-card--featured .result-card__service {
  color: rgba(31, 45, 36, 0.76);
}

.result-card:not(.result-card--featured) .result-card__provider {
  font-size: 1rem;
  color: #172330;
}

.result-card:not(.result-card--featured) .result-card__service {
  font-size: 0.84rem;
}

.result-card:not(.result-card--featured) .result-card__price {
  font-size: 1.18rem;
  font-weight: 400;
}

.results-stack .result-card + .result-card {
  box-shadow: inset 0 1px 0 rgba(24, 38, 49, 0.08);
}

.results-stack .result-card + .result-card .result-card__action {
  box-shadow: inset 0 1px 0 rgba(24, 38, 49, 0.08);
}

.result-card__action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  justify-self: stretch;
  align-self: stretch;
  min-width: 240px;
  min-height: auto;
  padding: 0 10px 0 14px;
  margin-top: calc(var(--result-pad-y) * -1);
  margin-bottom: calc(var(--result-pad-y) * -1);
  gap: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(62, 89, 110, 0.98), rgba(47, 70, 90, 0.98));
  color: #f5f8fb;
  text-decoration: none;
}

.result-card--featured .result-card__action {
  grid-template-columns: minmax(0, 1fr) 46px;
  min-width: 240px;
  padding-right: 10px;
  background: linear-gradient(180deg, rgba(43, 73, 51, 0.98), rgba(34, 59, 42, 0.98));
}

.result-card__action .result-card__price {
  color: inherit;
  justify-content: flex-end;
}

.result-card__action .result-card__currency {
  opacity: 0.8;
}

.result-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: auto;
  width: auto;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.external-link-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
  fill: currentColor;
}

.result-card__link .external-link-icon {
  transform: translateY(-0.5px);
}

.results__empty {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.providers-overview {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(22, 34, 44, 0.08);
}

.providers-overview__header p {
  max-width: 64ch;
  margin-top: 8px;
  color: var(--color-muted);
  line-height: 1.6;
}

.providers-overview__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  align-items: start;
}

.provider-profile {
  display: grid;
  gap: 12px;
  padding: 18px;
  align-self: start;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 250, 251, 0.92));
  box-shadow: 0 10px 24px rgba(15, 27, 36, 0.08);
}

.provider-profile__title {
  margin: 0;
  font-size: 1.08rem;
  color: #1a2b37;
}

.provider-profile__usp {
  color: #223847;
  font-size: 0.98rem;
  line-height: 1.5;
  font-weight: 600;
}

.provider-profile__description {
  color: var(--color-muted);
  line-height: 1.6;
}

.provider-profile__label {
  color: rgba(22, 34, 44, 0.66);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.provider-profile__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-profile__chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(34, 56, 71, 0.08);
  color: #294151;
  font-size: 0.84rem;
}

.provider-profile__link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(34, 56, 71, 0.96);
  color: #f7fbfd;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.hero--content {
  padding-bottom: 56px;
}

.brand--compact {
  margin-bottom: 20px;
}

.content-panel {
  padding: 28px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  background: var(--color-surface);
  box-shadow: 0 18px 44px var(--color-shadow);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(22, 34, 44, 0.62);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.page-intro {
  display: grid;
  gap: 14px;
}

.page-intro__eyebrow {
  color: rgba(22, 34, 44, 0.66);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-intro__title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--color-text);
  text-shadow: none;
  max-width: none;
}

.page-intro__lead {
  max-width: 68ch;
  color: var(--color-muted);
  line-height: 1.7;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button--secondary {
  width: auto;
  background: rgba(39, 72, 94, 0.08);
  color: var(--color-accent);
  text-decoration: none;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.content-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 250, 251, 0.92));
  box-shadow: 0 10px 24px rgba(15, 27, 36, 0.08);
}

.content-card__title {
  font-size: 1.02rem;
  color: #1a2b37;
}

.content-card__text,
.content-card__list {
  color: var(--color-muted);
  line-height: 1.65;
}

.content-card__list {
  margin: 0;
  padding-left: 18px;
}

.content-card__meta {
  color: rgba(22, 34, 44, 0.64);
  font-size: 0.92rem;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.directory-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 250, 251, 0.92));
  box-shadow: 0 10px 24px rgba(15, 27, 36, 0.08);
}

.directory-card__title {
  margin: 0;
  font-size: 1.08rem;
  color: #1a2b37;
}

.directory-card__usp {
  color: #223847;
  font-size: 0.98rem;
  line-height: 1.5;
  font-weight: 600;
}

.directory-card__text {
  color: var(--color-muted);
  line-height: 1.6;
}

.directory-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.directory-card__link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.directory-card__link--primary {
  background: rgba(34, 56, 71, 0.96);
  color: #f7fbfd;
}

.directory-card__link--secondary {
  background: rgba(34, 56, 71, 0.08);
  color: #294151;
}

.footer {
  padding: 0 20px 40px;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}

.footer__nav a {
  color: var(--color-muted-on-image);
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.88);
}

.footer p {
  color: var(--color-muted-on-image);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.88);
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    transform: none;
  }
}

@media (max-width: 860px) {
  .quote-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field--action {
    grid-column: 1 / -1;
  }

  .results__header,
  .result-card {
    display: grid;
  }

  .button {
    justify-self: end;
  }

  .providers-overview__grid {
    grid-template-columns: 1fr;
  }

  .content-grid,
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .footer__content {
    align-items: start;
  }

  .result-card {
    grid-template-columns: minmax(0, 67%) minmax(0, 33%);
    align-items: center;
  }

  .result-card--featured {
    gap: 12px;
    grid-template-columns: minmax(0, 67%) minmax(0, 33%);
  }

  .result-card--featured .result-card__price {
    font-size: clamp(1.6rem, 3.0vw, 2.8rem);
  }

  .result-card__action {
    grid-template-columns: minmax(0, 1fr) 36px;
    min-width: 0;
    padding-left: 12px;
    padding-right: 8px;
  }

  .result-card--featured .result-card__action {
    grid-template-columns: minmax(0, 1fr) 40px;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .result-card {
    grid-template-columns: minmax(0, 67%) minmax(0, 33%);
  }

  .result-card--featured {
    grid-template-columns: minmax(0, 67%) minmax(0, 33%);
  }

  .result-card__action {
    grid-template-columns: minmax(0, 1fr) 34px;
    padding-left: 10px;
    padding-right: 8px;
  }
}

@media (max-width: 640px) {
  body::before {
    transform: none;
  }

  .hero {
    padding-top: 24px;
  }

  .brand {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .page-actions,
  .directory-card__actions,
  .footer__content,
  .footer__nav {
    flex-direction: column;
    align-items: stretch;
  }

  .calculator,
  .results,
  .content-panel {
    padding: 20px;
  }

  .quote-form__grid {
    grid-template-columns: 1fr;
  }

  .provider-profile {
    padding: 16px;
  }

  .button {
    width: 100%;
  }
}
