@layer components {

  /* ---------- request frame (private, contact): the ask on velvet, the form on paper ---------- */
  .request__frame { display: grid; grid-template-columns: .85fr 1.15fr; background: var(--velvet); color: var(--paper); }
  .request__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: clamp(36px, 5vw, 80px) clamp(24px, 4vw, 64px); }
  .request__intro h2 { max-width: 12ch; }
  .request__intro .lead { color: rgba(255, 249, 232, .88); max-width: 40ch; }
  .request__mail { max-width: 40ch; color: rgba(255, 249, 232, .8); }
  .request__mail .link { color: var(--sun); }
  .request__form { margin: 10px; padding: clamp(24px, 3.6vw, 56px); border-radius: calc(var(--radius) - 8px); background: var(--paper); color: var(--ink); }
  @media (max-width: 960px) { .request__frame { grid-template-columns: 1fr; } }

  /* ---------- fields ---------- */
  .form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
  .field { display: grid; gap: 8px; align-content: start; }
  .field--wide, .field[data-field="message"] { grid-column: 1 / -1; }
  .field label { font-weight: 600; font-size: .9375rem; }
  .field__hint { font-weight: 400; font-size: .8125rem; color: var(--ink-soft); }
  .field :is(input, select, textarea) {
    width: 100%; min-height: 52px; padding: 13px 16px; border-radius: 14px;
    border: 1.5px solid rgba(34, 22, 11, .28); background: #FFFDF5; color: var(--ink);
    font: 400 1rem/1.4 var(--text);
    transition: border-color .2s, box-shadow .2s;
  }
  .field textarea { min-height: 140px; resize: vertical; }
  .field select {
    appearance: none; padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322160B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
  }
  .field :is(input, select, textarea):hover { border-color: rgba(34, 22, 11, .5); }
  .field :is(input, select, textarea):focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(239, 169, 23, .55); }
  .field [aria-invalid="true"] { border-color: #A3361C; box-shadow: 0 0 0 3px rgba(163, 54, 28, .14); }
  .field__error { font-size: .875rem; font-weight: 600; color: #A3361C; }
  .field__error:empty { display: none; }
  @media (max-width: 560px) { .form__grid { grid-template-columns: 1fr; } }

  /* the trap field for bots: out of sight, out of the tab order */
  .form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

  .form__note { margin-top: 20px; font-size: .875rem; color: var(--ink-soft); }
  .form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 22px; }
  .form__actions .btn[disabled] { opacity: .6; cursor: progress; }
  .form__status { flex: 1 1 260px; font-weight: 600; font-size: .9375rem; }
  .form__status:empty { display: none; }
  .form__status[data-tone="error"] { color: #A3361C; }
  .form__status[data-tone="success"] { padding: 12px 16px; border-radius: 14px; background: var(--mint); color: var(--ink); }
}
