/* ==========================================================================
   Contact page — Figma 69:2449 "Page — Contact (Dark)"
   ========================================================================== */

:root { --err: #ff8a73; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------------------------------- */
/* Header (69:2451)                                                            */
/* -------------------------------------------------------------------------- */
.ct-head { padding: calc(56 * var(--px)) calc(40 * var(--px)) 0; }
.ct-head__micro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: calc(18 * var(--px));
  color: var(--paper);
}
.ct-head__dim { color: var(--paper-60); }
.ct-head__title {
  display: flex;
  align-items: center;
  border-block: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.ct-head__title h1 {
  font-size: calc(190 * var(--px));
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--lime);
  white-space: nowrap;
}
.ct-head__sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(22 * var(--px)) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.ct-head__lede {
  font-size: calc(32 * var(--px));
  line-height: normal;
  letter-spacing: -0.03em;
  color: var(--paper);
}
.ct-avail {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--px));
  font-size: calc(14 * var(--px));
  font-weight: 500;
  line-height: normal;
  color: var(--paper);
  white-space: nowrap;
}
.ct-avail__dot {
  width: calc(8 * var(--px));
  height: calc(8 * var(--px));
  border-radius: 50%;
  animation: ct-pulse 2.4s ease-out infinite;
}
@keyframes ct-pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 219, 133, 0.55); }
  70%, 100% { box-shadow: 0 0 0 calc(8 * var(--px)) rgba(61, 219, 133, 0); }
}

/* -------------------------------------------------------------------------- */
/* Form section (69:2464)                                                      */
/* -------------------------------------------------------------------------- */
.ct-form { padding: calc(72 * var(--px)) calc(40 * var(--px)) calc(150 * var(--px)); }
.ct-form__row {
  display: flex;
  align-items: flex-start;
  padding-top: calc(24 * var(--px));
}
.ct-form__side { width: calc(440 * var(--px)); flex: none; }

/* Person card (69:2467) */
.person {
  display: inline-flex;
  align-items: flex-start;
  gap: calc(20 * var(--px));
  padding: calc(10 * var(--px)) calc(28 * var(--px)) calc(10 * var(--px)) calc(10 * var(--px));
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(20 * var(--px));
}
.person__media {
  width: calc(140 * var(--px));
  height: calc(140 * var(--px));
  flex: none;
  border-radius: calc(14 * var(--px));
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}
.person__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  scale: 1.04; /* pre-inverted image; crops a light 1px edge */
  transition: transform 0.9s var(--ease-out);
}
.person:hover .person__media img { transform: scale(1.06); }
.person__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(6 * var(--px));
  padding-top: calc(16 * var(--px));
}
.person__role {
  font-size: calc(12 * var(--px));
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper-50);
  white-space: nowrap;
}
.person__name {
  font-size: calc(22 * var(--px));
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: normal;
  color: var(--paper);
}
.person__talk { margin-top: calc(26 * var(--px)); }

/* Lime "plus" circle + uppercase label (69:2472 / 69:2503) */
.plus-link {
  display: inline-flex;
  align-items: center;
  gap: calc(14 * var(--px));
  font-size: calc(12 * var(--px));
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: normal;
  color: var(--paper);
  white-space: nowrap;
}
.plus-link__btn {
  width: calc(40 * var(--px));
  height: calc(40 * var(--px));
  border-radius: 999px;
  background: var(--lime);
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.5s var(--ease-out), background-color 0.3s;
}
.plus-link__btn img {
  width: calc(14 * var(--px));
  height: calc(14 * var(--px));
  transition: transform 0.5s var(--ease-out);
}
.plus-link__label { transition: color 0.25s, transform 0.4s var(--ease-out); }
.plus-link:hover .plus-link__btn { transform: scale(1.08); background: var(--paper); }
.plus-link:hover .plus-link__btn img { transform: rotate(90deg); }
.plus-link:hover .plus-link__label { color: var(--lime); transform: translateX(calc(3 * var(--px))); }

/* Form card (69:2477) */
.form-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: calc(48 * var(--px));
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(24 * var(--px));
  overflow: hidden;
}
.js .form-card {
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out), height 0.6s var(--ease-out);
}
.cform {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(36 * var(--px));
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out), filter 0.4s var(--ease-out);
}
.cform__grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(36 * var(--px)) calc(24 * var(--px));
}

