/* Jon's site: client-only css (yacht-mechanics-fl). Rebuilt 2026-11-25.
   1. Fixes: Kai's text logo and the hero phone button use the dark text colour, which disappears on the dark hero photo.
   2. CTA bands: darker tint so the white text reads on busy photos (fresh review 11-25).
   3. Scroll motion (Dylan 11-25: "as you scroll down ... stuff is animated ... everything's just stale").
      How: CSS scroll-driven animations (animation-timeline: view()), no JavaScript, so content can never get stuck hidden.
      - Only runs where the browser supports it (Chrome/Edge, Safari 26+) AND the visitor has not asked for reduced motion.
        Anywhere else the page is exactly as before: everything visible, nothing moves.
      - Tied to scroll position, not a timer: an element already on screen (top of page, or a reload half-way down) is drawn fully.
      - Plays as an element enters the bottom of the screen and is finished by the time it is ~30% in; it never hides
        something the visitor is already looking at, and scrolling back up does not replay it (fill: both at the end state once past).
      - What moves (bar = calm trade sites: rise + fade, staggered cards, photo settle, slow parallax; nothing flies, bounces or spins):
        a. Kai's own .reveal groups (section headers, columns): the designer's chosen reveal targets, which the engine pins visible.
        b. Cards and tiles in rows: one after another (stagger by position in the row).
        c. Photos inside their frames: settle from a slight zoom.
        d. CTA band photo: slow parallax drift behind the text.
        e. FAQ rows, process steps, review cards, trust ticks: rise in order.
      - Never animated: the header, the hero (it already has its own load-in), the sticky emergency bar, buttons' own colours. */

header a.shrink-0, header a.shrink-0 span { color: #fff; }
[aria-label="Hero"] .btn-phone { color: #fff; border-color: rgba(255,255,255,.55); }
[aria-label="Hero"] .btn-phone:hover { background: rgba(255,255,255,.12); }

/* v3 (2026-11-28): Dylan's rule "no more image tints. not on hero or the cta band" (Notion, ~10-12).
   Photos run at full strength; only a dark fade sits behind the text side so it stays readable. */
[aria-label="Hero"] > [role="presentation"] { opacity: 1 !important; filter: none !important; }
@media (max-width: 1023px) {
  /* on phones the text spans the full width, so the fade runs bottom-up instead of left-right */
  [aria-label="Hero"] > [aria-hidden="true"] { background: linear-gradient(180deg, rgba(10,18,32,.35) 0%, rgba(10,18,32,.25) 30%, rgba(10,18,32,.78) 62%, rgba(10,18,32,.9) 100%) !important; }
  [aria-label="Hero"] .container-site { align-self: flex-end; }
}
.nc-root--photo .nc-tint { background: linear-gradient(90deg, rgba(10,18,32,.82) 0%, rgba(10,18,32,.6) 45%, rgba(10,18,32,.15) 100%) !important; }
@media (max-width: 767px) { .nc-root--photo .nc-tint { background: linear-gradient(180deg, rgba(10,18,32,.45) 0%, rgba(10,18,32,.85) 100%) !important; } }
.nc-root--photo .nc-heading, .nc-root--photo .nc-inner p { text-shadow: 0 1px 12px rgba(0,0,0,.45); }

/* service-page heroes: Kai shows the photo at 10% on navy; v3 shows it at full strength with a fade behind the text */
section.bg-dark-bg > .hero-bg-zoom.opacity-\[0\.1\] { opacity: 1 !important; }
section.bg-dark-bg:has(> .hero-bg-zoom.opacity-\[0\.1\])::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,18,32,.86) 0%, rgba(10,18,32,.62) 50%, rgba(10,18,32,.25) 100%); }
@media (max-width: 1023px) { section.bg-dark-bg:has(> .hero-bg-zoom.opacity-\[0\.1\])::before { background: linear-gradient(180deg, rgba(10,18,32,.55) 0%, rgba(10,18,32,.82) 100%); } }

/* v3: no justified text anywhere (Kai's base justifies body paragraphs; on phones it leaves wide gaps) */
/* only undo the justify; centered blocks (CTA bands, headers) stay centered (Dylan 11-28: CTA text looked off) */
main p:not(.font-heading):not(.flex):not(.text-left), .step-desc { text-align: inherit !important; -webkit-hyphens: manual !important; hyphens: manual !important; }

/* v3: phone header = wordmark + short "Call" button + menu button, all on screen at 360-430px wide
   (review 1: the full-number call button pushed the menu button off a 390px screen). */
