/* ——— A11y label tone ———
   The design's structural labels use --stone (#7e7a72 → 3.86:1 on cream) and
   tertiary ones --stone-light (#b5b0a7 → 1.95:1) — both below the 4.5:1 AA floor
   for the small tracked-caps sizes they're set at. --label-ink is a warm stone
   darkened just enough to clear AA (#66625a → ~5.4:1 on cream) while staying in
   the stone family so the hush is preserved. Scoped to the contact surface like
   the #8f897e "dark underline" one-off; the same tokens fail site-wide and want
   a global decision, so this is deliberately NOT promoted to app.css. */
.contact-hero,
.contact-form-section {
  --label-ink: #66625a;
}

/* ——— CONTACT LAYOUT ——— */
.contact-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.contact-hero {
  padding: calc(var(--nav-h) + 80px) 0 0;
  background: var(--cream);
}
.contact-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 112px);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -2px;
}
.contact-title em { font-style: italic; }
.contact-intro {
  font-size: 15px;
  line-height: 1.85;
  color: var(--label-ink);
  max-width: 420px;
  margin-bottom: 40px;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}
.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-detail-label {
  font-size: 9.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--label-ink);
}
.contact-detail-value {
  font-size: 15px;
  color: var(--ink);
  font-weight: 300;
}
.contact-detail-value a {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.contact-detail-value a:hover { border-color: var(--ink); }

/* ——— FORM SECTION ——— */
.contact-form-section {
  background: var(--cream);
  padding: 80px 0 120px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.form-label-top {
  font-size: 9.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--label-ink);
  margin-bottom: 48px;
}
.service-select-group {
  margin-bottom: 48px;
}
.service-select-title {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--label-ink);
  margin-bottom: 16px;
}
.service-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* Keep the native radio operable + in the a11y tree; the pill is its label.
   Clipped, not display:none, so keyboard focus and screen readers still reach
   it (see the WPForms mirror of this further down). */
.service-option {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.service-option:focus-visible + label {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
}
.service-option + label {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--label-ink);
  cursor: pointer;
  transition: all 0.22s;
  user-select: none;
}
.service-option:checked + label {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.service-option + label:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.service-option:checked + label:hover {
  background: var(--ink);
  color: white;
}

/* FORM FIELDS
   ———————————————————————————————————————————————————————————————————————————
   Field contrast: the "Dark underline" preset at 16px, baked in.
   The original design drew the field underline in --border (#e2ddd7), which on
   cream (#f5f3ef) is barely visible — the field reads as absent. This preset is
   the deliberate fix: a darker line, 1.5px, and a --stone label.

   #8f897e is a one-off, intentionally NOT a global token and NOT --border.
   It is the only colour in the theme outside the A1 token set: it exists purely
   because no existing token sits between --border (too faint to mark a field)
   and --stone-light #b5b0a7 (still too faint) while staying quieter than
   --stone #7e7a72 body copy. Do not promote it to app.css; it is load-bearing
   for form-field contrast only. The same value appears on the WPForms field
   rules further down — that is the same decision applied to the rendered form.
   ——————————————————————————————————————————————————————————————————————————— */
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.field-group {
  position: relative;
  border-bottom: 1.5px solid #8f897e; /* baked "Dark underline" preset */
  background: transparent;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
  transition: border-color 0.25s, background 0.25s;
}
.field-group:focus-within { border-color: var(--ink); }
.field-group label {
  display: block;
  font-size: 9.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--label-ink);
  padding-top: 20px;
  transition: color 0.25s;
}
.field-group:focus-within label { color: var(--ink); }
.field-group input,
.field-group textarea {
  display: block;
  width: 100%;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
  padding: 8px 0 18px;
  resize: none;
  line-height: 1.6;
}
.field-group input::placeholder,
.field-group textarea::placeholder { color: transparent; }

