:root {
  --animails-shell-width: 1280px;
  --animails-shell-gutter: 80px;
  --animails-shell-ink: #171717;
  --animails-shell-purple: #5b2ea0;
  --animails-shell-lime: #c6f135;
  --animails-shell-beige: #f5f2e8;
  --animails-shell-border: #e3dfd2;
  --animails-shell-header-h: 130px;
}

body:not(.animails-netlify-front) .wp-site-blocks {
  display: flex;
  width: 100%;
  max-width: none;
  flex-direction: column;
  gap: 0 !important;
  margin-inline: 0;
  padding: 0;
  overflow: clip;
}

body:not(.animails-netlify-front) .wp-site-blocks > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

body:not(.animails-netlify-front) header.wp-block-template-part,
body:not(.animails-netlify-front) footer.wp-block-template-part,
body:not(.animails-netlify-front) header.wp-block-template-part > .wp-block-shortcode,
body:not(.animails-netlify-front) footer.wp-block-template-part > .wp-block-shortcode {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
}

/* Figma node 357:4077 + 357:4078: 50px topbar + 80px header.
 * The template part is the sticky box (a sticky child could not leave its 130px
 * parent): it parks 50px above the viewport, so the topbar scrolls away and the
 * 80px nav stays. Phones hide the topbar and park at 0. */
body:not(.animails-netlify-front) header.wp-block-template-part:has(.animails-site-header) {
  position: sticky;
  top: calc(-50px + var(--wp-admin--admin-bar--height, 0px));
  z-index: 100;
  height: var(--animails-shell-header-h);
  flex: 0 0 var(--animails-shell-header-h);
  overflow: visible;
}
body:not(.animails-netlify-front) header.wp-block-template-part:has(.animails-site-header) > .wp-block-shortcode {
  height: 100%;
}

body:not(.animails-netlify-front) .wp-site-blocks > header,
body:not(.animails-netlify-front) .wp-site-blocks > footer,
.animails-site-header,
.animails-site-footer,
.a3-service-page {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

/* Blog/archive/article backgrounds are full bleed exactly like service pages.
 * Reading widths live only on their inner shells. Never constrain the outer
 * main canvas, because Gutenberg/global layout styles can otherwise reveal
 * white gutters around full-width hero sections. */
body:not(.animails-netlify-front) .wp-site-blocks > :is(.a3-blog-main,.a3-archive,.a3-article),
.a3-blog-main,
.a3-archive,
.a3-article,
.a3-blog-home,
.a3-blog-hero,
.a3-article__shell,
.a3-article__hero-section {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  align-self: stretch;
}

.animails-shell-container {
  width: 100%;
  max-width: calc(var(--animails-shell-width) + (2 * var(--animails-shell-gutter)));
  margin-inline: auto;
  padding-inline: var(--animails-shell-gutter);
}

/* Search lists use the same 1280px canvas, 24px grid gaps and 21px card
 * headings as the blog archive, rather than three columns inside 780px.
 * Scoped here because the shared shell also loads on search results. */
main#main.animails-search {
  width: 100% !important;
  max-width: none !important;
  padding-inline: 0 !important;
}
.animails-search > :is(.wp-block-query-title, .wp-block-query) {
  width: min(var(--animails-shell-width), calc(100% - (2 * var(--animails-shell-gutter))));
  max-width: none !important;
  margin-inline: auto;
}
main#main.animails-search > .wp-block-query { margin-block-start: 40px !important; }
.animails-search .wp-block-post-template { gap: 24px; }
html body main#main.animails-search .wp-block-post-title {
  font: 600 21px/1.35 Sora, Geist, sans-serif !important;
  letter-spacing: -.02em !important;
  overflow-wrap: normal;
  word-break: normal;
}
.animails-search .wp-block-post-title a { color: inherit; text-decoration: none; }
.animails-search .wp-block-post-title a:hover { color: var(--animails-shell-purple); }
@media (max-width: 1024px) {
  .animails-search > :is(.wp-block-query-title, .wp-block-query) { width: calc(100% - 64px); }
  .animails-search .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .animails-search > :is(.wp-block-query-title, .wp-block-query) { width: calc(100% - 40px); }
  .animails-search .wp-block-post-template { grid-template-columns: 1fr; gap: 16px; }
}

/* wpautop leaves empty <p> in the shell on block-template pages (one between the brand and
 * <nav>); as a flex item with a 32px gap it moved the menu ~110px right of its homepage position. */