/* Field */
.field {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: calc(6 * var(--px));
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.3s;
}
.field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease-out), background-color 0.3s;
}
.field:focus-within::after { transform: scaleX(1); }
.field:hover { border-bottom-color: rgba(255, 255, 255, 0.4); }

.field__label {
  flex: none;
  display: flex;
  gap: calc(6 * var(--px));
  padding-bottom: calc(20 * var(--px));
  font-size: calc(12 * var(--px));
  font-weight: 500;
  line-height: calc(16 * var(--px));
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper-50);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s;
}
.field__req { color: var(--paper); letter-spacing: 0; }
.field:focus-within .field__label { color: var(--paper-70); }

.field__input {
  flex: 1 1 auto;
  min-width: 0;
  height: calc(36 * var(--px));
  padding: 0 0 calc(20 * var(--px));
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font-size: calc(14 * var(--px));
  line-height: calc(16 * var(--px));
  caret-color: var(--lime);
}
.field__input:focus,
.field__input:focus-visible { outline: none; }
.field__input::placeholder { color: var(--paper-30); }
/* Chrome autofill on dark */
.field__input:-webkit-autofill {
  -webkit-text-fill-color: var(--paper);
  -webkit-box-shadow: 0 0 0 1000px var(--card) inset;
  transition: background-color 9999s;
}

/* Selects */
.field__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: calc(24 * var(--px));
  font-size: calc(12 * var(--px));
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.field__select option {
  background: var(--card-2);
  color: var(--paper);
  text-transform: none;
}
.field__chev {
  position: absolute;
  right: 0;
  top: calc(1 * var(--px));
  width: calc(14 * var(--px));
  height: calc(14 * var(--px));
  pointer-events: none;
  transition: transform 0.4s var(--ease-out);
}
.field--select.is-open .field__chev { transform: rotate(180deg); }
/* no-JS fallback: native select */
.field--select select:focus + .field__chev { transform: rotate(180deg); }

/* Custom dropdown (built by js/contact.js from the native select) */
.dd { flex: 1 1 auto; min-width: 0; display: flex; }
.dd__btn {
  width: 100%;
  display: block;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field.is-open { z-index: 20; }
.dd__list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  max-height: min(320px, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  list-style: none;
  background: var(--card-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: 50% 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out, transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
}
.field.dd-up .dd__list {
  top: auto;
  bottom: calc(100% + 10px);
  transform: translateY(8px) scale(0.98);
  transform-origin: 50% 100%;
}
.field.is-open .dd__list {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.22s ease-out, transform 0.4s var(--ease-out), visibility 0s;
}
.dd__list:focus,
.dd__list:focus-visible { outline: none; }
.dd__opt {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: max(13px, calc(14 * var(--px)));
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--paper);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.18s, color 0.18s, box-shadow 0.18s;
}
.dd__opt + .dd__opt { margin-top: 2px; }
.dd__opt--none { color: var(--paper-55); }
.dd__opt.is-active { background: rgba(255, 255, 255, 0.08); color: var(--paper); }
.dd__opt[aria-selected="true"] { background: var(--lime); color: var(--ink); font-weight: 500; }
.dd__opt[aria-selected="true"].is-active { box-shadow: inset 0 0 0 2px rgba(14, 14, 14, 0.28); }
/* check mark on the selected option */
.dd__opt[aria-selected="true"]::after {
  content: "";
  flex: none;
  width: 10px;
  height: 5px;
  margin: 0 2px 3px 0;
  border-left: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg);
}
.field.is-open .dd__opt { animation: dd-opt-in 0.35s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 0.025s + 0.04s); }
@keyframes dd-opt-in {
  from { opacity: 0; transform: translateY(-4px); }
}

/* the card clips only for the sent state, so the open dropdown can overhang it */
.form-card:not(.is-sent) { overflow: visible; }

/* Message (69:2500) */
.field--message {
  grid-column: 1 / -1;
  flex-direction: column;
  gap: 0;
}
.field--message .field__label { padding-bottom: 0; }
.field__textarea {
  width: 100%;
  height: calc(150 * var(--px));
  min-height: calc(150 * var(--px));
  padding: calc(14 * var(--px)) 0 calc(16 * var(--px));
  resize: vertical;
  font-size: calc(16 * var(--px));
  line-height: 1.5;
}

