/* ==========================================================================
   Pavilion — shared site styles (every page)
   Breakpoints:  mobile < 768  ·  tablet 768–1099  ·  desktop ≥ 1100
   Figma reference frames: Desktop 1440 · Mobile 402
   Page-specific styles live in css/pages/*.css
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* No grey/blue tap flash on phones for anything tappable, including whole cards with a click handler
   (homepage 3-up accordion); it inherits, so html covers every element. :focus-visible still shows for keyboards. */
html, a, button, summary, label { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--color-off-white);
  color: var(--color-black);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--color-maroon); outline-offset: 3px; }

/* ---------- Type utilities (map 1:1 to Figma text styles) ---------- */
.t-display, .t-h1, .t-h2, .t-h3, .t-h4, .t-h45, .t-h5, .t-quote {
  font-family: var(--font-serif); font-weight: 400; color: var(--color-maroon);
  letter-spacing: var(--ls-heading); text-wrap: balance;
}
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); }
.t-h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
.t-h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.t-h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.t-h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); }
.t-h45 { font-size: var(--fs-h45); line-height: var(--lh-h45); }
.t-quote { font-size: var(--fs-quote); line-height: var(--lh-quote); }
.t-h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); }
.t-body-xl { font-size: var(--fs-body-xl); line-height: var(--lh-body-xl); }
.t-body-lg { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-caption { font-size: var(--fs-caption); line-height: var(--lh-caption); }
.t-label {
  font-family: var(--font-mono); font-size: var(--fs-label); line-height: 1.4;
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--color-maroon);
}
/* Leading trim: Figma's text styles trim to cap height / baseline, so the gaps
   in the design are measured between letters, not line boxes. text-box does
   the same in current Chrome and Safari; other browsers ignore it and show
   slightly looser spacing. */
.t-display, .t-h1, .t-h2, .t-h3, .t-h4, .t-h45, .t-h5, .t-quote,
.t-body-xl, .t-body-lg, .t-body, .t-caption, .t-label, .trim {
  text-box: trim-both cap alphabetic;
}

.t-script {
  font-family: var(--font-script); font-size: var(--fs-script); line-height: 1.2;
  color: var(--color-maroon); letter-spacing: 0;
}

/* ---------- Buttons & pills ---------- */
.btn, .nav-pill, .chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1;
  color: var(--color-maroon); white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--light { background: var(--color-off-white); }
.btn--light:hover { background: var(--color-white); }
.btn--yellow { background: var(--color-yellow-300); }
.btn--yellow:hover { background: var(--color-yellow-200); }

/* ---------- Header ---------- */
.site-header {
  position: relative; height: 100px; background: var(--color-yellow-100);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px 0 34px;
}
.nav-pill { border: 1px solid var(--stroke-soft); background: transparent; }
.nav-pill:hover { border-color: rgba(17,17,17,.35); }
.nav-pill--menu { width: 66px; padding: 0; }
.site-header__logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.site-header__logo img { width: 189px; height: auto; }


/* Light header (Contact, Careers, job listings) */
.site-header--light { background: var(--color-off-white); }

/* Sticky header (js/site.js): once the header has scrolled out of view it becomes
   fixed and hidden; scrolling up slides it back down, scrolling down tucks it away. */
.site-header.is-stuck {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--color-off-white);   /* always off-white once sticky, whatever the hero colour */
  box-shadow: 0 1px 0 rgba(17, 17, 17, .06);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.site-header.is-stuck.is-hidden { transform: translateY(-100%); box-shadow: none; }
.site-header.no-anim { transition: none !important; }
/* Overlay header (Careers) goes solid once it detaches from the hero */
.site-header--overlay.is-stuck { background: var(--color-off-white); }
.site-header--overlay.is-stuck .nav-pill { border-color: var(--stroke-soft); color: var(--color-maroon); }
.site-header--overlay.is-stuck .site-header__logo img { filter: none; }

