/* ==========================================================================
   Contact page — Virtual Dimension
   Scoped under .cx-* so nothing here collides with vdim.webflow.css.
   Visual language borrows from measured drawings: mono annotation labels,
   hairline-divided cells, and a title block as the signature element.
   ========================================================================== */

/* The page background and nav strip are handled globally in theme.css. */

.cx {
  --paper: #f4f1eb;
  --card: #fff;
  --slate: #253439;
  --slate-deep: #1b282c;
  --ink: #1c2a2e;
  --muted: #6b7b80;
  --sand: #b29e84;
  --fill: #f1eae1;
  --fill-line: #e2d8cb;
  --teal: #1f7a73;
  --line: #ded7cc;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Archivo", "Inter", sans-serif;
  --body: "Inter", sans-serif;

  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
}

.cx *,
.cx *::before,
.cx *::after {
  box-sizing: border-box;
}

.cx-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* --- shared type ------------------------------------------------------- */

.cx-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cx-eyebrow::after {
  content: "";
  height: 1px;
  width: 56px;
  background: var(--sand);
  opacity: .5;
}

.cx h1,
.cx h2 {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  letter-spacing: -.02em;
  line-height: 1.04;
  color: var(--ink);
  margin: 0;
  text-transform: none;
}

.cx h1 {
  font-size: clamp(2.3rem, 4.8vw, 3.5rem);
  max-width: 15ch;
}

.cx h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  max-width: 22ch;
}

.cx-lede {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 20px 0 0;
  max-width: 46ch;
}

/* --- hero -------------------------------------------------------------- */

.cx-hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
}

/* faint plan grid, the paper the rest is drawn on */
.cx-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(37, 52, 57, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 52, 57, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 80% at 70% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 80% at 70% 0%, #000 20%, transparent 78%);
  pointer-events: none;
}

.cx-hero > * {
  position: relative;
}

.cx-hero-head {
  margin-bottom: 52px;
}

/* --- the card ---------------------------------------------------------- */

.cx-card {
  display: grid;
  grid-template-columns: 5fr 7fr;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(28, 42, 46, .04), 0 24px 48px -32px rgba(28, 42, 46, .22);
}

/* --- signature: the title block --------------------------------------- */

.cx-titleblock {
  background: var(--slate);
  color: #e8edee;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
}

.cx-titleblock-head {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "wdth" 112;
  font-size: 1.25rem;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 4px;
}

.cx-titleblock-note {
  font-size: .875rem;
  line-height: 1.55;
  color: #a8b7bb;
  margin: 0 0 28px;
}

.cx-cells {
  border-top: 1px solid rgba(232, 237, 238, .16);
  margin-bottom: 28px;
}

.cx-cell {
  border-bottom: 1px solid rgba(232, 237, 238, .16);
  padding: 14px 0;
}

.cx-cell dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 0 0 5px;
}

.cx-cell dd {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.4;
  color: #e8edee;
}

.cx-contact-row {
  display: block;
  font-family: var(--mono);
  font-size: .875rem;
  color: #e8edee;
  text-decoration: none;
  padding: 9px 0;
  border-bottom: 1px solid rgba(232, 237, 238, .1);
  transition: color .18s ease;
}

.cx-contact-row:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cx-titleblock-foot {
  margin-top: auto;
  padding-top: 26px;
}

.cx-booklink {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(244, 241, 235, .35);
  padding-bottom: 3px;
  transition: gap .18s ease, border-color .18s ease;
}

.cx-booklink:hover {
  gap: 14px;
  border-color: var(--paper);
}

/* --- form -------------------------------------------------------------- */

.cx-formpanel {
  padding: 40px 36px;
  background: var(--card);
}

.cx-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.cx-field {
  margin-bottom: 20px;
}

.cx-field > label,
.cx-legend {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.cx-optional {
  color: var(--fill-line);
  letter-spacing: .06em;
}

.cx input[type="text"],
.cx input[type="email"],
.cx input[type="tel"],
.cx textarea {
  width: 100%;
  font-family: var(--body);
  font-size: .9375rem;
  color: var(--ink);
  background: var(--fill);
  border: 1px solid var(--fill-line);
  border-radius: 10px;
  padding: 13px 14px;
  margin: 0;
  transition: border-color .18s ease, background .18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.cx textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.55;
}

.cx input::placeholder,
.cx textarea::placeholder {
  color: #a99b8b;
}

.cx input[type="text"]:focus,
.cx input[type="email"]:focus,
.cx input[type="tel"]:focus,
.cx textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 122, 115, .14);
}