/* Error state */
.field__err {
  position: absolute;
  left: 0;
  top: calc(100% + 7 * var(--px));
  font-size: calc(12 * var(--px));
  line-height: normal;
  color: var(--err);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out);
  pointer-events: none;
}
.field.is-invalid { border-bottom-color: var(--err); }
.field.is-invalid::after { background: var(--err); }
.field.is-invalid .field__label { color: var(--err); }
.field.is-invalid .field__err { opacity: 1; transform: none; }
.field.is-shake { animation: ct-shake 0.42s var(--ease-out); }
@keyframes ct-shake {
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* Submit */
.cform__send { cursor: pointer; }

/* Sent state */
.form-card.is-sent .cform {
  opacity: 0;
  transform: translateY(calc(-16 * var(--px)));
  filter: blur(6px);
  pointer-events: none;
}
.cform-done {
  position: absolute;
  inset: 0;
  padding: calc(48 * var(--px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: calc(16 * var(--px));
  opacity: 0;
  transform: translateY(calc(20 * var(--px)));
  transition: opacity 0.6s var(--ease-out) 0.2s, transform 0.7s var(--ease-out) 0.2s;
}
.cform-done[hidden] { display: none; }
.form-card.is-sent .cform-done { opacity: 1; transform: none; }
.cform-done__mark {
  width: calc(56 * var(--px));
  height: calc(56 * var(--px));
  border-radius: 999px;
  border: 1px solid rgba(214, 242, 75, 0.5);
  display: grid;
  place-items: center;
  margin-bottom: calc(8 * var(--px));
}
.cform-done__mark img { width: calc(20 * var(--px)); height: calc(20 * var(--px)); }
.cform-done__title {
  font-size: calc(40 * var(--px));
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--paper);
  max-width: calc(640 * var(--px));
}
.cform-done__title:focus { outline: none; }
.cform-done__text {
  max-width: calc(560 * var(--px));
  font-size: calc(16 * var(--px));
  line-height: 1.55;
  color: var(--paper-60);
}
.cform-done__text a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--paper-40); }
.cform-done__text a:hover { color: var(--lime); }
.cform-done__again { margin-top: calc(20 * var(--px)); }

/* -------------------------------------------------------------------------- */
/* Direct (69:2508)                                                            */
/* -------------------------------------------------------------------------- */
.ct-direct { padding: calc(40 * var(--px)) calc(40 * var(--px)) calc(150 * var(--px)); }
.ct-direct__label {
  border-bottom-color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.04em;
}
.ct-direct__label > :last-child { color: var(--paper-50); }
.ct-direct__h { font: inherit; letter-spacing: inherit; }

.ct-direct__list {
  list-style: none;
  display: flex;
}
.ct-direct__list li {
  flex: 1 1 0;
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.ct-direct__list li + li {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: calc(24 * var(--px));
}
.direct {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--px));
  padding: calc(28 * var(--px)) 0;
}
.direct__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: calc(24 * var(--px));
}
.direct__k {
  font-size: calc(12 * var(--px));
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper-50);
  transition: color 0.3s;
}
.direct__arrow {
  width: calc(14 * var(--px));
  height: calc(14 * var(--px));
  transition: transform 0.45s var(--ease-out);
}
.direct__v {
  font-size: calc(22 * var(--px));
  line-height: normal;
  letter-spacing: -0.02em;
  color: var(--paper);
  white-space: nowrap;
  transition: color 0.3s, transform 0.45s var(--ease-out);
}
.direct:hover .direct__v { color: var(--lime); transform: translateX(calc(4 * var(--px))); }
.direct:hover .direct__k { color: var(--paper); }
.direct:hover .direct__arrow { transform: translate(3px, -3px) rotate(45deg); }

