/* IJWestern — the Contact page. Step 9.
   Prefix: ct-  ·  zero collisions with styles.css, project.css,
   projects.css or about.css (pp-, wm-, bh-, px-, nl-, lb-, md- and ab-
   were the ones taken).

   Depends on styles.css for the tokens, .shell, .btn, .rule-top, the
   .reveal system and the whole .register-form / .field block, which
   this page's form reuses rather than restating. Nothing already
   defined there is redefined here, and there is not one literal
   radius, weight or font-size below: step 2's rule holds. */

.ct-page {
  padding: calc(var(--topbar-gap) + var(--topbar-h) + clamp(36px, 4.6vw, 72px)) 0 0;
  /* One shadow for every card on this page, so the info cards and the
     closing card sit at the same height off the ground. */
  --ct-shadow: 0 18px 44px -28px rgba(26, 25, 22, 0.28),
               0 3px 10px -6px rgba(26, 25, 22, 0.08);
  --ct-shadow-lift: 0 26px 58px -26px rgba(26, 25, 22, 0.34),
                    0 6px 14px -8px rgba(26, 25, 22, 0.1);
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.ct-hero {
  padding-bottom: clamp(56px, 7vw, 104px);
  background: var(--ground-white);
  position: relative;
  overflow: hidden;
}
/* The same gold wash the home page's register section carries, so the
   two pages that hold a form read as the same room. */
.ct-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    58% 58% at 92% 0%,
    color-mix(in oklab, var(--laterite-gold) 13%, transparent) 0%,
    transparent 62%
  );
  pointer-events: none;
}
.ct-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 4.5vw, 80px);
  align-items: start;
}
.ct-intro { min-width: 0; }
.ct-form-wrap { min-width: 0; }

/* Set at the About page's display size rather than the 68px the rest of
   the site uses, for the reason step 8 records: the client asked for
   short titles, and a title is short on the page, not in its word
   count. Two lines everywhere the two-column hero exists. */
.ct-title {
  margin: 0 0 clamp(20px, 2.4vw, 32px);
  font-size: clamp(32px, 3.4vw, 50px);
  font-weight: var(--fw-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
}
.ct-title em {
  font-style: normal;
  font-weight: var(--fw-accent);
  color: var(--survey-ink);
}

.ct-lead {
  margin: 0 0 clamp(14px, 1.6vw, 20px);
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.62;
  font-weight: var(--fw-body);
  color: color-mix(in oklab, var(--survey-ink) 80%, transparent);
  max-width: 52ch;
  text-wrap: pretty;
}
.ct-body {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.68;
  font-weight: var(--fw-body);
  color: color-mix(in oklab, var(--survey-ink) 68%, transparent);
  max-width: 52ch;
  text-wrap: pretty;
}

/* The form is the site's own glass card. It only needs to know it is
   the tallest thing in its column. */
.ct-form { width: 100%; }

/* ─── The information cards ──────────────────────────────────────── */
.ct-info {
  padding: clamp(48px, 6vw, 88px) 0;
  background: var(--ground-white);
}
.ct-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}

/* Same object as the project pages' figure cards, and deliberately so:
   white, on the media radius, with a gold rule that wipes in from the
   left on hover. That treatment was the client's own choice in step 6
   and this is the second row on the site that wants it. */
.ct-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: clamp(18px, 1.9vw, 26px);
  background: white;
  border: 1px solid color-mix(in oklab, var(--survey-ink) 10%, transparent);
  border-radius: var(--radius-media);
  box-shadow: var(--ct-shadow);
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
              border-color 0.35s ease;
}
.ct-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: var(--laterite-gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ct-card:hover,
.ct-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--ct-shadow-lift);
  border-color: color-mix(in oklab, var(--laterite-gold) 42%, transparent);
}
.ct-card:hover::before,
.ct-card:focus-within::before { transform: scaleX(1); }

.ct-card-k {
  font-family: var(--font-eyebrow);
  font-size: var(--fs-micro);
  font-weight: var(--fw-strong);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--contour-gray);
  transition: color 0.35s ease;
}
.ct-card:hover .ct-card-k,
.ct-card:focus-within .ct-card-k { color: var(--laterite-gold); }

.ct-card-v {
  font-size: clamp(17px, 0.55vw + 14px, 20px);
  line-height: 1.4;
  letter-spacing: var(--ls-card);
  font-weight: var(--fw-bold);
  color: var(--survey-ink);
  overflow-wrap: anywhere;
}
.ct-card-v a {
  border-bottom: 1px solid color-mix(in oklab, var(--laterite-gold) 45%, transparent);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.ct-card-v a:hover {
  color: var(--laterite-gold);
  border-bottom-color: var(--laterite-gold);
}
.ct-card-note {
  margin: 0;
  font-size: var(--fs-body-s);
  line-height: 1.5;
  font-weight: var(--fw-body);
  color: color-mix(in oklab, var(--survey-ink) 62%, transparent);
  text-wrap: pretty;
}

/* Two of these four are waiting on the client. The dotted key is the
   only thing that marks them on the page, and `data-pending` in the DOM
   marks them for us. */
.ct-card.is-pending .ct-card-v {
  color: color-mix(in oklab, var(--survey-ink) 52%, transparent);
  font-weight: var(--fw-strong);
}
.ct-card.is-pending .ct-card-k::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--laterite-gold) 70%, transparent);
  vertical-align: middle;
}

