/* Clark Renders — Enquire (enquire.html). Built on showcase.css, work.css and project.css.
   One screen, like every page: the introduction and email on the left, one simple form on the right.
   On phones the introduction comes first, then the form ("Or fill in the form", or a swipe). */

/* laid out exactly like Services and About: the same two columns, the introduction in the same place and
   size, text starting at the same indent (--fs-intro / --nw are shared, in showcase.css) */
.e-stage {
  position: relative; flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); column-gap: 6vw;
  align-items: stretch;
  margin: 0 var(--pad); padding: 0 0 clamp(12px, 3vh, 36px);
}

/* ---------- left: the introduction and the direct email ---------- */
.e-intro { display: flex; flex-direction: column; min-height: 0; }
.e-lead {
  margin: clamp(0px, 1vh, 12px) 0 0; padding-left: var(--nw); max-width: calc(40em + var(--nw));
  font-size: var(--fs-intro); line-height: 1.45; font-weight: 500; text-transform: none; font-stretch: 100%;
}
/* the email sits in the middle of the space below, level with the form */
.e-mail { margin: auto 0; padding-left: var(--nw); max-width: calc(30em + var(--nw)); }
.e-mail-link {
  display: inline-block; margin-top: 0.7em;
  font-size: var(--fs-state); line-height: 1; letter-spacing: -0.005em; text-transform: none;
  border-bottom: 2px solid currentColor; padding-bottom: 2px;
}
.e-insta { display: block; margin-top: 1.2em; width: max-content; }
@media (hover: hover) and (pointer: fine) { .e-insta:hover { color: var(--ink); } }
.e-start { display: none; align-self: flex-start; }

/* ---------- right: the form, all on one screen ---------- */
.e-form { display: grid; gap: clamp(18px, 3.2vh, 34px); width: 100%; max-width: 44em; justify-self: stretch; align-self: center; }

.e-row { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }
.e-row.two { grid-template-columns: 1fr 1fr; column-gap: 28px; }
.e-row > label, .e-row.two label { display: grid; gap: 7px; }
.e-row i { font-style: normal; opacity: 0.75; }
.e-form input:not([type="checkbox"]), .e-form textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent;
  color: var(--ink); padding: 6px 0 8px;
  font: 500 clamp(15px, 1.15vw, 18px)/1.4 var(--sans); text-transform: none; font-stretch: 100%;
  transition: border-color 200ms ease;
}
.e-form textarea { resize: none; height: clamp(5.5em, 16vh, 8em); }
.e-form input::placeholder, .e-form textarea::placeholder { color: var(--soft); opacity: 0.6; }
.e-form input:focus, .e-form textarea:focus { outline: none; border-bottom-color: var(--ink); }
.e-form .bad { border-bottom-color: #b5482f !important; }
/* the spam trap stays out of sight */
.e-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.e-end { display: grid; justify-items: start; gap: 10px; padding-top: 4px; }
.e-send-btn {
  display: inline-flex; align-items: center; gap: 0.7em; padding: 0 0 2px;
  font-size: var(--fs-state); line-height: 1; border-bottom: 2px solid currentColor;
}
.e-send-btn[disabled] { opacity: 0.5; cursor: wait; }
.e-send-btn .arr { transition: transform 350ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .e-send-btn:hover .arr { transform: translateX(4px); } }

.e-msg:empty { display: none; }
/* messages sit just below the form without moving anything */
.e-form { position: relative; }
.e-msg { position: absolute; left: 0; right: 0; top: calc(100% + 14px); margin: 0; padding: 10px 12px; border: 1px solid var(--line); background: var(--paper); }
.e-msg.ok { border-color: var(--ink); }
.e-msg.err { border-color: #b5482f; }

/* ---------- phones: the introduction first, then the form ---------- */
@media (max-width: 900px) {
  .e-stage { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; padding: 0 0 12px; }
  .e-intro, .e-form { grid-area: 1 / 1; transition: opacity 450ms ease, visibility 0s 450ms; }
  .e-stage[data-at="intro"] .e-form, .e-stage[data-at="form"] .e-intro { opacity: 0; visibility: hidden; }
  .e-stage[data-at="intro"] .e-intro, .e-stage[data-at="form"] .e-form { transition: opacity 450ms ease 120ms, visibility 0s; }
  .e-lead { margin-top: 0; padding-left: 0; }
  .e-mail { margin: 28px 0 0; padding-left: 0; }
  .e-form { align-self: start; }
  .e-mail-link { font-size: 21px; }
  .e-start {
    display: inline-flex; align-items: center; gap: 0.7em; margin-top: 30px;
    font-size: 17px; border-bottom: 2px solid currentColor; padding-bottom: 2px;
  }
  .e-form { justify-self: stretch; gap: 20px; }
  .e-row.two { grid-template-columns: 1fr; row-gap: 16px; }
  .e-send-btn { font-size: 21px; }
}
.e-hint a { border-bottom: 1px solid currentColor; }
