/* Shared PSMJ component styles, nav chrome, modal, HubSpot form skin, animations.
   Loaded by every page alongside the compiled Tailwind stylesheet (style.css). */

.eyebrow {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--psmj-red);
  color: var(--psmj-white);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: var(--radius-btn);
  transition:
    background var(--duration-base) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
  min-height: 48px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--psmj-red-600);
}
.btn-primary:active {
  background: var(--psmj-red-700);
  transform: translateY(1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--psmj-navy);
  border: 1px solid var(--psmj-navy);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 13px 25px;
  border-radius: var(--radius-btn);
  transition: background var(--duration-base) var(--ease-standard);
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
}
.btn-secondary:hover {
  background: rgba(6, 41, 70, 0.06);
}

.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--psmj-white);
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  padding: 13px 25px;
  border-radius: var(--radius-btn);
  transition: background var(--duration-base) var(--ease-standard);
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Diagonal red slash motif — separates stats/labels and punctuates heroes. */
.slash {
  display: inline-block;
  width: 56px;
  height: 4px;
  background: var(--psmj-red);
  transform: skewX(-28deg);
}

.container-psmj {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}
.container-wide {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Scroll reveal (opacity + 8px rise, per the motion rules) */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 280ms var(--ease-standard),
    transform 280ms var(--ease-standard);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tombstone cards */
.tombstone-card {
  transition:
    box-shadow var(--duration-base) var(--ease-standard),
    transform var(--duration-base) var(--ease-standard);
}
.tombstone-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Modal — matched 1:1 to the M&A Tombstones reference module. */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.8);
}
.modal-overlay[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 794px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--psmj-white);
  border: 1px solid var(--psmj-border);
  border-radius: 8px;
  box-shadow:
    0 10px 15px -3px rgba(6, 41, 70, 0.1),
    0 4px 6px -4px rgba(6, 41, 70, 0.1);
  padding: 32px;
  margin: auto;
  align-self: center;
  justify-self: center;
}
.modal-panel--wide {
  max-width: 1100px;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--psmj-navy);
  opacity: 0.7;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: opacity 160ms var(--ease-standard);
}
.modal-close:hover {
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

/* Team bio modal — real paragraph spacing so multi-paragraph bios breathe. */
#bio-modal-body p {
  margin: 0 0 1.1em;
}
#bio-modal-body p:last-child {
  margin-bottom: 0;
}



/* FAQ accordion */
.faq-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 20px 24px;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--psmj-navy);
  transition: background-color 200ms cubic-bezier(0.2, 0, 0.2, 1);
}

.faq-trigger:hover {
  background: rgba(6, 41, 70, 0.04);
}

.faq-icon {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--psmj-red);
  transition: transform 200ms cubic-bezier(0.2, 0, 0.2, 1);
}

.faq-icon::before {
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
}

.faq-icon::after {
  top: 0;
  left: 7px;
  width: 2px;
  height: 16px;
}

.faq-trigger[aria-expanded="true"] .faq-icon::after {
  transform: scaleY(0);
}

.faq-panel {
  padding: 0 24px 22px;
}

.faq-panel[hidden] {
  display: none;
}

/* HubSpot form internals — third-party markup we do not control. */
.modal-panel .modal-body #hubspot-form-subscribe,
.modal-panel .hbspt-form {
  background: #ffffff;
}
.modal-panel .hbspt-form {
  margin: 0 !important;
}
.modal-panel .hs-form-field {
  margin-bottom: 20px;
}
.modal-panel fieldset {
  max-width: none !important;
  border: 0;
  margin: 0;
  padding: 0;
}
.modal-panel form {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
.modal-panel fieldset.form-columns-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
.modal-panel fieldset.form-columns-2 .hs-form-field,
.modal-panel form > .hs_firstname,
.modal-panel form > .hs_lastname {
  flex: 1 1 calc(50% - 10px);
  width: auto !important;
  float: none !important;
}
.modal-panel fieldset.form-columns-1 .hs-form-field,
.modal-panel form > .hs_email,
.modal-panel form > .hs-form-field:not(.hs_firstname):not(.hs_lastname) {
  width: 100% !important;
  float: none !important;
  flex: 1 1 100%;
}

.modal-panel .hs-form-field > .input {
  margin-right: 0 !important;
}
.modal-panel .hs-form-field > label,
.modal-panel .hs-form-field > label span {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--psmj-navy);
}
.modal-panel .hs-form-field > label {
  display: block;
  margin-bottom: 8px;
}
.modal-panel .hs-form-required {
  color: var(--psmj-red);
}
.modal-panel input[type="text"],
.modal-panel input[type="email"],
.modal-panel input[type="tel"],
.modal-panel select,
.modal-panel textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 0 14px;
  min-height: 52px;
  background: #f5f8fa;
  border: 1px solid var(--psmj-border);
  border-radius: var(--radius-btn);
  color: var(--psmj-navy);
}
.modal-panel .hs-button,
.modal-panel input[type="submit"] {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  background: var(--psmj-red);
  color: var(--psmj-white);
  border: 0;
  border-radius: var(--radius-btn);
  padding: 16px 40px;
  cursor: pointer;
  transition: none;
  text-decoration: none;
  box-shadow: none;
}
.modal-panel .hs-button:hover,
.modal-panel .hs-button:focus,
.modal-panel .hs-button:active,
.modal-panel input[type="submit"]:hover,
.modal-panel input[type="submit"]:focus,
.modal-panel input[type="submit"]:active {
  background: var(--psmj-red) !important;
  color: var(--psmj-white) !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transform: none !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  font-family: var(--font-body) !important;
  padding: 16px 40px !important;
}