@media (max-width: 1023px) {
  header a.shrink-0 > span { width: auto !important; max-width: 9.5rem; }
  header a.shrink-0 span { font-size: .95rem !important; line-height: 1.15 !important; }
  header a[href^="tel:"].lg\:hidden { padding: 0 .8rem !important; gap: .4rem !important; margin-left: auto; }
  header a[href^="tel:"].lg\:hidden > span { display: none !important; }
  header a[href^="tel:"].lg\:hidden::after { content: "Call"; font-size: .95rem; font-weight: 800; }
  header [class*="container-site"] { gap: .6rem !important; }
}
/* v3: once scrolled, the header gets a solid navy background so the white wordmark and links stay readable */
header.site-header.is-scrolled { background-color: #243142 !important; box-shadow: 0 2px 14px rgba(0,0,0,.18) !important; }
/* v3 round 4 (Dylan 11-28): phone menu lists Services first, then About / Our Work / Blog / Contact, then Areas */
div.overflow-y-auto:has(> a[href="/about-us"]) > div:has(a[href="/our-services"]) { order: -1; margin-top: 0 !important; padding-top: 0 !important; border-top: 0 !important; }
div.overflow-y-auto:has(> a[href="/about-us"]) > a[href="/about-us"] { margin-top: 1rem; padding-top: 1.1rem; border-top: 1px solid var(--color-border, #e2e8f0); border-radius: 0; }
div.overflow-y-auto:has(> a[href="/about-us"]) > div:not(:has(a[href="/our-services"])) { order: 1; }

/* v3 round 4 (Dylan 11-28): trust band = bigger icons and text, band height locked to what it was (102px desktop) */
[aria-label="Why choose us"] { padding-top: 0 !important; padding-bottom: 0 !important; display: flex !important; align-items: center; }
[aria-label="Why choose us"] > .container-site { width: 100%; }
@media (min-width: 768px) and (max-width: 1023px) { [aria-label="Why choose us"] { height: 160px; } }
@media (min-width: 1024px) and (max-width: 1279px) { [aria-label="Why choose us"] { height: 111px; } }
@media (min-width: 1280px) { [aria-label="Why choose us"] { height: 102px; } }
[aria-label="Why choose us"] .h-10.w-10 { width: 3rem !important; height: 3rem !important; }
[aria-label="Why choose us"] .h-10.w-10 svg { width: 1.5rem !important; height: 1.5rem !important; }
[aria-label="Why choose us"] p { font-size: 1rem !important; line-height: 1.3 !important; font-weight: 600; }

/* v3: Home problem cards on phones: photo becomes a side thumbnail, the link list (same links as the title) is hidden,
   so the six cards take ~1.5 screens instead of 4.4. Desktop/tablet unchanged. */
@media (max-width: 639px) {
  [aria-labelledby="area-services-heading"] article { flex-direction: row !important; }
  [aria-labelledby="area-services-heading"] article > a[aria-hidden="true"] { width: 34% !important; aspect-ratio: auto !important; min-height: 100%; }
  [aria-labelledby="area-services-heading"] article > div { padding: 1rem !important; gap: .5rem !important; }
  [aria-labelledby="area-services-heading"] article hr,
  [aria-labelledby="area-services-heading"] article ul { display: none !important; }
  [aria-labelledby="area-services-heading"] article h3 { font-size: 1.05rem !important; }
  [aria-labelledby="area-services-heading"] article p { -webkit-line-clamp: 3 !important; }
  [aria-labelledby="area-services-heading"] .grid { gap: .75rem !important; }
}

/* v3: a related-cards grid with exactly 4 cards (Home "Bigger jobs") goes 2x2 instead of 3 + 1 orphan */
@media (min-width: 768px) {
  [aria-labelledby="related-heading"] .grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* v3 blog overhaul (Dylan 11-28: "lifeless ... full overhaul"): articles read like articles, not legal text.
   Pattern from best-practice trade blogs: readable measure, clear H2/H3 rhythm, a highlighted Key points box, roomy lists. */
[aria-label="Article"] .container-site { max-width: 720px !important; }
[aria-label="Article"] .prose-legal { font-size: 1.0625rem; line-height: 1.75; color: var(--color-text, #1f2937); }
[aria-label="Article"] .prose-legal > p:first-child { font-size: 1.25rem !important; line-height: 1.6 !important; color: var(--color-text, #1f2937) !important; margin-bottom: 2rem !important; }
[aria-label="Article"] .prose-legal h2 { font-family: var(--font-heading); font-size: clamp(1.5rem, 2.6vw, 1.875rem); line-height: 1.2; margin: 2.75rem 0 .9rem; color: var(--color-text, #111827); }
[aria-label="Article"] .prose-legal h3 { font-family: var(--font-heading); font-size: 1.25rem; margin: 1.75rem 0 .5rem; color: var(--color-text, #111827); }
[aria-label="Article"] .prose-legal p { margin: 0 0 1.1rem; }
[aria-label="Article"] .prose-legal ul { margin: .25rem 0 1.5rem; padding-left: 1.25rem; }
[aria-label="Article"] .prose-legal ul li { margin: .45rem 0; padding-left: .25rem; }
[aria-label="Article"] .prose-legal ul li::marker { color: #526C8D; }
/* the first H2 + list = "Key points" box */
[aria-label="Article"] .prose-legal > h2:first-of-type { margin-top: 0; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--font-body);
  color: #526C8D; background: #eef2f7; border-left: 4px solid #526C8D; border-radius: 10px 10px 0 0; padding: 1.1rem 1.4rem .35rem; margin-bottom: 0; }
[aria-label="Article"] .prose-legal > h2:first-of-type + ul { background: #eef2f7; border-left: 4px solid #526C8D; border-radius: 0 0 10px 10px; margin: 0 0 2.5rem; padding: .4rem 1.4rem 1.1rem 2.6rem; font-size: 1rem; }
/* the closing "Need a hand" block */
[aria-label="Article"] .prose-legal > h2:last-of-type { border-top: 1px solid #dfe5ec; padding-top: 2rem; }
/* in-text links: clearly visible (Dylan 11-28: "their color isn't very visible") */
[aria-label="Article"] .prose-legal a { color: #1f5fa8 !important; font-weight: 700 !important; text-decoration: underline !important; text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important; text-decoration-color: rgba(31,95,168,.45) !important; }
[aria-label="Article"] .prose-legal a:hover { color: #163f6e !important; text-decoration-color: currentColor !important; }
/* in-article call-to-action box (the block's <address> + the "Request service" line after it) */
[aria-label="Article"] .prose-legal address { margin: 2.25rem 0 0 !important; padding: 1.5rem 1.6rem 1.1rem !important; background: #243142 !important; border: 0 !important;
  border-radius: 14px 14px 0 0 !important; color: #fff; }
[aria-label="Article"] .prose-legal address strong { color: #fff !important; font-family: var(--font-heading); font-size: 1.35rem !important; margin-bottom: .5rem !important; }
[aria-label="Article"] .prose-legal address span { color: rgba(255,255,255,.85) !important; font-size: 1rem !important; line-height: 1.55; }
[aria-label="Article"] .prose-legal address a[href^="mailto:"] { display: none !important; }
[aria-label="Article"] .prose-legal address a[href^="tel:"] { display: inline-flex !important; align-items: center; gap: .5rem; margin-top: 1rem !important; padding: .7rem 1.2rem;
  background: #fff; color: #243142 !important; border-radius: 8px; font-weight: 800 !important; font-size: 1.05rem !important; text-decoration: none !important; }
[aria-label="Article"] .prose-legal address a[href^="tel:"]::before { content: "Call or text"; font-weight: 600; opacity: .7; }
[aria-label="Article"] .prose-legal address + p { margin: 0 0 2.5rem !important; padding: 0 1.6rem 1.4rem !important; background: #243142; border-radius: 0 0 14px 14px;
  color: rgba(255,255,255,.75) !important; font-size: .95rem !important; }
[aria-label="Article"] .prose-legal address + p a { display: inline-block; margin-right: .6rem; padding: .7rem 1.2rem; background: #526C8D; color: #fff !important; border-radius: 8px;
  text-decoration: none !important; font-weight: 700 !important; }
[aria-label="Article"] .prose-legal address + p a:hover { background: #3f5877; color: #fff !important; }
/* article header: the meta line (date, read time, byline) reads as meta */
[aria-label="Article header"] p.max-w-\[56ch\] { font-size: .95rem !important; letter-spacing: .02em; opacity: .9; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    @keyframes ym-rise  { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
    @keyframes ym-fade  { from { opacity: 0; } to { opacity: 1; } }
    @keyframes ym-settle{ from { transform: scale(1.09); } to { transform: scale(1); } }
    @keyframes ym-drift { from { transform: translateY(-7%) scale(1.14); } to { transform: translateY(7%) scale(1.14); } }

    /* shared timing: start as it enters, done by 30-35% in; ease that starts quick and settles */
    main .reveal,
    main section:not([aria-label="Hero"]) h2,
    main [class*="grid"] > :is(article, a, div, li),
    main .nrv-card,
    main details, main [class*="faq"] li, main [aria-labelledby="faq-heading"] button,
    main #process li, main #process [class*="grid"] > *,
    main [aria-label="Why choose us"] .grid > * {
      animation: ym-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 32%;
      animation-timing-function: cubic-bezier(.16, 1, .3, 1);
    }
    /* headings inside an already-animated group should not animate twice */
    main .reveal h2, main [class*="grid"] > * h2 { animation: none; }

    /* stagger: later cards in a row start a little later */
    main [class*="grid"] > :nth-child(2), main .nrv-card:nth-child(2) { animation-range: entry 6% entry 38%; }
    main [class*="grid"] > :nth-child(3), main .nrv-card:nth-child(3) { animation-range: entry 12% entry 44%; }
    main [class*="grid"] > :nth-child(4) { animation-range: entry 18% entry 50%; }
    main [class*="grid"] > :nth-child(n+5) { animation-range: entry 22% entry 54%; }

    /* photos settle inside their (overflow-hidden) frames; the frame itself rises with its card */
    main section:not([aria-label="Hero"]) :is([class*="overflow-hidden"], [class*="rounded"]) > img:not(.nc-bg) {
      animation: ym-settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }

    /* CTA band: photo drifts slower than the page; the text block fades up */
    .nc-root--photo { overflow: hidden; }
    .nc-root--photo .nc-bg { animation: ym-drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .nc-root .nc-inner { animation: ym-rise linear both; animation-timeline: view(); animation-range: entry 10% entry 45%; animation-timing-function: cubic-bezier(.16,1,.3,1); }

    /* never touch: hero, header, sticky emergency bar, modals */
    [aria-label="Hero"] *, header *, .nem-root, .nem-root *, #quote-modal, #quote-modal * { animation-timeline: auto; }
    .nem-root, .nem-root * { animation: none !important; }
  }
}

/* v3 blog round: the blocks force Title Case on headings ("Repair And Maintenance", "Mechanic And Captain"); the copy is already cased correctly */
main h1.capitalize, main h1 .capitalize, main h2.capitalize, main h2 .capitalize, main h3.capitalize, main h3 .capitalize { text-transform: none !important; }
/* article lists keep their bullets */
[aria-label="Article"] .prose-legal ul { list-style: disc !important; }
[aria-label="Article"] .prose-legal ul li { display: list-item !important; }
/* article body: the legal-content block sets 15px grey justified text; articles get 17px, darker, left-aligned, full measure */
[aria-label="Article"] .prose-legal p, [aria-label="Article"] .prose-legal li { font-size: 1.0625rem !important; line-height: 1.75 !important; color: #2b3644 !important;
  text-align: left !important; hyphens: manual !important; -webkit-hyphens: manual !important; max-width: none !important; }
[aria-label="Article"] .prose-legal > h2:first-of-type + ul li { font-size: 1rem !important; }
/* page headers (About, Services, Our Work, Contact, Blog, articles): photo at full strength, dark fade behind the text only (no flat tint) */
section.bg-dark-bg > .hero-bg-zoom.opacity-\[0\.24\] { opacity: 1 !important; filter: none !important; }
section.bg-dark-bg:has(> .hero-bg-zoom.opacity-\[0\.24\]) > [aria-hidden="true"] { background: linear-gradient(90deg, rgba(10,18,32,.86) 0%, rgba(10,18,32,.62) 50%, rgba(10,18,32,.22) 100%) !important; }
@media (max-width: 1023px) { section.bg-dark-bg:has(> .hero-bg-zoom.opacity-\[0\.24\]) > [aria-hidden="true"] { background: linear-gradient(180deg, rgba(10,18,32,.55) 0%, rgba(10,18,32,.85) 100%) !important; } }

/* logo (2026-11-28, Dylan's ChatGPT logo, cleaned to 2 inks in NavStack\yacht-mechanics\logo\make_logo.py).
   White+gold version on the dark header/footer, navy version in the white popup. The engine's logo box is sized
   for a square logo, so it is resized here for this wide (4:1) lockup; the image fills the box width. */
header a.shrink-0 > span { width: clamp(9rem, 46vw, 11.5rem) !important; max-width: none !important; height: 3.25rem !important; }
@media (min-width: 1024px) { header a.shrink-0 > span { width: clamp(11rem, 14vw, 14rem) !important; height: 4rem !important; } }
header a.shrink-0 > span img { width: 100% !important; height: auto !important; max-height: 100% !important; object-fit: contain; object-position: left center; }
footer[role="contentinfo"] img[alt$="logo"] { width: clamp(12rem, 60vw, 15rem) !important; max-height: none !important; height: auto !important; }
/* 1024-1279px: logo + 6 nav links + phone + button don't fit on one line (they overlapped, "Our Work" wrapped).
   Drop the desktop phone button there (the CTA and the phone in the hero stay), keep links on one line. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  header a.shrink-0 > span { width: 10rem !important; }
  header .hidden.lg\:flex.items-center.gap-3 > a[href^="tel:"] { display: none !important; }
  header nav[aria-label="Main navigation"] a, header nav[aria-label="Main navigation"] button { white-space: nowrap; }
}