/* A11y (README D3): the design only recolours the bottom border on focus, which
   is not a sufficient focus indicator. Keyboard focus gets a real outline; mouse
   /touch focus keeps the design's quiet underline-only treatment. */
.field-group input:focus-visible,
.field-group textarea:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}
.submit-row {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.submit-note {
  font-size: 12px;
  color: var(--label-ink);
  max-width: 280px;
  line-height: 1.7;
}
/* The reassurance note sits below the form (not in the prototype's submit-row),
   so it needs its own top separation and can use the full column width. */
.contact-reassurance {
  margin-top: 36px;
  max-width: 46ch;
}
.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 48px;
  background: var(--ink);
  border: 1px solid var(--ink);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: white;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.submit-btn:hover {
  background: transparent;
  color: var(--ink);
}
.submit-btn .btn-arrow { transition: transform 0.3s; }
.submit-btn:hover .btn-arrow { transform: translateX(6px); }

/* SUCCESS STATE */
.form-success {
  display: none;
  text-align: center;
  padding: 80px 0;
}
.form-success.visible { display: block; }
.success-icon {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 300;
  color: var(--border);
  line-height: 1;
  margin-bottom: 24px;
}
.success-headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  margin-bottom: 16px;
}
.success-text {
  font-size: 15px;
  color: var(--label-ink);
  line-height: 1.8;
}

/* ——— PHOTO COLUMN ——— */
.contact-photo-col {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
}
.contact-photo-stack {
  position: relative;
}
.contact-photo-main {
  aspect-ratio: 3/4;
  overflow: hidden;
}
.contact-photo-main img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.contact-photo-accent {
  position: absolute;
  bottom: -28px;
  right: -28px;
  width: 42%;
  aspect-ratio: 1/1;
  overflow: hidden;
  border: 4px solid var(--cream);
}
.contact-photo-accent img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ——— RESPONSIVE ——— */
@media (max-width: 960px) {
  .contact-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 60px; }
  .contact-photo-col { position: static; }
  .contact-photo-accent { bottom: -20px; right: -16px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 600px) {
  .contact-title { font-size: clamp(52px, 18vw, 80px); }
  .submit-row { flex-direction: column; align-items: flex-start; }
  /* Touch targets: the service pills and submit sit under the 44px min on phones.
     Grow them to a comfortable thumb size without changing the desktop look. */
  .service-option + label,
  .wpforms-field-radio label {
    min-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
  }
  .submit-btn,
  .wpforms-submit {
    min-height: 44px;
    justify-content: center;
  }
}

/* ——— WPFORMS OVERRIDES ——— */
/* Note: These styles map WPForms default class names onto the existing design system */
/* S7 will refine these when the actual form is built */

.wpforms-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.wpforms-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wpforms-field {
  position: relative;
  border-bottom: 1.5px solid #8f897e; /* baked "Dark underline" preset — see FORM FIELDS */
  transition: border-color 0.25s;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

.wpforms-field:focus-within {
  border-color: var(--ink);
}

/* WPForms' Modern Markup ships `div.wpforms-container-full .wpforms-form
   .wpforms-field-label`, which outranks a bare class selector — so every
   declaration here needs !important to land, not just the colour. Without it
   the labels render at WPForms' 16px/700/sentence-case instead of the design's
   eyebrow treatment (README A1). */
.wpforms-field-label {
  display: block;
  font-family: var(--font-body) !important;
  font-size: 9.5px !important;
  font-weight: 400 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: var(--label-ink) !important;
  padding-top: 20px;
  padding-bottom: 0 !important;
  margin-bottom: 8px !important;
  transition: color 0.25s;
}

.wpforms-field:focus-within .wpforms-field-label {
  color: var(--ink) !important;
}

.wpforms-field input[type="text"],
.wpforms-field input[type="email"],
.wpforms-field input[type="tel"],
.wpforms-field textarea {
  display: block;
  width: 100%;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
  padding: 8px 0 18px !important;
  margin: 0 !important;
  resize: none;
  line-height: 1.6;
  border-radius: 0 !important;
}

.wpforms-field input::placeholder,
.wpforms-field textarea::placeholder {
  color: transparent !important;
}

/* A11y (README D3) — keyboard focus indicator. `outline: none !important` above
   strips the UA ring for every state, so this must reassert it with !important. */
.wpforms-field input[type="text"]:focus-visible,
.wpforms-field input[type="email"]:focus-visible,
.wpforms-field input[type="tel"]:focus-visible,
.wpforms-field textarea:focus-visible {
  outline: 1.5px solid var(--ink) !important;
  outline-offset: 3px;
}

/* Radio buttons styled as cards to match .service-option */
.wpforms-field-radio {
  border: none !important;
  padding: 0 !important;
}

.wpforms-field-radio .wpforms-field-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--label-ink) !important;
  margin-bottom: 16px !important;
  padding-top: 0 !important;
}

