/* "Let's Talk" contact panel — two-column glass card on a dim
   backdrop. Underline-only inputs, claret accent on the "Talk"
   word, translucent submit pill that spans the full bottom row.

   Open/close = `.is-open` on the root. JS at js/lets-talk.js. */

.lets-talk {
  --lt-claret: #b3001b;
  --lt-claret-glow: rgba(179, 0, 27, 0.55);
  --lt-light-grey: rgba(245, 245, 250, 0.6);
  --lt-shadow: rgba(0, 0, 0, 0.55);

  position: fixed;
  inset: 0;
  z-index: 200;            /* above dock (100) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

.lets-talk.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transition: opacity 0.28s ease, visibility 0s;
}

.lets-talk__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      120% 90% at 50% 60%,
      rgba(40, 0, 8, 0.55) 0%,
      rgba(0, 0, 0, 0.78) 60%,
      rgba(0, 0, 0, 0.94) 100%);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}

/* Card — two columns on md+, single column below. */
.lets-talk__card {
  position: relative;
  width: 100%;
  max-width: 56rem;                             /* max-w-4xl */
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;                                  /* gap-6 */
  padding: clamp(1.5rem, 4vw, 4rem);            /* p-6 → md:p-16 */
  border-radius: 24px;
  background: var(--dock-bg, rgba(18, 12, 14, 0.78));
  border: 1px solid var(--dock-border, rgba(255, 255, 255, 0.12));
  box-shadow: 0 20px 50px var(--lt-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--dock-text, rgba(245, 245, 250, 0.95));
  font-family: "DM Sans", system-ui, sans-serif;
  transform: translateY(12px) scale(0.985);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.lets-talk.is-open .lets-talk__card {
  transform: translateY(0) scale(1);
}

@media (min-width: 768px) {
  .lets-talk__card {
    grid-template-columns: 1fr 1fr;
    /* Explicit rows: row 1 = intro | form, row 2 = submit (spans both),
       row 3 = status (spans both). Submit moves out of the form below
       so it can claim the full width of the card. */
    grid-template-rows: auto auto auto;
    gap: 3rem;                                  /* md:gap-12 */
  }
  .lets-talk__intro { grid-column: 1; grid-row: 1; }
  .lets-talk__form  { grid-column: 2; grid-row: 1; }
  .lets-talk__submit { grid-column: 1 / -1; grid-row: 2; }
  .lets-talk__status { grid-column: 1 / -1; grid-row: 3; }
}

/* Small screens: stack everything in source order — intro, form,
   submit, status — single column. */
@media (max-width: 767px) {
  .lets-talk__submit { order: 3; }
  .lets-talk__status { order: 4; }
}

.lets-talk__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 250, 0.8);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.lets-talk__close:hover,
.lets-talk__close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: none;
  transform: rotate(90deg);
}

.lets-talk__close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

/* ── Left column ──
   Top-aligned so the heading sits at the same line as the form's
   first input on the right. Centering used to look balanced when the
   intro had heading + copy + address + email, but with email removed
   the column got short and centering pushed it visibly low. */