.modal-panel .hs_submit {
  margin-top: 32px;
  text-align: center;
  flex: 1 1 100%;
  width: 100% !important;
}
.modal-panel .hs_submit .actions {
  text-align: center;
  padding: 0;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .tombstone-card {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* The nav host div would otherwise become the sticky containing block and the
   header would scroll away with it. display:contents hoists the header into
   the page wrapper so `position: sticky` has the full page to stick against. */
[data-site-nav] {
  display: contents;
}

/* HubSpot site-wide header offset: the PSMJ shared top nav is 84px tall, so the
   in-page sticky nav sits just below it (Tailwind `top-21`). */
body {
  overflow: unset !important;
}

/* HubSpot compatibility — restores Tailwind responsive visibility */
@media (min-width: 640px) {
  .sm\:inline,
  .sm\:flex,
  .sm\:block {
    visibility: visible !important;
  }
  .sm\:inline *,
  .sm\:flex *,
  .sm\:block * {
    visibility: visible !important;
  }
}
@media (min-width: 768px) {
  .md\:flex,
  .md\:block,
  .md\:inline {
    visibility: visible !important;
  }
  .md\:flex *,
  .md\:block *,
  .md\:inline * {
    visibility: visible !important;
  }
}
@media (min-width: 1024px) {
  nav.hidden,
  .lg\:flex,
  .lg\:block,
  .lg\:inline {
    visibility: visible !important;
  }
  nav.hidden *,
  .lg\:flex *,
  .lg\:block *,
  .lg\:inline * {
    visibility: visible !important;
  }
}

/* Belt-and-braces: HubSpot's global .hidden rule also forces display:none */
@media (min-width: 640px) {
  [class*="sm:inline"] {
    display: inline !important;
  }
  [class*="sm:flex"] {
    display: flex !important;
  }
  [class*="sm:block"] {
    display: block !important;
  }
}
@media (min-width: 768px) {
  nav[class*="hidden"][class*="md:flex"] {
    display: flex !important;
  }
  [class*="md:flex"] {
    display: flex !important;
  }
  [class*="md:block"] {
    display: block !important;
  }
  [class*="md:inline"] {
    display: inline !important;
  }
}
@media (min-width: 1024px) {
  [class*="lg:flex"] {
    display: flex !important;
  }
  [class*="lg:block"] {
    display: block !important;
  }
  [class*="lg:inline"] {
    display: inline !important;
  }
}

/* Fallback line-clamp for text excerpt truncation in the team grid. */
.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-none {
  -webkit-line-clamp: unset;
}

/* ---------- Completed AEC Transactions page ---------- */

/* Select arrow (data-URI background, not expressible as a utility). */
.psmj-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23062946' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-size: 12px;
}

/* Selected filter chip — driven by an attribute JS toggles. */
.psmj-chip[aria-pressed="true"] {
  background: var(--psmj-navy);
  border-style: solid;
  border-color: var(--psmj-navy);
  color: var(--psmj-white);
}

/* Card reveal, added/removed by the IntersectionObserver. */
.psmj-card {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 500ms ease-out,
    transform 500ms ease-out,
    box-shadow 200ms cubic-bezier(0.2, 0, 0.2, 1);
}
.psmj-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .psmj-card {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