/* chip groups: native radios, styled labels */
.cx-chipset {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}

.cx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cx-chip {
  position: relative;
  cursor: pointer;
}

.cx-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.cx-chip span {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--fill-line);
  border-radius: 999px;
  padding: 9px 15px;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.cx-chip:hover span {
  border-color: var(--sand);
}

.cx-chip input:checked + span {
  background: var(--slate);
  border-color: var(--slate);
  color: #fff;
}

.cx-chip input:focus-visible + span {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.cx-submitrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.cx-privacy {
  font-size: .8125rem;
  color: var(--muted);
  margin: 0;
  max-width: 34ch;
}

.cx-submit {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--slate);
  border: 0;
  border-radius: 999px;
  padding: 15px 30px;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.cx-submit:hover {
  background: var(--slate-deep);
  transform: translateY(-1px);
}

.cx-submit:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.cx-submit:disabled {
  opacity: .55;
  cursor: progress;
  transform: none;
}

/* Webflow's message blocks, restyled but class names kept intact
   because formScript targets .w-form-done / .w-form-fail */
.cx .w-form-done,
.cx .w-form-fail {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: .9375rem;
  line-height: 1.5;
  text-align: left;
  background: #eef4f0;
  border: 1px solid #cadbd1;
  color: #1f5340;
}

.cx .w-form-fail {
  background: #fdf0ee;
  border-color: #f0cec7;
  color: #8a3423;
}

/* --- capability strip -------------------------------------------------- */

.cx-capability {
  border-top: 1px solid var(--line);
  padding: 76px 0;
  background: #fff;
}

.cx-cap-head {
  margin-bottom: 44px;
}

.cx-cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.cx-cap-col {
  padding: 26px 26px 26px 0;
  border-right: 1px solid var(--line);
}

.cx-cap-col:first-child {
  padding-left: 0;
}

.cx-cap-col:not(:first-child) {
  padding-left: 26px;
}

.cx-cap-col:last-child {
  border-right: 0;
  padding-right: 0;
}

.cx-cap-col h3 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 0 0 16px;
}

.cx-cap-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cx-cap-col li {
  font-size: .9375rem;
  color: var(--ink);
  padding: 7px 0;
}

.cx-cap-note {
  margin: 36px 0 0;
  font-size: .9375rem;
  color: var(--muted);
}

/* --- faq --------------------------------------------------------------- */

.cx-faq {
  padding: 76px 0 96px;
  border-top: 1px solid var(--line);
}

.cx-faq-inner {
  max-width: 880px;
  margin: 0 auto;
}

.cx-faq-head {
  margin-bottom: 40px;
}

.cx-q {
  border-top: 1px solid var(--line);
}

.cx-q:last-of-type {
  border-bottom: 1px solid var(--line);
}

.cx-q summary {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-variation-settings: "wdth" 108;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--ink);
  transition: color .16s ease;
}

.cx-q summary::-webkit-details-marker {
  display: none;
}

.cx-q summary:hover {
  color: var(--teal);
}

.cx-q summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 4px;
}

.cx-q-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--sand);
  flex: none;
  padding-top: 4px;
}

.cx-q-text {
  flex: 1;
}

.cx-q-sign {
  flex: none;
  width: 13px;
  height: 13px;
  position: relative;
  margin-top: 5px;
}

.cx-q-sign::before,
.cx-q-sign::after {
  content: "";
  position: absolute;
  background: var(--muted);
  transition: transform .2s ease, opacity .2s ease;
}

.cx-q-sign::before {
  top: 6px;
  left: 0;
  width: 13px;
  height: 1px;
}

.cx-q-sign::after {
  top: 0;
  left: 6px;
  width: 1px;
  height: 13px;
}

.cx-q[open] .cx-q-sign::after {
  transform: scaleY(0);
  opacity: 0;
}

.cx-q-body {
  padding: 0 0 24px 44px;
  margin: 0;
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 66ch;
}

/* --- responsive -------------------------------------------------------- */

