/*
 * /contact page styles (loaded only on that page, from inside its page
 * container: see components/pages/ContactContent.tsx). Scoped under .ct,
 * overriding the Webflow shared CSS's element defaults inside .ct only.
 *
 * Design E2 "the form is one sentence" (docs/handoffs/parallel-bio-contact-designs),
 * with the handoff's spacing fixes, in the site's own fonts: Tobias (the
 * sentence), GT Standard (body), ABC Favorit Mono (labels, button).
 */

.ct {
  --ct-bg: var(--light, #efece1);
  --ct-ink: var(--dark, #0f0e10);
  --ct-prompt: #3f3f47;
  --ct-muted: #71717b;
  --ct-rule: #c2c0b7;
  --ct-blue: var(--blue, #4463d4);
  --ct-blue-dark: #3550b8;
  --ct-error: #a8323a;

  --ct-serif: "Tobiasvf Trial", "Times New Roman", serif;
  --ct-sans: "Gt Standard S Standard Trial", Arial, sans-serif;
  --ct-mono: "Abcfavoritmono Trial", ui-monospace, Menlo, monospace;

  position: relative;
  overflow: hidden;
  background: var(--ct-bg);
  color: var(--ct-ink);
  font-family: var(--ct-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ct h1,
.ct h2,
.ct p,
.ct ol {
  margin: 0;
}
.ct li {
  letter-spacing: normal;
  font-size: inherit;
}
.ct a {
  color: var(--ct-ink);
}
.ct a:hover {
  color: var(--ct-blue);
}
.ct button:focus-visible,
.ct a:focus-visible {
  outline: 2px solid var(--ct-blue);
  outline-offset: 4px;
}
.ct [hidden] {
  display: none !important;
}

.ct-rings {
  position: absolute;
  top: -220px;
  right: -260px;
  color: #d6d3c8;
  pointer-events: none;
}

.ct-main {
  position: relative;
  max-width: 1040px;
  box-sizing: border-box;
  margin: 0 auto;
  /* the site header is fixed (80px) and overlays the page */
  padding: clamp(136px, 14vw, 192px) 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.ct-eyebrow,
.ct-label,
.ct-next {
  font-family: var(--ct-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* ---------------------------------------------------------- the sentence */

.ct-form {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.ct-sentence {
  font-family: var(--ct-serif);
  font-size: clamp(28px, 2.4vw + 12px, 46px);
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: var(--ct-prompt);
}

.ct-blank {
  font: inherit;
  letter-spacing: inherit;
  color: var(--ct-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ct-ink);
  border-radius: 0;
  padding: 0 2px;
  margin: 0;
  height: auto;
  field-sizing: content;
  min-width: 2.5em;
  max-width: 100%;
  box-sizing: border-box;
  vertical-align: baseline;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.ct-blank::placeholder {
  color: var(--ct-muted);
  font-style: italic;
  opacity: 1;
}
.ct-blank--opt {
  border-bottom-style: dashed;
  border-bottom-color: var(--ct-muted);
}

.ct-reason {
  color: var(--ct-ink);
  border-bottom: 1px solid var(--ct-ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
}
.ct-reason:empty::before {
  content: attr(data-ph);
  color: var(--ct-muted);
  font-style: italic;
}

.ct-blank:focus,
.ct-reason:focus {
  outline: none;
  background: rgba(68, 99, 212, 0.1);
  border-bottom-color: var(--ct-blue);
}
.ct-blank[aria-invalid="true"],
.ct-reason[aria-invalid="true"] {
  border-bottom-color: var(--ct-error);
}

/*
 * The "because" answer has two forms:
 * - the inline editable span (.ct-reason), which wraps with the sentence: desktop, with a mouse;
 * - a real textarea (.ct-reason-box): touch screens, and anyone without JavaScript. iOS Safari
 *   focuses an editable span but won't type into it reliably; a textarea is native everywhere.
 * Chosen by CSS alone (pointer type, and Webflow's w-mod-js class set before first paint), so the
 * page never shifts when it loads.
 */
.ct-reason-box {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 0;
  padding: 0 2px 4px;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: var(--ct-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ct-ink);
  border-radius: 0;
  resize: none;
  overflow: hidden;
  field-sizing: content;
  min-height: calc(1lh + 4px);
  -webkit-appearance: none;
  appearance: none;
}
.ct-reason-box::placeholder {
  color: var(--ct-muted);
  font-style: italic;
  opacity: 1;
}
.ct-reason-box:focus {
  outline: none;
  background: rgba(68, 99, 212, 0.1);
  border-bottom-color: var(--ct-blue);
}
.ct-reason-box[aria-invalid="true"] {
  border-bottom-color: var(--ct-error);
}
.ct-reason {
  display: none;
}
.w-mod-js .ct-reason {
  display: inline;
}
.w-mod-js .ct-reason-box {
  display: none;
}
/* The sentence's closing period only follows the inline span; after the textarea it would sit alone. */
.ct-reason-end {
  display: none;
}
.w-mod-js .ct-reason-end {
  display: inline;
}
@media (pointer: coarse) {
  .w-mod-js .ct-reason,
  .w-mod-js .ct-reason-end {
    display: none;
  }
  .w-mod-js .ct-reason-box {
    display: block;
  }
}

/* Spam trap, off-screen */
.ct-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ct-problem {
  margin-top: -24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ct-error);
}
.ct-problem a {
  color: inherit;
}

/* ---------------------------------------------------------- send */

.ct-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.ct-send {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  min-height: 52px;
  padding: 0 8px 0 20px;
  background: var(--ct-blue);
  border: 0;
  border-radius: 0;
  color: #ffffff;
  font-family: var(--ct-mono);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.ct-send:hover {
  background: var(--ct-blue-dark);
}
.ct-send:disabled {
  cursor: progress;
  opacity: 0.8;
}
.ct-send__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.18);
}

/* ---------------------------------------------------------- alternatives */

.ct-alt {
  padding-top: 24px;
  border-top: 1px solid var(--ct-rule);
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ct-prompt);
}
.ct-offices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 48px;
}
.ct-offices p {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ct-label {
  color: var(--ct-muted);
}

/* ---------------------------------------------------------- after sending */

.ct-thanks {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 640px;
}
.ct-thanks:focus {
  outline: none;
}
.ct-thanks__title {
  font-family: var(--ct-serif);
  font-weight: 400;
  font-size: clamp(40px, 3.4vw + 16px, 64px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.ct-muted {
  color: var(--ct-muted);
}
.ct-next {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* No-JS results (the API redirects to #ct-sent / #ct-failed) */
.ct-nojs-msg {
  display: none;
}
.ct-nojs-msg:target {
  display: flex;
}
.ct-problem.ct-nojs-msg:target {
  display: block;
  margin-top: 0;
}

@media (max-width: 700px) {
  .ct-rings {
    width: 480px;
    height: 480px;
    top: -160px;
    right: -240px;
  }
  .ct-main {
    padding-bottom: 72px;
    gap: 40px;
  }
  .ct-actions {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-send {
    transition: none;
  }
}
