/* New View — navigation and motion extension. Load after styles.css/pages.css.
   Design read: coastal editorial extension; variance 6, motion 7 in the hero / 3 elsewhere,
   existing density and photography retained, brand fidelity 10. */
:root {
  --nv-ease: cubic-bezier(.16, 1, .3, 1);
  --nv-rule: rgba(6, 28, 53, .14);
}

/* Full-header website disclosure: native links, not an application menu. */
.site-header { isolation: isolate; }
.desktop-nav { align-items: center; }
.desktop-nav > a, .mega-trigger { white-space: nowrap; }
.services-nav {
  position: static;
  display: flex;
  align-items: center;
  padding-block: 34px;
  margin-block: -34px;
}
.mega-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  cursor: pointer;
}
.mega-trigger::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--nv-ease);
}
.mega-trigger:hover::after,
.mega-trigger:focus-visible::after,
.mega-trigger[aria-expanded='true']::after { transform: scaleX(1); }
.mega-trigger[aria-expanded='true'] { color: var(--teal); }
.dropdown-chevron {
  display: inline-block;
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .25s var(--nv-ease);
}
.mega-trigger[aria-expanded='true'] .dropdown-chevron { transform: translateY(3px) rotate(225deg); }
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: minmax(290px, .85fr) minmax(0, 1.65fr);
  width: 100%;
  max-height: calc(100dvh - 115px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 3px solid var(--teal);
  border-radius: 0;
  background: var(--paper);
  box-shadow: 0 28px 42px -18px rgba(6, 28, 53, .28);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  transform-origin: center top;
}
.mega-menu[hidden] { display: none !important; }
.mega-menu:not([hidden]) { animation: nv-mega-enter .42s var(--nv-ease) both; }
.desktop-nav .mega-menu a::after { content: none; }
.mega-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 38px clamp(30px, 4.5vw, 72px) 42px;
  background: var(--navy);
  color: var(--paper);
}
.mega-intro > span,
.mega-intro .mega-kicker,
.mega-intro .eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--aqua);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.mega-intro h2,
.mega-intro h3 {
  max-width: 300px;
  font-family: var(--display);
  font-size: clamp(40px, 3.6vw, 58px);
  font-weight: 600;
  line-height: .99;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.mega-intro h2 span,
.mega-intro h3 span,
.mega-intro h2 em,
.mega-intro h3 em { color: var(--aqua); font-style: normal; }
.mega-intro p {
  max-width: 315px;
  margin-top: 20px;
  color: #c7d6dc;
  font-size: 12px;
  line-height: 1.9;
}
.desktop-nav .mega-intro a {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  min-height: 44px;
  margin-top: 26px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(104, 214, 215, .6);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  transition: color .2s, border-color .2s;
}
.desktop-nav .mega-intro a:hover { color: var(--aqua); border-color: var(--aqua); }
.mega-intro a span,
.mega-intro a i { color: var(--aqua); font-size: 20px; font-style: normal; }
.mega-intro a:focus-visible { outline-color: var(--aqua); }
.mega-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  column-gap: 34px;
  padding: 25px clamp(30px, 4.5vw, 72px) 27px 38px;
}
.desktop-nav .mega-links > a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 6px 16px;
  align-content: center;
  min-height: 94px;
  padding: 17px 10px 17px 0;
  border-bottom: 1px solid var(--nv-rule);
  background: transparent;
  transition: color .22s, background .22s, padding .3s var(--nv-ease);
}
.desktop-nav .mega-links > a:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mega-links strong {
  grid-column: 1;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.005em;
}
.mega-links a > span {
  grid-column: 1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  text-wrap: pretty;
}
.mega-links i {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--teal);
  font-size: 22px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  transition: color .22s, transform .3s var(--nv-ease);
}
.desktop-nav .mega-links > a:hover,
.desktop-nav .mega-links > a:focus-visible {
  padding-left: 10px;
  background: rgba(8, 127, 137, .055);
  color: var(--teal);
}
.mega-links a:hover i,
.mega-links a:focus-visible i { color: var(--navy); transform: translate(3px, -3px); }
.mega-links a[aria-current] strong { color: var(--teal); }
@keyframes nv-mega-enter {
  from { opacity: 0; transform: translateY(-9px); clip-path: inset(0 0 12% 0); }
  to { opacity: 1; transform: none; clip-path: inset(0); }
}