/* ---------- Small utilities ---------- */
.muted { color: var(--color-gray-400); }
.muted-66 { color: var(--text-muted); }
.muted-33 { color: rgba(17, 17, 17, .33); }
.stack-20 { display: flex; flex-direction: column; gap: 20px; }
.site-header--gray { background: var(--color-gray-100); }
.rule { height: 24px; margin: 0; border: 0; background: linear-gradient(var(--color-gray-200), var(--color-gray-200)) center / 100% 1px no-repeat; }

/* Centered section heading: eyebrow + title (+ lede) */
.section-head { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; max-width: 844px; margin: 0 auto; }
.section-head .t-h2 { max-width: 628px; }
.section-head__lede { max-width: 628px; margin-top: 20px; color: var(--color-black); }

/* Round icon badge (Figma: 50px circle, 26px icon) */
.icon-circle { width: 50px; height: 50px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--color-orange-200); }
.icon-circle img { width: 26px; height: 26px; }

/* Carousel dots (6px, active 100% / others 25%) */
.dots { display: flex; justify-content: center; gap: 8px; }
.dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--color-gray-400)); opacity: .25; transition: opacity .2s, background-color .2s; }
.dots span.is-active { opacity: 1; background: var(--color-black); }   /* active dot is always Black */
.dots--maroon { --dot: var(--color-maroon); }
.dots--mobile { display: none; }

/* Horizontal swipe rows (used on mobile, and wherever a row outgrows the page) */
.swipe { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.swipe::-webkit-scrollbar { display: none; }

/* ---------- Accordion (Figma "Accordion item") ----------
   <details class="acc" name="group"> gives one-open-at-a-time natively. */
.accordion { display: flex; flex-direction: column; }
.acc { border-top: 1px solid var(--acc-line, var(--color-gray-200)); }
.acc:last-child { border-bottom: 1px solid var(--acc-line, var(--color-gray-200)); }
.acc__head {
  display: flex; align-items: center; gap: 20px; padding: 20px 0; cursor: pointer; list-style: none;
}
.acc__head::-webkit-details-marker { display: none; }
.acc__toggle {
  position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--acc-toggle, var(--color-purple-200)); transition: filter .2s ease;
}
.acc__toggle::before, .acc__toggle::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px;
  background: var(--color-black); border-radius: 1px; transition: transform .2s ease;
}
.acc__toggle::after { transform: rotate(90deg); }
.acc[open] .acc__toggle::after { transform: rotate(0); }
.acc__head:hover .acc__toggle { filter: brightness(.96); }
.acc__title { flex: 1; color: var(--color-black); }
.acc__num { color: var(--color-black); }
.acc__body { padding: 0 0 20px 60px; display: flex; flex-direction: column; gap: 24px; }
.acc__body .t-body { max-width: 570px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--color-gray-400); }
.checklist li::before {
  content: ""; width: 16px; height: 16px; flex: none; margin-top: .05em;
  background: var(--color-slate);
  -webkit-mask: url("../assets/img/icon-check.svg") center / 16px no-repeat; mask: url("../assets/img/icon-check.svg") center / 16px no-repeat;
}
.theme-pm { --acc-line: var(--color-blue-300); --acc-toggle: var(--color-blue-200); }

@media (max-width: 767px) {
  .dots--mobile { display: flex; }
  .section-head { gap: 20px; }
  .acc__head { padding: 16px 0; gap: 16px; }
  .acc__toggle { width: 32px; height: 32px; order: 3; }
  .acc__num { order: 0; }
  .acc__title { order: 1; }
  .acc__body { padding: 0 48px 20px 0; }
}

