/* Neighbours components (nb-). Used by the Neighbours option and by the Hybrid. */

.nb-header { background: var(--nest-cream); }
.nb-card { border-radius: var(--nest-radius-card); padding: clamp(24px, 3.4vw, 44px); }
.nb-card--petrol { background: var(--nest-petrol); color: var(--nest-sand); }
.nb-card--petrol .nest-label { color: var(--nest-sea-glass); }
.nb-card--glass { background: var(--nest-sea-glass); color: var(--nest-petrol); }
.nb-card--cream { background: var(--nest-cream); color: var(--nest-petrol); }
.lift { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.lift:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 28px 48px -28px rgba(23, 63, 71, .55); }
.btn-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.btn-arrow:hover::after { transform: translateX(4px); }

/* Photo hero with an overlapping Cream card and Petrol search card */
.nb-hero { padding: 16px 0 0; }
.nb-stage { position: relative; }
.nb-photo { border-radius: var(--nest-radius-card); border-top-right-radius: clamp(72px, 12vw, 220px); overflow: hidden; height: clamp(420px, 74vh, 760px); }
.nb-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; animation: nb-pan 2.4s var(--ease) both; }
@keyframes nb-pan { from { transform: scale(1.06); } to { transform: none; } }
.nb-hero-card { position: absolute; left: clamp(16px, 3vw, 48px); bottom: clamp(-120px, -8vw, -40px); width: min(620px, calc(100% - 32px)); box-shadow: 0 30px 60px -30px rgba(23, 63, 71, .5); animation: nest-fade-up .9s var(--ease) .3s both; }
.nb-hero-card .eyebrow { color: var(--nest-deep-clay); }
.nb-hero-card h1 { font-size: clamp(2.5rem, 5.2vw, 4.5rem); margin: 14px 0 16px; letter-spacing: -.01em; }
.nb-hero-card .intro { font-size: 1.125rem; color: var(--nest-muted); }
.nb-hero-card .crumbs { color: var(--nest-muted); }
.nb-search { position: absolute; right: clamp(16px, 3vw, 48px); bottom: clamp(-96px, -6vw, -28px); width: 340px; animation: nest-fade-up .9s var(--ease) .55s both; }
.nb-search .nest-label { display: block; color: var(--nest-sea-glass); margin-bottom: 4px; }
.nb-search label { border-bottom: 1px solid rgba(243, 235, 221, .3); padding: 10px 0 12px; }
.nb-search select { color: var(--nest-sand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F3EBDD' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.nb-search select option { color: var(--nest-petrol); }
.nb-search h2 { font-size: 1.5rem; margin-bottom: 8px; }
.nb-search .nest-button { width: 100%; margin-top: 18px; }
.nb-search .search-status { margin-top: 10px; color: var(--nest-sand); }
.nb-spacer { height: clamp(150px, 12vw, 170px); }
.nb-hero--page .nb-photo { height: clamp(320px, 52vh, 520px); }
.nb-hero--page .nb-hero-card h1 { font-size: clamp(2.25rem, 4.4vw, 3.75rem); }
.nb-hero--page .nb-spacer { height: clamp(120px, 10vw, 140px); }

/* Signature: the neighbours strip */
.nb-strip-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.nb-strip-head .head { margin-bottom: 0; }
.nb-strip { overflow: hidden; padding: 12px 0 24px; }
.nb-track { display: flex; gap: 20px; width: max-content; list-style: none; margin: 0; padding: 0 0 0 var(--gutter); animation: nb-drift 70s linear infinite; }
.nb-strip:hover .nb-track, .nb-strip:focus-within .nb-track, .nb-strip.is-paused .nb-track { animation-play-state: paused; }
@keyframes nb-drift { to { transform: translateX(-50%); } }
.nb-strip-item { position: relative; width: clamp(240px, 26vw, 340px); flex: 0 0 auto; }
.nb-strip-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--nest-radius-card); transition: transform .4s var(--ease); }
.nb-strip-item:nth-child(odd) img { border-top-left-radius: 72px; }
.nb-strip-item:hover img { transform: scale(1.025) rotate(-1deg); }
.nb-chip-label { position: absolute; left: 14px; bottom: 14px; background: var(--nest-cream); color: var(--nest-petrol); border-radius: var(--nest-radius-pill); padding: 10px 16px; font-weight: 600; font-size: .9375rem; max-width: calc(100% - 28px); }
.nb-pause { background: transparent; border: 0; box-shadow: inset 0 0 0 1.5px var(--nest-petrol); color: var(--nest-petrol); border-radius: var(--nest-radius-pill); font: 600 .9375rem/1 var(--nest-font-body); padding: 12px 18px; cursor: pointer; min-height: 44px; }
.nb-pause:hover { background: var(--nest-petrol); color: var(--nest-sand); }