/* Keep long navigation labels and the 190px brand clear of the conversion CTA. */
@media (min-width: 1001px) {
  .mobile-menu { display: none !important; }
  .menu-toggle { display: none; }
}
@media (min-width: 1001px) and (max-width: 1400px) {
  .site-header { gap: 24px; }
  .desktop-nav { gap: 21px; }
  .header-actions { gap: 18px; }
}
@media (min-width: 1001px) and (max-width: 1200px) {
  .site-header { gap: 18px; padding-left: 3.5%; padding-right: 3.5%; }
  .desktop-nav { gap: 17px; font-size: 12px; }
  .header-phone { display: none; }
  .header-actions { gap: 12px; flex-shrink: 0; }
  .header-book { padding: 12px 15px; gap: 12px; }
  .mega-intro { padding: 34px 32px; }
  .mega-links { column-gap: 25px; padding: 20px 35px; }
  .mega-links strong { font-size: 24px; }
}
@media (max-width: 1000px) {
  .desktop-nav,
  .mega-menu,
  .header-book { display: none !important; }
  .site-header { gap: 20px; padding: 14px 5%; }
  .menu-toggle { display: block; flex-shrink: 0; }
  .header-actions { margin-left: auto; gap: 20px; }
  .header-phone { display: block; font-size: 12px; }
  .mobile-menu {
    max-height: calc(100dvh - 115px);
    overflow: auto;
    overscroll-behavior: contain;
    padding-top: 15px;
    padding-bottom: 22px;
  }
  .mobile-menu[hidden] { display: none !important; }
  .mobile-menu:not([hidden]) { animation: nv-mobile-enter .25s var(--nv-ease) both; }
  .mobile-menu > a {
    display: block;
    min-height: 48px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 600;
  }
  .mobile-services { border-bottom: 1px solid var(--line); }
  .mobile-services summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 51px;
    padding: 10px 0;
    list-style: none;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }
  .mobile-services summary::-webkit-details-marker { display: none; }
  .mobile-services summary::after {
    content: '+';
    color: var(--teal);
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
  }
  .mobile-services[open] summary { color: var(--teal); }
  .mobile-services[open] summary::after { content: '−'; }
  .mobile-services a {
    display: block;
    min-height: 44px;
    padding: 10px 15px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.7;
  }
  .mobile-services a:hover,
  .mobile-services a:focus-visible { color: var(--teal); background: rgba(8, 127, 137, .045); }
  .menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }
}
@media (max-width: 450px) {
  .site-header { gap: 12px; }
  .header-actions { gap: 8px; }
  .header-phone { font-size: 11px; }
}
@media (max-width: 350px) {
  .header-phone { display: none; }
}
@keyframes nv-mobile-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* Homepage: typography lifts through its own line masks, never a cover screen.
   No default opacity/transform hiding: JS must explicitly opt into the finite sequence. */