.lets-talk__intro {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* "Let's [br] Talk." — Talk in claret with glow. */
.lets-talk__heading {
  margin: 0 0 0.625rem;                         /* mb-[10px] */
  font-family: "Archivo Black", "DM Sans", system-ui, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.01em;
  font-size: clamp(2rem, 6vw, 4rem);            /* 28px → 64px */
  color: var(--dock-text, #fff);
  word-break: break-word;
}

.lets-talk__heading-accent {
  color: var(--lt-claret);
  text-shadow:
    0 0 18px var(--lt-claret-glow),
    0 0 38px rgba(179, 0, 27, 0.35);
  margin-left: 0.4em;
}

.lets-talk__heading-break { display: none; }

@media (min-width: 640px) {
  .lets-talk__heading { margin-bottom: 1.875rem; } /* md:mb-[30px] */
  .lets-talk__heading-break { display: inline; }
  .lets-talk__heading-accent { margin-left: 0; }
}

.lets-talk__copy {
  margin: 0 0 0.9375rem;                        /* mb-[15px] */
  max-width: 24rem;                             /* max-w-sm */
  font-size: clamp(0.8125rem, 1.4vw, 1.125rem); /* 13px → 18px */
  line-height: 1.5;
  color: var(--lt-light-grey);
}

@media (min-width: 768px) { .lets-talk__copy { margin-bottom: 1.875rem; } }

.lets-talk__meta {
  font-size: 0.625rem;                          /* 10px */
  font-weight: 500;
  letter-spacing: 0.125rem;                     /* 2px */
  color: var(--lt-light-grey);
  display: grid;
  gap: 0.25rem;
}

.lets-talk__meta p { margin: 0; }

.lets-talk__meta a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lets-talk__meta a:hover,
.lets-talk__meta a:focus-visible {
  color: #fff;
  border-bottom-color: var(--lt-claret);
  outline: none;
}

@media (min-width: 768px) {
  .lets-talk__meta {
    font-size: 0.75rem;                         /* 12px */
    letter-spacing: 0.25rem;                    /* 4px */
    gap: 0.5rem;
  }
}

/* ── Right column · form ── */
.lets-talk__form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;                                  /* gap-2 */
  justify-content: center;
}

@media (min-width: 768px) { .lets-talk__form { gap: 1rem; } } /* md:gap-4 */

.lets-talk__hp { display: none; }

/* Each field wraps an input + a "fill me" warning span. position:
   relative so the warning can absolute-anchor to the input's right
   edge without disturbing the form's flex flow. */
.lets-talk__field {
  position: relative;
  display: block;
}

/* Inline empty-required warning. Pure transparent wrapper — just the
   word "fill me" hovering at the right side of the offending input.
   Triggered by lets-talk.js adding .is-invalid to the field. */
.lets-talk__warn {
  position: absolute;
  right: 0;
  bottom: 0.85rem;
  background: transparent;
  color: var(--lt-claret);
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.lets-talk__field--ta .lets-talk__warn {
  bottom: 0.55rem;
}
.lets-talk__field.is-invalid .lets-talk__warn {
  opacity: 1;
}

/* Underline-only inputs. */
.lets-talk__input,
.lets-talk__textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--dock-border, rgba(255, 255, 255, 0.12));
  padding: 0.75rem 0;
  font: inherit;
  font-size: 0.75rem;                           /* 12px */
  letter-spacing: 0.0625rem;                    /* 1px */
  color: var(--dock-text, #fff);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lets-talk__textarea {
  resize: none;
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .lets-talk__input,
  .lets-talk__textarea {
    padding: 1rem 0;
    font-size: 0.875rem;                        /* 14px */
    letter-spacing: 0.125rem;                   /* 2px */
  }
  .lets-talk__textarea { margin-top: 1rem; }
}

.lets-talk__input::placeholder,
.lets-talk__textarea::placeholder {
  color: var(--lt-light-grey);
  letter-spacing: inherit;
}

.lets-talk__input:focus,
.lets-talk__textarea:focus {
  outline: none;
  border-bottom-color: var(--lt-claret);
}

/* Round red send button — w/h 48px → md:64px. */
.lets-talk__submit {
  /* On md+ this is a grid item spanning both columns (see grid rules
     above); on small screens it sits in the single-column flow. */
  align-self: stretch;
  width: 100%;
  margin-top: 0;
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: center;
  /* "slide it in" — the three words spread across the whole bottom row
     instead of huddling in the middle. The single <span> child gets
     spaced out via a wide letter-spacing + word-spacing combo (see
     .lets-talk__submit span below). */
  justify-content: center;
  border: 1px solid rgba(179, 0, 27, 0.45);
  border-radius: 10px;
  background: rgba(179, 0, 27, 0.22);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 0 30px var(--lt-claret-glow);
  overflow: hidden;
  transition: transform 0.5s ease, box-shadow 0.4s ease, background 0.3s ease;
}

@media (min-width: 768px) {
  .lets-talk__submit {
    padding: 1.05rem 1.6rem;
    font-size: 0.875rem;
  }
}

.lets-talk__submit:hover,
.lets-talk__submit:focus-visible {
  transform: scale(1.05);
  background: rgba(179, 0, 27, 0.55);
  border-color: rgba(179, 0, 27, 0.85);
  outline: none;
}

.lets-talk__submit:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* The text gets aggressive tracking so "slide it in" visually spans
   the full button width — letter-spacing widens characters within
   each word, word-spacing widens the gaps between words. The hover
   nudge is preserved via translateX on the inner <span>. */
.lets-talk__submit span {
  display: inline-block;
  letter-spacing: 0.45em;
  word-spacing: 0.6em;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.lets-talk__submit:hover span,
.lets-talk__submit:focus-visible span {
  transform: translateX(4px);
}

@media (min-width: 768px) {
  .lets-talk__submit span {
    letter-spacing: 0.6em;
    word-spacing: 1em;
  }
}

/* Inline status under the form (success/error/info, set by JS). */
.lets-talk__status {
  min-height: 1.2em;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lt-light-grey);
}

.lets-talk__status.is-success { color: rgb(160, 245, 200); }
.lets-talk__status.is-error { color: rgb(255, 150, 160); }

@media (prefers-reduced-motion: reduce) {
  .lets-talk,
  .lets-talk__card,
  .lets-talk__close,
  .lets-talk__submit,
  .lets-talk__submit span {
    transition-duration: 0.001s !important;
  }
  .lets-talk.is-open .lets-talk__card { transform: none; }
  .lets-talk__submit:hover { transform: none; }
}
