/* Contact – Figma "06 Contact" (318:2492) */

/* ---------- Hero (Figma 731:11784) ---------- */

.contact-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
  align-items: center;
  justify-content: center;
  min-height: min(100svh, 658px);
  padding: calc(var(--header-height) + var(--space-48)) var(--layout-margin) var(--space-128);
  background: var(--color-surface-base);
  color: var(--color-text-primary);
  text-align: center;
}

.contact-hero__title {
  color: var(--color-interactive-primary);
}

.contact-hero__direct {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.contact-hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  justify-content: center;
}

/* ---------- Inquiry section (Figma 731:11846) ---------- */

.inquiry {
  display: grid;
  grid-template-columns: 720fr 416fr;
  gap: var(--space-64);
  align-items: start;
}

/* less air after the form: the send row closes the card, the footer follows sooner */
.inquiry.section {
  padding-bottom: var(--space-64);
}

.inquiry__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.inquiry__studio {
  position: sticky;
  top: calc(var(--header-height) + var(--space-24));
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
}

/* Inquiry Flow card – always dark graphite */
.inquiry-flow {
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
  padding: var(--space-48) var(--space-48) var(--space-32);
  border-radius: var(--radius-24);
  background: var(--color-core-tone-graphite);
  color: var(--color-fixed-light);
}

.inquiry-flow__hp {
  position: absolute;
  left: -9999px;
}

.inquiry-flow__note {
  color: var(--color-core-tone-fog);
}

.inquiry-flow__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.inquiry-flow__group legend {
  margin-bottom: var(--space-16);
  padding: 0;
}

.inquiry-flow__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
}

.inquiry-flow__details[hidden] {
  display: none;
}

.inquiry-flow__link {
  align-self: flex-start;
  color: var(--color-core-tone-fog);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.inquiry-flow__link .icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}

/* "etwas anderes": a chip like the others, dashed outline + plus */
.option-add {
  display: inline-flex;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8) var(--space-24) var(--space-8) var(--space-16);
  border: 1.5px dashed rgb(249 246 242 / 0.5);
  border-radius: var(--radius-pill);
  color: var(--color-fixed-light);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.option-add:hover,
.option-add[aria-expanded="true"] {
  border-color: var(--color-fixed-light);
  background: rgb(249 246 242 / 0.08);
}

.option-add__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  transition: rotate 0.4s var(--ease-calm);
}

.option-add[aria-expanded="true"] .option-add__icon {
  rotate: 45deg;
}

/* "Zeitrahmen & …" uses the same dashed chip, at the end of the form */
.inquiry-flow > .option-add {
  align-self: flex-start;
}

.option-add:focus-visible {
  outline: 2px solid var(--color-fixed-light);
  outline-offset: 3px;
}

/* the optional part slides open */
.inquiry-flow__details.is-opening {
  animation: inquiry-open 0.6s var(--ease-calm) both;
}

@keyframes inquiry-open {
  from {
    opacity: 0;
    translate: 0 -12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inquiry-flow__details.is-opening {
    animation: none;
  }
}

/* Form / Option (Figma 343:1118): paper chip → coral when selected */
.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  align-items: center;
}

.option {
  position: relative;
  cursor: pointer;
}

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

.option span,
.option--button {
  display: inline-block;
  padding: var(--space-8) var(--space-24);
  border-radius: var(--radius-pill);
  background: var(--color-fixed-light);
  color: var(--color-fixed-dark);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.option:hover span,
.option--button:hover {
  background: var(--color-core-tone-chalk);
}

.option input:checked + span {
  background: var(--color-interactive-primary);
  color: var(--color-fixed-light);
}

.option input:focus-visible + span {
  outline: 2px solid var(--color-fixed-light);
  outline-offset: 2px;
}

/* Budget slider (Figma 568:1186): fill follows the thumb exactly */
.budget-slider {
  /* fill ends exactly under the thumb centre (thumb 28px), like the browser places it */
  /* --pos 0–100 (set from the snapped value), --span = position of the highest budget */
  --fill: calc(14px + var(--pos) / 100 * (100% - 28px));
  /* the bar ends at the highest budget; "keine Angabe" is a separate point right behind it */
  --last: calc(14px + var(--span) / 100 * (100% - 28px));
  --track: rgb(137 133 129 / 0.35);
  /* neutral, not coral: the budget is one answer among others (Leoš) */
  --budget-fill: rgb(249 246 242 / 0.75);
  position: relative;
  padding-bottom: var(--space-32);
}

.budget-slider input {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.budget-slider input::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--budget-fill) var(--fill), transparent var(--fill));
}

