/* =====================================================================
   Worcester Heights – responsive.css
   Breakpoints match Bootstrap 5 (desktop first, max-width):
     0. Global fixes (all devices)
     A. ≥2200px  2K / 4K screens
     A. ≥1800px  Large screens
     B. <1200px  Laptop / small desktop
     C. <992px   Tablet landscape (mobile menu starts here)
     D. <768px   Tablet portrait / large phone
     E. <576px   Phone
     F. <375px   Small phone (iPhone SE, 320px Androids)
     G. Landscape phones (short screens)
     H. Touch devices (no hover)
     I. Notched phones (safe areas)
     J. Print
   ===================================================================== */


/* =====================================================================
   0. GLOBAL FIXES – every screen size
   ===================================================================== */
html {
  -webkit-text-size-adjust: 100%;          /* stop iOS enlarging text on rotate */
  text-size-adjust: 100%;
}
body { overflow-x: hidden; }               /* no sideways scroll from bleed elements */
img, video, iframe, svg { max-width: 100%; }

/* Lightbox image: dynamic viewport height so mobile browser bars don't cut it */
.lightbox img { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }


/* =====================================================================
   A. 2K / 4K SCREENS ≥ 2200px – scale the whole layout up a touch
   ===================================================================== */
@media (min-width: 2200px) {
  .wh-container { max-width: 1240px; }
  .hero-media { max-width: 1320px; }
  .hero-media img { height: 760px; }
  .header-inner { padding-left: 120px; padding-right: 120px; }
  .footer-inner,
  .disclaimer p { padding-left: 160px; padding-right: 160px; }

  body { font-size: 17px; }
  .main-nav a { font-size: 13px; }
  .brand-name { font-size: 19px; }
  .display-title,
  .section-dark .display-title,
  .enquire.section-dark .display-title { font-size: 64px; }
  .vision-copy .display-title { font-size: 52px; }
  .display-xl { font-size: 82px; }
  .lead-copy,
  .vision-copy p,
  .section-dark p,
  .res-panel p { font-size: 15px; }
  .features p,
  .amenity p { font-size: 13px; }
  .section { padding: 120px 0; }
}


/* =====================================================================
   A. LARGE SCREENS ≥ 1800px
   ===================================================================== */
@media (min-width: 1800px) {
  .hero-media img { height: 620px; }
}
@media (min-width: 2200px) {
  .hero-media img { height: 760px; }       /* keep 4K value after the rule above */
}


/* =====================================================================
   B. LAPTOP < 1200px
   ===================================================================== */
@media (max-width: 1199.98px) {
  .header-inner,
  .footer-inner { padding-left: 40px; padding-right: 40px; }
  .disclaimer p { padding-left: 40px; padding-right: 40px; }

  .main-nav { gap: 18px; }                 /* keeps nav on one line at ~1000px */

  .hero-title h1 { font-size: 62px; }
  .hero-media img { height: 500px; }

  .display-title,
  .section-dark .display-title,
  .enquire.section-dark .display-title { font-size: 44px; }
  .vision-copy .display-title { font-size: 38px; }
  .display-xl { font-size: 58px; }

  .res-row > .res-copy { padding-left: 44px; }
  .res-title { font-size: 36px; }
}


/* =====================================================================
   C. TABLET LANDSCAPE < 992px
   ===================================================================== */
