/* ============================================================
   Winjit US - Contact
   Uses the page family already established on the landing and
   industry pages: the .in-hero band with glass stat tiles, the
   .in-dec card grid, and the site .contact-form. Only what those
   do not already cover lives here.
   ============================================================ */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------
   Hero - reuses .lp-hero (landing page background: aurora,
   engineering grid, horizon glow). That component's sub/CTA
   reveal is driven by js/landing.js adding .is-ready, which
   this page doesn't load, so show the sub directly and give it
   the same one-shot CSS entrance the other .in-hero pages use.
   ------------------------------------------------------------ */
.ct-hero__inner h1 { animation: in-rise 900ms var(--ease-out) both; }
.ct-hero__inner .lp-hero__sub {
  opacity: 1; transform: none;
  animation: in-rise 900ms var(--ease-out) 150ms both;
}

/* "We are Winjit" reuses .lp-impact-grid / .lp-cell as-is from
   landing.css - no page-specific overrides needed. */

/* ------------------------------------------------------------
   Values We Vibe By - reuses .lp-gov's dark governance band and
   card grid; three values instead of that component's usual four
   ------------------------------------------------------------ */
#values .lp-gov__grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { #values .lp-gov__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { #values .lp-gov__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------
   Leadership - the .in-mark card with a portrait above it
   ------------------------------------------------------------ */
