/* Shared site header (_header.html) and footer social links (_social.html).
   app.py injects both into every page, so this file must not rely on any
   page's own styles. Colors fall back to the design-system values when a page
   does not load the token stylesheets. */

.tp-hd, .tp-hd-menu {
  --hd-forest: var(--tp-forest, #1E4D40);
  --hd-ink: var(--tp-forest-dark, #163A30);
  --hd-emerald: var(--tp-emerald, #388270);
  --hd-pearl: var(--tp-pearl, #FCF8F1);
  --hd-clay: var(--tp-clay, #E9E5DE);
  --hd-sage: var(--tp-deep-sage, #50574D);
  --hd-amber: var(--tp-amber, #F89C5C);
  --hd-hair: rgba(30, 77, 64, 0.15);
  --hd-gut: clamp(20px, 3.75vw, 48px);
  --hd-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hd-sans: "Albert Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --hd-serif: "PT Serif", Georgia, serif;
  font-family: var(--hd-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.tp-hd *, .tp-hd *::before, .tp-hd *::after,
.tp-hd-menu *, .tp-hd-menu *::before, .tp-hd-menu *::after { box-sizing: border-box; }
.tp-hd a, .tp-hd-menu a { text-decoration: none; }
.tp-hd img { display: block; max-width: 100%; }
.tp-hd :focus-visible, .tp-hd-menu :focus-visible { outline: 3px solid var(--hd-forest); outline-offset: 3px; border-radius: 0; }
.tp-hd-menu[hidden] { display: none !important; }

/* Buttons (same as the site's v4 buttons) */
.tp-hd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 30px; border: 0; border-radius: 999px; font-family: var(--hd-sans); font-size: 1rem; font-weight: 550; letter-spacing: 0.01em; white-space: nowrap; cursor: pointer; transition: background-color 0.3s, box-shadow 0.35s, color 0.3s, transform 0.25s var(--hd-ease); }
.tp-hd-btn:active { transform: scale(0.98); }
.tp-hd-btn svg { width: 17px; height: 17px; flex: none; }
.tp-hd .tp-hd-btn--solid, .tp-hd-menu .tp-hd-btn--solid { background: var(--hd-forest); color: var(--hd-pearl); box-shadow: 0 16px 32px -16px rgba(30, 77, 64, 0.7); }
.tp-hd .tp-hd-btn--solid:hover, .tp-hd-menu .tp-hd-btn--solid:hover { background: var(--hd-ink); color: var(--hd-pearl); }
.tp-hd .tp-hd-btn--amber, .tp-hd-menu .tp-hd-btn--amber { background: var(--hd-amber); color: var(--hd-forest); box-shadow: 0 16px 32px -18px rgba(248, 156, 92, 0.9); }
.tp-hd .tp-hd-btn--amber:hover, .tp-hd-menu .tp-hd-btn--amber:hover { background: #E88A4A; color: var(--hd-forest); }
.tp-hd .tp-hd-btn--soft, .tp-hd-menu .tp-hd-btn--soft { background: rgba(252, 248, 241, 0.72); color: var(--hd-forest); box-shadow: inset 0 0 0 1px var(--hd-hair); }
.tp-hd .tp-hd-btn--soft:hover, .tp-hd-menu .tp-hd-btn--soft:hover { background: var(--hd-clay); color: var(--hd-forest); box-shadow: inset 0 0 0 1px rgba(30, 77, 64, 0.4); }
.tp-hd-btn--sm { height: 44px; padding: 0 20px; font-size: 0.9375rem; }

/* Header bar. By default it overlays the top of the page (height 0), as on
   the industry and v4 pages, whose hero padding leaves room for it.
   .tp-hd--flow keeps its height in the page for pages without that padding. */
.tp-hd { position: sticky; top: 0; z-index: 60; height: 0; }
.tp-hd--flow { height: 84px; }
.tp-hd-in { display: flex; align-items: center; gap: 32px; height: 84px; padding: 0 var(--hd-gut); transition: height 0.45s var(--hd-ease), background-color 0.45s, box-shadow 0.45s; }
.tp-hd[data-scrolled="true"] .tp-hd-in { height: 70px; background: var(--hd-pearl); box-shadow: 0 1px 0 var(--hd-hair); }
.tp-hd-logo { flex: 0 0 auto; }
.tp-hd-logo img { height: 26px; width: auto; }
.tp-hd-links { display: flex; align-items: center; gap: 36px; margin: 0 auto; font-size: 0.9375rem; }
.tp-hd-links > a { position: relative; padding: 6px 0; white-space: nowrap; color: var(--hd-sage); transition: color 0.25s; }
.tp-hd-links > a:hover { color: var(--hd-forest); }
.tp-hd-links > a[aria-current="page"] { color: var(--hd-emerald); }
.tp-hd-end { display: flex; align-items: center; gap: 12px; }
.tp-hd-signin { font-size: 0.9375rem; font-weight: 600; color: var(--hd-forest); white-space: nowrap; padding: 6px 4px; }
.tp-hd .tp-hd-signin { color: var(--hd-forest); }
.tp-hd .tp-hd-signin:hover { color: var(--hd-emerald); }
.tp-hd-menu-btn { display: none; align-items: center; height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: rgba(252, 248, 241, 0.75); box-shadow: inset 0 0 0 1px var(--hd-hair); font-family: var(--hd-sans); font-size: 0.9375rem; font-weight: 550; color: var(--hd-forest); cursor: pointer; }

/* Dropdowns: open on hover and keyboard focus, and on tap through the
   data-open attribute that site.js sets (touch screens have no hover). */
.tp-hd-dd { position: relative; display: flex; align-items: center; }
.tp-hd-dd-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 0; border: 0; background: none; cursor: pointer; font-family: var(--hd-sans); font-size: 0.9375rem; line-height: inherit; color: var(--hd-sage); white-space: nowrap; }
.tp-hd-dd-btn[data-current="true"] { color: var(--hd-emerald); }
.tp-hd-dd-btn svg { transition: transform 0.25s var(--hd-ease); }
.tp-hd-dd:focus-within .tp-hd-dd-btn, .tp-hd-dd[data-open="true"] .tp-hd-dd-btn { color: var(--hd-forest); }
.tp-hd-dd:focus-within .tp-hd-dd-btn svg, .tp-hd-dd[data-open="true"] .tp-hd-dd-btn svg { transform: rotate(180deg); }
.tp-hd-dd-menu { position: absolute; z-index: 1; top: 100%; left: 50%; min-width: 240px; padding: 8px; margin-top: 10px; border-radius: 20px; background: #FFFFFF; box-shadow: 0 0 0 1px var(--hd-hair), 0 24px 48px -24px rgba(30, 77, 64, 0.35); transform: translate(-50%, 6px); opacity: 0; visibility: hidden; transition: opacity 0.18s ease-out, transform 0.18s ease-out, visibility 0s 0.18s; }
.tp-hd-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.tp-hd-dd:focus-within .tp-hd-dd-menu, .tp-hd-dd[data-open="true"] .tp-hd-dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
/* Hover only where there is a real pointer; on touch screens iOS keeps :hover
   stuck after a tap, so a second tap could not close the menu. */
@media (hover: hover) {
  .tp-hd-dd:hover .tp-hd-dd-btn { color: var(--hd-forest); }
  .tp-hd-dd:hover .tp-hd-dd-btn svg { transform: rotate(180deg); }
  .tp-hd-dd:hover .tp-hd-dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
}
.tp-hd-dd-menu a { display: block; padding: 12px 16px; border-radius: 14px; line-height: 1.4; }
.tp-hd-dd-menu a:hover, .tp-hd-dd-menu a[aria-current="page"] { background: var(--hd-clay); }
.tp-hd-dd-menu b { display: block; font-size: 0.9375rem; font-weight: 600; color: var(--hd-forest); }
.tp-hd-dd-menu small { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--hd-sage); }

/* Full-screen menu below 1240px */
.tp-hd-menu { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; gap: 44px; padding: 110px var(--hd-gut) 40px; background: var(--hd-pearl); overflow-y: auto; }
/* Auto margins center the menu when it fits and let it scroll from the top when it is taller than the screen. */
.tp-hd-menu > :first-child { margin-top: auto; }
.tp-hd-menu > :last-child { margin-bottom: auto; }
.tp-hd-menu nav { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tp-hd-menu nav a, .tp-hd-menu-group { padding: 6px 0; font-family: var(--hd-serif); font-size: clamp(2.25rem, 10vw, 3.25rem); line-height: 1.3; letter-spacing: -0.02em; color: var(--hd-forest); }
.tp-hd-menu nav a.tp-hd-menu-sub { padding: 2px 0; font-family: var(--hd-sans); font-size: 1.25rem; letter-spacing: 0; color: var(--hd-emerald); }
.tp-hd-menu nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.tp-hd-menu-ctas { display: grid; gap: 12px; width: 100%; max-width: 360px; margin: 0 auto; }

@media (max-width: 1239px) {
  .tp-hd-links, .tp-hd-signin, .tp-hd .tp-hd-demo { display: none; }
  .tp-hd-end { margin-left: auto; gap: 10px; }
  .tp-hd-menu-btn { display: inline-flex; }
}
@media (min-width: 1240px) { .tp-hd-menu { display: none !important; } }
/* The header is too wide for the default gaps just above 1240px. */
@media (min-width: 1240px) and (max-width: 1299px) {
  .tp-hd-in { gap: 20px; }
  .tp-hd-links { gap: 24px; }
  .tp-hd-end { gap: 8px; }
}
@media (max-width: 759px) {
  .tp-hd-in { height: 68px; }
  .tp-hd--flow { height: 68px; }
  .tp-hd-logo img { height: 21px; }
}
@media (max-width: 699px) { .tp-hd .tp-hd-btn--amber.tp-hd-btn--sm { display: none; } }
@media (max-width: 479px) { .tp-hd .tp-hd-btn--sm { display: none; } }

/* Footer social links (_social.html), below the contact line */
.tp-social { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.tp-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--tp-forest, #1E4D40); text-decoration: none; box-shadow: inset 0 0 0 1px rgba(30, 77, 64, 0.2); transition: background-color 0.25s, color 0.25s, box-shadow 0.25s; }
.tp-social a:hover { background: var(--tp-forest, #1E4D40); color: var(--tp-pearl, #FCF8F1); box-shadow: inset 0 0 0 1px var(--tp-forest, #1E4D40); }
.tp-social a:focus-visible { outline: 3px solid var(--tp-forest, #1E4D40); outline-offset: 3px; }
.tp-social svg { display: block; width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .tp-hd *, .tp-hd-menu *, .tp-social * { transition-duration: 0.001ms !important; }
}
/* Left-aligned variant for footers laid out in columns */
.tp-social-start .tp-social { justify-content: flex-start; margin-top: 0; }