@media (max-width: 991.98px) {
  :root { --header-h: 58px; }

  /* Bootstrap g-5 gutters are wider than the container padding – keep them inside the screen */
  .wh-container .row.g-5 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 2.5rem; }

  .section { padding: 80px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head .lead-copy { margin-top: 18px; }

  /* ---------- Mobile menu ---------- */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 44px;
    height: 44px;
    padding: 10px;
    margin-right: -10px;                    /* optical alignment with page edge */
    border: 0;
    background: none;
    z-index: 102;
  }
  .nav-toggle span { display: block; width: 100%; height: 1px; background: #fff; transition: transform .35s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 30px 40px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    background: var(--brown);
    overflow-y: auto;                       /* menu scrolls on short screens */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .35s, transform .35s, visibility .35s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .main-nav a {
    width: 100%;
    padding: 14px 0;
    font-family: var(--serif);
    font-size: 26px;
    letter-spacing: 0;
    border-bottom: 1px solid var(--line-dark);
  }
  .main-nav .btn-outline-light-sm {
    width: auto;
    margin: 30px 0 0;
    padding: 14px 32px;
    text-align: center;
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: .1em;
    border-bottom: 1px solid rgba(255, 255, 255, .85);
  }
  body.nav-open { overflow: hidden; }

  /* ---------- Sections ---------- */
  .hero-title h1 { font-size: 54px; }
  .hero-media img { height: 440px; }

  .vision-copy { padding-top: 0; }

  .arch-slider { max-width: 520px; margin: 0 auto; }

  .ig-sub { height: 300px; }

  .amenities { margin: 0 -12px; }
  .amenity { margin: 0 12px; }

  .res-row { --bs-gutter-x: 1.5rem; }
  .res-row > .res-copy { padding-left: calc(var(--bs-gutter-x) * .5); }
  .res-img { margin-bottom: 28px; }        /* space when image stacks above copy */
  .res-tab { font-size: 17px; }
  .res-title { font-size: 34px; }

  .wh-modal-body { padding: 34px 30px 30px; }
  .wh-modal-body h2 { font-size: 30px; }

  .footer-inner { grid-template-columns: 1fr auto; padding-top: 32px; padding-bottom: 32px; }
  .footer-address { grid-column: 1 / -1; grid-row: 2; }
}


/* =====================================================================
   D. TABLET PORTRAIT / LARGE PHONE < 768px
   ===================================================================== */