/* Included chips on Sea Glass */
.nb-included { background: var(--nest-sea-glass); }
.nb-included-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: center; }
.nb-included .head { margin-bottom: 0; }
.nb-included .head .lede { color: var(--nest-petrol); }
.nb-chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.nb-chips li { display: inline-flex; align-items: center; gap: 12px; background: var(--nest-cream); border-radius: var(--nest-radius-pill); padding: 12px 22px 12px 14px; font-weight: 600; font-size: 1.0625rem; transition: transform .3s var(--ease); }
.nb-chips .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--nest-sand); display: grid; place-items: center; }
.nb-chips .icon { width: 26px; height: 26px; transition: transform .45s var(--ease); }
.nb-chips li:hover { transform: translateY(-3px); }
.nb-chips li:hover .icon { transform: rotate(-12deg) scale(1.12); }

/* Overlapping room cards */
.nb-rooms { display: grid; gap: clamp(80px, 9vw, 140px); }
.nb-room { position: relative; display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: center; }
.nb-room .photo { grid-column: 1 / 2; grid-row: 1; border-radius: var(--nest-radius-card); border-top-left-radius: clamp(64px, 10vw, 160px); overflow: hidden; aspect-ratio: 16 / 10; }
.nb-room .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.nb-room:hover .photo img { transform: scale(1.03); }
.nb-room .nb-card { grid-column: 1 / 3; grid-row: 1; justify-self: end; width: min(440px, 46%); z-index: 1; }
.nb-room--flip { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.nb-room--flip .photo { grid-column: 2 / 3; border-top-left-radius: var(--nest-radius-card); border-top-right-radius: clamp(64px, 10vw, 160px); }
.nb-room--flip .nb-card { justify-self: start; }
.nb-room h3 { font-size: clamp(2rem, 3vw, 2.75rem); margin: 10px 0 12px; }
.nb-room p { font-size: 1.125rem; }
.nb-room .btn-row { margin-top: 22px; }
.nb-room.is-match .nb-card { outline: 4px solid var(--nest-clay); outline-offset: 4px; }

/* Community collage */
.nb-community { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.nb-collage { position: relative; aspect-ratio: 1 / 1; }
.nb-collage img { position: absolute; border-radius: var(--nest-radius-card); object-fit: cover; box-shadow: 0 24px 48px -28px rgba(23, 63, 71, .6); transition: transform .45s var(--ease); }
.nb-collage img:nth-child(1) { width: 66%; aspect-ratio: 4 / 5; left: 0; top: 0; border-top-left-radius: 96px; transform: rotate(-2deg); }
.nb-collage img:nth-child(2) { width: 54%; aspect-ratio: 1 / 1; right: 0; top: 14%; transform: rotate(2.5deg); }
.nb-collage img:nth-child(3) { width: 52%; aspect-ratio: 4 / 3; left: 22%; bottom: 0; transform: rotate(-1deg); }
.nb-collage img:hover { transform: rotate(0) scale(1.03); z-index: 2; }
.nb-pills { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.nb-pills li { background: var(--nest-cream); border-radius: var(--nest-radius-pill); padding: 10px 18px; font-weight: 600; }

/* Why Nest: overlapping Petrol quote and Sea Glass pillars */
.nb-why { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
.nb-why > .nb-card--petrol { grid-column: 1 / 2; grid-row: 1; z-index: 1; padding: clamp(32px, 5vw, 64px); position: relative; }
.nb-why blockquote { margin: 16px 0 0; font-family: var(--nest-font-heading); font-weight: 600; font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.15; }
.nb-why > .nb-card--glass { grid-column: 1 / 3; grid-row: 1; justify-self: end; width: 46%; padding: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 40px) clamp(32px, 4vw, 48px) clamp(80px, 12vw, 160px); }
.nb-pillar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.nb-pillar-list strong { display: block; font-family: var(--nest-font-heading); font-size: 1.375rem; }

/* Team: card over photo */
.nb-team { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; }
.nb-team .photo { grid-column: 2 / 3; grid-row: 1; border-radius: var(--nest-radius-card); border-top-right-radius: clamp(64px, 10vw, 160px); overflow: hidden; aspect-ratio: 3 / 2; }
.nb-team .photo img { width: 100%; height: 100%; object-fit: cover; }
.nb-team .nb-card { grid-column: 1 / 3; grid-row: 1; width: min(520px, 50%); align-self: center; z-index: 1; }
.nb-team blockquote { margin: 14px 0 0; font-family: var(--nest-font-heading); font-weight: 600; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.12; }
.nb-team p:not(.nest-label) { margin-top: 14px; }

/* Place: photo with card */
.nb-place { position: relative; }
.nb-place .photo { border-radius: var(--nest-radius-card); border-top-left-radius: clamp(64px, 12vw, 200px); overflow: hidden; height: clamp(360px, 52vw, 620px); }
.nb-place .photo img { width: 100%; height: 100%; object-fit: cover; }
.nb-place .nb-card { position: absolute; right: clamp(16px, 4vw, 56px); bottom: clamp(-56px, -4vw, -24px); width: min(460px, calc(100% - 32px)); box-shadow: 0 30px 60px -30px rgba(23, 63, 71, .5); }
.nb-place .nb-card h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 10px 0; }

/* Parents: overlapping Sea Glass and Petrol */
.nb-parents { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
.nb-parents > .nb-card--glass { grid-column: 1 / 2; grid-row: 1; padding-right: clamp(32px, 14vw, 200px); }
.nb-parents > .nb-card--petrol { grid-column: 1 / 3; grid-row: 1; justify-self: end; width: 44%; z-index: 1; }
.nb-parents p + p { margin-top: 14px; }

/* CTA with faces */
.nb-cta { text-align: center; background: var(--nest-cream); }
.nb-cta .stacked { width: 190px; margin: 0 auto 28px; }
.nb-cta h2 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); max-width: 13ch; margin: 0 auto; }
.nb-faces { display: flex; justify-content: center; margin-bottom: 28px; }
.nb-faces img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--nest-cream); margin-left: -14px; transition: transform .3s var(--ease); }
.nb-faces img:first-child { margin-left: 0; }
.nb-faces img:hover { transform: translateY(-6px); }

