/* ============================================================
   CONTACT   (loads AFTER style.css, so it only adds)
   Built to Figma "Contact page" (412:174). White page, giant blue
   word, a 3D card floating over it; "hit me up!" opens the contact
   unit and parks the card top-left. Namespaced under .ct2.
   ============================================================ */

/* the page never scrolls — the wheel turns the card instead */
/* no `background` here: `body.ct2-page` picks up the blue PAPER from
   style.css, so Contact is the same material as the rest of the site. */
body.ct2-page { overflow: hidden; overscroll-behavior: none; height: 100svh; scrollbar-width: none; }
body.ct2-page::-webkit-scrollbar { display: none; }
/* the page is solid brand blue, not the site's dot field */
body.ct2-page::before { content: none; }

/* fixed to the viewport, not 100svh: svh can resolve taller than the visual
   viewport, which pushed the contact unit's foot off-screen on a phone */
.ct2 {
  position: fixed;
  inset: 0;
  overflow: hidden;
  /* transparent: the blue paper on `body.ct2-page` shows through. It is fixed
     and full-bleed, so nothing else can leak past it. */
}
.ct2.over-hmu { cursor: pointer; }
/* WordPress's admin bar is its own fixed strip; this page is fixed too, so it
   would otherwise slide underneath it. Only ever true for a logged-in admin. */
body.admin-bar .ct2 { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .ct2 { top: 46px; } }

/* ---- the giant word. In the design it sits low and its descenders
   run past the bottom edge; the size is fitted by script. ---- */
.ct2-big {
  position: absolute; z-index: 1;
  left: 50%; translate: -50% 0;
  bottom: -9.85%;                         /* design: box bottom at 1227 of 1117 */
  margin: 0;
  font-family: var(--roc); font-weight: 700;
  font-size: 120px;                       /* placeholder until fitted */
  line-height: 1.2; letter-spacing: -.05em;
  color: #fff;
  white-space: nowrap;
  user-select: none;
}

/* ---- the card's stage: over the word, under the contact unit ---- */
.ct2-stage { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ct2-stage canvas { width: 100%; height: 100%; display: block; }
.ct2-stage.no-gl { display: none; }
.ct2-chip {
  position: absolute; translate: 16px 16px;
  font-family: var(--helv); font-weight: 700; letter-spacing: -.04em;
  font-size: clamp(11px, 1.05vw, 14px); white-space: nowrap;
  background: var(--ink); color: #fff;
  padding: .4em .85em; border-radius: 999px;
  pointer-events: none; z-index: 4;
}

/* a keyboard route into state 2 — the painted button is a texture */
.ct2-open-btn {
  position: absolute; z-index: 3;
  left: -9999px; top: 0;
  font-family: var(--roc); font-weight: 700;
  background: var(--blue); color: #fff; border: 0;
  padding: .7em 1.4em; border-radius: 14px; cursor: pointer;
}
.ct2-open-btn:focus-visible { left: clamp(20px, 4vw, 48px); top: clamp(84px, 11vh, 118px); background: #fff; color: var(--blue); outline: 3px solid #fff; outline-offset: 3px; }

/* ============ STATE 2 — the contact unit ============
   The design's rect, to the pixel (frame 1728×1117, Rectangle 61 at
   479,69 · 1179×549): it is a FIXED panel that stops well above the word,
   not a box that grows with its content. */
.ct2-unit {
  position: absolute; z-index: 3;
  left: 27.72%; right: 4.05%;
  top: 6.18%; height: 49.15%;
  display: flex; flex-direction: column;
  overflow: auto;
  background: #fff;
  border-radius: clamp(18px, 2vw, 30px);
  box-shadow: 0 18px 50px rgba(20, 20, 80, .16), inset 0 0 0 1px #eceaf6;
  padding: clamp(18px, 2.2vw, 34px);
  opacity: 0;
  translate: 0 18px;
  pointer-events: none;
  transition: opacity .38s ease, translate .38s cubic-bezier(.22, .9, .35, 1);
}
body.ct2-open .ct2-unit { opacity: 1; translate: 0 0; pointer-events: auto; }

.ct2-unit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: clamp(14px, 1.6vw, 24px); }
.ct2-unit h2 {
  margin: 0;
  font-family: var(--roc); font-weight: 700;
  font-size: clamp(20px, 2.1vw, 32px); letter-spacing: -.03em; line-height: 1.05;
  color: var(--ink);
}
.ct2-close {
  flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: #f1f0f8; color: var(--ink);
  font-size: 17px; line-height: 1;
  transition: background .2s, transform .2s;
}
.ct2-close:hover { background: var(--blue); color: #fff; transform: rotate(90deg); }

/* the form reuses the site's .ct-form styling; only the frame differs here.
   The unit is a fixed-height panel, so the form fills it and the message box
   takes up whatever slack is left rather than the panel growing. */
.ct2-unit .ct-form { flex: 1; min-height: 0; padding: 0; box-shadow: none; background: none; gap: clamp(10px, 1.1vw, 16px); }
/* the placeholders carry the copy — the labels stay for screen readers only */
.ct2-unit .ct-lb { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ct2-unit .ct-field { gap: 0; }
.ct2-unit .ct2-msg { flex: 1; min-height: 0; }
.ct2-unit .ct-form textarea { min-height: 0; height: 100%; resize: none; }
.ct2-unit .ct-form input, .ct2-unit .ct-form textarea { padding: clamp(10px, 1vw, 15px) clamp(12px, 1.1vw, 18px); }
.ct2-unit .ct-send { align-self: flex-start; padding: clamp(10px, 1vw, 15px) clamp(20px, 2vw, 30px); }
.ct2-unit .ct-note { min-height: 0; }
.ct2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.1vw, 16px); }

/* ---- phone: the unit takes the lower half, the card sits above it ---- */
@media (max-width: 760px) {
  .ct2-big { bottom: -7%; }
  /* pin the unit between a top edge and the bottom margin rather than giving
     it a max-height: svh can resolve taller than the visual viewport, which
     pushed the foot of the form off-screen */
  .ct2-unit {
    left: 12px; right: 12px; top: 42%; bottom: 12px;
    height: auto;            /* let top/bottom govern — the desktop 49.15% would win otherwise */
    max-height: none;
    padding: 16px;
  }
  .ct2-grid { grid-template-columns: 1fr; }
  body.ct2-open .ct2-big { opacity: 0; transition: opacity .3s; }
}
