/* ==========================================================================
   VIVID — CONTACT PAGE
   --------------------------------------------------------------------------
   The band rhythm, top to bottom:

     phead (light)  →  THE BAND (form + aside)  →  light (the numbers)
                    →  a solid RED block (the closing RFQ)

   In dark mode the whole thing inverts at the TOKEN level: the page goes
   near-black and the band becomes the LIGHTER graphite slab, so the page still
   reads as a stack of alternating bands. Nothing here types a raw colour — every
   surface, line and text colour resolves through a semantic token, so it flips
   for free. The two exceptions are the offsets that must stay red (--red-500 is
   theme-independent by design) and the pure-white plate under the badge.

   Flat colour, hard offsets, 2px borders, medium radii. No blur, no gradient.
   Logical properties only.

   Namespace: .cx-*   Nothing here leaks to another page.
   ========================================================================== */


/* ==========================================================================
   1. THE BAND — the form, and the aside beside it.
   ========================================================================== */
.cx-band__grid {
  display: grid;
  gap: clamp(1.75rem, 1.1rem + 2.6vw, 3rem);
  align-items: start;
}
@media (min-width: 1024px) {
  .cx-band__grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: clamp(2rem, 0.6rem + 3.4vw, 4rem);
  }
}


/* --------------------------------------------------------------------------
   1a. THE FORM CARD
   A solid card thrown forward off the band by a hard red block. It is the one
   place on this band where the page's own surface/text tokens apply again — so
   the .band--ink defaults (which paint every heading white) MUST be undone, or
   the title disappears into the card. `.band--ink h2` is (0,1,1), so the
   overrides below are all deliberately (0,2,0).
   -------------------------------------------------------------------------- */
.cx-formcard {
  position: relative;
  min-inline-size: 0;
  background: var(--surface);
  border: var(--bw) solid var(--line-bold);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 0.7rem + 2.2vw, 2.5rem);
  box-shadow: var(--hard-red);
  color: var(--text);
}
/* The offset block must land on the other side when the direction flips. */
[dir="rtl"] .cx-formcard { box-shadow: -6px 6px 0 0 var(--red-500); }
@media (max-width: 559px) {
  .cx-formcard { box-shadow: var(--hard-red-sm); }
  [dir="rtl"] .cx-formcard { box-shadow: -4px 4px 0 0 var(--red-500); }
}

.cx-formcard__head {
  margin-block-end: var(--sp-7);
  padding-block-end: var(--sp-5);
  border-block-end: var(--bw) solid var(--line-bold);
}
/* .band--ink .kicker turns the kicker red-on-band; on a light card that red is
   far too bright, so it comes back down the ramp. */
.cx-formcard .kicker { color: var(--brand-text); }
.cx-formcard .cx-formcard__title {
  font-family: var(--font-head);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-head);
  line-height: var(--lh-tight);
  color: var(--text);
  text-wrap: balance;
}
.cx-formcard__sub {
  margin-block-start: var(--sp-3);
  max-inline-size: 56ch;
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  line-height: var(--lh-normal);
  color: var(--text-muted);
}

/* --- the foot: send + the reply promise ---------------------------------- */
.cx-form__foot {
  margin-block-start: var(--sp-7);
  padding-block-start: var(--sp-6);
  border-block-start: var(--bw) solid var(--line-bold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.cx-form__note {
  flex: 1 1 15rem;
  min-inline-size: 0;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
  color: var(--text-muted);
  text-align: end;
}
@media (max-width: 639px) {
  .cx-form__foot { flex-direction: column; align-items: stretch; }
  .cx-form__send { inline-size: 100%; }
  /* Once the foot stacks, the flex axis is the BLOCK axis — leave the grow
     factor on and the note stretches down the card, opening a dead gap. */
  .cx-form__note { flex: 0 0 auto; text-align: start; }
}

.cx-form__demo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-block-start: var(--sp-5);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-subtle);
}
.cx-form__demo svg { inline-size: 15px; block-size: 15px; flex: none; }