@media (max-width: 991px) {
  .cx-card {
    grid-template-columns: 1fr;
  }

  .cx-cap-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cx-cap-col:nth-child(2) {
    border-right: 0;
    padding-right: 0;
  }

  .cx-cap-col:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid var(--line);
  }

  .cx-cap-col:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .cx-wrap {
    padding: 0 20px;
  }

  .cx-hero {
    padding: 56px 0 64px;
  }

  .cx-titleblock,
  .cx-formpanel {
    padding: 30px 22px;
  }

  .cx-grid2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cx-grid2 .cx-field {
    margin-bottom: 20px;
  }

  .cx-cap-grid {
    grid-template-columns: 1fr;
  }

  .cx-cap-col {
    padding: 22px 0 !important;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .cx-cap-col:first-child {
    border-top: 0;
  }

  .cx-capability,
  .cx-faq {
    padding: 56px 0;
  }

  .cx-q-body {
    padding-left: 0;
  }

  .cx-submitrow {
    flex-direction: column;
    align-items: stretch;
  }

  .cx-submit {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cx *,
  .cx *::before,
  .cx *::after {
    transition-duration: .01ms !important;
  }

  .cx-submit:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Motion
   Same system as the projects page: one orchestrated load sequence, then
   restrained scroll reveals, with the safety inversion from home.css — the
   default state is visible, and nothing hides until the script sets
   html.cx-ready. Never runs under prefers-reduced-motion.

   The signature here is the title block filling in: the card arrives as one
   unit, then its cells complete in sequence with a sand rule drawing across
   each one, the way a drawing sheet's title block gets filled row by row.

   Deliberately NOT animated: anything inside the form, and the .w-form-done /
   .w-form-fail blocks. Those are display-toggled by the form handler, and
   layering opacity transitions on them would fight it.
   -------------------------------------------------------------------------- */

html.cx-ready .cx-anim {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

html.cx-ready .cx-anim.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .65s cubic-bezier(.22, .61, .36, 1);
}

html.cx-ready .cx-d1.is-in { transition-delay: .04s; }
html.cx-ready .cx-d2.is-in { transition-delay: .12s; }
html.cx-ready .cx-d3.is-in { transition-delay: .20s; }
html.cx-ready .cx-d4.is-in { transition-delay: .30s; }

/* the plan grid settles in behind the headline */
html.cx-ready .cx-hero::before {
  opacity: 0;
}

html.cx-ready .cx-hero.is-in::before {
  opacity: 1;
  transition: opacity 1.2s ease .25s;
}

/* signature: the title block completes cell by cell */
html.cx-ready .cx-card .cx-cell {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
}

html.cx-ready .cx-card.is-in .cx-cell {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease, transform .5s cubic-bezier(.22, .61, .36, 1);
}

html.cx-ready .cx-card.is-in .cx-cell:nth-child(1) { transition-delay: .42s; }
html.cx-ready .cx-card.is-in .cx-cell:nth-child(2) { transition-delay: .54s; }
html.cx-ready .cx-card.is-in .cx-cell:nth-child(3) { transition-delay: .66s; }

/* the sand rule drawing across each cell, then handing back to the hairline */
html.cx-ready .cx-card .cx-cell {
  position: relative;
}

html.cx-ready .cx-card .cx-cell::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

html.cx-ready .cx-card.is-in .cx-cell::after {
  transform: scaleX(1);
  opacity: 0;
  transition: transform .7s cubic-bezier(.22, .61, .36, 1),
              opacity .5s ease .7s;
}

html.cx-ready .cx-card.is-in .cx-cell:nth-child(1)::after { transition-delay: .42s, 1.1s; }
html.cx-ready .cx-card.is-in .cx-cell:nth-child(2)::after { transition-delay: .54s, 1.2s; }
html.cx-ready .cx-card.is-in .cx-cell:nth-child(3)::after { transition-delay: .66s, 1.3s; }

/* capability columns arrive as a group */
html.cx-ready .cx-cap-col {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
}

html.cx-ready .cx-cap-grid.is-in .cx-cap-col {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .55s cubic-bezier(.22, .61, .36, 1);
}

html.cx-ready .cx-cap-grid.is-in .cx-cap-col:nth-child(1) { transition-delay: .04s; }
html.cx-ready .cx-cap-grid.is-in .cx-cap-col:nth-child(2) { transition-delay: .12s; }
html.cx-ready .cx-cap-grid.is-in .cx-cap-col:nth-child(3) { transition-delay: .20s; }
html.cx-ready .cx-cap-grid.is-in .cx-cap-col:nth-child(4) { transition-delay: .28s; }

/* FAQ rows: same plotted rule as the project rows, so the two pages read as
   one system */
html.cx-ready .cx-q {
  position: relative;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
}

html.cx-ready .cx-q.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease, transform .5s cubic-bezier(.22, .61, .36, 1);
}

html.cx-ready .cx-q::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

html.cx-ready .cx-q.is-in::after {
  transform: scaleX(1);
  opacity: 0;
  transition: transform .7s cubic-bezier(.22, .61, .36, 1),
              opacity .5s ease .65s;
}
