/* Align the header mark with the complete name and tagline block. */
header.site .brand{ align-items: center; gap: 12px; }
header.site .brand-mark{ width: 48px; height: 48px; }
header.site .brand-text{ align-items: flex-start; justify-content: center; gap: 4px; }
header.site .brand .name{ line-height: 1.15; }
header.site .brand .tagline{
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .04em;
  text-wrap: balance;
}

/* Shared mobile identity and touch-friendly controls. */
.hero-btn-arrow{ flex: none; }
@media (max-width: 640px){
  header.site .nav-row{ height: 72px; padding-inline: 16px; gap: 10px; }
  header.site .brand,
  .home-v3 header.site .brand{ min-width: 0; gap: 10px; }
  header.site .brand-mark,
  .home-v3 header.site .brand-mark{ width: 42px; height: 42px; }
  header.site .brand-text,
  .home-v3 header.site .brand-text{ min-width: 0; gap: 5px; align-items: flex-start; }
  header.site .brand .name,
  .home-v3 header.site .brand .name{
    font-size: clamp(16px, 4.6vw, 19px); line-height: 1.1;
    font-weight: 700; letter-spacing: -.025em; white-space: nowrap;
  }
  header.site .brand .tagline,
  .home-v3 header.site .brand .tagline{
    font-family: var(--font-body); font-size: clamp(7.5px, 2.2vw, 9px);
    line-height: 1.3; letter-spacing: .025em; font-weight: 600;
    color: #506c83; max-width: none; white-space: nowrap;
    text-transform: none;
  }
  header.site .brand-coordinate{ display: none; }
  header.site .nav-actions{ flex: none; }
  header.site .menu-toggle{
    width: 44px; height: 44px; border-radius: 13px;
    color: #154b78; background: #eaf2fa; border: 1px solid #d4e3f0;
  }
  header.site nav.primary{ top: 72px; padding: 12px 16px 20px; border-radius: 0 0 20px 20px; box-shadow: 0 18px 30px -22px #183e65; }
  header.site nav.primary a{ padding: 14px 12px; }
  .btn{ min-height: 48px; }
  .btn:focus-visible, .menu-toggle:focus-visible{ outline: 3px solid #68b9ee; outline-offset: 4px; }

  .home-v3 [data-page="home"] .hero{ padding: 44px 0 48px; }
  .home-v3 [data-page="home"] .hero > .hero-grid{ gap: 34px; }
  .home-v3 [data-page="home"] .hero .eyebrow{ font-size: 10px; letter-spacing: .1em; padding: 9px 12px; }
  .home-v3 [data-page="home"] .hero h1{ font-size: clamp(34px, 10vw, 48px); margin-top: 20px; line-height: 1.12; max-width: 14ch; }
  .home-v3 [data-page="home"] .hero .lede{ font-size: 16px; line-height: 1.65; margin-top: 18px; }
  .home-v3 [data-page="home"] .hero-ctas{ display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
  .home-v3 [data-page="home"] .hero-ctas .btn{
    width: 100%; min-height: 54px; padding: 14px 20px;
    border-radius: 14px; font-size: 15px; font-weight: 600;
    justify-content: space-between; border-width: 1px;
    transform: none;
  }
  .home-v3 [data-page="home"] .hero-ctas .btn-brass{
    background: linear-gradient(120deg, #247cce, #17548f);
    box-shadow: 0 8px 24px rgba(0,36,76,.3), inset 0 1px 0 rgba(255,255,255,.2);
    border-color: rgba(142,207,255,.4);
  }
  .home-v3 [data-page="home"] .hero-ctas .btn-ghost{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.27); box-shadow: none; }
  .home-v3 [data-page="home"] .hero-ctas .btn::before,
  .home-v3 [data-page="home"] .hero-ctas .btn::after{ display: none; }
  .home-v3 [data-page="home"] .hero-ctas .btn:active{ transform: scale(.98); }
  .home-v3 [data-page="home"] .hero-badges{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
  .home-v3 [data-page="home"] .hero-badges .badge{ font-size: 10px; padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.045); }
  .home-v3 [data-page="home"] .hero-slider .hs-track{ border-radius: 14px; }
  .home-v3 [data-page="home"] .hero-slider > .hs-dots{ margin-top: 14px; gap: 6px; }
  .home-v3 [data-page="home"] .sec-head h2{ font-size: 30px; line-height: 1.15; }
  .home-v3 [data-page="home"] .wwd-tab{ border-radius: 12px; min-height: 68px; }
  .home-v3 [data-page="home"] .wt-title{ font-size: 13px; }
  .home-v3 [data-page="home"] .testimonials .testimonial-card{ padding: 24px; border-radius: 16px; }
  .guide-cta-actions{ width: 100%; }
  .guide-cta-actions .btn{ width: 100%; justify-content: center; }
}

/* Mobile rhythm: consistent gutters, softer cards and restrained decoration. */
.mobile-nav-book{ display: none; }
@media (max-width: 640px){
  html{ scroll-padding-top: 88px; }
  body{ background-color: #f5f8fc; }
  main{ background-image: none; }
  .wrap{ padding-inline: 20px; }
  header.site{ background: rgba(249,252,255,.97); box-shadow: 0 4px 22px rgba(12,42,73,.05); }
  header.site nav.primary.open{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  header.site nav.primary a{ border: 1px solid #dfE9f3; border-radius: 12px; background: #fff; }
  header.site nav.primary a.active{ background: #eaf3ff; border-color: #b4d2ef; }
  header.site nav.primary .mobile-nav-book{
    display: flex; grid-column: 1 / -1; justify-content: center;
    background: #175b98; color: white; border-color: #175b98;
    margin-top: 4px; padding: 14px;
  }
  header.site nav.primary .nav-cpa-badge{ grid-column: 1 / -1; justify-self: center; margin: 8px 0 0; }
  .page-banner{ padding: 38px 0 58px; }
  .page-banner .pb-title{ font-size: clamp(32px, 9vw, 42px); line-height: 1.1; letter-spacing: -.035em; margin-top: 20px; }
  .page-banner .pb-sub{ font-size: 15px; line-height: 1.6; max-width: 30ch; }
  .pb-crumb{ font-size: 12px; padding: 7px 12px; }
  .page-block.tight{ padding-top: 38px !important; padding-bottom: 44px; }
  .sec-head{ margin-bottom: 24px; }
  .sec-head h2{ font-size: 29px; line-height: 1.2; letter-spacing: -.025em; }
  .sec-head > p:not(.eyebrow){ font-size: 15px; line-height: 1.7; }
  .inner-page-hero{ margin-bottom: 28px; }
  .inner-page-hero::before{ display: none; }
  .inner-page-hero img,
  [data-page="about"] .inner-page-hero img{ display: block; height: 210px; border-radius: 18px; box-shadow: 0 10px 24px -18px #173959; }
  .home-v3 [data-page="home"] .hero{ border-radius: 0; }
  .home-v3 [data-page="home"] .hero-badges .badge{ font-size: 11px; }
  .home-v3 [data-page="home"] .hero-art::before{ inset: -5px; border-radius: 19px; }
  .home-v3 [data-page="home"] .svc-ticker{ padding-block: 26px; }
  .home-v3 [data-page="home"] .tk-label{ font-size: 9px; letter-spacing: .12em; margin-bottom: 12px; }
  .home-v3 [data-page="home"] .tk-pill{ padding: 8px 14px 8px 9px; font-size: 13px; }
  .home-v3 [data-page="home"] .why-section,
  .home-v3 [data-page="home"] .how-section{ padding: 48px 0; background: #f5f8fc; }
  .home-v3 [data-page="home"] .why-section .sec-head h2{ font-size: 30px; }
  .home-v3 [data-page="home"] .why-section .why-grid{ gap: 12px; }
  .home-v3 [data-page="home"] .why-section .why-grid::before{ display: none; }
  .home-v3 [data-page="home"] .why-section .why-item{
    grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px;
    padding: 22px 18px; border: 1px solid #e1e9f2; border-radius: 18px;
    box-shadow: 0 8px 22px -18px #315578;
  }
  .home-v3 [data-page="home"] .why-section .why-item .num{
    width: 38px; height: 38px; border-radius: 12px; background: #eaf3ff;
    color: #1c66a8; font-size: 15px; box-shadow: none;
  }
  .home-v3 [data-page="home"] .why-section .why-item h3{ font-size: 19px; line-height: 1.3; }
  .home-v3 [data-page="home"] .why-section .why-item p{ font-size: 14px; line-height: 1.7; margin-top: 8px; }
  .home-v3 [data-page="home"] section.what-section #homeServiceCards.is-tabbed .card{
    border-radius: 18px; padding: 100px 24px 24px;
    background: linear-gradient(145deg,#163d65,#0a2038) !important;
  }
  .home-v3 [data-page="home"] section.what-section #homeServiceCards.is-tabbed .svc-more{ min-height: 48px; border-radius: 12px; }
  .home-v3 [data-page="home"] .what-section > .wrap > div:last-child .btn{ width: 100%; justify-content: center; border-radius: 12px; }
  .home-v3 [data-page="home"] .how-section .process{ grid-template-columns: 1fr; gap: 12px; }
  .home-v3 [data-page="home"] .how-section .process::before,
  .home-v3 [data-page="home"] .how-section .process::after{ display: none; }
  .home-v3 [data-page="home"] .how-section .step{
    display: grid; grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas: "icon label" "icon title" "icon text";
    text-align: left; column-gap: 16px; padding: 22px 18px;
    border: 1px solid #e1e9f2; border-radius: 18px;
  }
  .home-v3 [data-page="home"] .how-section .step-icon{ grid-area: icon; width: 42px; height: 42px; border-radius: 13px; box-shadow: none; }
  .home-v3 [data-page="home"] .how-section .step-icon svg{ width: 22px; height: 22px; }
  .home-v3 [data-page="home"] .how-section .step-label{ grid-area: label; margin-top: 0; font-size: 9px; letter-spacing: .12em; }
  .home-v3 [data-page="home"] .how-section .step h4{ grid-area: title; font-size: 19px; margin-top: 6px; }
  .home-v3 [data-page="home"] .how-section .step p{ grid-area: text; font-size: 14px; line-height: 1.65; }
  .home-v3 [data-page="home"] .testimonials > .wrap{ row-gap: 24px; }
  .home-v3 [data-page="home"] .testimonials .rating-summary{ border-radius: 16px; padding: 18px; background: rgba(255,255,255,.045); }
  .home-v3 [data-page="home"] .testimonials .rating-summary a{ border-radius: 10px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .home-v3 [data-page="home"] .testimonials .testimonial-card{ min-height: 0; border: 1px solid rgba(255,255,255,.2); padding: 24px; }
  .home-v3 [data-page="home"] .testimonials .testimonial-card p{ font-size: 16px; line-height: 1.75; }
  .home-v3 [data-page="home"] .testimonials .t-arrow{ width: 44px; height: 44px; }
  .home-v3 [data-page="home"] [data-page="faq"] > .page-block{ padding-block: 48px !important; }
  .home-v3 [data-page="home"] .faq-item{ border-radius: 14px; }
  .home-v3 [data-page="home"] .cta-banner{ border-radius: 20px; padding: 30px 24px; gap: 20px; }
  .home-v3 [data-page="home"] .cta-banner h3{ font-size: 28px; }
  .home-v3 [data-page="home"] .cta-banner .btn{ width: 100%; justify-content: center; border-radius: 12px; }
  .faq-q{ min-height: 56px; font-size: 15px; line-height: 1.45; }
  .form-card, .office-card, .cq-card, .guide-cta{ border-radius: 18px; }
  .contact-quick{ gap: 10px; }
  .contact-page .form-card{ padding: 24px 20px; }
  .field-row{ grid-template-columns: minmax(0,1fr); }
  .field input:not([type="radio"]):not([type="checkbox"]), .field select, .field textarea{
    font-size: 16px; min-height: 50px; border-radius: 12px;
  }
  .chip-group{ gap: 8px; }
  .chip span{ min-height: 44px; display: flex; align-items: center; padding: 10px 12px; border-radius: 10px; }
  .contact-page .form-card .btn{ width: 100%; justify-content: center; min-height: 52px; border-radius: 12px; }
  .oc-links a{ overflow-wrap: anywhere; min-height: 44px; display: flex; align-items: center; }
  footer.site{ padding-top: 48px; }
  footer.site .footer-grid{ gap: 28px; }
  footer.site .footer-brand{ border-radius: 18px; padding: 24px 20px; }
  footer.site .legal-notice{ padding: 20px; border-radius: 14px; }
  footer.site a{ text-underline-offset: 4px; }
}
@media (prefers-reduced-motion: reduce){
  .hero-btn-arrow{ transition: none; }
}
@media (max-width: 640px){
  /* Keep reading content visible while swiping through the page. */
  [data-reveal]{ opacity: 1 !important; transform: none !important; }
  .home-v3 [data-page="home"] .why-section .why-item,
  .home-v3 [data-page="home"] .how-section .step{ transform: none !important; }
}
@media (max-width: 640px){
  header.site nav.primary .nav-cpa-badge{ width: 110px; max-width: 110px; height: auto; max-height: 38px; object-fit: contain; order: 2; }
  header.site nav.primary .mobile-nav-book{ order: 1; }
}
@media (max-width: 640px){
  .contact-quick{ margin-bottom: 28px; }
  .contact-quick .cq-card{
    display: grid; grid-template-columns: 42px minmax(0,1fr);
    grid-template-areas: "icon label" "icon value" "note note";
    column-gap: 14px; row-gap: 3px; padding: 18px;
    background: linear-gradient(125deg,#1b5f9c,#153c63);
  }
  .contact-quick .cq-ico{ grid-area: icon; width: 42px; height: 42px; margin: 0; border-radius: 12px; }
  .contact-quick .cq-label{ grid-area: label; font-size: 10px; }
  .contact-quick .cq-val{ grid-area: value; font-size: 17px; line-height: 1.4; }
  .contact-quick .cq-note{ grid-area: note; margin-top: 8px; }
}

/* A clean footer edge on phones; the wave remains a desktop detail. */
@media (max-width: 767px){
  footer.site,
  .home-v3 footer.site{
    -webkit-mask: none;
    mask: none;
    margin-top: 0;
    padding-top: 36px;
    border-radius: 24px 24px 0 0;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  footer.site::before{ display: none; }
}

/* Keep the landscape Earth video at its natural scale on phones. */
@media (max-width: 640px){
  .home-v3 [data-page="home"] .hero{
    background: linear-gradient(180deg, #061829 0%, #071421 60%, #091b2d 100%);
  }
  .home-v3 [data-page="home"] .hero-globe-wrap{
    inset: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background-size: contain;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  }
  .home-v3 [data-page="home"] .hero-video{ object-fit: contain; object-position: center top; }
  .home-v3 [data-page="home"] .hero-overlay{
    background: linear-gradient(90deg, rgba(3,15,28,.65), rgba(3,15,28,.2));
  }
  .home-v3 [data-page="home"] .hero-overlay::after{ display: none; }
}

/* Quiet, static section backgrounds and straight edges for mobile. */
@media (max-width: 767px){
  .home-v3 [data-page="home"] section.page-block.alt.what-section{
    background: linear-gradient(155deg, #102b46 0%, #091a2d 100%);
    background-attachment: scroll;
    border-block: 1px solid rgba(153,189,222,.15);
  }
  .home-v3 [data-page="home"] section.page-block.alt.testimonials{
    background: linear-gradient(155deg, #163957 0%, #0d2239 100%);
    background-attachment: scroll;
    border-block: 1px solid rgba(153,189,222,.15);
  }
  .home-v3 [data-page="home"] .testimonials .rating-summary{
    background: rgba(255,255,255,.055);
    border-color: rgba(227,199,126,.35);
  }
  .home-v3 [data-page="home"] .testimonials .testimonial-card{
    background: #10283f;
    box-shadow: 0 12px 24px -20px rgba(0,0,0,.65);
  }
  .page-banner{
    border-radius: 0;
    padding-bottom: 38px;
    border-bottom: 1px solid rgba(96,154,201,.3);
  }
  .page-banner::after{ display: none; }
  footer.site,
  .home-v3 footer.site{
    border-radius: 0;
    -webkit-mask: none;
    mask: none;
    background: linear-gradient(160deg, #102b46, #081a2c);
    border-top: 1px solid #35516b;
  }
  footer.site::after{ display: none; }
}
