/* ==================================================================================================
   CONTACT — two columns, a watermark, and a great deal of space.

   On the left: what the page is for and the ways to reach us. On the right: the form, in one container.
   Behind all of it and FIXED TO THE WINDOW, the Ritexa mark, set large and very faint. Because it does
   not move with the page it reads as the surface the page is printed on rather than as another thing on
   the page, and it holds the centre of the composition without competing with a word of it.

   There is no second box anywhere, no enormous type and no decorative shape — the room is made by
   leaving space, not by filling it.

   THE FORM IS ONE CONTAINER and nothing inside it is another. A field is a label, a line of type and a
   rule underneath it; the rule draws itself in as you enter the field. That is the whole difference
   between a form with depth and a form made of boxes inside boxes.

   The panel is translucent so the site's own moving background reads through it. Nothing here is blurred,
   masked or filtered over that background: those are re-applied on every frame it moves, which on this
   site costs about half the frame rate. Translucency is free; backdrop blur is not.
   ================================================================================================== */

.ct { position: relative; z-index: 2;
  padding-top: var(--rx-header-h);        /* the site header is fixed; the page starts under it */
  --ct-ease: cubic-bezier(.2, .8, .3, 1); }

/* ==================================================================================================
   THE WATERMARK
   Fixed, centred, and underneath everything. It is the real lockup rather than a drawn approximation,
   held well under a tenth of full strength: at that weight it reads as a watermark at any brightness,
   and there is no point at which it makes a line of type or a field harder to read.
   ================================================================================================== */
.ct-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%);
  align-items: start; gap: clamp(28px, 5vw, 96px);
  padding-top: calc(var(--rx-sec-pad) * .75);
  padding-bottom: var(--rx-sec-pad); }

/* ==================================================================================================
   THE LEFT HALF
   ================================================================================================== */
.ct-side { display: grid; gap: clamp(22px, 3.6vh, 40px); align-content: start; }

.ct-head { display: grid; gap: clamp(10px, 1.6vh, 18px); max-width: 32ch; }
.ct-head__k { margin: 0; font: 500 var(--rx-eyebrow)/1 var(--rx-sans); letter-spacing: .2em;
  text-transform: uppercase; color: rgba(245, 239, 238, .4); }
/* large enough to lead the page, small enough that it is not shouting at you */
.ct-head__h { margin: 0; font: 500 clamp(30px, 3.4vw, 54px)/1.06 var(--rx-sans); letter-spacing: -.042em; }
.ct-head__p { margin: 0; max-width: 42ch;
  font: 400 clamp(14px, 1.02vw, 16px)/1.65 var(--rx-sans); color: var(--rx-dim); }

/* ---------- the ways in ---------- */
.ct-reach { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.4vh, 26px) clamp(18px, 2.4vw, 36px); }
.ct-reach li { display: grid; gap: 5px; min-width: 0; }
.ct-reach__k, .ct-reach__v { min-width: 0; overflow-wrap: anywhere; }
.ct-reach__k { font: 500 var(--rx-eyebrow)/1 var(--rx-sans); letter-spacing: .2em;
  text-transform: uppercase; color: rgba(245, 239, 238, .34); }
.ct-reach__v { font: 400 clamp(14.5px, 1.1vw, 17px)/1.45 var(--rx-sans); letter-spacing: -.012em;
  color: var(--rx-ink); }
.ct-reach__v a { color: inherit; text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, .16); padding-bottom: 2px;
  transition: border-color .35s var(--rx-ease); }
.ct-reach__v i { font-style: normal; opacity: .3; margin: 0 6px; }
.ct-reach__v--plain { color: var(--rx-dim); }

/* ==================================================================================================
   THE PANEL — the one container on this page
   ================================================================================================== */
.ct-panel { position: relative; margin: 0;
  padding: clamp(24px, 3vw, 42px);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: clamp(14px, 1.4vw, 22px);
  /* translucent on purpose: the background is part of the design, not something to cover up */
  background: linear-gradient(168deg, rgba(14, 18, 28, .72), rgba(6, 8, 14, .82));
  box-shadow: 0 34px 70px -42px rgba(0, 0, 0, .75);
  display: grid; gap: clamp(15px, 2.1vh, 24px); }

.ct-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(15px, 2.1vh, 24px) clamp(16px, 1.8vw, 28px); }

/* ---------- a field is a label, a line of type and a rule ---------- */
.ct-row { position: relative; display: grid; gap: 7px; min-width: 0; }
.ct-row label { font: 500 var(--rx-eyebrow)/1 var(--rx-sans); letter-spacing: .18em;
  text-transform: uppercase; color: rgba(245, 239, 238, .56);
  transition: color .3s var(--rx-ease); }
