/*
Theme Name: CIG Institutional
Theme URI:
Author: Clinical Integrity Group, LLC
Author URI: https://clinicalintegritygroup.com
Description: Institutional Editorial block theme for Clinical Integrity Group. Native WordPress block theme — templates, template parts and locked patterns, edited in the Site Editor. No page builder, no custom field layer, no third-party service dependency. Installs alongside the existing theme and does not activate itself.
Version: 1.0.3
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
License: All rights reserved — private commissioned work
License URI:
Text Domain: cig-institutional
Tags: block-theme, full-site-editing, accessibility-ready, editor-style
*/

/*
  The complete design system lives in assets/css/institutional.css and is
  enqueued from functions.php, so it is also loaded inside the editor.
  This file carries the theme header and the block-editor reconciliation
  layer only. Do not put page copy in any stylesheet.
*/

/* ---------------------------------------------------------------
   Block reconciliation — keep core block wrappers from disturbing
   the approved composition.
   --------------------------------------------------------------- */

/* Core adds a wrapper class to every group; the approved layout classes
   (wrap, section, hero__grid, ...) must remain the ones that position. */
.wp-block-group {
  margin-block: 0;
}

/* Core buttons: neutralise the default element styling so the approved
   .btn treatment is what renders. */
.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-s);
}
.wp-block-button.btn-shell {
  margin: 0;
  display: inline-flex;
  max-width: 100%;
}
.wp-block-button__link.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 0.95rem 1.6rem;
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
}
.wp-block-button__link.btn--gold {
  background: var(--gold);
  color: var(--navy);
  border: 1px solid var(--gold);
}
.wp-block-button__link.btn--gold:hover,
.wp-block-button__link.btn--gold:focus-visible {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
  color: var(--navy);
}
.wp-block-button__link.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.wp-block-button__link.btn--ghost:hover,
.wp-block-button__link.btn--ghost:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}

/* Core images: the approved figures size themselves. */
.wp-block-image {
  margin: 0;
}
.wp-block-image img {
  display: block;
  height: auto;
}

/* Core lists inside approved registers keep the approved treatment. */
.wp-block-list {
  padding-left: 0;
}

/* Core heading wrapper adds no margin of its own. */
.wp-block-heading {
  margin-block: 0;
}

/* Query loop used by the Insights index. */
.wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Editor-only guardrail: show locked section boundaries faintly so an
   editor understands where a section starts and ends. */
.is-root-container .wp-block-group[class*="section"] {
  outline: 1px dashed rgba(8, 20, 38, 0.14);
  outline-offset: 4px;
}

/* Narrow handsets: a button is an inline-flex box, so its label cannot wrap
   on its own. Below 420px buttons become blocks and long tokens such as an
   email address break rather than overflow the column. */
@media (max-width: 420px) {
  .wp-block-button.btn-shell,
  .wp-block-button.btn-shell .wp-block-button__link.btn,
  .btn {
    display: block;
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
    padding: 0.85rem 1.05rem;
  }
}