/* --- send button: idle → loading ----------------------------------------- */
.cx-form__send { position: relative; }
.cx-form__spin { display: none; }
.cx-form__send.is-loading .cx-form__spin {
  display: block;
  inline-size: 18px;
  block-size: 18px;
  border-width: 2.5px;
  border-color: rgba(255, 255, 255, 0.35);
  border-block-start-color: var(--white);
}
.cx-form__send.is-loading .btn__arrow { display: none; }
.cx-form__send:disabled { cursor: progress; }

/* --- the success panel (the toast fires too; this is what stays) ---------- */
.cx-sent {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--sp-3);
  padding-block: var(--sp-8) var(--sp-4);
}
.cx-sent__ico {
  display: grid;
  place-items: center;
  inline-size: 60px;
  block-size: 60px;
  color: var(--white);
  background: var(--ok-500);
  border-radius: var(--r-md);
  box-shadow: var(--hard-ink-sm);
}
[dir="rtl"] .cx-sent__ico { box-shadow: -4px 4px 0 0 var(--block); }
.cx-sent__ico svg { inline-size: 28px; block-size: 28px; }
/* (0,2,0) — beats `.band--ink h3` (0,1,1), which would paint it white. */
.cx-sent .cx-sent__title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-head);
  color: var(--text);
}
.cx-sent__body {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
}
.cx-sent__again { margin-block-start: var(--sp-3); }


/* --------------------------------------------------------------------------
   1b. THE ASIDE — three cards, ON the band.
   Two sit one step above the band (--surface-ink-card); the third is a solid
   red block, and it is the loudest thing on the page.
   -------------------------------------------------------------------------- */
.cx-aside {
  display: grid;
  gap: var(--sp-5);
  min-inline-size: 0;
  align-content: start;
}
@media (min-width: 640px) and (max-width: 1023px) {
  /* Between the phone and the sidebar, the two neutral cards sit side by side
     and the red block runs the full width beneath them. */
  .cx-aside { grid-template-columns: 1fr 1fr; }
  .cx-aside > .cx-rfq { grid-column: 1 / -1; }
}

.cx-card {
  min-inline-size: 0;
  padding: clamp(1.125rem, 0.9rem + 0.9vw, 1.5rem);
  background: var(--surface-ink-card);
  border: var(--bw-hair) solid var(--surface-ink-line);
  border-radius: var(--r-lg);
}
.cx-card__title {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-lg);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-head);
  color: var(--text-on-ink);
}
.cx-card__ico {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  color: var(--white);
  background: var(--red-500);   /* solid block colour — never a gradient */
  border-radius: var(--r-sm);
}
.cx-card__ico svg { inline-size: 19px; block-size: 19px; }

.cx-card__note {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-block-start: var(--sp-4);
  padding-block-start: var(--sp-4);
  border-block-start: var(--bw-hair) solid var(--line-on-ink);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
  color: var(--text-on-ink-muted);
}
.cx-card__note svg { inline-size: 15px; block-size: 15px; flex: none; margin-block-start: 1px; color: var(--brand-on-ink); }
.cx-card__note--plain { font-weight: var(--fw-medium); }

/* --- business hours ------------------------------------------------------- */
.cx-hours {
  margin-block-start: var(--sp-4);
  display: grid;
  gap: var(--sp-1);
}
.cx-hours__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-inline-size: 0;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-xs);
  font-size: var(--fs-sm);
}
.cx-hours__d {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-inline-size: 0;
  font-weight: var(--fw-bold);
  color: var(--text-on-ink-muted);
}
.cx-hours__t {
  margin: 0;
  flex: none;
  font-weight: var(--fw-heavy);
  color: var(--text-on-ink);
}
/* today — a solid red plate, white type. 5.07:1. */
.cx-hours__row.is-today {
  background: var(--red-500);
}
.cx-hours__row.is-today .cx-hours__d,
.cx-hours__row.is-today .cx-hours__t { color: var(--white); }
.cx-hours__today {
  flex: none;
  padding: 2px 6px;
  font-size: var(--fs-3xs);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--red-700);
  background: var(--white);
  border-radius: 4px;
}
.cx-hours__row.is-closed .cx-hours__d { color: var(--text-on-ink-subtle); }
.cx-hours__row.is-closed .cx-hours__t { color: var(--brand-on-ink); }
.cx-hours__row.is-today.is-closed .cx-hours__d,
.cx-hours__row.is-today.is-closed .cx-hours__t { color: var(--white); }