/* ─── The closing card ───────────────────────────────────────────── */
.ct-next {
  padding: 0 0 clamp(72px, 9vw, 128px);
  background: var(--ground-white);
}
.ct-next-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-media-lg);
  background: var(--survey-ink);
  color: var(--ground-white);
  padding: clamp(34px, 5vw, 76px);
  box-shadow: var(--ct-shadow);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ct-next-card:hover { transform: translateY(-5px); box-shadow: var(--ct-shadow-lift); }
.ct-next-card:focus-visible {
  outline: 2px solid var(--laterite-gold);
  outline-offset: 4px;
}

/* Gold light, sitting where the pointer is. --ct-gx/--ct-gy are written
   to the node by the page; with no pointer it rests in the top right,
   which is where the hero's own wash sits, so the page opens and closes
   on the same light. */
.ct-next-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    46% 62% at var(--ct-gx, 88%) var(--ct-gy, 8%),
    color-mix(in oklab, var(--laterite-gold) 40%, transparent) 0%,
    transparent 68%
  );
  opacity: 0.55;
  transition: opacity 0.5s ease;
}
.ct-next-card:hover .ct-next-glow { opacity: 0.95; }

.ct-next-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(14px, 1.6vw, 20px);
}
.ct-next-eyebrow {
  font-family: var(--font-eyebrow);
  font-size: var(--fs-micro);
  font-weight: var(--fw-strong);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--laterite-gold) 78%, var(--ground-white));
}
.ct-next-title {
  display: block;
  margin: 0;
  font-size: clamp(34px, 4.4vw, 66px);
  font-weight: var(--fw-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--ground-white);
}
.ct-next-title em {
  font-style: normal;
  font-weight: var(--fw-accent);
  color: var(--ground-white);
}
.ct-next-lead {
  display: block;
  max-width: 52ch;
  font-size: var(--fs-body);
  line-height: 1.62;
  font-weight: var(--fw-body);
  color: color-mix(in oklab, var(--ground-white) 74%, transparent);
  text-wrap: pretty;
}

/* The five names, as a quiet index rather than a second set of cards.
   They are aria-hidden: the card already announces where it goes, and
   five more names inside one link would be read as part of its label. */
.ct-next-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 2px;
}
.ct-next-name {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--ground-white) 22%, transparent);
  background: color-mix(in oklab, var(--ground-white) 7%, transparent);
  font-size: var(--fs-meta);
  font-weight: var(--fw-strong);
  letter-spacing: 0.01em;
  color: color-mix(in oklab, var(--ground-white) 84%, transparent);
  white-space: nowrap;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}
.ct-next-card:hover .ct-next-name {
  background: color-mix(in oklab, var(--ground-white) 12%, transparent);
  border-color: color-mix(in oklab, var(--ground-white) 34%, transparent);
  color: var(--ground-white);
}
.ct-next-num {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: color-mix(in oklab, var(--laterite-gold) 74%, var(--ground-white));
}

/* It is a span, not a button — the card is the link. It only has to
   look like the site's own CTA and travel with it. */
.ct-next-cta { margin-top: clamp(6px, 1vw, 14px); }
.ct-next-card:hover .ct-next-cta .arrow {
  transform: rotate(-45deg) translate(2px, 0);
}

/* ─── Widths ─────────────────────────────────────────────────────── */
/* One column below 980. The form needs its full width before the intro
   does, and at 900 in two columns the two-up field rows inside it are
   narrower than their own labels. */
@media (max-width: 980px) {
  .ct-hero-grid { grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 44px); }
  .ct-lead, .ct-body { max-width: 62ch; }
}

@media (max-width: 640px) {
  .ct-info-grid { grid-template-columns: minmax(0, 1fr); }
  .ct-next-card { padding: clamp(26px, 7vw, 36px); }
}

/* ─── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  /* The colours still change, so hover is still legible. Nothing moves,
     and the gold rule is simply there rather than wiping in. */
  .ct-card,
  .ct-card::before,
  .ct-card-k,
  .ct-next-card,
  .ct-next-glow,
  .ct-next-name,
  .ct-next-cta .arrow { transition: none !important; }
  .ct-card:hover,
  .ct-card:focus-within,
  .ct-next-card:hover { transform: none; }
  .ct-card:hover::before,
  .ct-card:focus-within::before { transform: scaleX(1); }
}