.ct-row input, .ct-row textarea {
  -webkit-appearance: none; appearance: none;
  width: 100%; margin: 0; padding: 4px 0 10px;
  background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .2);
  border-radius: 0;
  font: 400 clamp(15px, 1.15vw, 17px)/1.5 var(--rx-sans); letter-spacing: -.012em;
  color: var(--rx-ink); }
.ct-row textarea { resize: vertical; min-height: 5.4em; }
.ct-row input::placeholder, .ct-row textarea::placeholder { color: rgba(245, 239, 238, .34); }
.ct-row input:focus, .ct-row textarea:focus { outline: none; }
.ct-row:focus-within label { color: rgba(245, 239, 238, .82); }

/* the rule that draws itself under the field you are in — a line, not a box */
.ct-row::after { content: ""; position: absolute; left: 0; bottom: calc(1.45em + 1px);
  height: 1px; width: 0; background: var(--rx-ramp);
  transition: width .45s var(--ct-ease); }
.ct-row:focus-within::after { width: 100%; }
/* the notes sit under the rule, so nothing reflows when one appears */
.ct-note { margin: 0; min-height: 1.45em;
  font: 400 12.5px/1.45 var(--rx-sans); color: rgba(245, 239, 238, .42); }
.ct-row.is-bad input, .ct-row.is-bad textarea { border-bottom-color: rgba(255, 146, 143, .62); }
.ct-row.is-bad .ct-note { color: rgba(255, 166, 163, .92); }

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

.ct-go { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 2px; }
.ct-go__small { margin: 0; font: 400 12.5px/1.5 var(--rx-sans); color: rgba(245, 239, 238, .42); }
.ct-go__small a { color: rgba(245, 239, 238, .74); text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .18); }

.ct-result { margin: 0; min-height: 1.5em; font: 400 13.5px/1.5 var(--rx-sans);
  color: rgba(245, 239, 238, .6); }
.ct-result.is-ok { color: #9fe8c4; }
.ct-result.is-bad { color: rgba(255, 166, 163, .95); }
.ct-panel.is-done .ct-row, .ct-panel.is-done .ct-go { opacity: .4; pointer-events: none; }

/* ==================================================================================================
   ARRIVING — each part comes up once as it reaches the screen. ui/rise.js decides when; this is all
   that happens. Nothing is tied to scroll position, and nothing here delays anything being readable:
   the first screen is already in view when the page paints, so it rises immediately.
   ================================================================================================== */
[data-rise] { transition: opacity .7s var(--rx-ease), transform .8s var(--ct-ease); }
.js [data-rise] { opacity: 0; transform: translateY(18px); }
.js [data-rise].is-up { opacity: 1; transform: none; }
/* the form is the thing they came for, so it is never the last to arrive */
.ct-panel[data-rise] { transition-delay: .06s; }
.ct-reach[data-rise] { transition-delay: .14s; }
/* without the script, or without an observer, everything is simply there */
.no-js [data-rise], .rx-no-rise [data-rise] { opacity: 1; transform: none; }

/* ==================================================================================================
   THE TAIL
   ================================================================================================== */
.ct-tail { position: relative; padding: var(--rx-sec-pad) 0 calc(var(--rx-sec-pad) * .8); }
.ct-tail__inner { display: grid; justify-items: center; text-align: center; gap: clamp(16px, 2.4vh, 26px); }
.ct-tail__h { margin: 0; font: 500 clamp(21px, 2.4vw, 34px)/1.12 var(--rx-sans); letter-spacing: -.032em; }
.ct-tail__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ==================================================================================================
   WHAT ONLY A POINTER GETS
   ================================================================================================== */
@media (hover: hover) and (pointer: fine) {
  .ct-reach__v a:hover, .ct-go__small a:hover { border-bottom-color: rgba(255, 255, 255, .6); }
}
.ct-reach__v a:focus-visible, .ct-go__small a:focus-visible {
  outline: 2px solid var(--rx-ink); outline-offset: 4px; border-radius: 4px; }

/* ==================================================================================================
   THE PHONE — the same three things, stacked in the order you need them.
   The object stays: it is the one piece of the page that is not text, and losing it on a phone would
   leave a form and a list. It is simply shorter.
   ================================================================================================== */

@media (max-width: 900px) {
  .ct-wrap { grid-template-columns: minmax(0, 1fr); gap: clamp(22px, 4vh, 34px);
    padding-top: clamp(16px, 3vh, 30px); }
  .ct-side { display: contents; }
  .ct-head { order: 1; } .ct-panel { order: 2; } .ct-reach { order: 3; }
  .ct-head { max-width: 100%; }
  .ct-reach { gap: 16px 18px; }
  .ct-panel { padding: clamp(20px, 5.4vw, 28px); }
  .ct-pair { grid-template-columns: minmax(0, 1fr); }
}

/* ==================================================================================================
   REDUCED MOTION
   ================================================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ct-row::after, [data-rise] { transition: none; }
  .js [data-rise], [data-rise] { opacity: 1; transform: none; }
}