.budget-slider input::-moz-range-track {
  height: 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--budget-fill) var(--fill), transparent var(--fill));
}

.budget-slider input {
  position: relative;
  z-index: 1;
}

/* grey bar: ends (rounded) at the highest budget */
.budget-slider::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: calc(var(--last) + 6px);
  height: 12px;
  border-radius: var(--radius-pill);
  background: var(--track);
  pointer-events: none;
}

/* small marks where the slider snaps (one per budget level) */
.budget-slider__ticks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  pointer-events: none;
}

.budget-slider__ticks span {
  position: absolute;
  top: 12px;
  left: calc(14px + var(--at) / 100 * (100% - 28px) - 2px);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgb(249 246 242 / 0.35);
}

/* the "keine Angabe" point at the far right (dashed like the optional chips), the thumb snaps onto it */
.budget-slider::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  border: 1.5px dashed rgb(249 246 242 / 0.6);
  border-radius: 50%;
  pointer-events: none;
}

.budget-slider input::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -8px;
  border: 0;
  border-radius: 50%;
  background: var(--color-fixed-light);
  box-shadow: var(--shadow-float);
  appearance: none;
}

.budget-slider input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--color-fixed-light);
  box-shadow: var(--shadow-float);
}

.budget-slider input:focus-visible {
  outline: 2px solid var(--color-fixed-light);
  outline-offset: 4px;
  border-radius: var(--radius-pill);
}

.budget-slider__value {
  position: absolute;
  top: 36px;
  left: var(--value-x, 0px); /* set by inquiry.js: centred under the thumb, kept inside */
  padding: var(--space-4) var(--space-16);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  background: rgb(249 246 242 / 0.12);
  color: var(--color-fixed-light);
  white-space: nowrap;
  transition: left 0.25s var(--ease-calm);
}

/* last position "keine Angabe": the fill drops out, the pill turns into a quiet dashed chip */
.budget-slider input::-webkit-slider-runnable-track {
  transition: background 0.3s ease;
}

.budget-slider.is-none input::-webkit-slider-runnable-track {
  background: transparent;
}

.budget-slider.is-none input::-moz-range-track {
  background: transparent;
}

.budget-slider.is-none .budget-slider__value {
  border: 1.5px dashed rgb(249 246 242 / 0.6);
  background: transparent;
  color: var(--color-fixed-light);
}

/* Form / Gap (Figma 343:1101): inline blank with underline */
.inquiry-flow__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.option-add {
  text-align: left;
}

.inquiry-flow__contact p {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16) var(--space-8);
  align-items: baseline;
}

/* "von [Firma]." and "[E-Mail]." stay together, the period sits right after the blank */
.inquiry-flow__pair {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: var(--space-8);
  align-items: baseline;
  max-width: 100%;
}

.inquiry-flow__dot {
  margin-left: calc(var(--space-8) * -1 + 2px);
}

.inquiry-flow__title {
  margin-bottom: calc(var(--space-16) * -1);
}

/* the end of the form: the optional chip belongs to the fields above, send gets its own footer */
.inquiry-flow > .option-add {
  margin-top: calc(var(--space-16) * -1);
}

.inquiry-flow__submit {
  padding-top: var(--space-32);
  border-top: 1px solid rgb(249 246 242 / 0.15);
}

.gap {
  display: inline-block;
  width: var(--gap-width, 200px);
  max-width: 100%;
  border-bottom: 1px solid var(--color-text-tertiary);
  transition: border-color 0.2s ease;
}

.gap--wide {
  width: 100%;
}

.gap[hidden] {
  display: none;
}

