/* contact: one blue field. The form tile leads, the inbox and the socials stack beside it. */

/* the bar sits over the first section, so it clears the strip and the bar */
.s-contact { padding-top: clamp(150px, 13vw, 210px); }
#h-contact { font-size: clamp(72px, 10vw, 168px); line-height: .82; }

.contact { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.c-form { grid-row: 1 / 3; gap: 0; }
.t-head { font: 900 clamp(32px, 2.8vw, 48px)/.9 var(--disp); text-transform: uppercase; }

/* fields */
.cform .t-head, .sent .t-head { margin-bottom: clamp(22px, 2vw, 30px); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px var(--gap); }
.f { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.f-wide { grid-column: 1 / -1; }
.f label { font-weight: 700; font-size: 15px; line-height: 1.2; }
.opt { font-weight: 500; margin-left: 6px; }
.req { margin-left: 3px; }
.f input, .f select, .f textarea {
  width: 100%; min-height: 54px; padding: 14px 16px; border: 0; border-radius: 6px;
  font: 500 17px/1.4 var(--text); color: var(--navy); background: var(--white);
  box-shadow: inset 0 0 0 2px rgba(11,26,51,.55);
  transition: box-shadow .2s;
}
.f textarea { min-height: 168px; resize: vertical; }
.f select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 48px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9 L12 16 L19 9' fill='none' stroke='%230b1a33' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 20px no-repeat; }
.f input:hover, .f select:hover, .f textarea:hover { box-shadow: inset 0 0 0 2px var(--navy); }
.f input:focus, .f select:focus, .f textarea:focus { outline: 3px solid var(--orange); outline-offset: 3px; box-shadow: inset 0 0 0 2px var(--navy); }
.f [aria-invalid="true"] { box-shadow: inset 0 0 0 3px var(--navy); }
.err { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; line-height: 1.3; }
.err[hidden] { display: none; }
.err::before { content: "!"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--orange); color: var(--navy); font: 900 14px/1 var(--text); }

/* bots fill this in, people never see it */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: inset(50%); white-space: nowrap; }

.send { margin-top: 26px; }
button.btn { border: 0; cursor: pointer; }

/* sent: the form's place, the same tile */
.sent { display: flex; flex-direction: column; align-items: flex-start; height: 100%; justify-content: flex-end; }
.sent[hidden] { display: none; }
.sent .t-head { font-size: clamp(72px, 8vw, 140px); line-height: .82; }
.sent p { font-size: clamp(18px, 1.35vw, 22px); line-height: 1.4; font-weight: 500; max-width: 34ch; margin-bottom: 26px; overflow-wrap: anywhere; }
.sent .t-head:focus { outline: none; }
.js .sent:not([hidden]) { animation: sent-in .6s var(--ease) both; }
@keyframes sent-in { from { opacity: 0; transform: translateY(16px); } }

/* side tiles: text pinned to the bottom */
.c-mail, .c-social { justify-content: flex-end; }
.c-mail p { font-size: 17px; }
.mail { font-weight: 700; font-size: clamp(20px, 1.7vw, 27px); line-height: 1.2; color: var(--paper); overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 6px; transition: color .2s; }
.mail:hover { color: var(--orange); }

.social { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.social a { display: inline-flex; align-items: center; gap: 10px; font: 800 clamp(26px, 2.1vw, 34px)/1.1 var(--disp); text-transform: uppercase; text-decoration: none; }
.social svg { width: .62em; height: .62em; overflow: visible; transition: transform .45s var(--slap); }
.social path { fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.social a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.social a:hover svg { transform: translate(3px, -3px); }

@media (max-width: 1100px) {
  .contact { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .c-form { grid-row: auto; grid-column: 1 / -1; }
  .c-mail, .c-social { min-height: 220px; }
}

@media (max-width: 760px) {
  .s-contact { padding-top: 124px; }
  .contact { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; gap: 18px; }
  /* 16px or more, so iOS never zooms into a field */
  .f input, .f select, .f textarea { font-size: 17px; }
  .c-mail, .c-social { min-height: 0; }
  .send .btn { width: 100%; }
}

/* the line draws an envelope in the inbox tile, then it fills in */
.c-mail { min-height: 340px; }
.env { left: 0; width: 100%; top: 6%; height: 52%; }
.env-art { opacity: 0; transition: opacity .7s var(--ease); }
.env-ink { fill: none; stroke: var(--paper); stroke-width: 3; stroke-linejoin: round; }
.c-mail.drawn .env-art { opacity: 1; }
@media (max-width: 760px) { .c-mail { min-height: 330px; } }

/* the form fills its tile: any spare height goes to the message box, never to empty paper */
.cform { flex: 1; display: flex; flex-direction: column; }
.cform[hidden] { display: none; }
.fields { flex: 1; grid-template-rows: auto auto auto 1fr; }
.f-msg textarea { flex: 1; }
@media (max-width: 1100px) { .fields { grid-template-rows: none; } }
