/* ==========================================================================
   Why, services, calculator
   ========================================================================== */

/* ---------- Why ---------- */

.why {
  background:
    radial-gradient(ellipse at 92% 8%, rgba(94, 23, 33, 0.055), transparent 38%),
    var(--paper);
}

.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.why__features {
  display: flex;
  flex-direction: column;
}

.feature {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease), background 0.35s ease;
}

.feature:last-child {
  border-bottom: 1px solid var(--line);
}

.feature:hover {
  padding-left: 8px;
}

.feature__num {
  padding-top: 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--wine);
}

.feature h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.feature p {
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.why__card {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  min-height: 440px;
  padding: clamp(28px, 3vw, 40px);
  overflow: hidden;
  border-radius: 2px;
  background: var(--wine);
  color: var(--paper);
}

.why__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(193, 18, 47, 0.38), transparent 54%),
    linear-gradient(160deg, transparent 55%, rgba(13, 8, 9, 0.2));
  pointer-events: none;
}

.why__card-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 242, 234, 0.5);
}

.why__years {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 46px 0 26px;
}

.why__years-num {
  font-family: var(--serif);
  font-size: clamp(100px, 10vw, 152px);
  font-weight: 500;
  line-height: 0.68;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.why__years-text {
  padding-bottom: 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 242, 234, 0.55);
}

.why__card-text {
  position: relative;
  max-width: 24ch;
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.35;
}

.why__stamp {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 108px;
  height: 108px;
  color: rgba(247, 242, 234, 0.55);
  animation: spin 34s linear infinite;
}

.why__stamp svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.why__stamp text {
  font-family: var(--sans);
  font-size: 8.2px;
  font-weight: 600;
  letter-spacing: 2.1px;
  fill: currentColor;
}

.why__stamp .why__stamp-center {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0;
  fill: var(--paper);
}

/* ---------- Services ---------- */

.services {
  background: var(--paper-2);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 336px;
  padding: clamp(24px, 2.4vw, 34px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0, rgba(193, 18, 47, 0.24), transparent 52%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service-card:hover {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--paper);
  transform: translateY(-4px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card__top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 34px;
}

.service-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.4s ease;
}

.service-card:hover .service-card__icon {
  border-color: rgba(247, 242, 234, 0.3);
}

.service-card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__num {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  transition: color 0.4s ease;
}

.service-card:hover .service-card__num {
  color: rgba(247, 242, 234, 0.5);
}

.service-card h3 {
  position: relative;
  max-width: 14ch;
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 27px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.service-card p {
  position: relative;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  transition: color 0.4s ease;
}

.service-card:hover p {
  color: rgba(247, 242, 234, 0.62);
}

.service-card__bottom {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.service-card__price {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.service-card__price small {
  margin-left: 3px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: color 0.4s ease;
}

.service-card:hover .service-card__price small {
  color: rgba(247, 242, 234, 0.52);
}

.services__note {
  margin-top: 36px;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}

.services__note a {
  color: var(--wine);
  border-bottom: 1px solid rgba(94, 23, 33, 0.35);
  transition: border-color 0.25s ease;
}

.services__note a:hover {
  border-bottom-color: var(--wine);
}

/* ---------- Calculator ---------- */

.calc {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.calc::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(247, 242, 234, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 242, 234, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 74%);
  pointer-events: none;
}

.calc::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(94, 23, 33, 0.35), transparent 65%);
  pointer-events: none;
}

.calc .container {
  position: relative;
  z-index: 1;
}

.calc__shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  overflow: hidden;
  border: 1px solid rgba(247, 242, 234, 0.14);
  border-radius: 2px;
  background: rgba(247, 242, 234, 0.025);
}

.calc__noscript {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(247, 242, 234, 0.55);
}

.calc__noscript a {
  color: var(--rose);
  border-bottom: 1px solid rgba(217, 163, 169, 0.35);
}

.calc__form {
  padding: clamp(24px, 3.2vw, 44px);
  border-right: 1px solid rgba(247, 242, 234, 0.12);
}

.calc__mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: rgba(247, 242, 234, 0.06);
  border-radius: 2px;
}

.seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 1px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(247, 242, 234, 0.58);
  transition: background 0.3s ease, color 0.3s ease;
}

.seg span {
  font-size: 8px;
  font-weight: 400;
  opacity: 0.6;
}

.seg.is-active {
  background: var(--paper);
  color: var(--ink);
}

.seg:not(.is-active):hover {
  background: rgba(247, 242, 234, 0.06);
  color: var(--paper);
}

.calc__field {
  margin-top: 26px;
}

.calc__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.calc__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 242, 234, 0.55);
}

.calc__hint {
  font-size: 8px;
  letter-spacing: 0.03em;
  color: rgba(247, 242, 234, 0.3);
  white-space: nowrap;
}

.stepper {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 62px;
  align-items: center;
  height: 62px;
  border: 1px solid rgba(247, 242, 234, 0.16);
}

.stepper__btn {
  height: 100%;
  font-size: 23px;
  font-weight: 300;
  color: rgba(247, 242, 234, 0.62);
  transition: background 0.25s ease, color 0.25s ease;
}

.stepper__btn:hover {
  background: rgba(247, 242, 234, 0.07);
  color: var(--paper);
}

