/* =====================================================================
   OneBridge Advisory: spacing + motion polish layer
   Loaded last on every page. Layout/colour/content untouched otherwise.
   Remove the <link> to polish.css and <script> polish.js to revert.
   ===================================================================== */

:root{
  --ob-nav-h:81px;            /* fixed header height (desktop) */
  --ob-hero-gap:56px;         /* space between header and first hero text */
  --ob-section-y:44px;        /* standard vertical padding for content sections (kept tight) */
  --ob-ease:cubic-bezier(.2,.65,.3,1);
}
@media (max-width:1024px){ :root{ --ob-section-y:36px; --ob-hero-gap:48px; } }
@media (max-width:640px){  :root{ --ob-section-y:30px; --ob-hero-gap:36px; } }

/* ---------------------------------------------------------------------
   1. SECTION RHYTHM: one consistent vertical spacing for content sections
   (repeated classes raise specificity above the page-level overrides)
   --------------------------------------------------------------------- */
/* Home */
body .ob-problem.ob-problem.ob-problem,
body .ob-solution.ob-solution.ob-solution,
body .home-why.home-why.home-why,
body .ob-stages.ob-stages.ob-stages,
body .ob-organisations.ob-organisations.ob-organisations,
body .home-capabilities.home-capabilities.home-capabilities,
body .ob-who.ob-who.ob-who,
body .home-industries.home-industries.home-industries,
body .ob-final.ob-final.ob-final,
/* About */
body .about-why.about-why.about-why,
body .about-thinking.about-thinking.about-thinking,
body .about-beliefs.about-beliefs.about-beliefs,
body .about-people.about-people.about-people,
body .about-final.about-final.about-final,
/* Services */
body .s-capabilities.s-capabilities.s-capabilities,
/* Partnership */
body .partner-why.partner-why.partner-why,
body .partner-process.partner-process.partner-process,
body .partner-models.partner-models.partner-models,
body .partner-diff.partner-diff.partner-diff,
body .partner-final.partner-final.partner-final,
/* Community */
body .community-section.community-section.community-section,
/* Consultation */
body .consultation-journey.consultation-journey.consultation-journey,
body .consultation-form-section-premium.consultation-form-section-premium.consultation-form-section-premium,
/* Knowledge */
body .knowledge-hero ~ section.section.section{
  padding-top:var(--ob-section-y)!important;
  padding-bottom:var(--ob-section-y)!important;
}
/* Services: Alco-Beverage and Industries read as one block, so share the gap. */
body .s-alcohol.s-alcohol.s-alcohol{
  padding-top:var(--ob-section-y)!important;
  padding-bottom:calc(var(--ob-section-y) / 2)!important;
}
body .s-industries.s-industries.s-industries{
  padding-top:calc(var(--ob-section-y) / 2)!important;
  padding-bottom:var(--ob-section-y)!important;
}

/* ---------------------------------------------------------------------
   2. HEROES: clear the fixed header with the same breathing space
   --------------------------------------------------------------------- */
/* Values measured per page so the first line of hero text sits ~56px
   (desktop) / ~40px (phone) below the fixed header. Each hero has a
   different internal offset, hence page-specific numbers. */
body .home-page .home-hero.home-hero{padding-top:129px!important;padding-bottom:48px!important}
body .s-hero.s-hero.s-hero{padding-top:125px!important;padding-bottom:44px!important}
body .community-hero.community-hero.community-hero{padding-top:117px!important}
body .about-hero.about-hero.about-hero{padding-top:129px!important}
body .consultation-hero-premium.consultation-hero-premium.consultation-hero-premium{padding-top:129px!important}
body .partner-hero.partner-hero.partner-hero{padding-top:64px!important}
body .knowledge-hero.knowledge-hero.knowledge-hero{padding-top:137px!important}
body .contact-hero.contact-hero.contact-hero{padding-top:137px!important}
/* Contact: copy and form card both start below the header (the card used to sit under it). */
body .contact-hero .contact-compact-grid.contact-compact-grid{align-items:start!important}
@media (min-width:641px) and (max-width:1024px){
  body .partner-hero.partner-hero.partner-hero{padding-top:133px!important}
  body .community-hero.community-hero.community-hero{padding-top:91px!important}
  body .contact-hero.contact-hero.contact-hero{padding-top:137px!important}
}
@media (max-width:640px){
  body .home-page .home-hero.home-hero{padding-top:113px!important;padding-bottom:32px!important}
  body .s-hero.s-hero.s-hero{padding-top:101px!important;padding-bottom:32px!important}
  body .community-hero.community-hero.community-hero{padding-top:113px!important}
  body .about-hero.about-hero.about-hero{padding-top:105px!important}
  body .consultation-hero-premium.consultation-hero-premium.consultation-hero-premium{padding-top:105px!important}
  body .partner-hero.partner-hero.partner-hero{padding-top:113px!important}
  body .knowledge-hero.knowledge-hero.knowledge-hero{padding-top:113px!important}
  body .contact-hero.contact-hero.contact-hero{padding-top:113px!important}
}

/* In-page anchor links land below the fixed header, not under it. */
main [id]{scroll-margin-top:calc(var(--ob-nav-h) + 24px)}

/* ---------------------------------------------------------------------
   3. SMALL FIXES
   --------------------------------------------------------------------- */
/* Justified intro paragraphs created uneven word gaps. */
body .home-page .home-lead.home-lead,
body .home-page .ob-stages .home-head p.home-head-p,
body .home-page .ob-stages .home-head p,
body .home-page .ob-organisations .home-head p{text-align:left!important;text-align-last:auto!important;word-spacing:normal!important}

