
.tf {
  --hp-form-card: #313d59;
  --hp-form-ink: #f4f6fa;
  --hp-form-muted: #c5ccda;
  --hp-form-edge: rgb(255 255 255 / 0.12);
  --hp-form-rule: rgb(255 255 255 / 0.12);
  --hp-form-panel: rgb(12 18 34 / 0.38);
  --hp-form-panel-edge: rgb(255 255 255 / 0.07);
  --hp-form-panel-shadow: inset 0 2px 6px rgb(0 0 0 / 0.28);
  --hp-form-field: #ffffff;
  --hp-form-field-ink: #19243b;
  --hp-form-field-edge: #8a95ab;
  --hp-form-placeholder: #5b6782;
  --hp-form-accent: #f9ab05;
  --hp-form-invalid: #ff5a5a;
  --hp-form-gap-y: 1rem;
  --hp-form-gap-x: 0.75rem;
  max-inline-size: 72rem;
  margin-inline: auto;
  padding: 1rem 1rem 1.625rem;
  color: var(--hp-form-ink);
  background: var(--hp-form-card);
  border: 1px solid var(--hp-form-edge);
  border-radius: 16px;
  hyphens: manual;
  overflow-wrap: break-word;
}

@media (min-width: 40rem) {
  .tf {
    padding: 1rem 2rem 1.625rem;
  }
}

.tf-intro {
  max-inline-size: 60ch;
  margin-block: 0.5rem 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--hp-form-ink);
}

.tf-panel {
  padding: 1.25rem 1rem;
  background: var(--hp-form-panel);
  border: 1px solid var(--hp-form-panel-edge);
  border-radius: 16px;
  box-shadow: var(--hp-form-panel-shadow);
}

@media (min-width: 40rem) {
  .tf-panel {
    padding: 1.5rem 2rem 1rem;
  }
}

.tf fieldset {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tf .tf-block {
  padding-block: 1.5rem 1.5rem;
  border-block-start: 1px solid var(--hp-form-rule);
}

.tf .tf-block:first-child {
  padding-block-start: 0;
  border-block-start: 0;
}

.tf .tf-block:last-child {
  padding-block-end: 0.5rem;
}

.tf legend {
  float: inline-start;
  inline-size: 100%;
  margin: 0 0 1rem;
  padding: 0;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hp-form-accent);
}

.tf legend + * {
  clear: both;
}

.tf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--hp-form-gap-y) var(--hp-form-gap-x);
}

@media (min-width: 40rem) {
  .tf-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .tf-s10 {
    grid-column: span 10;
  }

  .tf-s6 {
    grid-column: span 6;
  }

  .tf-s5 {
    grid-column: span 5;
  }

  .tf-s4 {
    grid-column: span 4;
  }
}

.tf-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-inline-size: 0;
}

.tf-field > label,
.tf legend + .tf-checks {
  font-size: 0.8rem;
  line-height: 1.2;
}

.tf-field > label {
  font-weight: 500;
  color: var(--hp-form-ink);
}

.tf .tf-group {
  gap: 0;
}

.tf .tf-group > legend {
  margin-block-end: 0.5rem;
  font-family: var(--font-text);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--hp-form-ink);
}

.tf-star {
  color: var(--hp-form-accent);
}

.tf-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--hp-form-muted);
}

.tf input[type="text"],
.tf input[type="email"],
.tf input[type="tel"],
.tf select,
.tf textarea {
  inline-size: 100%;
  min-block-size: 48px;
  padding: 0.25rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--hp-form-field-ink);
  background: var(--hp-form-field);
  border: 1px solid var(--hp-form-field-edge);
  border-radius: 12px;
  color-scheme: light;
}

.tf textarea {
  block-size: 5rem;
  padding-block: 0.625rem;
  resize: vertical;
}

.tf select {
  cursor: pointer;
}

.tf ::placeholder {
  color: var(--hp-form-placeholder);
  opacity: 1;
}

.tf input:focus-visible,
.tf select:focus-visible,
.tf textarea:focus-visible,
.tf-submit:focus-visible {
  outline: 3px solid var(--hp-form-accent);
  outline-offset: 2px;
}

.tf-tried input:invalid,
.tf-tried select:invalid,
.tf-tried textarea:invalid {
  border-color: var(--hp-form-invalid);
  box-shadow:
    0 0 0 2px var(--hp-form-invalid),
    0 0 0 5px rgb(255 90 90 / 0.28);
}

.tf-phone {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: var(--hp-form-gap-x);
}

.tf .tf-phone input {
  text-align: start;
}

.tf-checks {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
}

@media (min-width: 30rem) {
  .tf-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .tf-checks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tf-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-block-size: 48px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--hp-form-ink);
  background: var(--hp-form-panel);
  border: 1px solid var(--hp-form-field-edge);
  border-radius: 12px;
  cursor: pointer;
}

.tf-check input {
  color-scheme: dark;
  flex: none;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  margin: 0;
  accent-color: var(--hp-form-accent);
}

.tf-check:has(input:checked) {
  border-color: var(--hp-form-ink);
  box-shadow: 0 0 0 1px var(--hp-form-ink);
}

.tf-check:has(input:focus-visible) {
  outline: 3px solid var(--hp-form-accent);
  outline-offset: 2px;
}

.tf-tried .tf-check:has(input:invalid) {
  border-color: var(--hp-form-invalid);
  box-shadow:
    0 0 0 2px var(--hp-form-invalid),
    0 0 0 5px rgb(255 90 90 / 0.28);
}

.tf-foot {
  display: grid;
  gap: 0.75rem;
  margin-block-start: 1.5rem;
}

.tf-note {
  margin: 0;
  padding: 0.75rem 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--hp-form-ink);
  background: var(--hp-form-panel);
  border: 1px solid var(--hp-form-panel-edge);
  border-radius: 12px;
}

.tf-error {
  margin: 0;
  padding: 0.75rem 1rem;
  font-weight: 700;
  line-height: 1.45;
  color: #ffffff;
  background: rgb(255 90 90 / 0.16);
  border: 2px solid var(--hp-form-invalid);
  border-radius: 12px;
}

.tf-error[hidden] {
  display: none;
}

.tf-note a {
  color: var(--hp-form-accent);
  overflow-wrap: anywhere;
}

.tf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-block-start: 0.75rem;
}

.tf-req {
  margin: 0;
  font-size: 0.8rem;
  color: var(--hp-form-muted);
}

.tf-submit {
  inline-size: 100%;
  min-block-size: 52px;
  margin-block-end: 6px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #19243b;
  background: linear-gradient(180deg, #ffbb1f 0%, #f9ab05 100%);
  border: 0;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.35),
    0 6px 0 #b97e00,
    0 14px 24px rgb(0 0 0 / 0.3);
  cursor: pointer;
  transition:
    transform 150ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 150ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (min-width: 30rem) {
  .tf-submit {
    inline-size: auto;
    min-inline-size: 20rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .tf-submit:hover {
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.4),
      0 7px 0 #b97e00,
      0 18px 30px rgb(0 0 0 / 0.34);
  }
}

.tf-submit:active {
  transform: translateY(5px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    0 1px 0 #b97e00,
    0 4px 8px rgb(0 0 0 / 0.2);
}

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