.stepper__value {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid rgba(247, 242, 234, 0.12);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(247, 242, 234, 0.48);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.chip:hover,
.chip.is-active {
  border-color: rgba(247, 242, 234, 0.38);
  background: rgba(247, 242, 234, 0.06);
  color: var(--paper);
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  width: 100%;
  height: 62px;
  padding: 0 62px 0 18px;
  border: 1px solid rgba(247, 242, 234, 0.16);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.input-suffix input::-webkit-outer-spin-button,
.input-suffix input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.input-suffix input:focus {
  border-color: rgba(247, 242, 234, 0.42);
}

.input-suffix span {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247, 242, 234, 0.32);
  pointer-events: none;
}

.calc__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calc__row.is-single {
  grid-template-columns: 1fr;
}

.seg--time {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: rgba(247, 242, 234, 0.06);
}

.seg--time .seg {
  min-height: 42px;
  font-size: 10px;
}

.calc__switches {
  margin-top: 30px;
  border-top: 1px solid rgba(247, 242, 234, 0.12);
}

.switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(247, 242, 234, 0.12);
  cursor: pointer;
}

.switch__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.switch__text small {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(247, 242, 234, 0.32);
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch__ui {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
  border: 1px solid rgba(247, 242, 234, 0.24);
  border-radius: 20px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.switch__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(247, 242, 234, 0.55);
  transition: transform 0.3s var(--ease), background 0.3s ease;
}

.switch input:checked + .switch__ui {
  background: var(--red);
  border-color: var(--red);
}

.switch input:checked + .switch__ui::after {
  background: #fff;
  transform: translateX(20px);
}

.switch input:focus-visible + .switch__ui {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

/* ---------- Calculator result ---------- */

.calc__result {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.2vw, 44px);
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  transition: background 0.45s ease, color 0.45s ease;
}

.calc__result::before {
  content: "53";
  position: absolute;
  right: -12px;
  bottom: -44px;
  font-family: var(--serif);
  font-size: 240px;
  font-weight: 500;
  line-height: 1;
  color: rgba(28, 21, 23, 0.035);
  pointer-events: none;
}

.calc__result-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.calc__badge {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 21px;
  padding: 0 8px;
  border: 1px solid rgba(193, 18, 47, 0.28);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--red);
}

.calc__price {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 22px 0 10px;
  font-family: var(--serif);
  font-size: clamp(58px, 6.2vw, 86px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.calc__from {
  margin-top: 0.62em;
  margin-right: 2px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.calc__currency {
  margin-top: 0.18em;
  font-size: 0.36em;
  line-height: 1;
  color: var(--muted);
}

.calc__result-note {
  position: relative;
  margin-bottom: 22px;
  font-size: 11px;
  color: var(--muted);
}

.calc__breakdown {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.calc__breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}

.calc__breakdown-row span:last-child {
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.calc__breakdown-row--sum {
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.calc__breakdown-row--sum span:last-child {
  color: var(--ink);
}

.calc__includes {
  position: relative;
  margin: 0 0 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.calc__includes-label {
  display: block;
  margin-bottom: 8px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.calc__includes ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.calc__includes li {
  position: relative;
  padding-left: 14px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--ink);
}

.calc__includes li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 4px;
  height: 4px;
  background: var(--red);
}

.calc__includes li small {
  color: var(--muted);
}

.calc__result .btn--red {
  margin-top: auto;
}

.calc__disclaimer {
  position: relative;
  margin-top: 12px;
  font-size: 9px;
  line-height: 1.55;
  color: rgba(28, 21, 23, 0.45);
}

/* Night state */

.calc__result.is-night {
  background: var(--wine-deep);
  color: var(--paper);
}

.calc__result.is-night::before {
  color: rgba(247, 242, 234, 0.04);
}

.calc__result.is-night .calc__result-top,
.calc__result.is-night .calc__result-note,
.calc__result.is-night .calc__breakdown-row,
.calc__result.is-night .calc__disclaimer {
  color: rgba(247, 242, 234, 0.52);
}

.calc__result.is-night .calc__badge {
  border-color: rgba(217, 163, 169, 0.32);
  color: var(--rose);
}

.calc__result.is-night .calc__price {
  max-width: 9ch;
  margin: 28px 0 14px;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.calc__result.is-night .calc__currency,
.calc__result.is-night .calc__from {
  display: none;
}

.calc__result.is-night .calc__breakdown {
  border-top-color: rgba(247, 242, 234, 0.16);
}

.calc__result.is-night .calc__breakdown-row span:last-child,
.calc__result.is-night .calc__breakdown-row--sum,
.calc__result.is-night .calc__breakdown-row--sum span:last-child {
  color: var(--paper);
}

.calc__result.is-night .calc__breakdown-row--sum {
  border-top-color: rgba(247, 242, 234, 0.16);
}

.calc__result.is-night .calc__includes {
  border-top-color: rgba(247, 242, 234, 0.16);
}

.calc__result.is-night .calc__includes-label,
.calc__result.is-night .calc__includes li,
.calc__result.is-night .calc__includes li small {
  color: rgba(247, 242, 234, 0.62);
}

.calc__result.is-night .btn--red {
  background: var(--paper);
  color: var(--wine-deep);
}

.calc__result.is-night .btn--red:hover {
  background: var(--paper-2);
}