/* Skip link: fully hidden (incl. shadow) until keyboard focus. */
body .skip-link:not(:focus){transform:translateY(-200%)!important;box-shadow:none!important}

/* Home "Discuss your requirement" CTA: align with the content edge. */
/* The wrapper sits outside the content container, so give it the same
   width as .home-container at each breakpoint. */
body .home-page .home-why .why-cta-wrap.why-cta-wrap{
  width:min(1200px, calc(100% - 80px))!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box;
}
@media (max-width:1024px){ body .home-page .home-why .why-cta-wrap.why-cta-wrap{width:calc(100% - 64px)!important} }
@media (max-width:640px){  body .home-page .home-why .why-cta-wrap.why-cta-wrap{width:calc(100% - 28px)!important} }

/* ---------------------------------------------------------------------
   4. MOTION (only when polish.js adds .ob-motion, i.e. JS on and the
   visitor has not asked for reduced motion)
   --------------------------------------------------------------------- */
html{scroll-behavior:smooth}

/* Scroll reveal, uses the independent `translate` property so existing
   hover lifts (transform) keep working. */
html.ob-motion .ob-reveal{
  transition:
    opacity .75s var(--ob-ease) var(--ob-delay,0s),
    translate .75s var(--ob-ease) var(--ob-delay,0s),
    transform .3s ease, box-shadow .3s ease, border-color .3s ease, background-color .3s ease, color .3s ease;
}
html.ob-motion .ob-reveal:not(.ob-in){opacity:0;translate:0 26px}
html.ob-motion .ob-reveal.home-reveal{animation:none!important}

/* Hero entrance on page load. */
@keyframes obHeroIn{from{opacity:0;translate:0 22px}to{opacity:1;translate:0 0}}
html.ob-motion .ob-hero-item{animation:obHeroIn .9s var(--ob-ease) both!important;animation-delay:var(--ob-delay,0s)!important}

/* Buttons & text links: gentle lift and arrow nudge. */
html.ob-motion :is(a,button):is([class*="btn"],[class*="cta"],.why-cta,.s-panel-link,.form-submit){
  transition:translate .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
}
html.ob-motion :is(a,button):is([class*="btn"],[class*="cta"],.why-cta,.form-submit):hover{
  translate:0 -2px;box-shadow:0 10px 22px rgba(7,27,51,.14);
}
html.ob-motion .ob-arrow{display:inline-block;transition:translate .25s ease}
html.ob-motion :is(a,button):hover .ob-arrow{translate:4px 0}

/* Section images: slow, subtle zoom on hover within their frame. */
html.ob-motion .ob-zoom{overflow:hidden}
html.ob-motion .ob-zoom img{transition:scale 1.2s var(--ob-ease)}
html.ob-motion .ob-zoom:hover img{scale:1.04}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
}

/* ---------------------------------------------------------------------
   5. PHONES (readability + touch); polish.js also enforces minimum
   text and tap sizes on small screens.
   --------------------------------------------------------------------- */
@media (max-width:1024px), (pointer:coarse){
  /* 16px stops iPhone Safari from zooming the page when a field is tapped. */
  body :is(input,select,textarea){font-size:16px!important}
}
@media (max-width:1024px){
  body .nav .menu{min-width:44px!important;min-height:44px!important}
  body .footer :is(.footer-links a,.footer-email){display:inline-block!important;padding-top:12px!important;padding-bottom:12px!important}
  body .footer .footer-links{gap:0!important}
  body .services-page .s-link.s-link{font-size:12px!important}
  html,body{overflow-x:hidden}  /* safety net against any stray sideways scroll */
  body img{max-width:100%;height:auto}
}

/* Hero bottoms match the tighter section rhythm. */
body :is(.about-hero,.community-hero,.partner-hero,.consultation-hero-premium,.knowledge-hero,.contact-hero,.page-hero):is(section){padding-bottom:var(--ob-section-y)!important}

/* Footer office address (under the tagline). */
html body .footer .footer-address{margin:10px 0 0;font-style:normal;font-family:var(--ob-sans);font-size:.78rem;line-height:1.55;max-width:440px}
html body .footer .footer-address a{color:#9EABB9;text-decoration:none;transition:color .2s}
html body .footer .footer-address a:hover,html body .footer .footer-address a:focus-visible{color:#D9C8A6}
@media (max-width:640px){html body .footer .footer-address{margin-top:8px}}

/* Member Login: gold outlined pill at the end of the header nav (a plain link inside the phone menu). */
@media (min-width:981px){
  body .nav .nav-links a.nav-member{padding:10px 18px!important;background:#B5965A;border:1px solid #B5965A;border-radius:999px;color:#081422!important;font-weight:700;box-shadow:0 6px 16px -8px rgba(138,109,53,.65);transition:background .2s,border-color .2s,color .2s}
  body .nav .nav-links a.nav-member:after{display:none}
  body .nav .nav-links a.nav-member:hover,body .nav .nav-links a.nav-member:focus-visible{background:#0B1F33;border-color:#0B1F33;color:#fff!important}
}
@media (max-width:980px){
  body .nav .nav-links a.nav-member{margin-top:10px;padding:12px 22px!important;background:#B5965A;border-radius:999px;color:#081422!important;font-weight:700}
  body .nav .nav-links a.nav-member:after{display:none}
}
/* Narrow desktops (981–1240px): tighten the header so all links plus Member Login fit on one line. */
@media (min-width:981px) and (max-width:1240px){
  body .nav .nav-links{gap:14px!important;font-size:12px!important}
  body .nav .nav-links a.nav-member{padding:8px 13px!important}
  body .nav .brand-logo{width:128px}
}
