/*
  Site nav motion. Watermelon Navigation-5, rebuilt in plain HTML with our colors (markup in each page, behavior in
  nav.js). Enter with a strong ease-out, exit faster than enter, nothing scales from zero, and the panel grows out of
  its trigger. Reduced motion keeps opacity only.
*/

/* The fixed nav covers the top 80 px. Scroll padding keeps a field or link that Tab or Shift+Tab focuses from landing under it
   (WCAG 2.4.11; the 2026-11-06 audit found Shift+Tab hiding focus there in Chrome). Anchor jumps add it too, so each anchor's
   scroll-margin-top is 88 px less than where it lands. */
html { scroll-padding-top: 88px; }

/* Services panel titles (Local SEO, the card): one weight step above the nav */
.nav-item-title { font-family: var(--font-text); font-size: 1rem; font-weight: 600; line-height: 1.3; }

/* Services panel */
.nav-panel {
  transform-origin: var(--origin-x, 50%) top;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 150ms cubic-bezier(0.23, 1, 0.32, 1), transform 150ms cubic-bezier(0.23, 1, 0.32, 1);
}
.nav-panel[data-state="open"] {
  opacity: 1;
  transform: none;
  transition-duration: 200ms;
}
/* Bridges the gap under the bar, so moving the pointer down to the panel never closes it */
.nav-panel::before {
  content: "";
  position: absolute;
  inset: -18px 0 auto 0;
  height: 18px;
}

.nav-chevron { transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1); }
[aria-expanded="true"] > .nav-chevron { transform: rotate(180deg); }

/* Service icons beside each service, in the Services panel and the phone menu (2026-10-27, Rahul's ask, from icons he picked).
   One set on a 24 px grid with 2 px round strokes like the site's other icons, each the same object as its service picture: the
   sources are icons/*.svg, encoded here as they are (quotes to ', and < > # escaped). Each is painted through a mask in its service's
   color (services-page.css). They attach by each link's address, so no page markup changes; the Local SEO topics (#anchors) and
   All services get none. */
