/* ==========================================================================
   FalconryTrust — Phase C design enhancements
   Loads after styles.css and wp-compat.css.
   Overrides only. Does not replace the V12 design system.
   ========================================================================== */

:root {
  --motion: 180ms ease;
  --section-intro-space: clamp(28px, 1.6vw + 18px, 48px);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion: 0.001ms;
  }
}

@media (max-width: 768px) {
  :root {
    --section-space: clamp(44px, 7vw, 56px);
    --section-space-small: clamp(24px, 4.5vw, 36px);
    --section-intro-space: clamp(24px, 4vw, 32px);
  }
}

/* ------------------------------------------------------------------ Header */

.site-head {
  border-bottom-color: rgba(143, 193, 234, .28);
}

.head-inner {
  min-height: 76px;
  gap: 20px;
}

.brand {
  align-items: center;
  gap: 12px;
}

.brand-stack {
  gap: 3px;
}

.brand-sub {
  letter-spacing: .08em;
  font-size: .56rem;
  font-weight: 500;
  line-height: 1.3;
  color: #9db2c6;
}

.brand-powered {
  font-size: .6rem;
  letter-spacing: .04em;
  line-height: 1.35;
  color: #b9cbdc;
}

.nav {
  gap: 2px;
}

.nav-link {
  padding: 11px 15px;
  letter-spacing: .01em;
  transition: background-color var(--motion), color var(--motion);
}

.head-cta {
  padding: 10px 18px;
  letter-spacing: .02em;
  transition: background-color var(--motion), color var(--motion);
}

.burger {
  transition: background-color var(--motion), border-color var(--motion);
}

.burger:hover,
.burger:focus-visible {
  background: rgba(143, 193, 234, .12);
  border-color: var(--steel);
}

.mega a {
  transition: background-color var(--motion), color var(--motion);
}

@media (min-width: 1081px) {
  .head-inner {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 16px;
    min-height: 78px;
  }

  .brand {
    justify-self: start;
    min-width: 0;
  }

  .brand-stack {
    flex-shrink: 0;
  }

  .brand-sub,
  .brand-powered {
    white-space: nowrap;
  }

  .site-head nav {
    justify-self: center;
    min-width: 0;
  }

  .head-cta {
    justify-self: end;
  }

  .nav {
    gap: 8px;
    padding: 3px;
  }

  .nav-link {
    position: relative;
    padding: 8px 14px;
    font-weight: 500;
    letter-spacing: .04em;
    color: #d5e2ee;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    transition: background-color var(--motion), color var(--motion);
  }

  a.nav-link:hover,
  .nav-link:hover,
  .nav-link:focus-visible,
  .nav-link[aria-expanded="true"] {
    background: rgba(143, 193, 234, .11);
    border-color: transparent;
    color: #fff;
    box-shadow: none;
  }

  .nav-link.is-current {
    background: transparent;
    border-color: transparent;
    color: #fff;
    box-shadow: none;
  }

  .nav-link.is-current::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 5px;
    height: 2px;
    background: var(--orange);
    pointer-events: none;
  }

  .mega::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 16px;
  }

  .mega {
    border-radius: 8px;
  }

  .mega a:hover {
    border-radius: 6px;
  }
}

@media (min-width: 1280px) {
  /*
    14-inch baseline header. Side columns share leftover space; the nav
    column is content-sized so it does not sit in a growing 1fr and drift
    toward the page centre. Keep this track list unchanged through the
    15/16-inch range — extra viewport width becomes outer margin, not
    internal header spread.
  */
  .head-inner {
    grid-template-columns: minmax(0, 1.12fr) auto minmax(0, 1fr);
    gap: 32px;
  }

  .site-head nav {
    justify-self: stretch;
  }
}

/* ------------------------------------------------------------------ Hero */

.hero {
  padding-top: clamp(64px, 7.5vw, 104px);
}

.hero-grid {
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
}

.hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 675;
  font-size: clamp(2.7rem, 1.3rem + 3.4vw, 4.4rem);
  line-height: 1.04;
  max-width: 18.5ch;
  margin-bottom: .28em;
  letter-spacing: -.02em;
  font-optical-sizing: auto;
  font-variation-settings: 'wght' 675, 'opsz' 60;
}