@media (max-width: 767.98px) {
  body { font-size: 14px; }

  .section { padding: 68px 0; }
  #neighbourhood { padding-bottom: 60px; }
  .wh-container { padding-left: 20px; padding-right: 20px; }
  .header-inner,
  .footer-inner { padding-left: 20px; padding-right: 20px; }
  .disclaimer p { padding-left: 20px; padding-right: 20px; }
  .main-nav { padding: 20px; }

  /* ---------- Type scale ---------- */
  .display-title,
  .section-dark .display-title,
  .enquire.section-dark .display-title,
  .vision-copy .display-title { font-size: 36px; }
  .display-xl { font-size: 44px; }
  .eyebrow { font-size: 9.5px; }

  /* Larger body text for comfortable reading on phones */
  .lead-copy,
  .vision-copy p,
  .section-dark p,
  .res-panel p { font-size: 14px; }
  .features p,
  .amenity p { font-size: 13px; }

  /* Minimum 10px for all small print */
  figcaption,
  .fineprint,
  .credit,
  .gallery p,
  .gallery-head p,
  .gallery-head > span,
  .section-dark .slider-note,
  .section-dark .form-note,
  .tags li,
  .slide-count,
  .stat span,
  .text-link.small,
  .site-footer .text-link,
  .footer-address,
  .disclaimer p { font-size: 10px; }

  /* Comfortable tap targets for inline links */
  .text-link { padding-top: 6px; }

  /* ---------- Hero ---------- */
  .hero-title { padding: 22px 16px 18px; }
  .hero-title h1 { font-size: 42px; }
  .hero-title p { font-size: 11px; margin-top: 12px; }
  .hero-media img { height: 340px; }
  .hero-bar span,
  .hero-bar a { font-size: 9px; }
  .brand-sub { font-size: 7.5px; }

  /* ---------- Neighbourhood ---------- */
  .figure-wide figcaption { flex-direction: column; gap: 4px; }
  .place-card { margin-bottom: 12px; }
  .place-address,
  .place-distance { font-size: 12px; }
  .place-row { grid-template-columns: 1fr; gap: 8px; }
  .place-row .text-link { justify-self: start; }

  /* ---------- Architecture ---------- */
  .arch-slider { max-width: 100%; }
  .circle-btn { width: 40px; height: 40px; }
  .stat strong { font-size: 26px; }

  /* ---------- Interiors ---------- */
  .ig-main { margin-bottom: 12px; }
  .ig-sub { height: auto; aspect-ratio: 4 / 3; }
  .features { margin-top: 30px; }

  /* ---------- Amenities ---------- */
  .amenity { padding-bottom: 28px; }
  .amenity p { max-width: none; }

  /* ---------- Residences: tabs stack as full-width rows ---------- */
  .res-tabs {
    flex-direction: column;
    gap: 0;
    margin: 0 0 26px;
    padding: 0;
    border-bottom: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
  }
  .res-tab {
    flex: none;
    width: 100%;
    padding: 15px 0 14px;
    font-size: 17px;
    line-height: 1.3;
    white-space: normal;
    border-bottom: 1px solid var(--line);
  }
  .res-tab::after { bottom: -1px; height: 2px; }
  .res-title { font-size: 30px; }
  .res-links { gap: 18px; }
  .gallery-head { flex-direction: column; gap: 6px; margin-top: 48px; }
  .gallery-head h4 { font-size: 20px; }
  .gallery-head > span { padding-top: 0; white-space: normal; }

  /* ---------- Forms ---------- */
  .enquire { padding: 68px 0 76px; }
  .enquiry-form label { font-size: 10.5px; }
  .enquiry-form input,
  .enquiry-form select,
  .enquiry-form textarea { font-size: 16px; }   /* 16px stops iOS zooming into fields */
  .btn-gold { font-size: 12px; padding: 16px 20px; }
  .field-error { font-size: 12px; }
  .form-status { font-size: 12px; }
  .form-success { padding: 22px 18px; }
  .form-success h3 { font-size: 23px; }

  /* ---------- Footer ---------- */
  .footer-inner { padding-top: 30px; padding-bottom: 30px; gap: 22px; }
  .footer-logo { width: 150px; }
  .footer-links { gap: 16px; flex-wrap: wrap; }

  /* ---------- Modal & lightbox ---------- */
  .wh-modal { padding: 60px 12px 20px; align-items: flex-start; }
  .lb-close,
  .wh-modal-close { top: 12px; right: 12px; padding: 10px 12px; font-size: 14px; }
  .wh-modal-media { display: none; }
  .wh-modal-body { padding: 30px 22px 24px; }
  .wh-modal-body h2 { font-size: 28px; }
  .lightbox { gap: 0; padding: 60px 12px 84px; }
  .lightbox img { max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); }
  .lightbox .circle-btn { position: absolute; bottom: 20px; }
  .lightbox .lb-prev { left: calc(50% - 56px); }
  .lightbox .lb-next { right: calc(50% - 56px); }
}


/* =====================================================================
   E. PHONE < 576px
   ===================================================================== */
@media (max-width: 575.98px) {
  .brand-name { font-size: 15px; }

  .section { padding: 60px 0; }
  .section-head { margin-bottom: 28px; }

  .display-title,
  .section-dark .display-title,
  .enquire.section-dark .display-title,
  .vision-copy .display-title { font-size: 32px; }
  .display-xl { font-size: 38px; }

  .hero-title h1 { font-size: 34px; letter-spacing: .05em; }
  .hero-title p { font-size: 10px; letter-spacing: .45em; padding-left: .45em; }
  .hero-media img { height: 280px; }

  /* Address strip: keep on one line, trim the address if needed */
  .hero-bar .header-inner { gap: 12px; }
  .hero-bar span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; letter-spacing: .14em; }
  .hero-bar a { flex-shrink: 0; white-space: nowrap; }

  .stats { column-gap: 18px; }
  .dots { gap: 14px; }

  .amenity h3 { font-size: 22px; }

  .res-title { font-size: 27px; }
  .gallery .col-6 { width: 100%; }

  .enquire { padding: 60px 0 68px; }

  /* Footer stacks into one column */
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .footer-address { grid-row: auto; }
  .footer-links { justify-self: start; }

  .wh-modal-body h2 { font-size: 25px; }
}


/* =====================================================================
   F. SMALL PHONE < 375px
   ===================================================================== */