.animails-site-header p:empty,
.animails-site-footer p:empty { display: none; }

/* ===================== HEADER – exact Figma desktop shell ===================== */
.animails-site-header {
  position: relative;
  z-index: 100;
  height: 130px;
  color: var(--animails-shell-ink);
  font-family: Geist, sans-serif;
}
.animails-site-header .animails-shell-topbar {
  height: 50px;
  min-height: 50px;
  border-bottom: 1px solid var(--animails-shell-border);
  background: var(--animails-shell-beige);
}
.animails-site-header .topbar-inner {
  display: flex;
  height: 50px;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 0;
}
.animails-site-header .topbar-note {
  margin: 0;
  color: var(--animails-shell-ink);
  font: 600 12px/1.4 Sora, Geist, sans-serif;
}
.animails-site-header .contacts {
  display: flex;
  height: 26px;
  align-items: center;
  gap: 16px;
}
.animails-site-header .chip-contact {
  display: inline-flex;
  height: 26px;
  min-height: 26px;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--animails-shell-border);
  border-radius: 4px;
  background: #fff;
  color: var(--animails-shell-ink);
  font: 700 12px/1.5 Geist, sans-serif;
  text-decoration: none;
}
.animails-site-header .chip-contact .ph {
  flex: 0 0 auto;
  color: var(--animails-shell-purple);
  font-size: 14px;
  line-height: 1;
}

.animails-site-header .animails-shell-header {
  position: sticky;
  top: 0;
  z-index: 101;
  height: 80px;
  border-bottom: 1px solid var(--animails-shell-border);
  background: #fff;
}
.animails-site-header .nav {
  display: flex;
  height: 80px;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-block: 0;
}
/* `.brand` is intentionally kept in markup for the temporary homepage mirror,
 * but the shell owns positioning through the unique class below. */
.animails-site-header .animails-shell-brand {
  display: flex !important;
  width: 162px;
  height: 44px;
  flex: 0 0 162px;
  align-self: center !important;
  align-items: center;
  justify-content: flex-start;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  inset: auto !important;
  translate: none !important;
  transform: none !important;
  line-height: 0;
}
.animails-site-header .animails-shell-brand img {
  display: block !important;
  width: 162px;
  height: 44px;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  translate: none !important;
  transform: none !important;
  object-fit: contain;
  object-position: left center;
}
.animails-site-header .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.animails-site-header .nav-links > a,
.animails-site-header .nav-services > summary {
  color: var(--animails-shell-ink);
  font: 600 14px/1.4 Sora, Geist, sans-serif;
  text-decoration: none;
}
.animails-site-header .nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.animails-site-header .header-cta {
  width: 233px;
  min-height: 48px;
  padding: 16px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--animails-shell-lime);
  color: var(--animails-shell-ink);
  font: 600 16px/1 Sora, Geist, sans-serif;
  letter-spacing: -.01em;
  text-decoration: none;
}
.animails-site-header .menu-btn {
  position: relative;
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--animails-shell-border);
  border-radius: 50%;
  background: #fff;
  color: var(--animails-shell-ink);
  cursor: pointer;
}
.animails-site-header .menu-btn .ph {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  line-height: 1;
  color: currentColor;
  transition: opacity 160ms ease;
}
.animails-site-header .menu-btn .ph-x { opacity: 0; }
.animails-site-header .menu-btn[aria-expanded="true"] .ph-list { opacity: 0; }
.animails-site-header .menu-btn[aria-expanded="true"] .ph-x { opacity: 1; }

