/* ===========================================================================
   Contact page.

   Every page imported from WordPress ships an Elementor-generated stylesheet
   (post-<id>.css) carrying its background, container spacing and every colour
   decision, keyed off machine-generated ids. A page written by hand has none,
   which is why a generic Elementor container inherits no rhythm at all. This
   file is the hand-written equivalent, expressed through stable class names.

   Nothing here is a new design. Every value is read off the existing site:

   - #EFEAE6 is the kit's sand (--e-global-color-511d709 in post-6.css), the
     background the marketing pages use. A contact page belongs to that family,
     not to the dark family /covara/ and /concerto/ sit in.
   - #232937 is the kit's primary (--e-global-color-primary), which /standorte/
     uses as a section background — so it is the right ink for a form that is
     effectively an extension of the Locations page.
   - The 9px corner radius is the site's only radius: 87 occurrences across the
     generated stylesheets, no other value.
   - Adieu 400 for headings, Work Sans for everything else — the kit's
     typography tokens (post-6.css).

   Everything is scoped under .tc so it cannot leak into the shared header,
   footer or nav overlay.
   =========================================================================== */

body.tesedi-contact-page {
  background-color: #EFEAE6;
}

/* The site header is position:fixed. Without this the heading sits underneath
   it. The header is far taller on a phone than on a desktop, because the nav
   pill wraps, so this cannot be a single value. */
.tc-main {
  padding-top: 140px;
  padding-bottom: 90px;
}
@media (max-width: 767px) {
  .tc-main { padding-top: 190px; padding-bottom: 60px; }
}

.tc {
  --tc-ink: #232937;
  --tc-ink-soft: #595F6E;      /* --e-global-color-0c40272 */
  --tc-sand: #EFEAE6;
  --tc-white: #FFFFFF;
  --tc-peach: #F1AE91;
  --tc-radius: 9px;
  --tc-line: rgba(35, 41, 55, 0.18);
  --tc-error: #A4272B;

  max-width: 720px;
  margin-inline: auto;
}

/* --------------------------------------------------------------- typography */

.tc__title {
  margin: 0 0 14px;
  font-family: "Adieu", Sans-serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.3;
  color: var(--tc-ink);
  /* post-6.css sets hyphens:none on headings, so a long German compound can
     establish a min-content width wider than a phone. Breaking as a last
     resort keeps that promise without letting one word blow out the layout. */
  overflow-wrap: break-word;
}
@media (max-width: 767px) {
  .tc__title { font-size: 30px; }
}

.tc__lead {
  margin: 0 0 36px;
  font-family: "Work Sans", Sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--tc-ink-soft);
}

/* --------------------------------------------------------------------- card */

/* The `hidden` attribute hides an element through `display:none` in the user-
   agent stylesheet, which the `display:flex` below outranks — author styles
   beat UA styles regardless of specificity. Without this rule the filled-in
   form stays on screen underneath the confirmation after a successful send,
   inviting a second submission. The same trap applies to any element that is
   both toggled with `hidden` and given a `display` here. */
.tc__card[hidden] { display: none; }

.tc__card {
  background: var(--tc-white);
  border-radius: var(--tc-radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 767px) {
  .tc__card { padding: 22px; }
}

/* Two columns on a desktop, stacked on a phone. Grid rather than flex so the
   two fields stay equal width regardless of label length. */
.tc__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 600px) {
  .tc__row { grid-template-columns: 1fr; }
}

/* Grid and flex children default to min-width:auto, which lets an unbreakable
   child push a track past the viewport. */
.tc__row > * { min-width: 0; }

/* -------------------------------------------------------------------- field */

.tc__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tc__field label {
  font-family: "Work Sans", Sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--tc-ink);
}

.tc__req { color: var(--tc-error); margin-left: 3px; }

.tc__opt {
  margin-left: 5px;
  font-weight: 400;
  color: var(--tc-ink-soft);
}

.tc__field input,
.tc__field select,
.tc__field textarea {
  font-family: "Work Sans", Sans-serif;
  font-size: 16px;   /* below 16px, iOS Safari zooms the page on focus */
  line-height: 1.4;
  color: var(--tc-ink);
  background: var(--tc-white);
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  padding: 12px 14px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.tc__field textarea { resize: vertical; min-height: 120px; }

/* appearance:none strips the native arrow, so draw one back. Inline SVG as a
   data URI rather than a file: one fewer request, and it cannot 404. */
.tc__field select {
  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='%23232937' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.tc__field input:focus-visible,
.tc__field select:focus-visible,
.tc__field textarea:focus-visible {
  outline: none;
  border-color: var(--tc-ink);
  box-shadow: 0 0 0 3px rgba(35, 41, 55, 0.14);
}

/* Never signal validity by colour alone — the error text alongside carries the
   same information for anyone who cannot distinguish the border. */
.tc__field [aria-invalid="true"] { border-color: var(--tc-error); }

.tc__hint,
.tc__error {
  font-family: "Work Sans", Sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.tc__hint { color: var(--tc-ink-soft); }

.tc__error { color: var(--tc-error); }
.tc__error:empty { display: none; }

/* ------------------------------------------------------------------- submit */

.tc__submit {
  align-self: flex-start;
  font-family: "Work Sans", Sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--tc-white);
  background: var(--tc-ink);
  border: 1px solid var(--tc-ink);
  border-radius: var(--tc-radius);
  padding: 13px 30px;
  cursor: pointer;
  transition: background-color 120ms ease, opacity 120ms ease;
}

.tc__submit:hover:not(:disabled) { background: #11151D; }

.tc__submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(35, 41, 55, 0.3);
}

.tc__submit:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 600px) {
  .tc__submit { align-self: stretch; text-align: center; }
}

/* ------------------------------------------------------------ status / done */

.tc__status {
  margin: 0;
  font-family: "Work Sans", Sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.tc__status[data-state="error"] { color: var(--tc-error); }

.tc__done {
  background: var(--tc-white);
  border-radius: var(--tc-radius);
  border-left: 4px solid var(--tc-peach);
  padding: 32px;
}

.tc__done h2 {
  margin: 0 0 10px;
  font-family: "Adieu", Sans-serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.3;
  color: var(--tc-ink);
}

.tc__done p {
  margin: 0;
  font-family: "Work Sans", Sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--tc-ink-soft);
}

/* The site honours Reduce Motion everywhere else; the only motion here is the
   scroll to the confirmation, handled in contact-form.js. */