/* --- follow us ------------------------------------------------------------ */
.cx-social {
  margin-block-start: var(--sp-4);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
}
.cx-social__a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-inline-size: 0;
  min-block-size: 72px;
  padding: var(--sp-2);
  color: var(--text-on-ink);
  background: transparent;
  border: var(--bw) solid var(--line-on-ink);
  border-radius: var(--r-sm);
  transition: transform var(--t-fast), background-color var(--t-fast),
              color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.cx-social__a svg { inline-size: 22px; block-size: 22px; }
.cx-social__k {
  font-size: var(--fs-3xs);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-tight);
  max-inline-size: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A hard flip to the solid red block — nothing floats. The offset block is
   WHITE rather than --block, because it sits on the ink band, and the band is
   the dark tone in BOTH themes — so this white is theme-independent. */
.cx-social__a:hover {
  color: var(--white);
  background: var(--red-500);
  border-color: var(--red-500);
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 0 var(--white);
}
[dir="rtl"] .cx-social__a:hover {
  transform: translate(3px, -3px);
  box-shadow: -6px 6px 0 0 var(--white);
}
@media (prefers-reduced-motion: reduce) {
  .cx-social__a:hover { transform: none; }
}

/* --- the RFQ steer: a solid red block ------------------------------------- */
.cx-rfq {
  min-inline-size: 0;
  padding: clamp(1.25rem, 0.95rem + 1.2vw, 1.75rem);
  background: var(--surface-red);
  border: var(--bw) solid var(--surface-red);
  border-radius: var(--r-lg);
  /* Same reasoning as .cx-social__a — a white block on the band, in both themes. */
  box-shadow: 6px 6px 0 0 var(--white);
  color: var(--text-on-red);
}
[dir="rtl"] .cx-rfq { box-shadow: -6px 6px 0 0 var(--white); }
@media (max-width: 559px) {
  .cx-rfq { box-shadow: 4px 4px 0 0 var(--white); }
  [dir="rtl"] .cx-rfq { box-shadow: -4px 4px 0 0 var(--white); }
}
/* The white plate carries the small caps at 8.1:1 — the red itself could not. */
.cx-rfq__badge { color: var(--red-700); }
.cx-rfq .cx-rfq__title {
  margin-block-start: var(--sp-3);
  font-size: var(--fs-xl);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-head);
  line-height: var(--lh-snug);
  color: var(--text-on-red);
  text-wrap: balance;
}
.cx-rfq__body {
  margin-block-start: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);   /* white on red — hierarchy is weight, not tint */
  line-height: var(--lh-relax);
  color: var(--text-on-red-muted);
}
.cx-rfq__cta { margin-block-start: var(--sp-5); }
.cx-rfq__fine {
  margin-block-start: var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  text-align: center;
  color: var(--text-on-red-muted);
}


/* ==========================================================================
   2. TALK TO THE FACTORY  (light again)
   ========================================================================== */
.cx-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-3);
  min-inline-size: 0;
}
@media (min-width: 760px) {
  .cx-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cx-line { min-inline-size: 0; }
/* One number, two channels: WhatsApp on the row, a call button beside it. */
.cx-line--split { display: flex; gap: var(--sp-2); }
.cx-line--split .cx-line__a { flex: 1 1 auto; min-inline-size: 0; }

.cx-line__a {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-block-size: 68px;
  padding: var(--sp-3) var(--sp-4);
  min-inline-size: 0;
  background: var(--surface);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.cx-line__a:hover {
  border-color: var(--line-bold);
  transform: translate(-3px, -3px);
  box-shadow: var(--hard-ink-sm);
}
[dir="rtl"] .cx-line__a:hover {
  transform: translate(3px, -3px);
  box-shadow: -4px 4px 0 0 var(--block);
}

.cx-line__alt {
  flex: none;
  inline-size: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--surface);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-md);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}