.hero .lede {
  max-width: 46ch;
  line-height: 1.5;
  font-size: clamp(1.05rem, .98rem + .28vw, 1.22rem);
}

.hero-actions {
  gap: 14px;
  margin-top: 34px;
}

.hero-foot {
  padding: 18px 0 44px;
}

@media (max-width: 900px) {
  .hero-grid {
    align-items: start;
  }

  .hero h1 {
    max-width: 18.5ch;
  }
}

@media (max-width: 520px) {
  .hero h1 {
    max-width: none;
  }

  .hero-actions .btn,
  .hero-actions .head-cta {
    width: 100%;
    text-align: center;
  }
}

/* Inner-page masts share the same heading restraint */
.mast h1,
.narrative-hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 675;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-optical-sizing: auto;
  font-variation-settings: 'wght' 675, 'opsz' 60;
}

.mast-aside {
  padding-top: 20px;
}

/* ------------------------------------------------------------------ Buttons */

.btn,
.head-cta {
  letter-spacing: .02em;
  border-radius: 6px;
  transition: background-color var(--motion), border-color var(--motion), color var(--motion);
}

.btn {
  padding: 12px 22px;
}

.btn-primary:hover,
.head-cta:hover {
  background: #d93f00;
}

.btn-primary:active,
.head-cta:active,
.btn-ghost:active,
.btn-solid:active {
  transform: translateY(1px);
}

.btn-ghost {
  border-color: rgba(143, 193, 234, .55);
}

.btn-ghost:hover {
  background: rgba(143, 193, 234, .16);
  border-color: var(--steel);
  color: #fff;
}

.btn-solid:hover {
  background: #0a3d67;
}

.pre-footer-cta .btn-ghost:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary:active,
  .head-cta:active,
  .btn-ghost:active,
  .btn-solid:active {
    transform: none;
  }
}

/* ------------------------------------------------------------------ Cards
   Phase 2 — hierarchy and register-like grids. Geometry unchanged. */

.grid,
.pillar-grid,
.role-grid,
.persona-grid,
.feature-grid,
.story-grid,
.delivery-grid,
.ai-grid,
.agents,
.proof,
.anchor-groups,
.connected-chain,
.tiers,
.next {
  background: rgba(12, 74, 124, .2);
  border-color: rgba(12, 74, 124, .2);
}

.band-ink .grid,
.band-ink .proof,
.band-ink .connected-chain,
.band-ink .tiers {
  background: var(--rule-ink);
  border-color: var(--rule-ink);
}

.feature-card,
.role-card,
.ai-card,
.proof-card,
.persona-card,
.delivery-card,
.team-card {
  padding: 28px 24px;
}

.cell {
  padding: 24px 22px;
}

.output-grid > article {
  padding: 24px 20px;
}

.connected-chain > div {
  padding: 18px 16px;
}

.anchor-groups > div {
  padding: 26px 24px 18px;
}

.dashboard-bridge .role-card {
  padding: 20px 22px;
}

.persona-card,
.delivery-card {
  display: flex;
  flex-direction: column;
}

.role-label,
.card-tag,
.proof-sector,
.cell-num,
.delivery-number {
  letter-spacing: .16em;
}

.role-label,
.card-tag {
  margin-bottom: 8px;
}

.feature-card h3,
.role-card h3,
.ai-card h3,
.persona-card h3,
.delivery-card h3,
.proof-card h3,
.pillar-card h3,
.cell h3 {
  line-height: 1.22;
  margin-bottom: 14px;
}

.feature-card p,
.role-card p,
.persona-card p,
.delivery-card p,
.pillar-card p,
.ai-card p,
.proof-card p,
.cell p {
  line-height: 1.52;
}

.persona-card a,
.delivery-card a {
  margin-top: auto;
  padding-top: 16px;
}

.band:not(.band-ink) .cell h3 {
  color: var(--navy);
}

.band-ink .cell h3 {
  color: #fff;
}

@media (max-width: 640px) {
  .feature-card,
  .role-card,
  .ai-card,
  .proof-card,
  .persona-card,
  .delivery-card,
  .team-card,
  .cell,
  .agent {
    padding: 22px 18px;
  }

  .dashboard-bridge .role-card {
    padding: 18px 16px;
  }
}

