/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  /* safety net: never allow a horizontal scrollbar */
  overflow-x: hidden;
}

body {
  background-color: #000000;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  min-height: 100svh;
}

/* ===== Hero layout ===== */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  /* fluid horizontal padding: never smaller than 24px, never bigger than 88px */
  padding: clamp(24px, 6vw, 88px);
}

.hero__inner {
  /* shrink the block to exactly the width of the title text, so the
     subtitle + button row below can line up with the title's edges */
  width: fit-content;
  max-width: 100%;
  /* center the fit-content block so left/right whitespace stays equal */
  margin-inline: auto;
}

/* ===== Title (H1) ===== */
.hero__title {
  font-family: "Zalando Sans SemiExpanded", "Inter", sans-serif;
  /* Stay on ONE line on desktop: the size scales with the viewport width so
     the (wide) SemiExpanded title shrinks to fit instead of wrapping or being
     cut off. 8vw leaves comfortable margin on both sides; caps at 150px. */
  white-space: nowrap;
  font-size: min(8vw, 150px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: clamp(24px, 4vw, 48px);
}

/* ===== Bottom row: subtitle (left) + button (right) ===== */
.hero__bottom {
  /* full width of the inner block, which equals the title width */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 48px);
}

.hero__subtitle {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: #f8f8f8;
}

/* ===== Button ===== */
.hero__button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  color: #000000;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 14px 26px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  appearance: none;
  white-space: nowrap;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero__button:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.hero__button:active {
  transform: translateY(0);
}

/* ===== Responsive: tablet & phone ===== */
@media (max-width: 900px) {
  .hero {
    /* center the whole block vertically & horizontally */
    justify-content: center;
    text-align: center;
  }

  .hero__inner {
    /* let the block use the available width so content can center */
    width: 100%;
  }

  .hero__title {
    /* keep the title as the width reference, centered */
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    /* on tablet/phone it's fine for the title to wrap onto two lines */
    white-space: normal;
    font-size: clamp(2.5rem, 12vw, 96px);
  }

  .hero__bottom {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .hero__button {
    width: 100%;
  }
}

/* ===== Modal ===== */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: #000000;
  animation: modal-fade 0.2s ease;
}

.modal__dialog {
  position: relative;
  /* Width is driven by the 4 service pills; inputs stretch to match */
  width: max-content;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background-color: #000000;
  border: none;
  padding: clamp(24px, 4vw, 36px);
  animation: modal-pop 0.22s ease;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-bottom: 32px;
}

.modal__title {
  font-family: "Zalando Sans SemiExpanded", "Inter", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #ffffff;
}

.modal__close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #f8f8f8;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.modal__close:hover {
  opacity: 1;
}

.modal__form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  width: max-content;
  max-width: 100%;
}

.modal__form > * {
  align-self: stretch;
  box-sizing: border-box;
}

.field-row {
  display: flex;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.field__label {
  font-size: 13px;
  font-weight: 500;
  color: #f8f8f8;
}

.field__hint {
  color: rgba(248, 248, 248, 0.5);
  font-weight: 400;
}

.field__input {
  width: 100%;
  background-color: #161616;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 15px;
}

.field__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.field__input:focus {
  outline: none;
}

.field__textarea {
  resize: vertical;
  min-height: 96px;
}

/* Native select styled to match the inputs */
.field__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23f8f8f8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.field__select:invalid {
  color: rgba(255, 255, 255, 0.35);
}

.field__select option {
  color: #ffffff;
  background-color: #161616;
}

/* Services fieldset + selectable pills */
.services {
  border: none;
  padding: 0;
  margin: 0;
}

.field__req {
  color: rgba(248, 248, 248, 0.5);
}

.services__options {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin-top: 12px;
}

.pill {
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}

.pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background-color: #161616;
  color: #f8f8f8;
  border: none;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pill:hover span {
  background-color: #1f1f1f;
}

.pill input:checked + span {
  background-color: #ffffff;
  color: #000000;
}

.pill input:focus-visible + span {
  outline: 1px solid #ffffff;
  outline-offset: 2px;
}

.modal__status {
  font-size: 14px;
  line-height: 1.4;
  min-height: 0;
  margin: -2px 0 0;
}

.modal__status.is-error {
  color: #ff7676;
}

.modal__status.is-success {
  color: #7CFFA0;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.btn {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 999px;
  cursor: pointer;
  appearance: none;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--solid {
  background-color: #ffffff;
  color: #000000;
  border: none;
}

.btn--solid:hover {
  opacity: 0.85;
}

.btn--solid:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn--ghost {
  background-color: transparent;
  color: #f8f8f8;
  border: none;
  opacity: 0.7;
}

.btn--ghost:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .modal__dialog,
  .modal__form {
    width: 100%;
  }

  .services__options {
    flex-wrap: wrap;
    width: 100%;
  }

  .field-row {
    flex-direction: column;
  }

  .modal__actions {
    flex-direction: column-reverse;
  }

  .modal__actions .btn {
    width: 100%;
  }
}
