/* ==========================================================================
   Truework — shared utilities (plain CSS; Tailwind Play CDN handles the rest)
   Loaded on every page via relative path: ./assets/css/custom.css (root)
   or ../assets/css/custom.css (/services/).
   ========================================================================== */

/* ---- Base ---------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-feature-settings: "cv11", "ss01"; /* Inter: cleaner 1/l/I glyphs */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #1D4ED8;
  color: #FFFFFF;
}

/* Offset in-page anchors so the sticky header (h-20 = 80px) never covers headings */
[id] {
  scroll-margin-top: 96px;
}

/* Visible, high-contrast keyboard focus on every interactive element */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #1D4ED8;
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark a:focus-visible,
.on-dark button:focus-visible {
  outline-color: #93C5FD;
}

/* ---- Skip link ----------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #1D4ED8;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.875rem;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ---- Header: desktop Services dropdown ----------------------------------- */
.nav-dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
/* Hover for pointer users; .is-open (set by JS on click / Enter / Space) for keyboard + touch */
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown.is-open .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown:hover .nav-chevron,
.nav-dropdown.is-open .nav-chevron {
  transform: rotate(180deg);
}
.nav-chevron {
  transition: transform 0.15s ease;
}

/* Header gains a subtle shadow once the page scrolls */
.site-header.is-scrolled {
  box-shadow: 0 1px 0 #CBD5E1, 0 8px 24px -12px rgba(11, 25, 44, 0.18);
}

/* ---- Decorative backgrounds --------------------------------------------- */
/* Dotted blueprint pattern for light/pastel surfaces (hero, flow diagram) */
.bg-dots-light {
  background-image: radial-gradient(#CBD5E1 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ---- Architecture flow diagram connectors ------------------------------- */
/* Vertical connector with a travelling pulse (used between diagram nodes) */
.flow-line {
  position: relative;
  width: 2px;
  background: #CBD5E1;
  overflow: hidden;
}
.flow-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: linear-gradient(to bottom, transparent, #1D4ED8, transparent);
  animation: flow-pulse 2.4s ease-in-out infinite;
}
@keyframes flow-pulse {
  0%   { top: -40%; }
  100% { top: 100%; }
}

/* Live status dot (voice agent, hero stack) */
.status-dot {
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: inherit;
  animation: status-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes status-ping {
  75%, 100% { transform: scale(2.4); opacity: 0; }
}

/* ---- Check list (service cards) ----------------------------------------- */
/* <ul class="check-list"><li>Item</li></ul> — brand-emerald tick, divider above */
.check-list {
  list-style: none;
  margin-left: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid #CBD5E1;
  display: grid;
  gap: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #0F172A;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.05rem;
  border-radius: 9999px;
  background: #D1FAE5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23047857'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-8 8a1 1 0 01-1.4 0l-4-4a1 1 0 111.4-1.4L8 12.58l7.3-7.3a1 1 0 011.4 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}

/* ---- Logo strip ---------------------------------------------------------- */
/* Alumni logos are pre-tinted dark grey (#4B5563) on a shared 320x96 canvas,
   so every slot renders at the same box size with no CSS filters. */
.logo-slot img {
  display: block;
  width: 160px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 10 / 3;
}

/* ---- Motion preferences -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Hero background photo ---------------------------------------------- */
/* Slow one-time settle-in zoom; disabled by the reduced-motion rule above. */
@keyframes hero-kenburns {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.hero-kenburns {
  animation: hero-kenburns 18s ease-out both;
  transform-origin: 60% 80%;
}
@media (prefers-reduced-motion: reduce) {
  .hero-kenburns { animation: none; }
}

/* ---- Cookie notice (injected by assets/js/main.js) ------------------------ */
.cookie-bar {
  position: fixed;
  z-index: 60;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  margin: 0 auto;
  max-width: 44rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 1rem;
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.25);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-bar.is-visible {
  opacity: 1;
  transform: none;
}
.cookie-bar__text {
  flex: 1 1 18rem;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #334155;
}
.cookie-bar__text strong {
  color: #0F172A;
  font-weight: 600;
}
.cookie-bar__btn {
  flex: none;
  padding: 0.625rem 1.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: #1D4ED8;
  color: #FFFFFF;
  font: 600 0.875rem/1.25rem Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.cookie-bar__btn:hover { background: #1E40AF; }
.cookie-bar__btn:focus-visible {
  outline: 2px solid #1D4ED8;
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .cookie-bar__btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-bar { transition: none; }
}

/* ---- Form honeypot (booking form) ----------------------------------------- */
/* Off-screen rather than display:none, as Formward recommends for _gotcha. */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