.wpforms-field-radio ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.wpforms-field-radio li {
  margin: 0 !important;
  padding: 0 !important;
}

/* A11y: the radios are styled as pills via their label, but must stay operable
   by keyboard and exposed to the a11y tree. `display:none` removed them from
   both — so instead clip them visually while keeping them focusable, and mirror
   the focus onto the pill via :focus-visible below. */
.wpforms-field-radio input[type="radio"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.wpforms-field-radio label {
  display: inline-flex !important;
  align-items: center;
  padding: 9px 20px !important;
  border: 1px solid var(--border) !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--label-ink) !important;
  cursor: pointer;
  transition: all 0.22s;
  user-select: none;
  margin: 0 !important;
  font-weight: 400 !important;
}

.wpforms-field-radio input[type="radio"]:checked + label {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  color: white !important;
}

/* Mirror keyboard focus onto the pill (the input itself is visually clipped). */
.wpforms-field-radio input[type="radio"]:focus-visible + label {
  outline: 1.5px solid var(--ink) !important;
  outline-offset: 3px;
}

.wpforms-field-radio label:hover {
  border-color: var(--ink) !important;
  color: var(--ink) !important;
}

.wpforms-field-radio input[type="radio"]:checked + label:hover {
  background: var(--ink) !important;
  color: white !important;
}

.wpforms-submit {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 48px !important;
  background: var(--ink) !important;
  border: 1px solid var(--ink) !important;
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: white !important;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  margin: 48px 0 0 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.wpforms-submit:hover {
  background: transparent !important;
  color: var(--ink) !important;
  border-color: var(--ink) !important;
}

/* Hide WPForms default required asterisks */
.wpforms-required {
  display: none !important;
}

/* Error states */
.wpforms-field.wpforms-has-error {
  border-color: #d32f2f !important;
}

.wpforms-error {
  color: #d32f2f !important;
  font-size: 12px !important;
  margin-top: 8px !important;
}

/* ——— S7 WPForms refinements ——— */
/* (The name/email two-column rule lives with the other .contact-form-scoped
   container rules at the bottom of this file — it has to share their
   specificity to win.) */

/* Wunschtermin native date picker (converted from text in contact.js).
   The WPForms text-input rules key off input[type="text"], so a date input needs
   its own copy of the underline-field styling. */
.wpforms-field input[type="date"].thp-date {
  display: block;
  width: 100%;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
  padding: 8px 0 18px !important;
  margin: 0 !important;
  line-height: 1.6;
  border-radius: 0 !important;
}
.wpforms-field input[type="date"].thp-date:focus-visible {
  outline: 1.5px solid var(--ink) !important;
  outline-offset: 3px;
}
/* Tone the browser's calendar glyph into the stone palette. */
.wpforms-field input[type="date"].thp-date::-webkit-calendar-picker-indicator {
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.2s;
}
.wpforms-field input[type="date"].thp-date:hover::-webkit-calendar-picker-indicator {
  opacity: 0.8;
}

/* Service radio field - match .service-option design exactly */
.wpforms-field-radio .wpforms-field-label {
  font-size: 11px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--label-ink) !important;
  margin-bottom: 16px !important;
}

