/* ==========================================================================
   /anfrage/ – Projekt anfragen (page styles, loaded after site.css)
   1 Hero   2 Composer (form card)   3 Aside   4 Example stage   5 Responsive
   From site.css: .form/.field/.input…, .field-error + .status-t (built by
   site.js), .num-pill (step numbers), .card-dark + .next-steps (aside),
   the .example-stage glow preset.
   Only the breakpoints from site.css §13 are used.
   ========================================================================== */

/* 1 · Hero ----------------------------------------------------------------- */
.inquiry-hero-grid { display: grid; gap: 1.5rem; }
.inquiry-assurance { gap: .5rem 1.5rem; }

/* 2 · Composer: the form as a message to one person ------------------------ */
.inquiry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.2vw, 3rem);
  align-items: start;
}
.composer {
  position: relative; overflow: clip;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
/* thin brand line on top of the card (decoration only, no text on it) */
.composer::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad-brand); }
.composer-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px;
  padding: 22px 28px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.composer-head .avatar { grid-row: auto; width: 46px; height: 46px; font-size: 15px; }
.composer-title { font-size: 1.1875rem; font-weight: 620; letter-spacing: -.018em; line-height: 1.25; }
.composer-to p { font-size: var(--fs-sm); color: var(--fg-3); }
.composer-secure {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .65rem; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 550; line-height: 1.4; white-space: nowrap;   /* sans, like .badge */
  color: var(--ok); background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--ok-line);
}
.composer-secure .i { width: 13px; height: 13px; stroke-width: 1.9; }

.composer-form { gap: 0; padding: 28px 28px 26px; }
.form-group { display: grid; gap: 1.15rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.form-group + .form-group { margin-top: 1.9rem; padding-top: 1.75rem; border-top: 1px dashed var(--line-2); }
.form-legend {
  display: flex; align-items: center; gap: .7rem;
  float: left; width: 100%; margin: 0 0 .1rem; padding: 0;   /* float: legend joins the grid flow */
  font-size: 1.0625rem; font-weight: 620; letter-spacing: -.012em; color: var(--fg);
}
.composer .field { align-content: start; }
.composer .textarea { min-height: 188px; line-height: 1.55; }
.field-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem 1.25rem; }
.field-count { flex: none; padding-top: .1rem; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.field-count.is-near { color: var(--warn); }
.composer-example {
  display: inline-flex; align-items: center; gap: .45rem; justify-self: start;
  min-height: 44px; margin-top: -.35rem;
  font-size: var(--fs-sm); font-weight: 550; color: var(--accent-text);
  text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 4px;
}
.composer-example .i { width: 17px; height: 17px; }
.composer-example:hover { text-decoration-color: currentColor; }

/* Inline field errors: site.css .field-error (inserted by site.js) */
/* Stronger keyboard focus in the form: effectively 2px border + a visible halo */
.composer :is(.input, .select, .textarea):focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus), 0 0 0 4px rgba(45, 75, 220, .35); }
.composer [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.composer [aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger), 0 0 0 4px rgba(180, 35, 24, .4); }

/* Status (success / error) – site.css gives colours and .status-t; here: the icon */
.composer .form-status::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: .12em;
  background: currentColor;
  -webkit-mask: var(--mask-alert) center / contain no-repeat;
  mask: var(--mask-alert) center / contain no-repeat;
}
.composer .form-status { margin-top: 1.75rem; }
.composer .form-status.success, .composer .form-status.error { align-items: flex-start; gap: .7rem; padding: 14px 16px; line-height: 1.5; }
.composer .form-status:focus { outline: none; }
.composer .form-status:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.composer .form-status.success::before {
  width: 20px; height: 20px; margin-top: .05em;
  -webkit-mask-image: var(--mask-ok);
  mask-image: var(--mask-ok);
}
.composer .form-status.error::before { width: 20px; height: 20px; margin-top: .05em; }

.composer .form-actions { margin-top: 1.75rem; flex-wrap: nowrap; }
.composer-submit { flex: none; min-width: 210px; }
.composer-submit[aria-busy="true"] .i { opacity: .5; }
.composer .form-note { max-width: 46ch; line-height: 1.5; }
.form-legal { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); }

/* 3 · Aside: next steps + direct contact ------------------------------------ */
.inquiry-aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 14px; }
.aside-h { font-size: 1.0625rem; font-weight: 620; letter-spacing: -.012em; line-height: 1.3; color: var(--fg); }

/* "So geht es weiter": a site.css .card-dark.theme-dark with .next-steps */
.next-card { padding: 26px 26px 22px; border-radius: var(--r-lg); }