@media (max-width: 1100px) {
  .nb-search { position: relative; right: auto; bottom: auto; width: auto; margin: 16px 0 0; }
  .nb-hero-card { position: relative; left: auto; bottom: auto; width: auto; margin: -96px 16px 0; }
  .nb-spacer, .nb-hero--page .nb-spacer { height: 0; }
  .nb-stage { padding-bottom: 8px; }
}
@media (max-width: 960px) {
  .nb-included-inner, .nb-community { grid-template-columns: 1fr; }
  .nb-room, .nb-room--flip, .nb-why, .nb-team, .nb-parents { display: block; }
  .nb-room .nb-card, .nb-why > .nb-card--glass, .nb-team .nb-card, .nb-parents > .nb-card--petrol { width: auto; margin: -64px 16px 0; position: relative; }
  .nb-why > .nb-card--glass { margin-top: -24px; padding: 40px 28px 32px; }
  .nb-parents > .nb-card--glass { padding-right: clamp(24px, 3.4vw, 44px); padding-bottom: 88px; }
  .nb-place .nb-card { position: relative; right: auto; bottom: auto; width: auto; margin: -64px 16px 0; }
}
@media (max-width: 640px) {
  .nb-photo { height: 420px; }
  .nb-hero--page .nb-photo { height: 320px; }
  .nb-hero-card { margin: -72px 0 0; }
  .nb-room .nb-card, .nb-team .nb-card, .nb-parents > .nb-card--petrol, .nb-place .nb-card { margin-left: 8px; margin-right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .nb-strip { overflow-x: auto; scroll-snap-type: x mandatory; }
  .nb-track { animation: none; }
  .nb-strip-item { scroll-snap-align: start; }
  .nb-strip-item[aria-hidden="true"] { display: none; }
  .nb-pause { display: none; }
}