.cx-line__alt svg { inline-size: 19px; block-size: 19px; }
.cx-line__alt:hover {
  border-color: var(--line-bold);
  background: var(--invert-bg);
  color: var(--invert-fg);
  transform: translate(-3px, -3px);
  box-shadow: var(--hard-red-sm);
}
[dir="rtl"] .cx-line__alt:hover {
  transform: translate(3px, -3px);
  box-shadow: -4px 4px 0 0 var(--red-500);
}

.cx-line__ico {
  flex: none;
  inline-size: 44px;
  block-size: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--invert-fg);
  background: var(--invert-bg);
  border-radius: var(--r-sm);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.cx-line__ico svg { inline-size: 20px; block-size: 20px; }
.cx-line__a:hover .cx-line__ico { background: var(--red-500); color: var(--white); }

.cx-line__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
  flex: 1 1 auto;
}
.cx-line__k {
  font-size: var(--fs-3xs);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}
.cx-line__v {
  display: block;
  min-inline-size: 0;
  font-size: var(--fs-lg);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-tight);
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: start;
}
/* The value is a <bdi dir="ltr"> so the digits read LTR inside the Arabic page.
   That own dir also makes `start` resolve to LEFT, which parked the number
   against the far edge while its label sat right. Align the BOX to the page;
   keep the DIGITS isolated. */
[dir="rtl"] .cx-line__v { text-align: right; }

.cx-line__go {
  flex: none;
  inline-size: 18px;
  block-size: 18px;
  color: var(--text-subtle);
  transition: color var(--t-fast), transform var(--t-fast);
}
[dir="rtl"] .cx-line__go { transform: scaleX(-1); }
.cx-line__a:hover .cx-line__go { color: var(--brand-text); transform: translateX(3px); }
[dir="rtl"] .cx-line__a:hover .cx-line__go { transform: scaleX(-1) translateX(3px); }


/* --------------------------------------------------------------------------
   THE ADDRESS. A strip, not a map — there is no embedded map on this page.
   -------------------------------------------------------------------------- */
.cx-visit {
  margin-block-start: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
  min-inline-size: 0;
  padding: clamp(1.125rem, 0.8rem + 1.4vw, 1.75rem);
  background: var(--surface-sunken);
  border: var(--bw) solid var(--line-bold);
  border-radius: var(--r-lg);
}
.cx-visit__ico {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 52px;
  block-size: 52px;
  color: var(--white);
  background: var(--red-500);
  border-radius: var(--r-sm);
}
.cx-visit__ico svg { inline-size: 24px; block-size: 24px; }

.cx-visit__body { flex: 1 1 20rem; min-inline-size: 0; }
.cx-visit__k {
  font-size: var(--fs-3xs);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--brand-text);
}
.cx-visit__name {
  margin-block-start: 2px;
  font-size: var(--fs-lg);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-tight);
  color: var(--text);
}
.cx-visit__addr {
  margin-block-start: var(--sp-1);
  max-inline-size: 62ch;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: var(--lh-normal);
  color: var(--text-muted);
}
/* The Arabic label is long; let it wrap rather than clip. */
.cx-visit__cta {
  flex: none;
  white-space: normal;
}
@media (max-width: 639px) {
  .cx-visit__cta { inline-size: 100%; }
}


/* ==========================================================================
   3. THE CLOSING RFQ PANEL
   The .qcta component paints itself solid red, so the shared .kicker (red type
   on a light page) would vanish on it. White, and a white rule.
   ========================================================================== */
.cx-cta .kicker { color: var(--white); }
.cx-cta .kicker::before { background: var(--white); }
