/* Contact — a sales and support channel, and the demo request folded in from /request-demo. */

/* ── hero: the kelp mirrored so open water sits behind the words ── */

.contact-hero .page-hero__plate {
  transform: scaleX(-1);
  object-position: 50% 40%;
}

.contact-hero::before {
  background:
    linear-gradient(to top, color-mix(in oklab, var(--bg-deep) 92%, transparent) 0%, color-mix(in oklab, var(--bg-deep) 36%, transparent) 48%, transparent 80%),
    linear-gradient(90deg, color-mix(in oklab, var(--bg-deep) 66%, transparent), transparent 58%);
}

[data-theme="dark"] .contact-hero .page-hero__plate {
  filter: brightness(0.5) saturate(0.85);
}

/* ── shared lead-form pieces ───────────────── */

.lead {
  position: relative;
  display: grid;
  gap: 22px;
}

.lead--panel {
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
}

.lead__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 18px;
}

.lead__wide {
  grid-column: 1 / -1;
}

.lead__opt {
  margin-left: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-3);
}

.lead__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead .field__error {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lead .field__error::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.lead__status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: var(--r-control);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.lead__status .icon {
  margin-top: 1px;
}

.lead__status-title {
  font-weight: 640;
}

.lead__status-body {
  grid-column: 2;
  color: var(--ink-2);
}

.lead__status--ok {
  background: var(--ok-soft);
  color: color-mix(in oklab, var(--ok) 72%, var(--ink));
}

.lead__status--bad {
  background: var(--bad-soft);
  color: color-mix(in oklab, var(--bad) 80%, var(--ink));
}

.lead__again {
  grid-column: 2;
  justify-self: start;
  margin-top: 4px;
  font-size: 0.875rem;
  font-weight: 560;
}

.lead__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.lead__note {
  flex: 1 1 240px;
  max-width: 46ch;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.lead.is-sent .lead__grid {
  opacity: 0.55;
}

.lead [data-lead-submit][disabled] {
  opacity: 1;
}

.lead.is-sent [data-lead-submit] {
  background: var(--ok);
  color: #fff;
}

@media (max-width: 640px) {
  .lead__grid {
    grid-template-columns: 1fr;
  }

  .lead__foot .btn {
    width: 100%;
  }
}

/* ── contact: form + other ways in ─────────── */

.contact-main {
  padding-top: clamp(64px, 8vw, 120px);
}

.contact-main__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(36px, 6vw, 104px);
  align-items: start;
}

.contact-main__title {
  max-width: 14ch;
}

.contact-main__lede {
  margin: 16px 0 clamp(26px, 3vw, 36px);
}

.contact-ways {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  display: grid;
  gap: 14px;
  justify-items: start;
  padding-top: 8px;
}

.contact-ways__label {
  font-size: 0.875rem;
  font-weight: 620;
  color: var(--current);
}

.contact-ways__title {
  margin-bottom: 6px;
}

.contact-ways__list {
  display: grid;
  width: 100%;
  margin-bottom: 10px;
}

.contact-way {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.contact-way:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-way__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--current);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
}

.contact-way__icon .icon {
  width: 17px;
  height: 17px;
}

.contact-way__link {
  font-weight: 600;
}

.contact-ways__mail {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--ink-3);
}

@media (max-width: 960px) {
  .contact-main__grid {
    grid-template-columns: 1fr;
  }

  .contact-ways {
    position: static;
  }
}

/* ── demo request: its own slab, agenda first ─ */

.contact-demo {
  margin: 0 var(--tank-inset) var(--section-tight);
  padding-block: clamp(56px, 8vw, 112px);
  border-radius: var(--r-tank);
  background:
    radial-gradient(ellipse 46% 60% at 0% 0%, color-mix(in oklab, var(--held-soft) 70%, transparent), transparent 70%),
    var(--surface);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.contact-demo__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 104px);
  align-items: start;
}

.contact-demo__title {
  max-width: 13ch;
}

.contact-demo__lede {
  margin: 16px 0 clamp(26px, 3vw, 36px);
  max-width: 50ch;
}

.contact-agenda {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.contact-agenda__label {
  font-size: 0.875rem;
  font-weight: 620;
  color: var(--current);
}

.contact-agenda__len {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: clamp(4rem, 7vw, 6.5rem);
  line-height: 0.86;
  font-weight: 330;
  font-stretch: 86%;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.contact-agenda__len span {
  font-size: 0.26em;
  font-weight: 520;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.contact-agenda__title {
  margin: 10px 0 8px;
}

/* the agenda runs in order, so it earns its numbers */
.contact-agenda__list {
  position: relative;
  display: grid;
  gap: 0;
  margin-bottom: 18px;
  counter-reset: agenda;
}

.contact-agenda__list::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: var(--line-strong);
}

.contact-agenda__list li {
  position: relative;
  padding: 10px 0 10px 44px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
  counter-increment: agenda;
}

.contact-agenda__list li::before {
  content: counter(agenda);
  position: absolute;
  left: 0;
  top: 8px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong) inset;
  font-size: 0.75rem;
  font-weight: 640;
  font-variant-numeric: lining-nums proportional-nums;
  color: var(--ink);
}

@media (max-width: 960px) {
  .contact-demo__grid {
    grid-template-columns: 1fr;
  }

  .contact-agenda {
    order: 2;
  }
}

/* phones: the copy spans the full width, so the veil does too */
@media (max-width: 640px) {
  .contact-hero::before {
    background: linear-gradient(to bottom, color-mix(in oklab, var(--bg-deep) 70%, transparent) 0%, color-mix(in oklab, var(--bg-deep) 84%, transparent) 40%, color-mix(in oklab, var(--bg-deep) 94%, transparent) 100%);
  }

  [data-theme="dark"] .contact-hero::before {
    background: linear-gradient(to bottom, rgb(5 17 25 / 0.7) 0%, rgb(5 17 25 / 0.86) 40%, rgb(5 17 25 / 0.94) 100%);
  }
}

/* Chinese headings break at phrase boundaries (punctuation, spaces, <wbr>), never inside a
   word; a phrase wider than the line still wraps rather than overflowing. */
:lang(zh) main :is(h1, h2, h3, h4) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

:lang(zh) .contact-main__title,
:lang(zh) .contact-demo__title {
  max-width: 10em;
}