/* ---------- Menu drawer (markup injected by js/site.js) ----------
   Figma: "Menu drawer" component — Desktop 480 wide panel over a 35% scrim,
   Mobile full-screen. The hand-drawn arrow points at the current page. */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .35);
  opacity: 0; transition: opacity .3s ease;
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; inset: 0 auto 0 0; width: 480px; max-width: 100%;
  background: var(--color-yellow-200); color: var(--color-maroon);
  display: flex; flex-direction: column; padding: 50px 50px 40px 20px;
  overflow: hidden auto; overscroll-behavior: contain;
  transform: translateX(-100%); transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__nav { display: flex; flex-direction: column; gap: 36px; }
.drawer__item {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding-left: 24px; width: fit-content;
}
.drawer__item-title { font-family: var(--font-serif); font-size: 32px; line-height: 1.08; letter-spacing: var(--ls-heading); text-box: trim-both cap alphabetic; }
.drawer__item-sub { font-size: 14px; line-height: 1.4; color: var(--color-maroon); text-box: trim-both cap alphabetic; }
.drawer__item:hover .drawer__item-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.drawer__home { display: block; padding-left: 24px; width: fit-content; position: relative; }
.drawer__home img { width: 27px; height: auto; margin: 2.5px; }
.drawer__logo, .drawer__close-m { display: none; }
.drawer__arrow { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; fill: var(--color-maroon); }
.drawer__arrow--m { display: none; }
.drawer__bottom { margin-top: auto; padding-left: 20px; padding-top: 40px; display: flex; flex-direction: column; gap: 28px; }
.drawer__divider { height: 1px; background: var(--color-yellow-300); }
.drawer__contact { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.drawer__contact .t-caption { color: var(--color-maroon); }
.btn--maroon { background: var(--color-maroon); color: var(--color-off-white); }
.btn--maroon:hover { background: var(--color-maroon-dark); }
.drawer__close-d {
  position: absolute; top: 12px; right: 12px; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.drawer__close-d:focus-visible { width: auto; height: auto; clip: auto; padding: 8px 12px; border-radius: 999px; }
body.drawer-open { overflow: hidden; }

@media (max-width: 767px) {
  .drawer__scrim { display: none; }
  .drawer__panel { width: 100%; padding: 0 20px 32px; }
  .drawer__home, .drawer__close-d, .drawer__arrow--d { display: none; }
  .drawer__arrow--m { display: block; }
  .drawer__logo { display: block; position: absolute; left: 50%; top: 21px; transform: translateX(-50%); }
  .drawer__logo img { width: 120px; height: auto; }
  .drawer__close-m {
    display: inline-flex; position: absolute; left: 20px; top: 14px; width: 52px; height: 36px;
    align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgba(17,17,17,.10);
  }
  .drawer__nav { padding-top: 104px; gap: 32px; }
  .drawer__item { padding-left: 0; gap: 14px; }
  .drawer__item-title { font-size: 26px; line-height: 1.1; }   /* Mobile/H4 */
  .drawer__bottom { padding-left: 0; gap: 24px; }
  .drawer__contact { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer__panel, .drawer__scrim { transition: none; }
}

/* ---------- Footer ---------- */
/* Light header (Contact, Careers, job listings) */
.site-header--light { background: var(--color-off-white); }

/* ---------- Menu drawer (markup injected by js/site.js) ----------
   Figma: "Menu drawer" component — Desktop 480 wide panel over a 35% scrim,
   Mobile full-screen. The hand-drawn arrow points at the current page. */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .35);
  opacity: 0; transition: opacity .3s ease;
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; inset: 0 auto 0 0; width: 480px; max-width: 100%;
  background: var(--color-yellow-200); color: var(--color-maroon);
  display: flex; flex-direction: column; padding: 50px 50px 40px 20px;
  overflow: hidden auto; overscroll-behavior: contain;
  transform: translateX(-100%); transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__nav { display: flex; flex-direction: column; gap: 36px; }
.drawer__item {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding-left: 24px; width: fit-content;
}
.drawer__item-title { font-family: var(--font-serif); font-size: 32px; line-height: 1.08; letter-spacing: var(--ls-heading); text-box: trim-both cap alphabetic; }
.drawer__item-sub { font-size: 14px; line-height: 1.4; color: var(--color-maroon); text-box: trim-both cap alphabetic; }
.drawer__item:hover .drawer__item-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.drawer__home { display: block; padding-left: 24px; width: fit-content; position: relative; }
.drawer__home img { width: 27px; height: auto; margin: 2.5px; }
.drawer__logo, .drawer__close-m { display: none; }
.drawer__arrow { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; fill: var(--color-maroon); }
.drawer__arrow--m { display: none; }
.drawer__bottom { margin-top: auto; padding-left: 20px; padding-top: 40px; display: flex; flex-direction: column; gap: 28px; }
.drawer__divider { height: 1px; background: var(--color-yellow-300); }
.drawer__contact { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.drawer__contact .t-caption { color: var(--color-maroon); }
.btn--maroon { background: var(--color-maroon); color: var(--color-off-white); }
.btn--maroon:hover { background: var(--color-maroon-dark); }
.drawer__close-d {
  position: absolute; top: 12px; right: 12px; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.drawer__close-d:focus-visible { width: auto; height: auto; clip: auto; padding: 8px 12px; border-radius: 999px; }
body.drawer-open { overflow: hidden; }

@media (max-width: 767px) {
  .drawer__scrim { display: none; }
  .drawer__panel { width: 100%; padding: 0 20px 32px; }
  .drawer__home, .drawer__close-d, .drawer__arrow--d { display: none; }
  .drawer__arrow--m { display: block; }
  .drawer__logo { display: block; position: absolute; left: 50%; top: 21px; transform: translateX(-50%); }
  .drawer__logo img { width: 120px; height: auto; }
  .drawer__close-m {
    display: inline-flex; position: absolute; left: 20px; top: 14px; width: 52px; height: 36px;
    align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgba(17,17,17,.10);
  }
  .drawer__nav { padding-top: 104px; gap: 32px; }
  .drawer__item { padding-left: 0; gap: 14px; }
  .drawer__item-title { font-size: 26px; line-height: 1.1; }   /* Mobile/H4 */
  .drawer__bottom { padding-left: 0; gap: 24px; }
  .drawer__contact { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer__panel, .drawer__scrim { transition: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--color-maroon); padding: 80px var(--gutter) 48px; color: var(--color-off-white); }
.site-footer__mark {
  /* inline SVG wordmark (works over file:// too); color comes from the footer theme */
  display: block; width: 100%; max-width: var(--content-max); height: auto; margin: 0 auto 32px;
  color: var(--color-maroon-dark);
}
.site-footer__bar { max-width: var(--content-max); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; }
.site-footer__bar p { color: var(--color-white); }
.site-footer__links { order: 2; display: flex; gap: 16px; }   /* Figma: copyright left, links right */
.site-footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Light footer */
.site-footer--light { background: var(--color-off-white); color: var(--color-gray-400); }   /* Figma: Gray/Gray-400 */
.site-footer--light .site-footer__mark { color: var(--color-gray-200); }
.site-footer--light .site-footer__bar p { color: var(--color-gray-400); }

@media (max-width: 767px) {
  .site-header { height: 64px; padding: 0 20px; }
  .nav-pill--menu { width: 52px; min-height: 36px; border-color: rgba(17,17,17,.10); }
  .nav-pill--contact { display: none; }
  .site-header__logo img { width: 120px; }
  .site-footer { padding: 56px 20px 40px; }
  .site-footer__bar { flex-direction: row; align-items: flex-start; gap: 16px; }
  .site-footer__links { order: 0; flex-direction: column; gap: 16px; }
  .site-footer__bar p { font-size: 10px; line-height: 1.4; width: 171px; flex: none; }
}

@media (min-width: 1441px) {
  :root { --gutter: calc((100% - 1440px) / 2 + 80px); }
  /* header stays at the window edges (34 / 30px), not inside the 1440 frame; the logo stays centred */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Footer social links (LinkedIn, Instagram) — left of Privacy Policy on desktop, above it on mobile.
   URLs are placeholders (about:blank) until the real profiles are ready. */
.site-footer__links { align-items: center; }
.site-footer__social { display: flex; align-items: center; gap: 16px; }
.site-footer__social a { display: block; width: 20px; height: 20px; color: inherit; opacity: .9; transition: opacity .2s; }
.site-footer__social a:hover { opacity: 1; text-decoration: none; }
.site-footer__social svg { display: block; width: 100%; height: 100%; fill: currentColor; }
@media (max-width: 767px) {
  .site-footer__links { align-items: flex-start; }
  .site-footer__social { margin: 0 0 4px; }
}

/* Menu drawer social links: small, maroon at 60%, full strength on hover */
.drawer__social { display: flex; align-items: center; gap: 14px; }
.drawer__social a { display: block; width: 18px; height: 18px; color: var(--color-maroon); opacity: .6; transition: opacity .2s; }
.drawer__social a:hover, .drawer__social a:focus-visible { opacity: 1; }
.drawer__social svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* ---------- Carousel arrows (js/site.js, Figma "Carousel Arrows") — replace dots + swipe hints ---------- */
[data-carousel-dots], .companies__swipe-hint, .team__hint, .carousel-dots, .dots--mobile { display: none !important; }
.carousel-nav { display: flex; justify-content: flex-end; gap: 8px; width: 100%; box-sizing: border-box; }
.carousel-nav[hidden] { display: none; }
.carousel-nav__btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: var(--color-white); border: 1px solid var(--color-gray-200); color: var(--color-black);
  transition: background-color .2s ease, opacity .2s ease;
}
.carousel-nav__btn--next svg { transform: scaleX(-1); }
.carousel-nav__btn:hover:not(:disabled) { background: var(--color-gray-100); }
.carousel-nav__btn:disabled { opacity: .35; cursor: default; }
.carousel-nav__btn:focus-visible { outline: 2px solid var(--color-maroon); outline-offset: 2px; }
@media (max-width: 767px) { .carousel-nav { justify-content: center; } }   /* Figma mobile: centred */


/* ---------- Light footer · mobile (Figma "Footern Mobile" 6439:14343) ----------
   20px padding all round, 40px between wordmark / links row / copyright.
   Links row: two equal columns (20px gap) — social icons left, Privacy + Terms stacked right, both at 70%.
   Copyright: 10px Gray-300 at 50%. */
@media (max-width: 767px) {
  .site-footer--light { padding: 20px; }
  .site-footer--light .site-footer__mark { margin-bottom: 40px; }
  .site-footer--light .site-footer__bar { flex-direction: column; gap: 40px; }
  .site-footer--light .site-footer__links {
    width: 100%; display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; row-gap: 8px; align-items: start;
  }
  .site-footer--light .site-footer__social { grid-column: 1; grid-row: 1 / span 2; align-self: center; margin: 0; opacity: .7; }
  .site-footer--light .site-footer__links > a { grid-column: 2; font-size: 14px; line-height: 1; opacity: .7; }
  .site-footer--light .site-footer__bar p { width: auto; font-size: 10px; line-height: 1; color: var(--color-gray-300); opacity: .5; }
}

/* Swipe rows scroll sideways only. A row with overflow-x: auto also scrolls vertically by default whenever
   its content is a pixel taller than the row, which on phones feels like a box scrolling inside the page.
   Each rule applies only where that row already scrolls sideways, so nothing new gets clipped. */
.homes__track, .companies__tabs { overflow-y: hidden; }
@media (max-width: 1099px) { .audiences__track { overflow-y: hidden; } }
@media (max-width: 767px) {
  .features__track, .services__grid, .advantage__grid, .overview__row, .team__grid, .companies__grid { overflow-y: hidden; }
}
