/* ==========================================================================
   Page tail: the contact section and the footer beneath it
   Together because they are the bottom of every long page and are always
   rendered as a pair.
   ========================================================================== */

/* ==========================================================================
   Contact
   ========================================================================== */

.contact__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (min-width: 58rem) {
  .contact__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}

.contact__lead {
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.875rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* Flash messages -------------------------------------------------------- */

.notes { display: grid; gap: 0.5rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-left-width: 2px;
  background: var(--paper-raised);
  animation: note-in 0.45s var(--ease);
}
@keyframes note-in {
  from { opacity: 0; transform: translateY(-0.4rem); }
  to   { opacity: 1; transform: none; }
}
.note--success { border-left-color: #2f9e5f; }
.note--error   { border-left-color: #c0392b; }
.note--info    { border-left-color: var(--accent); }
.note__text { flex: 1; font-size: 0.9375rem; line-height: 1.55; }
.note__x {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--ink-faint);
}

/* Form ------------------------------------------------------------------ */

.form { display: grid; gap: clamp(1.25rem, 3vw, 1.75rem); }

.field { display: grid; gap: 0.5rem; }
.field__label { color: var(--ink-faint); }
.field__label span { color: var(--accent); }

.field__input {
  width: 100%;
  padding: 0.85rem 0;
  font-family: inherit;
  font-size: var(--t-body);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  transition: border-color 0.35s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field__input::placeholder { color: var(--ink-faint); }
.field__input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.field__input:focus-visible { outline: none; }
.field__input--area { resize: vertical; min-height: 8rem; line-height: 1.6; }

.form__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}
.form__req { color: var(--ink-faint); }

[data-submit][disabled] { opacity: 0.55; cursor: progress; }
[data-submit][data-state="sending"] svg { animation: nudge-x 0.9s var(--ease-in-out) infinite; }
@keyframes nudge-x {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(3px); }
}

/* Direct channels ------------------------------------------------------- */

.direct__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: clamp(0.7rem, 1.6vw, 0.95rem);
  border-bottom: 1px solid var(--rule);
}
.direct__row:first-child { border-top: 1px solid var(--rule); }
.direct__label { color: var(--ink-faint); flex: none; }

.direct__value {
  position: relative;
  text-align: right;
  font-size: 0.9375rem;
  text-decoration: none;
  word-break: break-word;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
@media (hover: hover) {
  .direct__value:hover { color: var(--accent); border-bottom-color: currentColor; }
}
.direct__value:focus-visible { color: var(--accent); }

.contact__status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  line-height: 1.5;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.75rem 2.5rem;
}

.foot__mark {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}
.foot__line {
  margin-top: 0.5rem;
  color: var(--ink-faint);
  font-size: 0.875rem;
}

.foot__socials { display: flex; flex-wrap: wrap; gap: clamp(1rem, 3vw, 1.75rem); }
.foot__socials a { min-height: 2.75rem; display: inline-flex; align-items: center; }

.foot__legal {
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  width: 100%;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* Narrow phones: label-above-value reads better than a squeezed two-column
   row, especially for the long LinkedIn URL. */
@media (max-width: 30rem) {
  .direct__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .direct__value { text-align: left; }
}
