/* ==========================================================================
   Contact page
   Hero (giant Thunder "Let's talk", rotating brief badge) → brief form →
   inverted studio + map. Prefix: ct-
   ========================================================================== */

/* page-level tokens: ink is the type colour, paper the page colour; the inverted
   studio section swaps them */
.ct-page {
  --ct-ink-base: var(--primary);
  --ct-paper-base: var(--white);
  --ct-ink: var(--ct-ink-base);
  --ct-paper: var(--ct-paper-base);
  --ct-muted: color-mix(in srgb, var(--ct-ink) 55%, transparent);
  --ct-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .ct-page {
  --ct-paper-base: var(--black);
  --ct-paper: var(--ct-paper-base);
}

.ct-page section {
  position: relative;
  margin-bottom: -1px;
}

/* small uppercase label used across the page: ( 01 ), readouts, field captions */
.ct-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font_bdogrotesk);
  font-size: 12px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.ct-kicker b {
  font-weight: 400;
  color: var(--ct-ink);
  font-variant-numeric: tabular-nums;
}

/* masked lines for SplitText reveals (contact-animations.js) */
.ct-line-mask {
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

/* ---------- section heads ---------- */
.ct-sec-head {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 3fr;
  gap: 24px 30px;
  align-items: start;
  margin-bottom: clamp(40px, 6vw, 90px);
}

.ct-sec-title {
  font-family: var(--font_sequelsansromanbody);
  font-size: clamp(38px, 6vw, 100px);
  font-weight: 310;
  line-height: 0.95;
  letter-spacing: -0.07em;
  color: var(--ct-ink);
  margin: 0;
}

.ct-sec-title em {
  font-style: normal;
  color: var(--theme);
}

.ct-sec-lede {
  grid-column: 2;
  max-width: 46ch;
  margin: 0;
  font-family: var(--font_dmsans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ct-muted);
}

@media (max-width: 767px) {
  .ct-sec-head { grid-template-columns: 1fr; }
  .ct-sec-lede { grid-column: 1; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.ct-hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(110px, 15vh, 160px) 0 clamp(24px, 4vh, 44px);
  overflow: clip;
}

/* film grain, barely there (same as the about hero) */
.ct-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ct-hero > .container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ct-hero-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(28px, 5vh, 70px);
}

/* Thunder caps paint ~0.225em above a 0.477 line box; the padding gives them room inside the mask */
/* .ct-page prefix beats the body's .font-heading-sequelsans-romanbody h1 rule */
.ct-page .ct-hero-title {
  width: 100%;
  margin: 0;
  font-family: var(--font_thunder);
  font-size: min(36vw, 33vh);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ct-ink);
}

.ct-hero-line {
  position: relative;
  display: block;
  overflow: hidden;
  padding-top: 0.24em;
  line-height: 0.477;
}

.ct-hero-line > span {
  display: inline-block;
}

.ct-hero-line.is-offset {
  padding-left: 1.15em;
}

.ct-hero-line .ct-dot {
  color: var(--theme);
}

/* editorial note tucked into the gap the indented line leaves */
.ct-hero-note {
  position: absolute;
  left: 0.04em;
  bottom: 0.05em;
  max-width: 1em;
  font-family: var(--font_sequelsansromanbody);
  font-size: clamp(13px, 1.4vw, 24px);
  font-style: normal;
  font-weight: 310;
  letter-spacing: -0.04em;
  line-height: 1.05;
  white-space: normal;
  text-transform: none;
  color: var(--ct-muted);
}

/* rotating "send a brief" badge → scrolls to the form */
.ct-badge {
  position: absolute;
  z-index: 4;
  right: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: clamp(110px, 11vw, 180px);
  aspect-ratio: 1;
  margin-top: calc(clamp(110px, 11vw, 180px) / -2);
  border-radius: 50%;
  color: var(--ct-ink);
  background-color: var(--ct-paper);
  border: 1px solid var(--border);
  transition: background-color 0.4s var(--ct-ease), color 0.4s var(--ct-ease), border-color 0.4s var(--ct-ease);
}

.ct-badge svg {
  position: absolute;
  inset: 6%;
  width: 88%;
  height: 88%;
  animation: ctSpin 18s linear infinite;
}

.ct-badge text {
  font-family: var(--font_bdogrotesk);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  fill: currentColor;
}

.ct-badge i {
  font-size: clamp(16px, 1.4vw, 22px);
  transition: transform 0.5s var(--ct-ease);
}

.ct-badge:hover,
.ct-badge:focus-visible {
  color: var(--white);
  background-color: var(--theme);
  border-color: var(--theme);
}

.ct-badge:hover i {
  transform: translateY(4px);
}

@keyframes ctSpin {
  to { transform: rotate(360deg); }
}