/* ------------------------------------------------------------------ Registers / tables
   Phase 2 — scanability only. Not cards, not dashboards. */

.table-scroll {
  border-color: rgba(12, 74, 124, .22);
}

.reg-table caption {
  padding-bottom: 12px;
  letter-spacing: .01em;
}

.reg-table thead th {
  background: var(--pale);
  color: var(--navy);
  letter-spacing: .1em;
  padding: 11px 16px;
}

.reg-table th,
.reg-table td {
  padding: 12px 16px;
  line-height: 1.5;
  border-bottom-color: rgba(12, 74, 124, .16);
}

.reg-table td:first-child {
  font-weight: 650;
  line-height: 1.4;
}

.reg-table tbody tr:nth-child(even) {
  background: rgba(12, 74, 124, .035);
}

.reg-table tbody tr:nth-child(odd):hover {
  background: var(--white);
}

.reg-table tbody tr:nth-child(even):hover {
  background: rgba(12, 74, 124, .035);
}

.dl {
  border-top-color: rgba(12, 74, 124, .22);
}

.dl > div {
  padding: 18px 0;
  gap: 8px 40px;
  border-bottom-color: rgba(12, 74, 124, .16);
}

.dl dt {
  line-height: 1.35;
}

.dl dd {
  line-height: 1.55;
}

.band-ink .dl,
.band-ink .dl > div {
  border-color: var(--rule-ink);
}

/* ------------------------------------------------------------------ Interactive cards
   Hover/focus only on components that are actually links. */

a.pillar-card,
.sectors a,
.next a {
  transition: background-color var(--motion), box-shadow var(--motion);
}

a.pillar-card:hover,
.sectors a:hover,
.next a:hover {
  box-shadow: inset 0 2px 0 var(--orange);
}

.persona-card a,
.delivery-card a,
.card-link,
.cell h3 a {
  display: inline-block;
  transition: color var(--motion), transform var(--motion);
}

a.pillar-card:hover .card-link,
a.pillar-card:focus-visible .card-link,
.persona-card a:hover,
.persona-card a:focus-visible,
.delivery-card a:hover,
.delivery-card a:focus-visible,
.cell h3 a:hover,
.cell h3 a:focus-visible {
  transform: translateX(3px);
  text-decoration: none;
}

.cell h3 a:hover,
.cell h3 a:focus-visible {
  color: var(--falcon);
}

/* ------------------------------------------------------------------ Section hierarchy */

.kicker {
  letter-spacing: .18em;
  margin: 0 0 16px;
  font-weight: 650;
}

.sec-head h2,
.section-intro h2,
.ai-intro h2,
.pre-footer-cta h2,
.split > div > h2,
.story > div > h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.65rem, 1.35rem + 1.05vw, 2.35rem);
  line-height: 1.14;
  letter-spacing: -.015em;
  max-width: 22ch;
  font-optical-sizing: auto;
  font-variation-settings: 'wght' 600, 'opsz' 36;
}

.demo-head h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-weight: 540;
  letter-spacing: -.016em;
  line-height: 1.2;
  font-variation-settings: 'opsz' 20, 'wght' 540;
  font-feature-settings: 'cv05' 1, 'ss01' 1;
}

.sec-head .lede,
.section-intro .lede,
.sec-head p {
  margin-top: .35em;
}

.crumb {
  letter-spacing: .04em;
  margin-bottom: 22px;
}

/* ------------------------------------------------------------------ Phase 1 — section rhythm
   Same-surface follow-on sections stay connected. Colour changes keep
   full padding as chapter breaks. Heroes, masts, showcase, pre-footer
   and footer are left on their existing padding. */

.band-white + .band-white,
.band:not(.band-white):not(.band-ink):not(.hero):not(.pre-footer-cta) + .band:not(.band-white):not(.band-ink):not(.pre-footer-cta) {
  padding-top: var(--section-space-small);
}

.ai-intro {
  margin-bottom: var(--section-intro-space);
}

/* ------------------------------------------------------------------ Footer / pre-footer */