/* ===================== FOOTER – Figma node 336:2876 ===================== */
.animails-site-footer {
  height: 394px;
  min-height: 394px;
  margin: 0;
  padding: 88px 0 40px;
  background: var(--animails-shell-beige);
  color: var(--animails-shell-ink);
  font-family: Geist, sans-serif;
}
.animails-site-footer .footer-inner {
  display: flex;
  height: 266px;
  flex-direction: column;
  gap: 56px;
}
.animails-site-footer .footer-top {
  display: grid;
  height: 172px;
  flex: 0 0 172px;
  grid-template-columns: 340px repeat(3, minmax(0, 240px));
  gap: 40px;
}
.animails-site-footer .footer-brand {
  display: flex;
  width: 340px;
  height: 172px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.animails-site-footer .footer-brand img {
  display: block;
  width: 180px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}
.animails-site-footer .footer-brand p {
  width: 340px;
  height: 66px;
  margin: 0;
  color: var(--animails-shell-ink);
  font: 400 14px/1.55 Geist, sans-serif;
}
.animails-site-footer .socials {
  display: flex;
  height: 26px;
  gap: 12px;
}
.animails-site-footer .social {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--animails-shell-purple);
  color: #fff;
  text-decoration: none;
}
.animails-site-footer .social .ph {
  font-size: 13px;
  line-height: 1;
}
.animails-site-footer .footer-col {
  display: flex;
  width: 240px;
  flex-direction: column;
  gap: 16px;
  font-size: 14px;
}
.animails-site-footer .col-head {
  height: 20px;
  font: 600 14px/1.4 Sora, Geist, sans-serif;
}
.animails-site-footer .footer-col a {
  width: fit-content;
  color: var(--animails-shell-ink);
  font: 400 14px/1.55 Geist, sans-serif;
  text-decoration: none;
}
.animails-site-footer .footer-bottom {
  display: flex;
  height: 38px;
  flex: 0 0 38px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 20px;
  border-top: 1px solid var(--animails-shell-border);
  color: var(--a3-text-muted-on-light);
  font: 700 12px/1.5 Geist, sans-serif;
  letter-spacing: -.01em;
  overflow: visible;
}
.animails-site-footer .footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.animails-site-footer .footer-legal a,
.animails-site-footer .footer-legal span,
.animails-site-footer .footer-bottom > span a {
  color: inherit;
  font: inherit;
  text-decoration: none;
}
/* The cookie settings button reads like its sibling links: same type, no underline. */
.animails-site-footer .footer-legal .cookie-settings-trigger {
  letter-spacing: inherit;
  text-decoration: none;
}

body:not(.animails-netlify-front) footer.wp-block-template-part:has(.animails-site-footer),
footer:has(.animails-site-footer) {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* The exact 4-column Figma footer needs 1180px of inner width. With the
 * standard 80px gutters that stops fitting below 1340px, so switch layout
 * before overflow can shift or clip the whole page. */
@media (max-width: 1339px) {
  .animails-site-footer {
    height: auto;
    min-height: 0;
  }
  .animails-site-footer .footer-inner,
  .animails-site-footer .footer-top,
  .animails-site-footer .footer-brand,
  .animails-site-footer .footer-bottom,
  .animails-site-footer .footer-brand p {
    height: auto;
    min-height: 0;
    flex-basis: auto;
  }
  .animails-site-footer .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .animails-site-footer .footer-brand,
  .animails-site-footer .footer-brand p,
  .animails-site-footer .footer-col {
    width: 100%;
  }
}

@media (max-width: 1160px) {
  :root { --animails-shell-gutter: 48px; }
  .animails-site-header .header-cta { display: none; }
}

@media (max-width: 1080px) {
  :root { --animails-shell-gutter: 32px; }
  body.menu-open { overflow: hidden; }
  .animails-site-header .menu-btn { display: block; }
  .animails-site-header .nav-links {
    position: absolute;
    z-index: 120;
    top: 100%;
    right: 0;
    left: 0;
    height: calc(100dvh - 130px - var(--wp-admin--admin-bar--height, 0px));
    display: none;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0;
    padding: 28px var(--animails-shell-gutter) 48px;
    overflow-y: auto;
    background: #fff;
  }
  .animails-site-header .nav-links.open { display: flex; }
  .animails-site-header .nav-links > a {
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid var(--animails-shell-border);
    font-size: 20px;
  }
}

@media (max-width: 760px) {
  :root {
    --animails-shell-gutter: 20px;
    --animails-shell-header-h: 76px;
  }
  body:not(.animails-netlify-front) header.wp-block-template-part:has(.animails-site-header) {
    top: var(--wp-admin--admin-bar--height, 0px);
    height: 76px;
    flex-basis: 76px;
  }
  .animails-site-header {
    height: 76px;
  }
  .animails-site-header .animails-shell-topbar { display: none; }
  .animails-site-header .animails-shell-header,
  .animails-site-header .nav {
    height: 76px;
    min-height: 76px;
  }
  .animails-site-header .animails-shell-brand,
  .animails-site-header .animails-shell-brand img {
    width: 140px;
    height: 38px;
    flex-basis: 140px;
  }
  .animails-site-header .nav-links { height: calc(100dvh - 76px - var(--wp-admin--admin-bar--height, 0px)); }
  .animails-site-footer {
    padding: 56px 0 36px;
  }
  .animails-site-footer .footer-inner { gap: 36px; }
  .animails-site-footer .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .animails-site-footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