.ct-hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.ct-hero-intro {
  max-width: 38ch;
  margin: 0;
  font-family: var(--font_dmsans);
  font-size: clamp(17px, 1.3vw, 22px);
  line-height: 1.45;
  color: var(--ct-muted);
}

.ct-hero-intro span {
  color: var(--ct-ink);
}

.ct-mail-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.ct-mail {
  position: relative;
  display: inline-block;
  font-family: var(--font_sequelsansromanbody);
  font-size: clamp(30px, 4.4vw, 84px);
  font-weight: 310;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--ct-ink);
  padding-bottom: 0.08em;
}

/* underline draws in from the left, leaves to the right */
.ct-mail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--theme);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.7s var(--ct-ease);
}

.ct-mail:hover {
  color: var(--ct-ink);
}

.ct-mail:hover::after,
.ct-mail:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.ct-mail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ct-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  font-family: var(--font_instrumentsans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--ct-ink);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.ct-pill:hover,
.ct-pill:focus-visible,
.ct-pill.is-done {
  color: var(--white);
  background-color: var(--theme);
  border-color: var(--theme);
}

@media (max-width: 991px) {
  .ct-hero-foot { grid-template-columns: 1fr; }
  .ct-mail-wrap { align-items: flex-start; }
  .ct-mail-actions { justify-content: flex-start; }
}

@media (max-width: 767px) {
  .ct-page .ct-hero-title { font-size: 42vw; }
  .ct-hero-note { display: none; }
  .ct-hero-line.is-offset { padding-left: 0.5em; }
  .ct-hero-stage { flex-direction: column; align-items: flex-start; gap: 28px; }
  .ct-badge { position: relative; top: auto; right: auto; margin: 0 0 0 auto; width: 104px; }
  .ct-badge text { font-size: 11.5px; }
}

/* ==========================================================================
   BRIEF — plain labelled form: topics, name, email / phone, message, send
   ========================================================================== */
.ct-brief {
  padding: clamp(60px, 7vw, 100px) 0 clamp(90px, 10vw, 160px);
}

.ct-brief-aside .ct-sec-title {
  margin: 18px 0 24px;
}

.ct-direct {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.ct-direct .ct-kicker {
  margin-bottom: 6px;
}

.ct-direct a {
  font-family: var(--font_instrumentsans);
  font-size: 20px;
  font-weight: 500;
  color: var(--ct-ink);
}

.ct-direct a:hover {
  color: var(--theme);
}

@media (max-width: 1199px) {
  .ct-brief-aside { margin-bottom: 56px; }
}

/* field label: small, readable, always visible */
.ct-label {
  display: block;
  float: none;
  width: auto;
  margin: 0 0 10px;
  padding: 0;
  font-family: var(--font_instrumentsans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ct-ink);
}

.ct-label span {
  font-weight: 400;
  color: var(--ct-muted);
}

.ct-label b {
  font-weight: 500;
  color: var(--theme);
}

/* topic chips */
.ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 48px;
  padding: 0;
  border: 0;
}

.ct-chips legend {
  margin-bottom: 14px;
}

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

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

.ct-chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font_instrumentsans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--ct-ink);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.ct-chip span::before {
  content: "+";
  display: inline-block;
  width: 0.7em;
  font-weight: 400;
  transition: transform 0.4s var(--ct-ease);
}

.ct-chip:hover span {
  border-color: var(--ct-ink);
}

.ct-chip input:checked + span {
  color: var(--white);
  background-color: var(--theme);
  border-color: var(--theme);
}

.ct-chip input:checked + span::before {
  transform: rotate(45deg);
}

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

/* fields: two-column grid, name and message full width */
.ct-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 30px;
}

.ct-field {
  position: relative;
}

.ct-field.is-full {
  grid-column: 1 / -1;
}

.ct-field input,
.ct-field textarea {
  display: block;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  font-family: var(--font_dmsans);
  font-size: 20px;
  line-height: 1.4;
  color: var(--ct-ink);
  outline: none;
  transition: border-color 0.3s ease;
}

.ct-field textarea {
  min-height: 130px;
  resize: vertical;
}

.ct-field input::placeholder,
.ct-field textarea::placeholder {
  color: var(--ct-muted);
  opacity: 0.6;
}

.ct-field input:hover,
.ct-field textarea:hover {
  border-bottom-color: var(--ct-muted);
}

.ct-field input:focus,
.ct-field textarea:focus {
  border-bottom-color: var(--theme);
  box-shadow: 0 1px 0 var(--theme);
}

.ct-field.is-invalid input {
  border-bottom-color: var(--theme);
}

.ct-error {
  display: block;
  min-height: 0;
  margin-top: 8px;
  font-family: var(--font_dmsans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--theme);
}

.ct-error:empty {
  display: none;
}

.ct-count {
  position: absolute;
  right: 0;
  top: 0;
  font-family: var(--font_dmsans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ct-muted);
}