.contact-card { padding: 4px 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.contact-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 20px 0; }
.contact-item + .contact-item { border-top: 1px solid var(--line); }
.contact-item p { margin-top: .2rem; font-size: var(--fs-sm); line-height: 1.55; color: var(--fg-2); }
.contact-item .aside-h { margin-top: .4rem; }
.contact-mail {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 500; color: var(--accent-text);
  text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.contact-mail:hover { text-decoration-color: currentColor; }
.contact-item .contact-mail + p { margin-top: 0; }

/* 4 · Example stage: a short request, annotated ------------------------------ */
.example-stage { scroll-margin-top: calc(var(--header-h) + 16px); }
.example-grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.example-copy .lead { margin-top: 1.1rem; }
.example-keys { list-style: none; display: grid; gap: 10px; margin-top: 2rem; }
.example-keys li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-card); }
.ek-num, .msg-mark b {
  display: inline-grid; place-items: center; flex: none;
  border-radius: 50%; font-family: var(--font-mono); font-weight: 600; line-height: 1;
  color: #fff; background: var(--grad-brand-strong);
}
.ek-num { width: 28px; height: 28px; font-size: 13px; }
.ek-t { font-size: var(--fs-sm); line-height: 1.5; color: var(--fg-2); }
.ek-t strong { display: block; margin-bottom: .1rem; font-size: var(--fs-md); font-weight: 600; color: var(--fg); }
.example-back { margin-top: 1.25rem; }

.example-visual { position: relative; display: grid; justify-items: start; width: 100%; max-width: 560px; margin-inline: auto; }
.msg { width: 100%; font-size: 14px; }
.msg-bar-t { font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.msg-meta { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 9px 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.msg-k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.msg-v { min-width: 0; font-weight: 550; color: var(--fg); }
.msg-v small { margin-left: .5rem; font-family: var(--font-mono); font-size: 11.5px; font-weight: 400; color: var(--fg-3); }
.msg-body { padding: 18px 20px 8px; font-size: 15px; line-height: 1.75; color: var(--fg); }
.msg-mark {
  padding: 2px 4px; border-radius: 5px;
  background: var(--accent-soft);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.msg-mark b { width: 18px; height: 18px; margin-right: 6px; font-size: 11px; vertical-align: 1px; }
.msg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px 18px; }
.msg-foot > span:not(.msg-send) { padding: 2px 9px; border-radius: 999px; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.msg-send { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin-left: auto; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--grad-brand-strong); }
.msg-send .i { width: 13px; height: 13px; }
.msg-wire { position: relative; display: block; width: 2px; height: 34px; margin-left: 42px; overflow: hidden; background: linear-gradient(180deg, var(--line-2), var(--accent-line)); }
.msg-wire i { position: absolute; left: -2px; top: 0; width: 6px; height: 10px; border-radius: 3px; background: var(--brand-cyan); opacity: 0; }
.reply-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: min(100% - 22px, 390px); margin-left: 22px; padding: 12px 14px; }
.reply-t { font-size: 14px; font-weight: 550; line-height: 1.35; }
.reply-t small { display: block; margin-bottom: 2px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.reply-state { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.reply-state .i { width: 16px; height: 16px; }

@keyframes anf-drop { 0% { transform: translateY(-10px); opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(34px); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .msg-wire i { animation: anf-drop 2.4s cubic-bezier(.55, 0, .45, 1) infinite; }
}

/* FAQ: no single-word last line next to the +/- button */
.accordion-item summary > span:first-child { text-wrap: pretty; }

/* 5 · Responsive ------------------------------------------------------------- */
@media (min-width: 1100px) {
  .inquiry-hero-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 4rem; }
  .inquiry-assurance { flex-direction: column; gap: .7rem; padding: 4px 0 6px 1.5rem; border-left: 1px solid var(--line-2); }
  .example-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
}

@media (max-width: 1099.98px) {
  /* Narrower form column: the encryption note moves under the recipient */
  .composer-head { grid-template-columns: auto minmax(0, 1fr); }
  .composer-head .avatar { grid-row: span 2; }
  .composer-secure { grid-column: 2; justify-self: start; margin-top: .35rem; }
}
@media (min-width: 760.02px) and (max-width: 1099.98px) {
  .example-copy .lead { max-width: 680px; }
  .example-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .example-keys li { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1020px) {
  .inquiry-grid { grid-template-columns: minmax(0, 1fr); }
  .inquiry-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 760px) {
  .inquiry-assurance { gap: .45rem 1.1rem; }
  .inquiry-aside { grid-template-columns: minmax(0, 1fr); }
  .composer-head { padding: 18px 18px 16px; }
  .composer-head .avatar { width: 42px; height: 42px; font-size: 14px; }
  .composer-form { padding: 22px 18px 20px; }
  .composer .textarea { min-height: 168px; }
  .field-foot { flex-direction: column; gap: .3rem; }
  .field-count { align-self: flex-end; padding-top: 0; }
  .composer .form-actions { flex-direction: column; align-items: stretch; gap: .9rem; }
  .composer-submit { width: 100%; min-width: 0; }
  .next-card { padding: 22px 20px 18px; }
  .contact-card { padding: 2px 20px; }
  /* Example: annotation list stays, the sender line of the mock goes */
  .example-keys li { padding: 12px 14px; }
  .msg-meta .is-optional { display: none; }
  .msg-body { font-size: 14px; padding: 16px 16px 6px; }
  .msg-meta { padding: 12px 16px; }
  .msg-foot { padding: 10px 16px 16px; }
  .reply-card { width: min(100% - 10px, 390px); margin-left: 10px; }
  .msg-wire { margin-left: 30px; }
}

@media (max-width: 520px) {
  .msg-foot .msg-extra { display: none; }
}