:is(.nav-panel, .nav-menu) a[href="/services/seo/local"] { --svc-color: #337AEE; --svc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 18S6.5 13.2 6.5 8.5a5.5 5.5 0 0 1 11 0C17.5 13.2 12 18 12 18Z'/%3E%3Ccircle cx='12' cy='8.5' r='2'/%3E%3Cpath d='M17 14.8A9.5 3.75 0 1 1 7 14.8'/%3E%3C/svg%3E"); }
:is(.nav-panel, .nav-menu) a[href="/services/seo"] { --svc-color: #FEC003; --svc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M11 6a5 5 0 0 1 5 5M16.7 16.7 21 21'/%3E%3C/svg%3E"); }
:is(.nav-panel, .nav-menu) a[href="/services/websites"] { --svc-color: #FD3487; --svc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.8 3.8 20.5 10.4l-6.6 1.7a2 2 0 0 0-1.8 1.8l-1.7 6.6Z'/%3E%3C/svg%3E"); }
:is(.nav-panel, .nav-menu) a[href="/services/meta-ads"] { --svc-color: #FF2F25; --svc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5h17L14.25 14v7.75l-4.5-2V14Z'/%3E%3Ccircle cx='10.25' cy='4.75' r='1' fill='%23000'/%3E%3Ccircle cx='14.75' cy='2.25' r='.6' fill='%23000'/%3E%3C/svg%3E"); }
:is(.nav-panel, .nav-menu) a[href="/services/crm"] { --svc-color: #0DB2CA; --svc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='4.5' width='19' height='15' rx='2.5'/%3E%3Ccircle cx='8.5' cy='10.5' r='2'/%3E%3Cpath d='M5 16.5a3.5 3.5 0 0 1 7 0M15 10h3M15 14h3'/%3E%3C/svg%3E"); }
:is(.nav-panel, .nav-menu) a[href="/services/automations"] { --svc-color: #0FBA79; --svc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6.5' width='20' height='11' rx='5.5'/%3E%3Ccircle cx='16.5' cy='12' r='2.5' fill='%23000'/%3E%3C/svg%3E"); }
:is(.nav-panel, .nav-menu) a[href="/services/custom-builds"] { --svc-color: #8146F5; --svc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 8-4 4 4 4M17 8l4 4-4 4M14 4l-4 16'/%3E%3C/svg%3E"); }
:is(.nav-panel, .nav-menu) a[href="/services/ai-training"] { --svc-color: #FF8500; --svc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 4.5c.7 4.9 2.6 7.3 7.5 8-4.9.7-6.8 3.1-7.5 8-.7-4.9-2.6-7.3-7.5-8 4.9-.7 6.8-3.1 7.5-8Z'/%3E%3Cpath d='M18.5 2.5c.3 1.5.9 2.2 2.5 2.5-1.6.3-2.2 1-2.5 2.5-.3-1.5-.9-2.2-2.5-2.5 1.6-.3 2.2-1 2.5-2.5Z'/%3E%3C/svg%3E"); }
.nav-panel a:is([href="/services/seo"], [href="/services/websites"], [href="/services/meta-ads"], [href="/services/crm"], [href="/services/automations"], [href="/services/custom-builds"], [href="/services/ai-training"]) { width: fit-content; gap: 10px; margin-inline: -10px; padding-inline: 10px; border-radius: 10px; }
.nav-panel a:is([href="/services/seo"], [href="/services/websites"], [href="/services/meta-ads"], [href="/services/crm"], [href="/services/automations"], [href="/services/custom-builds"], [href="/services/ai-training"])::before,
.nav-panel a[href="/services/seo/local"] > span:first-child::before,
.nav-menu__sublink[href^="/services/"]::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  background-color: var(--svc-color);
  -webkit-mask: var(--svc-icon) center / contain no-repeat;
  mask: var(--svc-icon) center / contain no-repeat;
}
/* The Local SEO entry: the set's pin in place of the plain one, without the box it sat in (Rahul, 2026-10-27: "remove the black box
   from behind"), a step larger than the list's icons since it heads the column. */
.nav-panel a[href="/services/seo/local"] > span:first-child { width: auto; height: auto; justify-content: flex-start; background-color: transparent; }
.nav-panel a[href="/services/seo/local"] > span:first-child > svg { display: none; }
.nav-panel a[href="/services/seo/local"] > span:first-child::before { width: 24px; height: 24px; }
/* Pointed at (or reached by keyboard), each service lights up in its own color (Rahul, 2026-10-27: "when hovered over each service,
   they can be highlighted in the same color as their icon's color"): a faint tint inside a hairline ring of that color, so yellow
   reads as yellow on Night rather than olive, and the name turns white. Each row
   is only as wide as its icon and name ("not sure why the higlight is longer than the option itslef") and reaches 10 px past them,
   the Local SEO entry 8 px: its column gives up its left padding for room on the right (the text keeps its width, so nothing wraps
   anew), so the highlight stops 8 px short of the divider instead of crossing it, and its title is no longer underlined.
   Timing (Rahul, 2026-10-27: "the hover state can be more responsive and quick"): the highlight comes on in the frame the pointer
   arrives and fades over 120 ms when it leaves, so moving down the list never blinks in the gaps between rows; All services and the
   free call card light up the same way; a press shrinks the item a little, as the buttons do. */
.nav-panel { --svc-ease: cubic-bezier(0.23, 1, 0.32, 1); }
.nav-panel .grid > :first-child { padding: 0 16px 0 0; }
.nav-panel a[href="/services/seo/local"] { margin: -8px; padding: 8px; border-radius: 12px; }
.nav-panel a[href="/services/seo/local"] .nav-item-title { text-decoration-line: none; }
/* The tint and ring are worked out on each link, where its --svc-color is set */
.nav-panel a:is([href="/services/seo/local"], [href="/services/seo"], [href="/services/websites"], [href="/services/meta-ads"], [href="/services/crm"], [href="/services/automations"], [href="/services/custom-builds"], [href="/services/ai-training"]) {
  --svc-tint: color-mix(in srgb, var(--svc-color) 12%, transparent);
  --svc-ring: inset 0 0 0 1px color-mix(in srgb, var(--svc-color) 40%, transparent);
  transition: background-color 120ms var(--svc-ease), box-shadow 120ms var(--svc-ease), border-color 120ms var(--svc-ease), color 120ms var(--svc-ease), scale 160ms var(--svc-ease);
}
.nav-panel a[href="/services/seo/local"] .t-small { transition: color 120ms var(--svc-ease); }
.nav-panel a[href="/services"] { transition: background-color 120ms var(--svc-ease), border-color 120ms var(--svc-ease), scale 160ms var(--svc-ease); }
.nav-panel .nav-ask { transition: box-shadow 120ms var(--svc-ease), scale 160ms var(--svc-ease); }
@media (hover: hover) and (pointer: fine) {
  .nav-panel a:is([href="/services/seo/local"], [href="/services/seo"], [href="/services/websites"], [href="/services/meta-ads"], [href="/services/crm"], [href="/services/automations"], [href="/services/custom-builds"], [href="/services/ai-training"]):hover { transition-duration: 0ms, 0ms, 0ms, 0ms, 160ms; }
  .nav-panel a[href="/services/seo/local"]:hover .t-small { color: rgb(255 255 255 / 0.85); transition-duration: 0ms; }
  .nav-panel a[href="/services"]:hover { transition-duration: 0ms, 0ms, 160ms; }
  .nav-panel .nav-ask:hover { transition-duration: 0ms, 160ms; }
  .nav-panel a:is([href="/services/seo/local"], [href="/services/seo"], [href="/services/websites"], [href="/services/meta-ads"], [href="/services/crm"], [href="/services/automations"], [href="/services/custom-builds"], [href="/services/ai-training"]):hover { background-color: var(--svc-tint); box-shadow: var(--svc-ring); color: #fff; }
}
.nav-panel a:is([href="/services/seo/local"], [href="/services/seo"], [href="/services/websites"], [href="/services/meta-ads"], [href="/services/crm"], [href="/services/automations"], [href="/services/custom-builds"], [href="/services/ai-training"]):focus-visible { transition-duration: 0ms, 0ms, 0ms, 0ms, 160ms; }   /* keys move at once too */
.nav-panel a[href="/services/seo/local"]:focus-visible .t-small { color: rgb(255 255 255 / 0.85); transition-duration: 0ms; }
.nav-panel a:is([href="/services/seo/local"], [href="/services/seo"], [href="/services/websites"], [href="/services/meta-ads"], [href="/services/crm"], [href="/services/automations"], [href="/services/custom-builds"], [href="/services/ai-training"]):focus-visible { background-color: var(--svc-tint); box-shadow: var(--svc-ring); color: #fff; }
.nav-panel a:is([href="/services/seo/local"], [href="/services/seo"], [href="/services/websites"], [href="/services/meta-ads"], [href="/services/crm"], [href="/services/automations"], [href="/services/custom-builds"], [href="/services/ai-training"]):active { scale: 0.97; }
/* The free call card presses in under a finger only: under a mouse it has its ring, and a card shrinking away from the pointer would lose a
   click that ends at its very edge */
@media (hover: none), (pointer: coarse) { .nav-panel .nav-ask:active { scale: 0.97; } }
/* The pages under a service (registry.PAGES; docs/pages/make-pages.py writes the markup): a short list below its parent behind a hairline
   that runs down under the parent's icon, each link in the quiet white of the list with the same quick light-up as the services (no
   ring: it is a small link, not a card). Local SEO's heads its column with no icon column, so its list sits a little below the line of
   words. The services' own colors stay on the services themselves. */
.nav-sublist { margin: 2px 0 6px 9px; padding: 0; list-style: none; border-left: 1px solid rgb(255 255 255 / 0.1); }
.nav-sublist--feature { margin: 16px 0 0; }
.nav-sub {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 8px 4px 20px;
  border-radius: 0 8px 8px 0;
  color: rgb(255 255 255 / 0.7);
  text-decoration: none;
  line-height: 1.35;
  transition: background-color 120ms var(--svc-ease), color 120ms var(--svc-ease), scale 160ms var(--svc-ease);
}
@media (hover: hover) and (pointer: fine) { .nav-sub:hover { background-color: rgb(255 255 255 / 0.06); color: #fff; transition-duration: 0ms, 0ms, 160ms; } }
.nav-sub:focus-visible { background-color: rgb(255 255 255 / 0.06); color: #fff; outline: 2px solid #fff; outline-offset: 2px; transition-duration: 0ms, 0ms, 160ms; }
.nav-sub:active { scale: 0.97; }
.nav-sub[aria-current] { color: #fff; }
/* The panel's foot: its last link, to the Bakersfield hub, under the columns behind a hairline, flush with the first column's words. A pin where
   the services have their icons, quieter until it is pointed at or reached by key. */
.nav-panel__foot { padding: 0 32px 14px; }
@media (min-width: 1280px) { .nav-panel__foot { padding-inline: 40px; } }
.nav-panel__foot::before { content: ""; display: block; margin: 0 0 8px; border-top: 1px solid rgb(255 255 255 / 0.06); }
.nav-local {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-left: -8px;
  padding: 0 12px 0 8px;
  border-radius: 10px;
  color: rgb(255 255 255 / 0.7);
  text-decoration: none;
  transition: background-color 120ms var(--svc-ease), color 120ms var(--svc-ease), scale 160ms var(--svc-ease);
}
.nav-local svg { flex: none; width: 20px; height: 20px; color: rgb(255 255 255 / 0.5); transition: color 120ms var(--svc-ease); }
.nav-local:focus-visible { background-color: rgb(255 255 255 / 0.06); color: #fff; outline: 2px solid #fff; outline-offset: 2px; transition-duration: 0ms, 0ms, 160ms; }
.nav-local:focus-visible svg { color: #fff; }
.nav-local:active { scale: 0.97; }
@media (hover: hover) and (pointer: fine) { .nav-local:hover { background-color: rgb(255 255 255 / 0.06); color: #fff; transition-duration: 0ms, 0ms, 160ms; } .nav-local:hover svg { color: #fff; transition-duration: 0ms; } }

/* Phone and tablet menu (2026-10-21, after Clay's mobile menu: docs/research/2026-10-21-clay-mobile-menu.md). A full-screen Night
   panel under the bar, below 1024 px. Opening: a curtain drops over the page (the panel's background slides down from above the
   screen), the links and the contact details rise in one after another, and the menu button turns into an X. Closing is quicker:
   the content fades, then the curtain lifts. Transform and opacity only, all of it transitions, so a tap in the middle of the
   move turns it round from where it is. The links are tappable the moment the menu opens; the stagger never blocks them.
   A transition takes its timing from the state it is going to, so each state's rule below holds the timing for arriving there. */
.nav-menu,
[data-site-nav] {
  --menu-curve: cubic-bezier(0.19, 1, 0.22, 1);     /* Clay's curtain curve, an expo ease-out */
  --menu-ui: cubic-bezier(0.23, 1, 0.32, 1);        /* the strong ease-out for the content */
  --menu-drawer: cubic-bezier(0.32, 0.72, 0, 1);    /* the iOS drawer curve, for the curtain going back up */
}
.nav-menu { pointer-events: none; }                 /* while it closes, taps reach the page */
.nav-menu[data-state="open"] { pointer-events: auto; }

/* The curtain: the panel's background. Closed, it waits above the screen. */
.nav-menu__curtain {
  background-color: #0c0e12;
  transform: translateY(-100%);
  transition: transform 420ms var(--menu-drawer) 70ms;
  will-change: transform;
}
.nav-menu[data-state="open"] .nav-menu__curtain {
  transform: none;
  transition: transform 900ms var(--menu-curve);
}

/* What rises in: the four links, then the email, the phone and the button (the markup numbers them with --i) */
.nav-menu [data-menu-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 110ms ease-out, transform 110ms ease-out, translate 360ms var(--menu-curve);
}
.nav-menu[data-state="open"] [data-menu-reveal] {
  opacity: 1;
  transform: none;
  transition:
    opacity 420ms var(--menu-ui) calc(110ms + var(--i, 0) * 45ms),
    transform 420ms var(--menu-ui) calc(110ms + var(--i, 0) * 45ms),
    translate 360ms var(--menu-curve);
}

.nav-menu__scroll { overscroll-behavior: contain; }
.nav-menu__inner {
  box-sizing: border-box;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 100px 36px calc(28px + env(safe-area-inset-bottom));   /* 36 px a side: the left edge of the logo's blue square in the bar (16 + 8 + 12) */
}
.nav-menu__list { margin: 0; padding: 0; list-style: none; }
.nav-menu__list > li + li { margin-top: 4px; }

/* The four links: the display face at the heading size, the way Clay sets its menu in its headline face */
.nav-menu__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding-block: 7px;
  color: #fff;
  text-decoration: none;
  transform-origin: left center;
  transition: color 150ms var(--menu-ui), transform 160ms var(--menu-ui), opacity 150ms var(--menu-ui);
}
.nav-menu__link:active { transform: scale(0.97); }                  /* the press: a small scale, as the buttons have, never a color change */
@media (hover: hover) and (pointer: fine) { .nav-menu__link:hover { color: rgb(255 255 255 / 0.7); } }
.nav-menu__link .nav-chevron { width: 20px; height: 20px; color: rgb(255 255 255 / 0.6); }
/* The page you are on: white on a white 8% pill, as in the bar */
.nav-menu a[aria-current] { margin-inline: -12px; padding-inline: 12px; border-radius: 12px; background-color: rgb(255 255 255 / 0.08); }

/* Services, opened in place. nav.js slides the links below it down by transform, so the list never animates its height, and they
   hide the list until they have passed: each of them (and the contact block) sits above the list, and the cover, an opaque strip
   hanging from the first link below Services, is as tall as the list while the links slide. Closing, the list fades out first. */
.nav-menu [data-menu-mover] { position: relative; z-index: 1; }
.nav-menu__cover { position: absolute; z-index: -1; top: 0; left: -36px; right: -36px; height: 0; background-color: #0c0e12; pointer-events: none; }
.nav-menu__sub { position: relative; padding: 2px 0 12px 16px; }
.nav-menu__sub[data-state="closed"] { opacity: 0; transition: opacity 90ms ease-out; }
.nav-menu__sub[data-state="open"] { opacity: 1; }
.nav-menu__sub ul { margin: 0; padding: 0; list-style: none; }
.nav-menu__sublink {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: rgb(255 255 255 / 0.8);
  text-decoration: none;
  transform-origin: left center;
  transition: color 150ms var(--menu-ui), transform 160ms var(--menu-ui), opacity 150ms var(--menu-ui);
}
.nav-menu__sublink:active { transform: scale(0.97); }
/* The pages under a service: indented behind a hairline under the service's icon, so their words start where the service's do, in the
   nav's smaller size and a quieter white. The service icon rule above matches their addresses too, so it is switched off here. */
.nav-menu__sub .nav-menu__subsub { margin: 0 0 4px 9px; padding: 0 0 0 22px; border-left: 1px solid rgb(255 255 255 / 0.12); }
.nav-menu__subsublink { min-height: 40px; padding-block: 7px; line-height: 1.25; color: rgb(255 255 255 / 0.65); }   /* a long name wraps without crowding */
.nav-menu__sub .nav-menu__subsublink::before { content: none; }
@media (hover: hover) and (pointer: fine) { .nav-menu__sublink:hover { color: #fff; } }

/* Email and phone, then the button; at the bottom of the screen, where the thumb is */
.nav-menu__foot { margin-top: auto; display: flex; flex-direction: column; gap: 24px; transition: translate 360ms var(--menu-curve); }
.nav-menu__contact { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.nav-menu__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.3);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 150ms var(--menu-ui);
}
@media (hover: hover) and (pointer: fine) { .nav-menu__contact a:hover { text-decoration-color: #fff; } }
.nav-menu :is(a, button):focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Let's talk, in the bar and at the foot of this menu: the press takes 160 ms as every button's does and the fill 150, on the strong ease-out
   (their classes give both 150 ms; this file is unlayered, so it wins) */
[data-site-nav] a.t-button[href="/connect"], .nav-menu__cta > a { transition: scale 160ms var(--menu-ui), background-color 150ms var(--menu-ui); }

/* From 768 px: two columns, as Clay's. The links on the right half, the contact details bottom left. The bar already shows
   Let's talk from 768 px, so the button below is for phones. */
@media (min-width: 768px) {
  .nav-menu__inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr; column-gap: 16px; padding: 120px 36px 40px; }
  .nav-menu__nav { grid-column: 7 / span 6; grid-row: 1; }
  .nav-menu__foot { grid-column: 1 / span 6; grid-row: 1; align-self: end; margin-top: 0; }
  .nav-menu__cta { display: none; }
}
/* A phone held sideways: less room above the links */
@media (min-width: 768px) and (max-height: 500px) {
  .nav-menu__inner { padding-top: 92px; }
}

/* The menu button: two bars that slide together, then turn into an X (and back, the other way round). The individual
   transform properties let the slide and the turn run one after the other. */
.nav-burger { position: relative; display: block; width: 22px; height: 22px; }
.nav-burger__bar {
  position: absolute;
  left: 0;
  top: 10px;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background-color: currentColor;
  translate: 0 -4.5px;
  rotate: 0deg;
  transition: translate 170ms var(--menu-ui) 150ms, rotate 170ms var(--menu-ui) 0ms;
}
.nav-burger__bar:last-child { translate: 0 4.5px; }
[aria-expanded="true"] > .nav-burger > .nav-burger__bar {
  translate: 0 0;
  rotate: 45deg;
  transition: translate 170ms var(--menu-ui) 0ms, rotate 170ms var(--menu-ui) 140ms;
}
[aria-expanded="true"] > .nav-burger > .nav-burger__bar:last-child { rotate: -45deg; }

/* While the menu is open the bar has no glass: the logo and the X sit on the panel itself, as in Clay's. This rule sets only opacity, so
   it wins over the tone rule below, which sets only the color. The pill's color also eases over 150 ms when the tone changes (none with
   reduced motion, see the end of this file). */
[data-site-nav] [data-nav-glass] { transition: opacity 200ms ease, background-color 150ms ease; }
[data-site-nav][data-menu-open] [data-nav-glass] { opacity: 0; }

/* The glass over a light ground. The bar's 45% Night turns mid-gray over white, and its links (white at 70%) fall to 2.3:1 (axe color-contrast
   on /blog/archive, a blog category, an author and a post, 2026-11-06; and on every page whose header is dark once the bar floats over a white
   section). nav.js reads what is under the bar and sets data-tone on the header, "light" or "dark" (its Tone section says how), so the page
   being light or dark at the top no longer decides: a light tone gets a mostly solid Night pill, which keeps the links at 7:1 over whatever is
   behind the bar, and the blur, hairline and shadow stay. Over a dark ground the bar is exactly as before. The rule is here, not in the pages:
   nav.css is unlayered, so it wins over the Tailwind class on the glass layer. */
[data-site-nav][data-tone="light"] [data-nav-glass] { background-color: rgb(12 14 18 / 0.86); }
/* Over a dark ground the glass is 60% Night, not the old 45%: over the home hero's glow the 45% left the links at 3.8 to 4.2:1 at
   laptop sizes between 160 and 260 px of scroll (fix batch 2 review); 60% keeps them at 5.08:1 or better there. */
[data-site-nav][data-tone="dark"] [data-nav-glass] { background-color: rgb(12 14 18 / 0.6); }

/* Compact on scroll (2026-10-20, one clock 2026-10-21). At the top of the page the bar is full: the lockup, up to 1024 px wide.
   Once the hero has scrolled off, nav.js puts data-compact on the header. From lg up the bar's row then shrinks around its
   content (the links and the button come closer) and the glass pill, an empty layer behind the row, follows it; below lg
   only the logo changes. The logo is the lockup in both states: its blue square is the logomark, so the square never moves
   and the letters are wiped away right to left by shrinking the clip around the image (a soft edge while it moves), then
   wiped back in when the bar expands. nav.js drives the move frame by frame (a spring on one number, which sets the row's
   width, the clip's width and the pill's two edges together), so none of this is a CSS transition. These rules are the two
   resting states. */
@media (min-width: 1024px) {
  [data-site-nav][data-compact] [data-nav-bar] { width: fit-content; }
}
/* The clip around the lockup: as wide as the lockup when full, as wide as its square when compact (the lockup is as tall
   as the square is wide: 1.75rem, 2rem from sm up) */
[data-site-nav] [data-nav-logo] { display: block; flex: none; overflow: hidden; }
[data-site-nav][data-compact] [data-nav-logo] { width: 1.75rem; }
@media (min-width: 640px) {
  [data-site-nav][data-compact] [data-nav-logo] { width: 2rem; }
}
/* The image keeps its size inside a narrower clip (the page's img reset would squeeze it), and only the link takes clicks */
[data-site-nav] [data-nav-lockup] { max-width: none; pointer-events: none; }
/* While it moves, the clip's right edge is soft: nav.js sets --nav-feather, 0 at either end so the resting logo is never faded */
[data-site-nav][data-nav-moving] [data-nav-logo] {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--nav-feather, 0px)), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - var(--nav-feather, 0px)), transparent 100%);
}

@media (prefers-reduced-motion: reduce) {
  .nav-panel,
  .nav-panel[data-state="open"] { transform: none; transition: opacity 120ms ease; }
  /* The phone menu fades in and out instead of dropping: nothing moves, the stagger and the button's turn are gone, and the links
     slide into place at once when Services opens (nav.js). Opacity stays, since it helps people follow what changed. */
  .nav-menu__curtain,
  .nav-menu[data-state="open"] .nav-menu__curtain { transform: none; opacity: 0; transition: opacity 150ms ease; }
  .nav-menu[data-state="open"] .nav-menu__curtain { opacity: 1; }
  .nav-menu [data-menu-reveal],
  .nav-menu[data-state="open"] [data-menu-reveal] { transform: none; transition: opacity 150ms ease; }
  .nav-menu__sub[data-state="closed"] { transition: opacity 120ms ease; }
  .nav-burger__bar,
  [aria-expanded="true"] > .nav-burger > .nav-burger__bar { transition: none; }
  .nav-menu__link:active,
  .nav-menu__sublink:active,
  .nav-sub:active,
  .nav-local:active,
  [data-site-nav] a.t-button[href="/connect"]:active,
  .nav-menu__cta > a:active,
  .nav-panel a:is([href^="/services/seo/local"], [href="/services/seo"], [href="/services/websites"], [href="/services/meta-ads"], [href="/services/crm"], [href="/services/automations"], [href="/services/custom-builds"], [href="/services/ai-training"], [href="/services"]):active { transform: none; scale: none; opacity: 0.7; }   /* the press is a fade, not a scale */
  @media (hover: none), (pointer: coarse) { .nav-panel .nav-ask:active { scale: none; opacity: 0.7; } }   /* the card fades under a finger too */
  .nav-panel .nav-ask:hover svg { translate: none; }   /* the free call card's arrow stays put under a mouse */
  [data-site-nav] [data-nav-glass] { transition: opacity 120ms ease; }   /* the pill's color switches at once with the tone */
  .nav-chevron { transition: none; }
  /* The compact bar switches at once (nav.js); only the letters of the lockup fade, over 120 ms and by opacity alone, while the
     blue square stays put. They are the part of the image to the right of the square plus a 5 px margin for its edge. */
  [data-site-nav] [data-nav-logo] { --nav-edge: 2.3rem; overflow: visible; transition: --nav-letters 120ms linear; }
  [data-site-nav][data-compact] [data-nav-logo] { --nav-letters: 0; }
  /* The lockup reads the clip's value: --nav-letters is registered with inherits: false, so without this the image kept the
     initial 1 and the letters showed over Services in the compact bar */
  [data-site-nav] [data-nav-lockup] { --nav-letters: inherit; }
  [data-site-nav] [data-nav-lockup] {
    -webkit-mask-image: linear-gradient(90deg, #000 var(--nav-edge), rgb(0 0 0 / var(--nav-letters)) var(--nav-edge));
    mask-image: linear-gradient(90deg, #000 var(--nav-edge), rgb(0 0 0 / var(--nav-letters)) var(--nav-edge));
  }
}
@property --nav-letters { syntax: '<number>'; inherits: false; initial-value: 1; }

/* ═══ Page reveal (Rahul, 2026-11-17: "make sure each page has animations when the page loads up. Each section kind of fades in
   nicely"): on every page with a nav, the blocks of a section's column (main .blog-container > *) that are on the first screen
   fade in and rise 16 px on load, staggered (nav.js marks them .rv-wait and reveals them). Blocks further down are simply there:
   they faded in as they scrolled into view until 2026-11-18, when Rahul had that removed (the same entrance on every block). The home
   page and About keep their own motion and have no .blog-container. Before nav.js runs, the blocks wait hidden for at most 3 s
   (rv-safe shows them if the script never runs); without scripts (no html.js) or with reduced motion nothing hides. Dialogs and
   hidden blocks are never touched. Opacity and transform only. ═══ */
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rv-ok) main .blog-container > :not(dialog):not([hidden]):not(script):not(style) { opacity: 0; animation: rv-safe 1ms 3s forwards; }
  html.js main .blog-container > .rv-wait { opacity: 0; transform: translateY(16px); }
  /* The block that holds the page's headline does not wait for nav.js: it comes in by CSS from the first paint, so the largest thing on
     the first screen is drawn as soon as the styles are. Held for the script, a case study's headline was drawn 2.1 s after the page
     answered on a slow phone (Lighthouse, 2026-11-18: 2.69 s against a 2.5 s limit). nav.js leaves that block alone. :not(.rv-none) only
     lifts this rule over the one above it (no page has that class); a browser without :has() keeps the scripted reveal. */
  @supports selector(:has(a)) {
    html.js:not(.rv-none) main .blog-container > :is(h1, :has(h1)):not(dialog):not([hidden]):not(script):not(style) { opacity: 1; animation: rv-first 700ms cubic-bezier(0.22, 1, 0.36, 1) both; }
  }
  html.js main .blog-container > .rv-in { opacity: 1; transform: none; transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1), transform 750ms cubic-bezier(0.22, 1, 0.36, 1); transition-delay: var(--rv-d, 0ms); }
}
@keyframes rv-safe { to { opacity: 1; } }
/* It rises and does not fade: Chrome leaves out of its largest-paint timing a block first painted at opacity 0, and counted the next
   block's scripted reveal instead (2.67 s). Drawn solid from the first paint, the headline is readable at once and is what gets timed. */
@keyframes rv-first { from { transform: translateY(16px); } to { transform: none; } }