.hero-line-mask {
  display: block;
  overflow: hidden;
  padding-block: .09em;
  margin-block: -.09em;
}
.hero-line { display: block; transform-origin: left bottom; }
.intro-ready .hero-content .hero-eyebrow {
  animation: nv-hero-detail .7s var(--nv-ease) .35s both;
}
.intro-ready .hero-content .hero-line {
  animation: nv-hero-line 1.05s var(--nv-ease) .55s both;
}
.intro-ready .hero-line-mask:nth-child(2) .hero-line { animation-delay: .69s; }
.intro-ready .hero-line-mask:nth-child(3) .hero-line { animation-delay: .79s; }
.intro-ready .hero-line-mask:nth-child(n+4) .hero-line { animation-delay: .89s; }
.intro-ready .hero-content .intro-heading {
  transform-origin: left bottom;
  animation: nv-hero-heading 1.05s var(--nv-ease) .55s both;
}
.intro-ready .hero-content .hero-description {
  animation: nv-hero-detail .85s var(--nv-ease) .8s both;
}
.intro-ready .hero-content .hero-actions {
  animation: nv-hero-detail .85s var(--nv-ease) 1.05s both;
}
.intro-ready .hero .hero-bottom {
  animation: nv-hero-bottom .8s var(--nv-ease) 1.25s both;
}
@keyframes nv-hero-line {
  0% { opacity: 0; transform: translateY(115%) rotate(1.5deg); filter: blur(7px); }
  55% { opacity: 1; filter: blur(1px); }
  100% { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); }
}
@keyframes nv-hero-heading {
  from { opacity: 0; transform: translateY(48px) rotate(.8deg); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes nv-hero-detail {
  from { opacity: 0; transform: translateY(24px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes nv-hero-bottom {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: none; }
}

/* Interior page introductions carry the same language at a quieter intensity. */
.intro-ready .page-hero-content {
  animation: nv-page-enter .9s var(--nv-ease) .18s both;
}
.intro-ready .page-hero-content h1.hero-heading {
  animation: nv-page-heading .9s var(--nv-ease) .28s both;
}
@keyframes nv-page-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes nv-page-heading {
  from { transform: translateY(12px); filter: blur(3px); }
  to { transform: none; filter: blur(0); }
}

/* IntersectionObserver starts each body entrance once. Unlike persistent hidden
   reveal states, these keyframes always settle at visible even if JS fails later. */
.motion-ready .reveal {
  --nv-reveal-x: 0px;
  --nv-reveal-y: 28px;
  --nv-reveal-scale: 1;
  opacity: 1;
  transform: none;
  transition: none;
}
.motion-ready .reveal[data-reveal='left'] { --nv-reveal-x: -36px; --nv-reveal-y: 12px; }
.motion-ready .reveal[data-reveal='right'] { --nv-reveal-x: 36px; --nv-reveal-y: 12px; }
.motion-ready .reveal[data-reveal='image'] { --nv-reveal-y: 20px; --nv-reveal-scale: .985; }
.motion-ready .reveal.is-visible { animation: nv-reveal-enter .9s var(--nv-ease) both; animation-delay:var(--reveal-delay,0ms); }
.motion-ready .reveal[data-reveal='image'].is-visible { animation: nv-image-enter 1.1s var(--nv-ease) both; animation-delay:var(--reveal-delay,0ms); }
@keyframes nv-reveal-enter {
  from { opacity: 0; transform: translate(var(--nv-reveal-x), var(--nv-reveal-y)); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes nv-image-enter {
  from { opacity: 0; transform: translateY(var(--nv-reveal-y)) scale(var(--nv-reveal-scale)); clip-path: inset(7% 0 0 0); }
  to { opacity: 1; transform: none; clip-path: inset(0); }
}
.motion-ready .reveal:focus-within,
.intro-ready .hero-actions:focus-within,
.intro-ready .hero-bottom:focus-within,
.intro-ready .page-hero-content:focus-within {
  animation: none;
  opacity: 1;
  transform: none;
  filter: none;
  clip-path: none;
}
.blog-card[hidden], .blog-card.hidden, #blog-empty[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .mega-menu:not([hidden]),
  .mobile-menu:not([hidden]),
  .intro-ready .hero-content .hero-eyebrow,
  .intro-ready .hero-content .hero-line,
  .intro-ready .hero-content .intro-heading,
  .intro-ready .hero-content .hero-description,
  .intro-ready .hero-content .hero-actions,
  .intro-ready .hero .hero-bottom,
  .intro-ready .page-hero-content,
  .intro-ready .page-hero-content h1.hero-heading,
  .motion-ready .reveal,
  .motion-ready .reveal.is-visible,
  .motion-ready .reveal[data-reveal='image'].is-visible {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: none;
  }
  .mega-trigger::after, .dropdown-chevron, .mega-links i { transition: none; }
}
