/* Fixes from the PropStory pre-launch audit (October 2026).
   Loaded last on every page, so these rules win over the older patch sheets. */

/* Page H1 kept for search engines and screen readers where the design has no visible H1 */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Consent checkbox + privacy link: same on every enquiry form */
.consent-field {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 0 !important;
}
form .consent-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 17px !important;
  height: 17px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  accent-color: #3557a3;
}
form .consent-field > span {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.consent-field a,
form .consent-field > span a {
  display: inline !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: inherit !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-transform: none !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
form .consent-field > span a::before,
form .consent-field > span a::after {
  content: none !important;
}
/* dark forms (project pages, Enquire page) */
.project-form .consent-field input[type="checkbox"],
.contact-form .consent-field input[type="checkbox"] {
  accent-color: #fff;
}
.project-form .consent-field > span,
.contact-form .consent-field > span {
  color: #dce5f8 !important;
}
/* light form (homepage pop-up) */
.contact-popup form .consent-field > span {
  color: #42506a !important;
}

/* Scroll animations: shorter, subtler movement */
.anim-js .fade-up {
  transform: translate3d(0, 20px, 0);
  transition-duration: .6s;
}

/* Homepage project tabs: show the project name next to the number on phones */
@media (max-width: 900px) {
  .home-project-hero .home-project-switcher > button {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: auto !important;
    min-height: 46px;
    padding: 6px 4px !important;
    line-height: 1.15;
    text-align: center;
  }
  .home-project-hero .home-project-switcher > button span {
    display: block !important;
    margin: 0 !important;
    font-size: 8.5px;
    letter-spacing: .02em;
    white-space: normal;
  }
}

/* Leadership role titles: readable on phones */
@media (max-width: 760px) {
  .leadership .team-person .team-name p,
  .leadership .team-name p {
    font-size: 11px !important;
    line-height: 1.45 !important;
    color: #4f5d78 !important;
  }
}

/* Phones: the footer gets room so the floating buttons never cover its text. */
@media (max-width: 700px) {
  .site-footer .footer-meta,
  .site-footer .footer-bottom {
    padding-bottom: 84px !important;
  }
}

/* Enquire page: link to Leadership in place of the portrait grid */
.enquiry-team-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px 22px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
}
.enquiry-team-link:hover,
.enquiry-team-link:focus-visible {
  background: #fff;
  color: #10234d;
}

/* ESG policy pages inside the main site template */
.policy-page .legal-hero h1 {
  font-size: clamp(38px, 5.5vw, 76px);
  line-height: 1.02;
}
.policy-back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #3557a3;
  text-decoration: none;
}
.policy-copy > div + div {
  margin-top: 8px;
}
.policy-copy h2 {
  font-size: 24px;
}
.policy-copy h3 {
  font-size: 18px;
  color: #17366f;
  margin: 30px 0 10px;
}
.legal-table {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
}
.legal-table table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}
.legal-table th,
.legal-table td {
  padding: 12px 14px;
  border: 1px solid #d9e0eb;
  text-align: left;
  vertical-align: top;
}
.legal-table th {
  background: #f4f7fc;
  color: #17366f;
  font-weight: 600;
}

