/* Contact: hero call to action, contact section, form (inline + dialog). */

/* ---------- Hero CTA ---------- */
.hero__cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
  margin-top: clamp(1.25rem, 2.6vh, 2rem);
}
.cta {
  display: inline-flex; align-items: stretch; min-height: 52px;
  border: 1px solid var(--green); border-radius: 3px;
  background: var(--green); color: var(--green-ink);
  font-family: var(--ui); font-size: .9375rem; font-weight: 600; text-decoration: none;
  box-shadow: 0 10px 30px -14px rgb(34 197 94 / .7);
  transition: background-color .2s, border-color .2s, transform .2s;
}
.cta__icon { display: grid; place-items: center; width: 52px; border-right: 1px solid rgb(6 39 15 / .28); color: var(--green-ink); }
.cta__label { display: flex; align-items: center; padding-inline: 1.25rem; }
.cta:hover { background: #3ad673; border-color: #3ad673; }
.cta:active { transform: translateY(1px); }
.cta:focus-visible { outline-color: var(--ink); }
.hero__email {
  display: inline-block; padding-block: .6rem;
  font-family: var(--ui); font-size: .9375rem; color: rgb(242 238 232 / .82);
  text-decoration: underline; text-decoration-color: rgb(34 197 94 / .7); text-underline-offset: .3em;
}
.hero__email:hover { color: var(--ink); text-decoration-color: var(--green); }

/* ---------- Hire strip (after the work) ---------- */
.hire-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  margin-top: clamp(4rem, 7vw, 7rem); padding: 1rem 1rem 1rem 1.25rem;
  border: 1px solid #303236; border-top: 2px solid var(--green); border-radius: 3px;
  background: #141517;
}
.hire-strip__text {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.15; letter-spacing: -.02em;
}
.hire-strip__tc { flex: none; font-size: .75rem; letter-spacing: .08em; color: var(--green); }
.hire-strip__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.hire-strip__btn {
  display: inline-flex; align-items: stretch; min-height: 48px;
  border: 1px solid #34573e; border-radius: 3px; background: #1b2e21; color: var(--ink);
  font: 600 .9375rem var(--ui); text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.hire-strip__icon { display: grid; place-items: center; width: 48px; border-right: 1px solid #34573e; color: var(--green); }
.hire-strip__label { display: flex; align-items: center; padding-inline: 1.1rem; }
.hire-strip__btn:hover { background: #22402c; border-color: var(--green); }
.hire-strip__mail {
  display: inline-block; padding-block: .6rem;
  font: .875rem var(--ui); color: var(--ink-2);
  text-decoration: underline; text-decoration-color: rgb(34 197 94 / .6); text-underline-offset: .3em;
}
.hire-strip__mail:hover { color: var(--ink); }

/* ---------- Contact section ---------- */
.contact__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
  margin-top: clamp(3rem, 6vw, 5.5rem);
}
.contact__status {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .55rem .9rem; border: 1px solid #2c2e30; border-radius: 3px;
  background: rgb(19 18 20 / .85);
  font-family: var(--ui); font-size: .875rem; color: var(--ink);
}
.contact__status .contact__dot {
  position: relative; width: .55rem; height: .55rem; border: 0; border-radius: 50%; background: var(--green);
}
/* The ring only animates transform and opacity (compositor-only), and only while the section is near. */
.contact__status .contact__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgb(34 197 94 / .55);
  animation: contact-pulse 2.4s ease-out infinite; animation-play-state: paused;
}
.contact.is-near .contact__status .contact__dot::after { animation-play-state: running; }
@keyframes contact-pulse {
  0% { transform: scale(1); opacity: .9; }
  70%, 100% { transform: scale(3); opacity: 0; }
}
.contact__lede {
  margin-top: 1.5rem; max-width: 30rem;
  color: var(--ink-2); font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.6;
}
.contact__direct { margin-top: 2rem; border-top: 1px solid var(--line); }
.contact__direct > div { padding-top: 1.1rem; }
.contact__direct dt { font-family: var(--ui); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact__direct dd { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: .5rem 0 0; }
.contact__email {
  display: inline-block; padding-block: .5rem;
  font-family: var(--ui); font-size: clamp(1rem, 1.5vw, 1.25rem); color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: .3em; text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.contact__email:hover { color: #9fe2b7; }
.contact__copy {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; padding: 0 .75rem;
  border: 1px solid #3a3c3f; border-radius: 3px; background: #1a1b1d; color: var(--ink-2);
  font-family: var(--ui); font-size: .8125rem; cursor: pointer; transition: border-color .2s, color .2s;
}
.contact__copy:hover { border-color: #5a5d60; color: var(--ink); }
.contact__copy.is-copied { border-color: var(--green); color: var(--green); }

.contact__steps { margin: 2rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.contact__steps li {
  display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line);
  color: var(--ink-2); font-size: .9375rem; line-height: 1.55;
}
.contact__steps strong { color: var(--ink); font-weight: 600; }
.contact__step { flex: none; width: 2rem; padding-top: .15rem; font-size: .75rem; color: var(--green); letter-spacing: .06em; }

/* ---------- Form (shared by inline + dialog) ---------- */
.contact-form {
  min-width: 0; border: 1px solid #303236; border-radius: 4px; background: #141517;
  box-shadow: 0 30px 80px -40px rgb(0 0 0 / .9);
}
.contact-form__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1.1rem; border-bottom: 1px solid #2a2c2f; background: #1b1c1f;
  font-family: var(--ui); font-size: .75rem; color: var(--ink-2);
}
.contact-form__rec { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); letter-spacing: .08em; }
.contact-form__rec i { width: .45rem; height: .45rem; border-radius: 50%; background: #e5484d; opacity: .35; }
.contact-form:focus-within .contact-form__rec { color: var(--ink); }
.contact-form:focus-within .contact-form__rec i { opacity: 1; animation: contact-rec 1.2s steps(2, jump-none) infinite; }
@keyframes contact-rec { 50% { opacity: .25; } }
.contact-form__body { padding: clamp(1.1rem, 2.4vw, 1.75rem); }
.contact-form--dialog .contact-form__body { padding: 0; }
.contact-form--dialog { border: 0; background: none; box-shadow: none; }
.contact-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.contact-form__field { display: flex; flex-direction: column; gap: .5rem; min-width: 0; margin: 0 0 1.1rem; }
.contact-form__field > span,
.contact-form__types legend { font-family: var(--ui); font-size: .8125rem; color: #ccc8c1; }
.contact-form__field input,
.contact-form__field textarea {
  display: block; width: 100%; min-width: 0; margin: 0; padding: .8rem .85rem;
  border: 1px solid #393b3e; border-radius: 3px; background: #0f1012; color: var(--ink);
  font: 400 .9375rem/1.5 var(--sans); outline: none;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.contact-form__field input { min-height: 46px; }
.contact-form__field textarea { min-height: 128px; resize: vertical; }
.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder { color: #8a8b8f; opacity: 1; }
.contact-form__field input:hover,
.contact-form__field textarea:hover { border-color: #4a4c50; }
.contact-form__field input:focus,
.contact-form__field textarea:focus { border-color: var(--green); background: #111413; box-shadow: 0 0 0 3px rgb(34 197 94 / .16); }
.contact-form__field input[aria-invalid="true"],
.contact-form__field textarea[aria-invalid="true"] { border-color: #e5484d; box-shadow: 0 0 0 3px rgb(229 72 77 / .14); }
.contact-form__field input[aria-invalid="true"]:focus,
.contact-form__field textarea[aria-invalid="true"]:focus { border-color: #e5484d; box-shadow: 0 0 0 3px rgb(229 72 77 / .24); }

.contact-form__types { min-width: 0; margin: 0 0 1.1rem; padding: 0; border: 0; }
.contact-form__types legend { padding: 0; margin-bottom: .5rem; }
.contact-form__chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.contact-form__chips label { position: relative; cursor: pointer; }
.contact-form__chips input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.contact-form__chips span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 .8rem;
  border: 1px solid #393b3e; border-radius: 3px; background: #1a1b1d; color: var(--ink-2);
  font-family: var(--ui); font-size: .8125rem; transition: border-color .18s, background-color .18s, color .18s;
}
.contact-form__chips label:hover span { border-color: #55585c; color: var(--ink); }
.contact-form__chips input:checked + span { border-color: #34573e; background: #1b2e21; color: #c6f0d4; }
.contact-form__chips input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

.contact-form__honey { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.contact-form__send {
  display: flex; align-items: stretch; width: 100%; min-height: 50px; margin-top: .35rem; padding: 0;
  border: 1px solid #34573e; border-radius: 3px; background: #1d3526; color: var(--ink); cursor: pointer;
  font: 600 .9375rem var(--ui); text-align: left;
  transition: background-color .2s, border-color .2s;
}
.contact-form__send-icon { display: grid; place-items: center; width: 50px; border-right: 1px solid #34573e; color: var(--green); }
.contact-form__send-label { display: flex; align-items: center; flex: 1; padding-inline: 1rem; }
.contact-form__send:hover { background: #22402c; border-color: var(--green); }
.contact-form__send:disabled { cursor: progress; opacity: .75; }
.contact-form[data-state="sent"] .contact-form__send { border-color: var(--green); opacity: 1; cursor: default; }
/* Sent: the play glyph becomes a check mark. */
.contact-form[data-state="sent"] .contact-form__send-icon svg { display: none; }
.contact-form[data-state="sent"] .contact-form__send-icon::before {
  content: ""; width: 12px; height: 6px; margin-top: -3px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg);
}
/* Sending: the icon blinks like a render indicator. */
.contact-form[data-state="sending"] .contact-form__send-icon svg { animation: cf-sending 1s steps(2, jump-none) infinite; }
@keyframes cf-sending { to { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .contact-form[data-state="sending"] .contact-form__send-icon svg { animation: none; } }

.contact-form__status { min-height: 1.5em; margin-top: .9rem; padding-left: .75rem; border-left: 2px solid #3a3c3f; font-family: var(--ui); font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.contact-form__status:empty { display: none; }
.contact-form__legal { margin-top: .75rem; font-family: var(--ui); font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.contact-form__legal a { color: var(--ink-2); text-underline-offset: .2em; text-decoration-color: var(--green); }
.contact-form__legal a:hover { color: var(--ink); }
.footer__note { margin-top: 1rem; font-size: .8125rem; color: var(--muted); }
.contact-form__status { scroll-margin-block: 1.5rem; }
.contact-form[data-state="sent"] .contact-form__status { color: #9fe2b7; border-left-color: var(--green); }
.contact-form[data-state="error"] .contact-form__status { color: #f1a7a9; border-left-color: #e5484d; }
.contact-form__status a { color: inherit; text-underline-offset: .2em; }

/* Dialog tweaks over contact-character.css */
.contact-preview__intro a { color: var(--ink); text-underline-offset: .2em; text-decoration-color: var(--green); overflow-wrap: anywhere; }

/* Footer links: larger tap targets without changing the look */
.footer__role a { color: var(--ink-2); }
.footer a { display: inline-block; padding-block: .6rem; margin-block: -.6rem; }

/* Dialog on short screens: shrink the heading so the fields and Send fit */
@media (max-height: 760px) {
  .contact-preview h2 { font-size: 40px; }
  .contact-preview__body { padding: 20px 26px 24px; }
  .contact-preview__intro { margin: 8px 0 18px; }
  .contact-form--dialog .contact-form__field textarea { min-height: 96px; }
}

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px), (pointer: coarse) {
  /* 16px stops iOS Safari from zooming the page when a field gets focus */
  .contact-form__field input, .contact-form__field textarea { font-size: 1rem; }
}
@media (max-width: 520px) {
  .contact-form__row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cta { flex: 1 1 100%; }
  .hire-strip { padding: 1rem; }
  .hire-strip__actions, .hire-strip__btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .contact__status .contact__dot::after,
  .contact-form:focus-within .contact-form__rec i { animation: none; }
}