.ct-people { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 24px); margin-top: 34px; }
.ct-person {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--strokes); border-radius: var(--radius-card);
  transition: opacity 500ms var(--ease-out), transform 250ms var(--ease-out), box-shadow 250ms ease, border-color 250ms ease;
}
.ct-person:hover { transform: translateY(-4px); box-shadow: var(--shadow-blue-lift); border-color: var(--blue-hover-border); }
/* placeholder until real portraits are supplied */
.ct-person__photo {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1; display: grid; place-items: center; align-content: center; gap: 6px;
  background: linear-gradient(150deg, var(--grad-soft-stops));
  border-bottom: 1px solid var(--strokes);
}
.ct-person__photo span {
  font-family: var(--ff-display); font-size: 30px; font-weight: 700; color: var(--primary); opacity: .5;
}
.ct-person__photo em { font-style: normal; font-size: 11px; letter-spacing: .04em; color: var(--grey-500); }
.ct-person__body { padding: 20px 20px 22px; }
.ct-person h3 { font-size: 17px; font-weight: 700; margin: 0 0 4px; color: var(--grey-900); }
.ct-person__role { margin: 0 0 10px; font-size: 14px; color: var(--grey-600); }
.ct-person__link { font-size: 12.5px; color: var(--grey-400); font-style: italic; }
@media (max-width: 800px) { .ct-people { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------
   Contact - split hero (headline, deck, stats, globe graphic)
   next to a flat-field lead form, direct details in a strip below
   ------------------------------------------------------------ */
.ct-contact { position: relative; overflow: hidden; scroll-margin-top: calc(var(--header-h) + 16px); }

.ct-contact__globe {
  position: absolute; left: -6%; bottom: -12%; width: min(60%, 720px);
  pointer-events: none; user-select: none; z-index: 0;
}

.ct-contact__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: .87fr 1fr; gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
}
.ct-contact__intro { display: flex; flex-direction: column; }
.ct-contact__intro .ct-direct { margin-top: auto; }
.ct-contact__intro h2 { font-weight: 700; max-width: 14ch; }
.ct-contact__intro .lp-deck { max-width: 42ch; }

.ct-contact__stats {
  display: flex; flex-wrap: wrap; gap: clamp(28px, 3vw, 48px);
  margin-top: clamp(28px, 3.4vw, 44px);
}
.ct-contact__num {
  display: block; font-family: var(--ff-display); font-weight: 700;
  font-size: clamp(30px, 3vw, 38px); color: var(--grey-900); line-height: 1;
}
.ct-contact__num em { font-style: normal; color: var(--live-green); }
.ct-contact__stats p { margin: 8px 0 0; max-width: 16ch; font-size: 14.5px; line-height: 1.4; color: var(--grey-700); }

/* Card and field measurements below match the live global-site
   contact form (winjit.com/contact) pixel for pixel, so the US and
   global forms read as the same component. Values that already
   equal a design token use the token; the few that don't (heading
   scale, field padding/radius, button height) are literal because
   they're specific to this measured form, not the general scale. */
.ct-form {
  background: #fff; border: 1px solid var(--strokes); border-radius: var(--radius-card);
  padding: 36px; box-shadow: var(--shadow-blue-lift);
  /* Stretches to the intro column so both cards end on the same line;
     the message box absorbs the extra height (see textarea below). */
  display: flex; flex-direction: column;
}
.ct-form form { flex: 1; display: flex; flex-direction: column; }
.ct-form h3 { font-size: 32px; font-weight: 600; line-height: 1.2; margin: 0 0 24px; max-width: 16ch; color: var(--grey-900); }
.ct-form input, .ct-form textarea {
  display: block; width: 100%; box-sizing: border-box; margin: 0 0 16px; padding: 14px 20px;
  font-family: var(--ff-base); font-size: 14px; color: var(--grey-900);
  background: var(--grey-100); border: 1px solid transparent; border-radius: var(--radius-control);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.ct-form input::placeholder, .ct-form textarea::placeholder { color: var(--grey-500); }
.ct-form input:focus, .ct-form textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--focus-halo); background: #fff;
}
.ct-form textarea { flex: 1 0 auto; min-height: 100px; resize: vertical; }
.ct-form__error { display: block; margin: -12px 0 12px; font-size: 13px; font-weight: 600; color: #B42318; }
.ct-form__error:empty { margin: 0; }
.ct-form input.is-invalid, .ct-form textarea.is-invalid { border-color: #B42318; }
.ct-form__consent { margin: 0 0 20px; font-size: 12px; line-height: 18px; color: #6C757D; }
.ct-form__consent span { color: var(--primary); }

/* Two-column name row: First name / Last name side by side on
   desktop, stacked on narrow viewports (media query further down). */
.ct-form__row { display: flex; gap: 14px; margin: 0 0 16px; }
.ct-form__row input { margin-bottom: 0; }
.ct-form__row + .ct-form__error:not(:empty) { margin-top: -4px; }

/* Honeypot: present in the DOM and in the tab order of nothing, so a
   scripted filler still finds it but a sighted or keyboard visitor
   never does. display:none is deliberately avoided since some bots
   skip hidden fields; this is off-screen instead. */
.ct-form__hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Consent checkbox row, styled to sit at the same weight as the
   inputs above it rather than as a footnote. */
.ct-form__check {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 20px;
  font-size: 12px; line-height: 18px; color: #6C757D;
}
.ct-form__check input {
  margin: 2px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--primary);
}
.ct-form__check label { cursor: pointer; }

/* Turnstile widget slot: same position as the captcha on the global
   form, between the message box and the consent line. */
/* Light theme + flexible width are set on the element; the widget
   itself is a Cloudflare iframe, so only its frame can be shaped here:
   same radius as the fields, clipped so its square corners don't show. */
/* Rounding the outer box alone slices through Cloudflare's own 1px
   square-cornered border and leaves chipped corners. Instead, clip 1px
   off every edge so their border disappears, and draw one rounded
   border of ours on top (pointer-events: none keeps it clickable). */
.cf-turnstile {
  position: relative; margin: 4px 0 20px; line-height: 0;
  clip-path: inset(1px round var(--radius-control));
}
.cf-turnstile::after {
  content: ""; position: absolute; inset: 1px; pointer-events: none;
  border: 1px solid var(--strokes); border-radius: var(--radius-control);
}

.ct-submit {
  display: flex; width: 100%; justify-content: center; align-items: center;
  min-height: 49px; padding: 10px 20px;
  font-family: var(--ff-base); font-size: 18px; font-weight: 700;
  background: var(--grey-900); color: #fff; border: 0; border-radius: 46px; cursor: pointer;
}
.ct-submit:hover { background: #000; }
.ct-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.ct-form__status { margin: 14px 0 0; font-size: 14px; font-weight: 600; text-align: center; min-height: 1.3em; }
.ct-form__status[data-state="error"] { color: #B42318; }
.ct-form__status[data-state="success"] { color: var(--live-green); }

@media (max-width: 560px) {
  .ct-form__row { flex-direction: column; gap: 16px; }
}

/* Direct contact - same card weight as the form: this is the
   other half of "how to reach us," not a footer afterthought */
.ct-direct {
  position: relative; z-index: 1; margin-top: clamp(24px, 3vw, 32px);
  background: #fff; border: 1px solid var(--strokes); border-radius: var(--radius-card);
  box-shadow: var(--shadow-blue-lift); padding: clamp(34px, 4vw, 48px);
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
.ct-direct__item { position: relative; padding-left: clamp(52px, 5vw, 60px); min-height: 52px; }
.ct-direct__icon {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; padding: 7px;
  color: var(--primary); background: var(--soft-blue); border-radius: 50%;
}
.ct-direct h3 {
  margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--primary);
}
.ct-direct p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--grey-700); }
.ct-direct a { color: var(--grey-900); font-weight: 600; }
.ct-direct a:hover { color: var(--primary); }

.ct-note { margin: 28px 0 0; font-size: 15px; line-height: 1.6; color: var(--grey-600); }
.ct-note a { color: var(--primary); font-weight: 700; }
.ct-note a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ct-global { position: relative; z-index: 1; margin: 28px 0 0; font-size: 15px; color: var(--grey-600); }
.ct-global a { color: var(--primary); font-weight: 700; }
.ct-global a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  /* minmax(0, 1fr), not 1fr: a plain 1fr track grows to its widest
     child's min-content, and the Turnstile iframe (300px minimum) was
     pushing the whole column past the viewport on phones. */
  .ct-contact__grid { grid-template-columns: minmax(0, 1fr); }
  .ct-direct { grid-template-columns: 1fr; gap: 20px; }
  /* stacked: margin-top:auto collapses to 0 with no spare height */
  .ct-contact__intro .ct-direct { margin-top: 28px; }
}

/* Phones. The form's inner width must stay >= 300px for Turnstile's
   flexible widget: 375 - 2x20 gutter - 2x16 padding - 2 border = 301. */
@media (max-width: 560px) {
  .ct-contact__intro h2 { max-width: none; }
  .ct-form { padding: 28px 16px 20px; }
  .ct-form h3 { font-size: 26px; margin-bottom: 20px; }
  .ct-direct { padding: 24px 20px; gap: 22px; }
  .ct-direct__item { padding-left: 50px; min-height: 0; }
  .ct-direct p { font-size: 16px; }
}
/* 360px-class Androids: trim the gutter so Turnstile still gets 300px */
@media (max-width: 374px) {
  .ct-contact .container { padding-left: 12px; padding-right: 12px; }
}

/* leadership sits on the black surface, so the cards follow it */
.lp-gov .ct-person { background: var(--midnight-card); border-color: var(--midnight-card-border); }
.lp-gov .ct-person:hover { border-color: rgba(0, 237, 135, .45); box-shadow: 0 16px 36px rgba(0, 0, 0, .35); }
.lp-gov .ct-person__photo { background: linear-gradient(150deg, #1C1C22, #14201C); border-bottom-color: var(--midnight-card-border); }
.lp-gov .ct-person__photo span { color: var(--aurora-mint); opacity: .6; }
.lp-gov .ct-person__photo em { color: var(--grey-500); }
.lp-gov .ct-person h3 { color: #fff; }
.lp-gov .ct-person__role { color: var(--grey-400); }

/* LinkedIn link on a leadership card */
.ct-person__link {
  display: inline-flex; align-items: center; gap: 8px; font-style: normal;
  font-size: 13.5px; font-weight: 700; color: var(--primary);
}
.ct-person__link svg { width: 16px; height: 16px; flex: 0 0 auto; }
.ct-person__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.lp-gov .ct-person__link { color: var(--aurora-mint); }

/* supplied portrait sits over the placeholder */
.ct-person__photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
}

/* /contact page: the contact block is the whole page. <main> already
   clears the fixed header. 60px here puts the headline's letters 74px
   below the header: the h2's line-height adds ~14px above the glyphs. */
.page-contact .ct-contact { padding-top: 75px; min-height: 100vh; }
@media (max-width: 560px) {
  .page-contact .ct-contact { padding-top: 40px; min-height: 0; }
}