/* ESG page: targets merged in from the retired Sustainability page */
.esg-targets {
  padding: 105px 7.5vw;
}
.target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.target-grid article {
  padding: 34px 32px;
  border: 1px solid var(--line, #d7dfec);
  background: #fff;
}
.target-grid span {
  display: block;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #3557a3;
}
.target-grid h3 {
  margin: 14px 0 20px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
  color: #152750;
}
.target-grid ul {
  margin: 0;
  padding-left: 18px;
  color: #596987;
  font-size: 14px;
  line-height: 1.7;
}
.target-grid li + li {
  margin-top: 8px;
}
@media (max-width: 980px) {
  .target-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .esg-targets {
    padding: 72px 6vw;
  }
  .target-grid article {
    padding: 26px 22px;
  }
}

/* Grand Forest page: original logo in white (butterfly keeps its colour), straight on the hero photo
   like the other project pages. File: assets/projects/grand-forest/gf-logo-white.png */
/* Same NEOLIV size and position as the other project pages (their logo files carry built-in padding) */
body.grand-forest .n76-hero .project-detail-logo.project-detail-logo--original {
  width: calc(clamp(170px, 17vw, 230px) * .8) !important;
  margin: calc(clamp(170px, 17vw, 230px) * .07) 0 0 calc(clamp(170px, 17vw, 230px) * .13) !important;
}
@media (max-width: 760px) {
  body.grand-forest .n76-hero .project-detail-logo.project-detail-logo--original {
    width: calc(clamp(132px, 39vw, 166px) * .8) !important;
    margin: calc(clamp(132px, 39vw, 166px) * .07) 0 0 calc(clamp(132px, 39vw, 166px) * .13) !important;
  }
}

/* Corporate page, 02 Founder Credentials (redesigned): sharp square portrait, quote, three figure cards */
.nowrap {
  white-space: nowrap;
}
.founder-v2 {
  padding: 68px clamp(24px, 6vw, 84px) clamp(62px, 6vw, 92px);
  background: #f4f7fb;
  color: #152750;
}
.founder-v2-grid {
  display: grid;
  grid-template-columns: minmax(240px, 400px) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  margin-top: 48px;
}
.founder-v2-photo {
  position: relative;
  margin: 0;
  padding: 0 18px 18px 0;
}
.founder-v2-photo::before {
  content: "";
  position: absolute;
  inset: 18px 0 0 18px;
  border: 1px solid rgba(53, 87, 163, .45);
}
.founder-v2-photo img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  box-shadow: 0 24px 50px rgba(16, 35, 77, .16);
}
.founder-v2-eyebrow {
  display: block;
  color: #3557a3;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.founder-v2 h2 {
  margin: 14px 0 14px;
  color: #10234d;
  font-size: clamp(40px, 4.6vw, 68px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.045em;
}
.founder-v2-role {
  margin: 0;
  color: #647493;
  font-size: 12px;
  letter-spacing: .1em;
  line-height: 1.7;
  text-transform: uppercase;
}
.founder-v2-note {
  max-width: 560px;
  margin: 30px 0 0;
  padding-left: 18px;
  border-left: 2px solid #3557a3;
  color: #4c5b78;
  font-size: 15px;
  line-height: 1.75;
}
.founder-v2-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.founder-v2-metrics article {
  padding: 26px 26px 28px;
  background: #fff;
  border: 1px solid #d7dfec;
  border-top: 3px solid #3557a3;
}
.founder-v2-metrics strong {
  display: block;
  color: #3557a3;
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.05em;
}
.founder-v2-metrics h3 {
  margin: 16px 0 6px;
  color: #152750;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.founder-v2-metrics p {
  margin: 0;
  color: #71809b;
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .founder-v2-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .founder-v2-photo {
    width: min(100%, 380px);
  }
}
@media (max-width: 760px) {
  .founder-v2 {
    padding-top: 40px;
  }
  .founder-v2-grid {
    margin-top: 32px;
  }
  .founder-v2-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .founder-v2-metrics article {
    display: grid;
    grid-template-columns: 104px 1fr;
    column-gap: 16px;
    align-items: center;
    padding: 20px 18px;
  }
  .founder-v2-metrics strong {
    grid-row: span 2;
    font-size: 36px;
    white-space: nowrap;
  }
  .founder-v2-metrics h3 {
    margin: 0 0 4px;
  }
  .founder-v2-note {
    font-size: 14px;
  }
}

/* A little more breathing room above and below every content section (+20px desktop, +12px phone).
   Added as a transparent border so it stacks on top of each section's existing padding;
   background-origin keeps colour bands and gradients seamless. Heroes and the legal strip are left as they were. */
main > section:not(.home-project-hero):not(.corp-hero):not(.esg-hero):not(.n76-hero):not(.inner-hero):not(.legal-hero):not(.assurance-hero):not(.esg-kids-feature):not(.project-legal) {
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  background-origin: border-box;
}
@media (max-width: 760px) {
  main > section:not(.home-project-hero):not(.corp-hero):not(.esg-hero):not(.n76-hero):not(.inner-hero):not(.legal-hero):not(.assurance-hero):not(.esg-kids-feature):not(.project-legal) {
    border-top-width: 12px;
    border-bottom-width: 12px;
  }
}

/* Numbered section labels are hidden, so the first item in each section no longer needs the
   top margin that used to separate it from the label. Keeps every section's top gap the same
   as the homepage. */
main > section:not(.home-project-hero):not(.corp-hero):not(.esg-hero):not(.n76-hero):not(.inner-hero):not(.legal-hero):not(.assurance-hero) > :first-child {
  margin-top: 0 !important;
}
.corporate-page main > #home.corp-hero {
  margin-bottom: 0 !important;
}
main > section > .forest-location-heading:first-child {
  padding-top: 0 !important;
}