/* -------------------------------------------------------------------------- */
/* Mobile + tablet base (<1200) — Figma 115:2158 "Contact · Mobile 390"        */
/* -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  /* Header (115:2160) */
  .ct-head { padding: 25px 20px 0; }
  .ct-head__micro { font-size: 12px; padding-bottom: 18px; gap: 16px; }
  .ct-head__dim { text-align: right; }
  .ct-head__title { padding: 0; }
  .ct-head__title h1 { font-size: min(18.97vw, 120px); white-space: normal; width: min-content; } /* 74px @390, always two lines */
  .ct-head__sub { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px 0; }
  .ct-head__lede { font-size: 20px; }
  .ct-avail { font-size: 14px; gap: 8px; }
  .ct-avail__dot { width: 8px; height: 8px; }

  /* Form (115:2171) */
  .ct-form { padding: 32px 20px 68px; }
  .ct-form__row { flex-direction: column; gap: 16px; padding-top: 24px; }
  .ct-form__side { width: 100%; }
  .person {
    display: flex;
    gap: 20px;
    padding: 10px 20px 10px 10px;
    border-radius: 20px;
  }
  .person__media { width: 140px; height: 140px; border-radius: 14px; }
  .person__info { flex: 1 1 0; min-width: 0; gap: 6px; padding-top: 16px; }
  .person__role { font-size: 12px; }
  .person__name { font-size: 17px; }
  .person__talk { margin-top: 26px; }

  .plus-link { gap: 14px; font-size: 12px; }
  .plus-link__btn { width: 40px; height: 40px; }
  .plus-link__btn img { width: 14px; height: 14px; }

  .form-card { flex: none; width: 100%; padding: 22px 20px; border-radius: 24px; }
  .cform { gap: 18px; }
  .cform__grid { grid-template-columns: 1fr; gap: 24px; }
  .field { gap: 6px; }
  .field__label { font-size: 12px; line-height: 16px; padding-bottom: 20px; gap: 6px; }
  .field__input { height: 36px; padding-bottom: 20px; font-size: 16px; line-height: 16px; }
  .field__select { font-size: 12px; line-height: 16px; padding-right: 24px; letter-spacing: 0.02em; text-transform: uppercase; }
  .field__chev { width: 14px; height: 14px; top: 1px; }
  .dd__opt { font-size: 14px; padding: 12px; }
  .dd__list { border-radius: 12px; }
  .field__textarea { height: 68px; min-height: 68px; padding: 10px 0 12px; font-size: 16px; line-height: 1.4; }
  .field__err { font-size: 12px; top: calc(100% + 5px); }

  .cform-done { padding: 22px 20px; gap: 14px; }
  .cform-done__mark { width: 48px; height: 48px; margin-bottom: 4px; }
  .cform-done__mark img { width: 20px; height: 20px; }
  .cform-done__title { font-size: 26px; max-width: none; }
  .cform-done__text { font-size: 15px; max-width: none; }
  .cform-done__again { margin-top: 10px; }

  /* Direct (115:2215) — no left rules between items */
  .ct-direct { padding: 40px 20px 68px; }
  .ct-direct__label { font-size: 12px; padding-bottom: 14px; }
  .ct-direct__list { flex-direction: column; gap: 16px; }
  .ct-direct__list li + li { border-left: 0; padding-left: 0; }
  .direct { gap: 14px; padding: 28px 0; }
  .direct__top { padding-right: 20px; }
  .direct__k { font-size: 12px; }
  .direct__arrow { width: 14px; height: 14px; }
  .direct__v { font-size: 17px; }
}

/* -------------------------------------------------------------------------- */
/* Tablet (768–1199) — Figma 114:2158 "Contact · Tablet 768"                   */
/* -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1199px) {
  /* Header (114:2160) */
  .ct-head { padding: 34px 40px 0; }
  .ct-head__title h1 { font-size: 15.625vw; } /* 120px @768 */
  .ct-head__sub { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
  .ct-head__lede { font-size: 25px; }

  /* Form (114:2171): vertical person card beside the form card */
  .ct-form { padding: 43px 40px 90px; }
  .ct-form__row { flex-direction: row; align-items: flex-start; gap: 16px; }
  .ct-form__side { width: clamp(220px, 28.65vw, 300px); }
  .person {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 10px 10px 16px;
  }
  .person__media { width: 100%; height: auto; aspect-ratio: 198 / 180; }
  .person__info { flex: none; padding: 4px 0 0 6px; }
  .person__name { font-size: 19px; }

  .form-card { flex: 1 1 0; width: auto; min-width: 0; padding: 28px 24px; }
  .cform { gap: 25px; }
  .field__input { font-size: 14px; }
  .field__select { font-size: 12px; }
  .field__textarea { height: 90px; min-height: 90px; font-size: 15px; }

  /* Direct (114:2215): three links — email (the longest) spans the first row,
     LinkedIn + Dribbble share the second; no left rules */
  .ct-direct { padding: 40px 40px 90px; }
  .ct-direct__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
  .ct-direct__list li:first-child { grid-column: 1 / -1; }
  .direct__top { padding-right: 24px; }
  .direct__v { font-size: 19px; }
}

/* Wider tablets: the form fields can sit side by side like desktop */
@media (min-width: 1024px) and (max-width: 1199px) {
  .cform__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