/* Hide WPForms field description */
.wpforms-field-description {
  display: none !important;
}

/* Success confirmation message styling */
.wpforms-confirmation-container-full {
  text-align: center;
  padding: 80px 0;
}

.wpforms-confirmation-container-full .wpforms-confirmation-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.wpforms-confirmation-container-full .wpforms-confirmation-scroll::before {
  content: "✓";
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 300;
  color: var(--border);
  line-height: 1;
}

.wpforms-confirmation-container-full .wpforms-confirmation-scroll {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  color: var(--ink);
}

/* Submit button - add arrow */
.wpforms-submit::after {
  content: "→";
  margin-left: 8px;
  transition: transform 0.3s;
}

.wpforms-submit:hover::after {
  transform: translateX(6px);
}

/* ——— Prototype-parity pass: WPForms "Modern Markup" overrides ———
   WPForms Modern Markup ships wpforms-full.min.css, which strips the field
   underline and lays radio choices out as a single-column grid. These !important
   rules reassert the prototype look regardless of stylesheet load order. A cleaner
   long-term fix is WPForms → Settings → General → "Include Form Styling: Base only"
   and/or turning off Modern Markup. All rules are scoped to .contact-form so other
   WPForms instances are unaffected. */

/* Field underline — mirrors the prototype's .field-group bottom border.
   Carries the baked "Dark underline" preset (1.5px / #8f897e) — see FORM FIELDS.
   This is the rule that actually wins on the rendered page, so the preset would
   be invisible without it. */
.contact-form .wpforms-field-text,
.contact-form .wpforms-field-name,
.contact-form .wpforms-field-email,
.contact-form .wpforms-field-textarea {
  border-bottom: 1.5px solid #8f897e !important;
}
.contact-form .wpforms-field-text:focus-within,
.contact-form .wpforms-field-name:focus-within,
.contact-form .wpforms-field-email:focus-within,
.contact-form .wpforms-field-textarea:focus-within {
  border-bottom-color: var(--ink) !important;
}

/* Service choices as horizontal pills (override the modern single-column grid) */
.contact-form .wpforms-field-radio ul {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  grid-template-columns: none !important;
}
.contact-form .wpforms-field-radio {
  border-bottom: none !important;
}

/* Surface the service selection first, like the prototype, and let the
   name/email pair share a row (README D4).
   Row + wrap rather than column: every field still stacks (they're all
   flex-basis 100%) except that pair. `order: -1` keeps working — it applies in
   either direction — so the service chips stay above the fields. */
.contact-form .wpforms-field-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 48px;
}
.contact-form .wpforms-field-container > .wpforms-field {
  flex: 0 0 100%;
  min-width: 0;
}
.contact-form .wpforms-field-radio {
  order: -1;
  margin-bottom: 32px !important;
}

/* Name is a plain WPForms *text* field — there is no `.wpforms-field-name`
   class to hook (the old rule here targeted one and silently never matched).
   It's simply the container's first child, with the email field next to it.
   `:first-child` reads DOM order, so the reordered radio above doesn't
   disturb the match. */
.contact-form .wpforms-field-container > .wpforms-field-text:first-child,
.contact-form .wpforms-field-container > .wpforms-field-text:first-child + .wpforms-field-email {
  flex: 0 0 calc(50% - 24px);
}

/* Must follow the rule above: same specificity, so order decides the winner. */
@media (max-width: 960px) {
  .contact-form .wpforms-field-container > .wpforms-field-text:first-child,
  .contact-form .wpforms-field-container > .wpforms-field-text:first-child + .wpforms-field-email {
    flex: 0 0 100%;
  }
}