/* =========================================================================
   Celerium — Team Card module (TC)
   Structural CSS only. Every visual value (color, radius, border, shadow,
   font, padding) is set per-instance in the scoped <style> block inside
   TC-module.html, which feeds the custom properties consumed below.

   HubSpot serves module.css once per page, shared by every instance of the
   module — which is exactly why nothing instance-specific belongs here.
   ========================================================================= */

/* ---------------------------------------------------------------- shell -- */
.tc-module { box-sizing: border-box; }
.tc-module *,
.tc-module *::before,
.tc-module *::after { box-sizing: inherit; }

.tc-frame {
  display: block;
  position: relative;
  /* background-clip intentionally left at border-box: in gradient-stroke
     mode the frame's background IS the visible ring. */
}

.tc-card {
  position: relative;
  display: flex;
  gap: var(--tc-gap, 0px);
  text-align: var(--tc-text, center);
  background-clip: padding-box;
}

/* ------------------------------------------------------------- layouts -- */
/* Row: justify-content = horizontal, align-items = vertical. */
.tc-layout--media-left > .tc-frame > .tc-card {
  flex-direction: row;
  justify-content: var(--tc-h, center);
  align-items: var(--tc-v, flex-start);
}

/* Column: the two axes swap. */
.tc-layout--media-top > .tc-frame > .tc-card {
  flex-direction: column;
  align-items: var(--tc-h, center);
  justify-content: var(--tc-v, flex-start);
}

.tc-media {
  display: flex;
  flex-direction: column;
  align-items: var(--tc-media-h, center);
  text-align: var(--tc-media-text, center);
  min-width: 0;
}

.tc-layout--media-left > .tc-frame > .tc-card > .tc-media {
  flex: 0 0 var(--tc-media-width, 34%);
  max-width: var(--tc-media-width, 34%);
  align-self: var(--tc-media-v, flex-start);
}

.tc-layout--media-top > .tc-frame > .tc-card > .tc-media { width: 100%; }

.tc-body { flex: 1 1 auto; min-width: 0; }
.tc-layout--media-top > .tc-frame > .tc-card > .tc-body { width: 100%; }

/* -------------------------------------------------------------- pieces -- */
.tc-image { max-width: 100%; line-height: 0; }
.tc-image img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Margins come from the Style tab's spacing fields, which are emitted from
   the scoped block at higher specificity, so these are just resets. */
.tc-name,
.tc-title { margin: 0; }
.tc-body > *:first-child { margin-top: 0; }
.tc-body > *:last-child { margin-bottom: 0; }

.tc-social {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--tc-social-gap, 12px);
  justify-content: var(--tc-social-justify, center);
}
.tc-social li { margin: 0; }
.tc-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--tc-social-size, 20px);
  line-height: 1;
  color: var(--tc-social-color, currentColor);
  text-decoration: none;
  transition: color 0.15s ease;
}
.tc-social a:hover,
.tc-social a:focus-visible { color: var(--tc-social-hover, currentColor); }
.tc-social i { display: block; }

/* ------------------------------------------------- gradient stroke ------ */
/* The gradient is painted on a pseudo-element and masked to the border ring
   only. Painting it as the frame's own background made it show through the
   card whenever the card was transparent or semi-transparent - which reads as
   "the border gradient is controlling the card background". Default is hidden
   so a browser without mask-composite gets no border rather than a rectangle
   of gradient over the whole card. */
.tc-frame--gradient::before {
  content: "";
  display: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: var(--tc-bw-t, 0px) var(--tc-bw-r, 0px) var(--tc-bw-b, 0px) var(--tc-bw-l, 0px);
  background-image: var(--tc-border-grad, none);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .tc-frame--gradient::before { display: block; }
}

/* Icons come from HubSpot's icon tag as inline SVG, so they no longer depend
   on Font Awesome being loaded. */
.tc-social svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  display: block;
}

/* ------------------------------------------------- whole-card link ------ */
/* Stretched-link pattern: the overlay is a SIBLING of the content, never a
   parent, so no anchor is ever nested inside another anchor. Real links in
   the bio and the social row sit above the overlay and keep working. */
.tc-cardlink {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  text-decoration: none;
}
.tc-cardlink:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.tc-module--linked .tc-card { cursor: pointer; }

.tc-social a,
.tc-body a,
.tc-body button {
  position: relative;
  z-index: 4;
}

.tc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------------- mobile stack -- */
/* Toggled by the "Stack to a single column on mobile" style field. */
@media (max-width: 768px) {
  .tc-module--stackable.tc-layout--media-left > .tc-frame > .tc-card {
    flex-direction: column;
    align-items: var(--tc-h, center);
    justify-content: flex-start;
  }
  .tc-module--stackable.tc-layout--media-left > .tc-frame > .tc-card > .tc-media {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    align-self: auto;
  }
  .tc-module--stackable.tc-layout--media-left > .tc-frame > .tc-card > .tc-body {
    width: 100%;
  }
}

/* ------------------------------------------------------ print / motion -- */
@media (prefers-reduced-motion: reduce) {
  .tc-social a { transition: none; }
}