/* Corporate and ESG: same section rhythm as the homepage (about 150px between sections on
   desktop, 90px on phones). ESG used 105px padding; same-colour neighbours looked very far apart. */
.corporate-page main > section:is(#profile, #leadership, #values, #capital-deployment, #partners-advisors, #governance, #resources),
main > section:is(.esg-vision, .esg-pillars, .esg-promises, .esg-targets, .esg-policies, .esg-resources) {
  padding-top: 68px !important;
  padding-bottom: 44px !important;
}
@media (max-width: 760px) {
  .corporate-page main > section:is(#profile, #leadership, #values, #capital-deployment, #partners-advisors, #governance, #resources),
  main > section:is(.esg-vision, .esg-pillars, .esg-promises, .esg-targets, .esg-policies, .esg-resources) {
    padding-top: 40px !important;
    padding-bottom: 26px !important;
  }
}

/* ESG "Our Targets" follows "Our Promises" on the same white background: one homepage-sized
   gap (88px desktop / 52px phone) between them instead of two stacked paddings. */
main > section.esg-targets {
  border-top-width: 0 !important;
  padding-top: 24px !important;
}
@media (max-width: 760px) {
  main > section.esg-targets {
    padding-top: 14px !important;
  }
}

/* PropStory lead forms: the sidenav_form wrapper must not change the existing form grid,
   and the success / error messages stay hidden until form_submit.js shows one. */
.enq_form > .sidenav_form {
  display: contents;
}
.enq_form > .success_msg,
.enq_form > .error_msg {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
}
.enq_form > .success_msg h4,
.enq_form > .error_msg h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: inherit;
}
.enq_form .phone-open-div .intl-tel-input {
  display: block;
  width: 100%;
}

/* Lead forms: highlight empty / invalid fields (set by form_submit.js) */
.enq_form input.field-error,
.enq_form select.field-error {
  border-bottom-color: #ff6b6b !important;
  box-shadow: 0 1px 0 #ff6b6b !important;
}
.enq_form input[type="checkbox"].field-error {
  outline: 2px solid #ff6b6b !important;
  outline-offset: 2px;
}

/* Homepage enquiry pop-up: no visible scrollbar; compact spacing on short screens
   (small laptops, zoomed-in browsers) so the whole form fits without scrolling. */
.contact-popup {
  scrollbar-width: none;
}
.contact-popup::-webkit-scrollbar {
  display: none;
}
@media (max-height: 780px) {
  .contact-popup {
    padding: 28px 36px !important;
  }
  .contact-popup-intro h2 {
    margin: 8px 44px 6px 0 !important;
    font-size: clamp(30px, 4vw, 40px) !important;
  }
  .contact-popup form {
    gap: 14px 20px !important;
    margin-top: 18px !important;
  }
  .contact-popup form input,
  .contact-popup form select {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
}
@media (max-height: 640px) {
  .contact-popup {
    padding: 22px 30px !important;
  }
  .contact-popup-intro p {
    display: none;
  }
  .contact-popup-intro h2 {
    font-size: 28px !important;
  }
  .contact-popup form {
    gap: 10px 18px !important;
    margin-top: 12px !important;
  }
}

/* #55 Mobile readability: no text below 10px and tap areas of at least 24px (phones only; desktop unchanged). */
@media (max-width: 760px) {
  /* Home hero: project facts, location line and project switcher */
  html body:not(#m55) .home-project-copy > span { font-size: 11px !important; }
  html body:not(#m55) .home-project-switcher button span { font-size: 10px !important; }
  html body:not(#m55) .home-project-actions a { padding-top: 2px !important; }
  /* Project page hero: facts and eyebrow; "Showing nearby" map label */
  html body:not(#m55) .n76-hero-facts span { font-size: 10px !important; }
  html body:not(#m55) .n76-eyebrow { font-size: 10px !important; }
  html body:not(#m55) .nearby-map-label span { font-size: 10px !important; }
  /* Leadership cards: "View profile" */
  html body:not(#m55) .team-name span { font-size: 10px !important; }
  /* Footer links: taller tap area, same spacing as before (gap moved into padding) */
  html body:not(#m55) .site-footer .footer-column nav { gap: 0 !important; }
  html body:not(#m55) .site-footer .footer-column nav a { padding: 4px 0 !important; }
  /* Form consent checkbox */
  html body:not(#m55) .enq_form input[type="checkbox"] { width: 20px !important; height: 20px !important; }
}

/* ---- QA round 18 Nov 2026 ---- */
/* ESG page: equal top and bottom padding on content sections */
html body:not(#m55) main > :is(#pillars,#promises,#targets,#policies,#resources){padding-top:68px!important;padding-bottom:68px!important}
@media (max-width:760px){html body:not(#m55) main > :is(#pillars,#promises,#targets,#policies,#resources){padding-top:44px!important;padding-bottom:44px!important}}

/* ESG Policy page: sub-headings (h6) were ~10px */
html body:not(#m55) main h6{font-size:16px!important;line-height:1.4!important;color:#17366f!important;margin:28px 0 10px!important}
@media (max-width:760px){html body:not(#m55) main h6{font-size:15px!important}}

/* Home news cards: title clipped half-way through the 5th line */
html body:not(#m55) .insight-card h3{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:4!important;overflow:hidden!important;padding-bottom:0!important;margin-bottom:10px!important;height:auto!important;max-height:none!important}

/* Project amenities: every description takes 2 lines, so cards line up */
html body:not(#m55) .amenity-slide-body p{min-height:2lh}

/* Project location: space under "Explore the neighbourhood map" = space above the content */
html body:not(#m55) #location.strategic-location{padding-bottom:94px!important}
@media (max-width:760px){html body:not(#m55) #location.strategic-location{padding-bottom:70px!important}}

/* Enquire page steps (mobile): card used only a narrow column */
@media (max-width:760px){
  html body:not(#m55) .enq-l-steps li{grid-template-columns:1fr!important}
  html body:not(#m55) .enq-l-steps li a{grid-column:1/-1!important;grid-template-columns:48px minmax(0,1fr)!important}
}

/* Advisory Disclosures: smaller mobile hero, compact cards, even spacing */
html body:not(#m55) .advisory-hero{margin-bottom:0!important}
@media (max-width:760px){
  html body:not(#m55) .advisory-hero{min-height:440px!important}
  html body:not(#m55) .disclosure-grid a{min-height:0!important;padding-top:22px!important;padding-bottom:22px!important}
}

/* ESG: "Our Targets" and "Our Policies" share the same background, so the gap where they meet
   was double (bottom of one + top of the next). Trim the Targets bottom only. */
html body:not(#m55) main > #targets{padding-bottom:20px!important}
@media (max-width:760px){html body:not(#m55) main > #targets{padding-bottom:12px!important}}

/* ESG Policy page: main headings (h5, e.g. "Monitoring and Reporting") larger than sub-headings (h6) */
html body:not(#m55) main h5{font-size:20px!important;line-height:1.35!important;color:#17366f!important;margin:36px 0 12px!important}
@media (max-width:760px){html body:not(#m55) main h5{font-size:18px!important}}

/* Corporate: equal top and bottom padding on every content section (bottom was 44px vs 68px top) */
html body:not(#m55) main > :is(#profile,#platform,#leadership,#values,#capital-deployment,#governance,#partners-advisors){padding-top:68px!important;padding-bottom:68px!important}
@media (max-width:760px){html body:not(#m55) main > :is(#profile,#platform,#leadership,#values,#capital-deployment,#governance,#partners-advisors){padding-top:40px!important;padding-bottom:40px!important}}
/* Leadership -> Values -> Capital share one light background: trim the bottom so the joins don't double up */
html body:not(#m55) main > :is(#leadership,#values){padding-bottom:20px!important}
@media (max-width:760px){html body:not(#m55) main > :is(#leadership,#values){padding-bottom:12px!important}}

/* Grand Forest: map ("nearby") section bottom matched to its top, like the other project pages */
html body:not(#m55) main > #nearby.nearby-section{padding-bottom:68px!important}
@media (max-width:760px){html body:not(#m55) main > #nearby.nearby-section{padding-bottom:48px!important}}
/* Corporate "Clarity at Every Stage": navy background now reaches the section edge (thin white strip above/below) */
html body:not(#m55) main > #governance{background-origin:border-box!important}

/* ESG policy pages (all 7): one size per level
   h2 24px | sub-heading (h3, h5) 18px | small heading (h4, h6) 16px | text (p, li, table) 15px desktop / 14px mobile */
html body.policy-page:not(#m55) .policy-copy :is(h3,h5){font-size:18px!important;line-height:1.4!important;font-weight:700!important;color:#17366f!important;margin:32px 0 12px!important}
html body.policy-page:not(#m55) .policy-copy :is(h4,h6){font-size:16px!important;line-height:1.4!important;font-weight:700!important;color:#17366f!important;margin:26px 0 10px!important}
html body.policy-page:not(#m55) .policy-copy :is(p,li,td,th){font-size:15px!important;line-height:1.8!important;color:#42506a!important}
@media (max-width:760px){html body.policy-page:not(#m55) .policy-copy :is(p,li,td,th){font-size:14px!important}}

/* Enquire page "Your Next Step" cards: every description takes two lines on desktop, so all cards are the same height */
@media (min-width: 901px) {
  html body.enquiry-page:not(#m55) .enq-l-steps p{min-height:calc(14px * 1.65 * 2)!important}
  html body.enquiry-page:not(#m55) .enq-l-steps li>a{display:flex!important;flex-direction:column;height:100%}
  html body.enquiry-page:not(#m55) .enq-l-steps li>a>span{flex:none}
  html body.enquiry-page:not(#m55) .enq-l-steps li>a>div{flex:1}
}

/* Corporate hero: NeoLiv banner shown whole (desktop 1309x560, mobile 417x640), no overlay text */
html body:not(#m55) .corp-hero{height:auto!important;min-height:0!important;aspect-ratio:1309/560;background:#2f4fb0!important}
html body:not(#m55) .corp-hero picture,html body:not(#m55) .corp-hero picture img{display:block;width:100%!important;height:100%!important;object-fit:cover!important}
@media (max-width:650px){html body:not(#m55) .corp-hero{aspect-ratio:417/640}}



/* Corporate: smaller gap between the hero banner and "A Unique Integrated…" */
html body:not(#m55) main > #profile.corp-profile{padding-top:36px!important;border-top-width:0!important}
@media (max-width:760px){html body:not(#m55) main > #profile.corp-profile{padding-top:28px!important}}

/* Corporate profile (desktop): heading and the text beside it start at the same top line */
@media (min-width:981px){
  html body:not(#m55) .corp-profile .corp-profile-grid{align-items:start!important}
  html body:not(#m55) .corp-profile .corp-profile-grid > h2,
  html body:not(#m55) .corp-profile .corp-profile-grid > div > p:first-child{margin-top:0!important}
}