@media (max-width: 374.98px) {
  .wh-container { padding-left: 16px; padding-right: 16px; }
  .header-inner,
  .footer-inner,
  .disclaimer p { padding-left: 16px; padding-right: 16px; }
  .res-tab { font-size: 16px; padding: 13px 0 12px; }

  .display-title,
  .section-dark .display-title,
  .enquire.section-dark .display-title,
  .vision-copy .display-title { font-size: 28px; }
  .display-xl { font-size: 33px; }
  .hero-title h1 { font-size: 30px; }
  .hero-title p { letter-spacing: .3em; padding-left: .3em; }
  .hero-media img { height: 240px; }
  .hero-bar span,
  .hero-bar a { font-size: 8px; letter-spacing: .1em; }

  .main-nav a { font-size: 22px; padding: 12px 0; }

  .stat strong { font-size: 23px; }
  .stats { column-gap: 14px; }

  .res-title { font-size: 25px; }
  .tags { gap: 6px; }

  .wh-modal-body { padding: 26px 16px 20px; }
}


/* =====================================================================
   G. LANDSCAPE PHONES – short screens (phone turned sideways)
   ===================================================================== */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 991.98px) {
  .section { padding: 56px 0; }

  /* Hero fits the screen instead of overflowing it */
  .hero-title { padding: 14px 16px 12px; }
  .hero-title h1 { font-size: 36px; }
  .hero-title p { margin-top: 8px; }
  .hero-media img { height: 62vh; height: 62dvh; min-height: 200px; }

  /* Menu: smaller links, two columns so it fits without much scrolling */
  .main-nav { padding: 16px 40px; flex-direction: row; flex-wrap: wrap; align-content: flex-start; column-gap: 40px; }
  .main-nav a { width: calc(50% - 20px); font-size: 19px; padding: 10px 0; }
  .main-nav .btn-outline-light-sm { width: auto; margin-top: 18px; padding: 10px 26px; }

  /* Modal starts at the top and scrolls */
  .wh-modal { align-items: flex-start; padding-top: 56px; }

  /* Lightbox: arrows at the sides, image uses the full height */
  .lightbox { padding: 50px 70px 16px; }
  .lightbox img { max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); }
  .lightbox .circle-btn { position: absolute; top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox .lb-prev { left: 14px; }
  .lightbox .lb-next { right: 14px; }
}


/* =====================================================================
   H. TOUCH DEVICES – no hover, so no stuck zoom effects
   ===================================================================== */
@media (hover: none) {
  .place-card:hover .place-img img,
  .gallery a:hover img { transform: none; }
  .circle-btn:hover { background: transparent; color: #fff; }
  .main-nav a:hover { color: #fff; }

  /* Larger hit area for slider dots */
  .dots button::after { inset: -14px; }
}


/* =====================================================================
   I. NOTCHED PHONES – respect safe areas
   (requires <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">)
   ===================================================================== */
@supports (padding: max(0px)) {
  @media (max-width: 991.98px) {
    .header-inner {
      padding-left: max(20px, env(safe-area-inset-left));
      padding-right: max(20px, env(safe-area-inset-right));
    }
    .main-nav { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .site-footer .footer-inner { padding-bottom: max(30px, env(safe-area-inset-bottom)); }
    .lightbox .circle-btn { margin-bottom: env(safe-area-inset-bottom); }
  }
  @media (max-height: 500px) and (orientation: landscape) {
    .wh-container {
      padding-left: max(20px, env(safe-area-inset-left));
      padding-right: max(20px, env(safe-area-inset-right));
    }
  }
}


/* =====================================================================
   J. PRINT
   ===================================================================== */
@media print {
  .site-header,
  .nav-toggle,
  .hero-bar,
  .slider-controls,
  .enquire,
  .wh-modal,
  .lightbox,
  .skip-link { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section { padding: 32px 0; }
  .section-dark { background: #fff; color: #333; }
  .section-dark h2,
  .section-dark h3 { color: #000; }
  .slide { position: relative; opacity: 1; }
  .slide:not(.is-active) { display: none; }
}