.gap input {
  width: 100%;
  padding: 0 0 var(--space-4) var(--space-4);
  border: 0;
  background: none;
  color: var(--color-fixed-light);
  outline: none;
}

.gap input::placeholder {
  color: var(--color-text-tertiary);
}

.gap:focus-within {
  border-color: var(--color-fixed-light);
}

.gap--error {
  border-color: var(--color-interactive-primary);
}

.inquiry-flow__textarea {
  width: 100%;
  min-height: 180px;
  padding: var(--space-16) var(--space-24);
  border: 0;
  border-radius: var(--radius-16);
  background: var(--color-fixed-light);
  color: var(--color-fixed-dark);
  resize: vertical;
}

.inquiry-flow__textarea::placeholder {
  color: var(--color-text-tertiary);
}

.inquiry-flow__error {
  margin-bottom: calc(-1 * var(--space-24));
  color: var(--color-interactive-primary);
}

.inquiry-flow__submit {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-24);
  align-items: center;
  justify-content: space-between;
}

/* hint/note on the left, send button at the right edge */
.inquiry-flow__submit .inquiry-flow__note {
  order: 1;
}

.inquiry-flow__submit .inquiry-flow__send {
  order: 2;
  margin-left: auto;
}

/* idle: paper (clickable, shows what's missing); ready: coral */
.inquiry-flow__note {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.inquiry-flow__missing {
  color: var(--color-fixed-light);
}

.inquiry-flow__missing:empty {
  display: none;
}

.inquiry-flow__send.is-ready {
  color: var(--color-fixed-light);
}

.inquiry-flow__send.is-ready::before {
  background: var(--color-interactive-primary);
}

.inquiry-flow__send.is-ready:hover::before {
  background: var(--color-interactive-primary-hover);
}

/* Step 4 · Thanks */
.inquiry-flow--success {
  gap: var(--space-32);
}

.inquiry-success__summary {
  color: var(--color-core-tone-fog);
}

.inquiry-success__summary strong {
  color: var(--color-fixed-light);
  font-weight: inherit;
}

.inquiry-success__card {
  display: flex;
  gap: var(--space-24);
  align-items: center;
  padding: var(--space-24);
  border-radius: var(--radius-16);
  background: var(--color-core-tone-chalk);
  color: var(--color-fixed-dark);
}

.inquiry-success__card > span:last-child {
  display: flex;
  flex-direction: column;
}

.inquiry-success__card .contact-person__photo {
  width: 56px;
  height: 56px;
}

/* ---------- Contact person + FAQ ---------- */

.contact-person {
  display: flex;
  gap: var(--space-24);
  align-items: flex-start;
  padding: var(--space-24);
  border-radius: var(--radius-24);
  background: var(--color-surface-raised);
}

.contact-person__photo {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: var(--radius-pill);
}

.contact-person__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-person__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.contact-person__name {
  color: var(--color-text-secondary);
}

.contact-person__mail {
  color: var(--color-text-tertiary);
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
  .inquiry {
    grid-template-columns: 1fr;
  }

  .inquiry__studio {
    position: static;
  }

  /* phones/tablets: "Du sprichst direkt mit mir" first, then the form, the FAQ last */
  .inquiry__studio {
    display: contents;
  }

  .inquiry .contact-person {
    order: -1;
  }

  .inquiry .faq {
    order: 1;
  }
}

@media (max-width: 600px) {
  .contact-hero__title {
    font-size: var(--font-size-h1);
  }

  .inquiry-flow {
    gap: var(--space-32);
    padding: var(--space-24);
  }

  .option span,
  .option--button {
    padding: var(--space-8) var(--space-16);
    font-size: var(--font-size-small);
  }

  .gap {
    width: 100%;
  }

  .inquiry-flow__pair {
    width: 100%;
  }

  .inquiry-flow__pair .gap {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .inquiry-flow__submit .button {
    width: 100%;
  }
}

/* the hero button glides down to the form (reduced motion: base.css switches it off) */
html:has(body[data-template="contact"]) {
  scroll-behavior: smooth;
}

#anfrage {
  scroll-margin-top: calc(var(--header-height) + var(--space-16));
}