.pre-footer-cta .split {
  align-items: end;
}

.pre-footer-cta h2 {
  max-width: 16ch;
}

.site-foot {
  padding: 72px 0 32px;
}

.foot-grid-v8 {
  padding-bottom: 44px;
}

.foot-line {
  margin: 16px 0 12px;
}

.foot-grid-v8 .foot-col > a,
.foot-pillars a,
.foot-legal a,
.foot-email {
  transition: color var(--motion), border-color var(--motion);
}

.foot-email:hover {
  color: var(--orange) !important;
  border-bottom-color: var(--orange);
  text-decoration: none;
}

.foot-pillars {
  padding: 22px 0;
}

.foot-legal {
  padding-top: 26px;
}

/* ------------------------------------------------------------------ Inner-page consistency */

.form-card {
  box-shadow: 0 18px 36px -28px rgba(8, 34, 57, .5);
}

.field input,
.field select,
.field textarea {
  transition: border-color var(--motion);
}

.spine a {
  transition: background-color var(--motion);
}

.jrail a {
  transition: background-color var(--motion), color var(--motion);
}

/* ------------------------------------------------------------------ Accessibility */

.btn:focus-visible,
.head-cta:focus-visible,
.nav-link:focus-visible,
.burger:focus-visible,
.mega a:focus-visible,
.pillar-card:focus-visible,
.sectors a:focus-visible,
.next a:focus-visible,
.persona-card a:focus-visible,
.delivery-card a:focus-visible,
.cell h3 a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .head-inner {
    min-height: 70px;
  }
}

/* ------------------------------------------------------------------ Large monitors (≥1920px)
   1366–1728 keep the Phase B 1280px shell so 14/15/16-inch laptops share
   the same internal composition. Extra width is outer margin.
   At 1920+ the shell grows modestly; header tracks stay as at 1280. */

@media (min-width: 1920px) {
  :root {
    --container-max: 1400px;
    --maxw: var(--container-max);
  }
}

/* ------------------------------------------------------------------ Risk register diagram
   Corrected geometry; section-width scale (no isolated 880px cap). */

.risk-register-fig .risk-register-svg {
  display: block;
  width: 100%;
  height: auto;
}

.risk-register-list,
.risk-register-hub {
  display: none;
}

@media (max-width: 900px) {
  .risk-register-fig .risk-register-svg {
    display: none;
  }

  .risk-register-hub {
    display: block;
    margin: 0 0 18px;
    padding: 22px 20px;
    background: var(--navy);
    color: #fff;
    text-align: center;
  }

  .risk-register-hub strong {
    display: block;
    font-family: Fraunces, Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
  }

  .risk-register-hub span {
    display: block;
    margin-top: 6px;
    font-size: .82rem;
    color: var(--steel);
  }

  .risk-register-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    background: var(--rule);
    border: 1px solid var(--rule);
  }

  .risk-register-list li {
    background: var(--white);
    padding: 12px 14px;
    font-size: .88rem;
    color: var(--navy);
    font-weight: 500;
  }
}

@media (max-width: 460px) {
  .risk-register-list {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------ About — Leadership & Team
   Scoped to .leadership-section only. Does not restyle .team-grid / .team-card. */

.leadership-section .leadership-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 24px;
  background: transparent;
  border: 0;
}

.leadership-section .leadership-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ink);
  border: 1px solid var(--rule-ink);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color var(--motion);
}

.leadership-section .leadership-card:hover {
  border-color: rgba(143, 193, 234, .38);
}

.leadership-section .leadership-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--ink);
}

.leadership-section .leadership-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.leadership-section .leadership-content {
  flex: 1;
  padding: 18px 18px 22px;
}

.leadership-section .leadership-name {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.22;
  margin: 0 0 8px;
}

.leadership-section .leadership-role {
  margin: 0;
  max-width: none;
  font-size: .76rem;
  letter-spacing: .05em;
  font-weight: 700;
  line-height: 1.45;
  color: #FF8A55;
}

@media (max-width: 940px) {
  .leadership-section .leadership-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .leadership-section .leadership-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .leadership-section .leadership-content {
    padding: 16px 16px 20px;
  }
}