.ct-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 30px;
  margin-top: 44px;
}

.ct-form-fine {
  max-width: 40ch;
  margin: 0;
  font-family: var(--font_dmsans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ct-muted);
}

.ct-form-fine a {
  color: var(--ct-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* send: teal pill; ink fills it from the bottom on hover, arrow nudges forward */
.ct-send {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 8px 8px 8px 30px;
  border: 0;
  border-radius: 100px;
  background-color: var(--theme);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  font-family: var(--font_instrumentsans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.ct-send::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--ct-ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s var(--ct-ease);
}

.ct-send:hover::before,
.ct-send:focus-visible::before {
  transform: scaleY(1);
}

.ct-send:hover,
.ct-send:focus-visible {
  color: var(--ct-paper);
}

.ct-send:focus-visible {
  outline: 2px solid var(--theme);
  outline-offset: 4px;
}

.ct-send-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--theme);
  overflow: hidden;
}

.ct-send-arrow i {
  transition: transform 0.5s var(--ct-ease);
}

.ct-send:hover .ct-send-arrow i {
  transform: translateX(3px) rotate(-45deg);
}

.ct-form.is-sending .ct-send {
  pointer-events: none;
  opacity: 0.7;
}

@media (max-width: 767px) {
  .ct-fields { grid-template-columns: 1fr; gap: 28px; }
  .ct-field input, .ct-field textarea { font-size: 18px; }
  .ct-chips { gap: 8px; margin-bottom: 36px; }
  .ct-chip span { padding: 9px 14px; font-size: 14px; }
  .ct-form-foot { flex-direction: column-reverse; align-items: stretch; }
  .ct-send { justify-content: space-between; }
}

/* ==========================================================================
   STUDIO — inverted section; tokens are swapped so everything inside reads right
   ========================================================================== */
.ct-studio {
  --ct-ink: var(--ct-paper-base);
  --ct-paper: var(--ct-ink-base);
  --border: color-mix(in srgb, var(--ct-ink) 14%, transparent);
  --ct-muted: color-mix(in srgb, var(--ct-ink) 55%, transparent);
  padding: clamp(90px, 10vw, 160px) 0;
  background-color: var(--ct-paper);
  color: var(--ct-ink);
}

.ct-studio-info {
  margin: 0;
  border-top: 1px solid var(--border);
}

.ct-studio-info > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.ct-studio-info dt {
  margin: 0;
  font-family: var(--font_bdogrotesk);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.8;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.ct-studio-info dd {
  margin: 0;
  font-family: var(--font_dmsans);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ct-ink);
}

.ct-studio-info a {
  color: var(--ct-ink);
  background-image: linear-gradient(var(--theme), var(--theme));
  background-size: 0% 1px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: background-size 0.5s var(--ct-ease), color 0.3s ease;
}

.ct-studio-info a:hover {
  color: var(--theme);
  background-size: 100% 1px;
}

.ct-social {
  display: flex;
  gap: 10px;
}

.ct-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background-image: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.ct-social a:hover,
.ct-social a:focus-visible {
  color: var(--white);
  background-color: var(--theme);
  border-color: var(--theme);
}

/* map in a viewfinder frame; desaturated until hovered */
/* stretches to the height of the info column on desktop */
.ct-map {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 320px;
  padding: 18px;
}

.ct-map-corner {
  position: absolute;
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 0 solid var(--ct-ink);
  pointer-events: none;
}

.ct-map-corner.is-tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.ct-map-corner.is-tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.ct-map-corner.is-bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.ct-map-corner.is-br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.ct-map-frame {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.ct-map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) invert(0.9) contrast(0.9);
  transform: scale(1.04);
  transition: filter 0.8s var(--ct-ease), transform 1.2s var(--ct-ease);
}

.dark .ct-map-frame iframe {
  filter: grayscale(1) contrast(1.05);
}

.ct-map:hover .ct-map-frame iframe,
.ct-map:focus-within .ct-map-frame iframe {
  filter: none;
  transform: scale(1);
}

.ct-map-tag {
  position: absolute;
  z-index: 2;
  left: 36px;
  bottom: 36px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 100px;
  background-color: var(--theme);
  font-family: var(--font_bdogrotesk);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  pointer-events: none;
}

.ct-map-tag i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--white);
  animation: ctBlink 1.6s ease-in-out infinite;
}

.ct-map-coords {
  position: absolute;
  z-index: 2;
  top: -26px;
  right: 0;
}

@media (max-width: 991px) {
  .ct-studio-col { margin-bottom: 60px; }
  .ct-map { height: auto; }
  .ct-map-frame { flex: none; height: 260px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ct-map-tag i,
  .ct-badge svg {
    animation: none !important;
  }
  .ct-page *,
  .ct-page *::before,
  .ct-page *::after {
    transition-duration: 0.01ms !important;
  }
}
