/* ==========================================================================
   İletişim — page styles (scoped: .contact-*)
   ========================================================================== */

/* ---------- Hero ---------- */
.contact-hero__title { max-width: 13ch; }
.contact-nowrap { white-space: nowrap; }

/* ---------- Form section: form (body) + "Sonra ne olacak?" (label column) ---------- */
@media (min-width: 900px) {
  .contact-next { grid-row: 1; }            /* sits beside the form, which comes first in the DOM */
  .contact-main__body { grid-row: 1; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .contact-main__body { grid-column: 4 / -1; }   /* use the last column too, so chip rows don't break early */
}

/* Form groups */
.contact-form { gap: clamp(32px, 3.4vw, 48px); }
.contact-group { display: grid; gap: clamp(28px, 3vw, 40px); }
.contact-group + .contact-group {
  padding-top: clamp(32px, 3.4vw, 48px);
  border-top: 1px solid var(--line);
}
.contact-group__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.contact-group__title { font-size: var(--fs-h4); letter-spacing: -0.015em; }
.contact-group__hint { font-family: var(--font-sans); font-size: var(--fs-label); color: var(--muted); }

.contact-form .req { color: var(--accent); font-weight: 500; }

/* Larger, calmer serif inputs */
.contact-form .field { gap: 6px; align-content: start; }
.contact-form .field__error,
.contact-consent__error { min-height: 1.5em; font-family: var(--font-sans); line-height: 1.5; }   /* fixed height: no layout shift when a message appears */
.contact-form .field input,
.contact-form .field textarea {
  padding: 10px 0 12px;
  font-size: clamp(1.25rem, 1.08rem + 0.55vw, 1.625rem);
  line-height: 1.35;
}
.contact-form .field textarea { min-height: 176px; line-height: 1.45; }
@supports (field-sizing: content) {
  /* grows with the text instead of showing a resize handle */
  .contact-form .field textarea { field-sizing: content; resize: none; max-height: 60vh; }
}
.contact-form .field input::placeholder,
.contact-form .field textarea::placeholder { color: #a2a2a8; }
.contact-form .field.has-error .field__label,
.contact-form .field.has-error .req { color: var(--danger); }
.contact-form .field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 100px var(--paper) inset;
}

/* Chips */
.contact-choices { gap: 10px; }
.contact-choices legend { margin-bottom: 16px; }
.contact-form legend .opt { margin-left: 6px; color: var(--muted); font-weight: 400; }
.contact-choices .choice span { padding: 11px 20px; font-size: 1rem; }
.contact-choices .choice--multi span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  vertical-align: 0.05em;
  opacity: 0.45;
  transition: background-color 0.2s, opacity 0.2s;
}
.contact-choices .choice--multi input:checked + span::before { background: currentColor; opacity: 1; }

/* Consent */
.contact-consent { display: grid; gap: 8px; }
.contact-consent .check { max-width: 64ch; cursor: pointer; }
.contact-consent .check input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper) no-repeat center / 12px 9px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.contact-consent .check input:checked {
  background-color: var(--ink);
  border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='9' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.5l3.2 3L11 1' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E");
}
.contact-consent__error:empty,
.contact-form:has(input[data-consent]:checked) .contact-consent__error { display: none; }
.contact-consent__error { padding-left: 32px; }

/* Global error + submit row */
.contact-form__error { font-family: var(--font-sans); font-size: var(--fs-small); font-weight: 500; color: var(--danger); }
.contact-form__error:empty { display: none; }
.contact-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.contact-submit__note { font-family: var(--font-sans); font-size: var(--fs-small); color: var(--muted); }
/* privacy line: always on its own row under the button */
.contact-privacy {
  flex: 1 0 100%;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.contact-privacy .link { color: var(--ink-2); }

/* Success panel */
.contact-success { gap: 20px; padding: clamp(32px, 5vw, 72px); justify-items: start; }
.contact-success:focus { outline: none; }
.contact-success__mark { margin-bottom: clamp(8px, 2vw, 24px); }
.contact-success__title { font-size: var(--fs-h2); max-width: 16ch; }
.contact-success__lead { max-width: 40ch; color: var(--ink-2); }
.contact-success__note { font-family: var(--font-sans); font-size: var(--fs-small); line-height: 1.5; color: var(--muted); }
.contact-success__links { font-size: 1.0625rem; color: var(--muted); }

/* "Sonra ne olacak?" */
.contact-next > .label { display: flex; }
@media (min-width: 900px) {
  .contact-next { padding-top: 4px; padding-right: clamp(16px, 2.4vw, 40px); }  /* label baseline = "Sizi tanıyalım" baseline */
}
.contact-next__list { list-style: none; margin-top: 28px; border-bottom: 1px solid var(--line); }
.contact-next__item { display: grid; gap: 8px; padding-block: 20px 26px; border-top: 1px solid var(--line); }
.contact-next__num { font-size: var(--fs-label); font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.contact-next__item h3 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; }
.contact-next__item p { font-size: 1rem; line-height: 1.5; color: var(--muted); max-width: 32ch; }

/* ---------- Other routes ---------- */
.contact-routes .split__label > .label { display: flex; }
.contact-routes .index-list__num { min-width: 0; }
@media (min-width: 900px) {
  /* row label = 2 of the body's 9 grid columns (+ their gutters) → addresses start exactly on grid column 6 */
  .contact-routes .index-list__link {
    grid-template-columns: calc((100% - 8 * var(--col-gap)) / 9 * 2 + 2 * var(--col-gap)) minmax(0, 1fr) auto;
    column-gap: 0;
  }
  /* the section rule replaces the list's first hairline; first row starts on the label line */
  .contact-routes .index-list > li:first-child { border-top: 0; }
  .contact-routes .index-list > li:first-child > .index-list__link { padding-top: 0; }
  /* label baseline = first address baseline (title: --fs-h2, lh 1.06; Archivo ascent ≈ .88em) */
  .contact-routes .split__label { padding-top: calc(var(--fs-h2) * 0.91 - 15px); }
}

/* ---------- Small screens ---------- */
@media (max-width: 899px) {
  .contact-next { margin-top: clamp(40px, 10vw, 64px); }
  .contact-routes.section--ruled > .container { border-top: 0; padding-top: 0; }
  .contact-routes .index-list__link { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; }
  .contact-routes .index-list__num { grid-column: 1 / -1; }
  .contact-routes .index-list__title { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.25rem); }
}
@media (min-width: 640px) and (max-width: 899px) {
  /* stacked layout on tablets: the three steps sit side by side instead of a long single column */
  .contact-next__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--col-gap);
    border-bottom: 0;
  }
  .contact-next__item { align-content: start; }
}
@media (max-width: 699px) {
  .contact-form .form__row { row-gap: 20px; }
  .contact-group { gap: 24px; }
  .contact-choices { gap: 8px; }
  .contact-choices .choice span { padding: 10px 16px; font-size: 0.9375rem; }
}
