/*
Theme Name: HRP - Haverford Retail Partners
Theme URI: https://haverfordretail.com
Author: Haverford Retail Partners
Description: Custom brand theme for Haverford Retail Partners. One-page layout with About, Featured Properties, Team, Newsroom, and Invest sections, built around the HRP logo and palette.
Version: 1.5.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hrp
*/

:root {
  --hrp-navy: #38465e;
  --hrp-navy-dark: #2e3a4e;
  --hrp-slate: #a0b1c4;
  --hrp-slate-soft: #c8d2de;
  --hrp-ink: #2b3342;
  --hrp-body: #4a5568;
  --hrp-bg: #ffffff;
  --hrp-bg-soft: #f4f6f9;
  --hrp-line: #e3e8ef;
  --hrp-radius: 10px;
  --hrp-font: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --hrp-font-head: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--hrp-font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--hrp-body);
  background: var(--hrp-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--hrp-navy); text-decoration: none; }
a:hover { color: var(--hrp-navy-dark); }

.hrp-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  color: var(--hrp-ink);
  font-family: var(--hrp-font-head);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

/* ---------- Header ---------- */

.hrp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hrp-line);
}

.hrp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 84px;
}

.hrp-header__logo { display: flex; align-items: center; flex-shrink: 0; }
.hrp-header__logo img,
.hrp-header__logo .custom-logo { width: auto; height: 46px; max-height: 46px; display: block; }

.hrp-nav { display: flex; align-items: center; gap: 28px; flex-wrap: nowrap; }
.hrp-nav ul { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; }
.hrp-nav a { white-space: nowrap; }
.hrp-nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hrp-ink);
}
.hrp-nav a:hover { color: var(--hrp-slate); }

.hrp-btn {
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--hrp-navy);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease;
}
.hrp-btn:hover { background: var(--hrp-navy-dark); }

.hrp-btn--light { background: #fff; color: var(--hrp-navy) !important; }
.hrp-btn--light:hover { background: var(--hrp-slate-soft); }

.hrp-menu-toggle { display: none; }

/* ---------- Hero (full-screen with photo + navy overlay) ---------- */

.hrp-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  background: linear-gradient(160deg, var(--hrp-navy) 0%, var(--hrp-navy-dark) 100%);
  color: var(--hrp-slate-soft);
  padding: 140px 0 120px;
  overflow: hidden;
}

.hrp-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.65);
  opacity: 0;
  transition: opacity 1.8s ease;
}
.hrp-hero__bg.is-active { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hrp-hero__bg.is-active { animation: hrp-kenburns 9s ease-out forwards; }
}
@keyframes hrp-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}
.hrp-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, rgba(40, 50, 68, 0.9) 0%, rgba(50, 62, 84, 0.78) 55%, rgba(40, 50, 68, 0.92) 100%);
}

.hrp-hero__content { position: relative; z-index: 1; }

.hrp-hero__kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--hrp-slate);
  margin-bottom: 22px;
}

.hrp-hero h1 {
  color: #fff;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  max-width: 14em;
  margin-bottom: 0.5em;
}

.hrp-hero p {
  font-size: 19px;
  max-width: 38em;
  margin: 0 0 36px;
}

/* Vertical SCROLL cue, bottom right */
.hrp-hero__scroll {
  position: absolute;
  right: 42px;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hrp-hero__scroll::after {
  content: "";
  width: 1px;
  height: 72px;
  background: rgba(255, 255, 255, 0.55);
  animation: hrp-scroll-pulse 2.2s ease-in-out infinite;
}
@keyframes hrp-scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 0.55; }
  50% { transform: scaleY(0.55); opacity: 1; }
}

/* Staggered fade-up of hero content once the preloader lifts */
.hrp-fade {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
body.hrp-ready .hrp-fade { opacity: 1; transform: none; }
body.hrp-ready .hrp-fade--1 { transition-delay: 0.15s; }
body.hrp-ready .hrp-fade--2 { transition-delay: 0.3s; }
body.hrp-ready .hrp-fade--3 { transition-delay: 0.5s; }
body.hrp-ready .hrp-fade--4 { transition-delay: 0.7s; }

/* ---------- Preloader (opening transition) ---------- */

.hrp-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hrp-navy-dark);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.hrp-preloader img {
  width: min(420px, 70vw);
  height: auto;
  opacity: 0;
  transform: scale(0.88);
  animation: hrp-mark-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}
@keyframes hrp-mark-in {
  to { opacity: 1; transform: scale(1); }
}
body.hrp-ready .hrp-preloader { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------- Transparent header over the front-page hero ---------- */

body.hrp-front .hrp-header {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  transition: background 0.35s ease, border-color 0.35s ease;
}
body.hrp-front .hrp-nav a { color: #fff; }
body.hrp-front .hrp-nav a:hover { color: var(--hrp-slate); }
body.hrp-front .hrp-header .hrp-btn { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.45); }
body.hrp-front .hrp-header .hrp-btn:hover { background: rgba(255, 255, 255, 0.26); }
/* Once scrolled, the header turns white with the navy logo. */
body.hrp-front.hrp-scrolled .hrp-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--hrp-line);
}
body.hrp-front.hrp-scrolled .hrp-nav a { color: var(--hrp-ink); }
body.hrp-front.hrp-scrolled .hrp-nav a:hover { color: var(--hrp-slate); }
body.hrp-front .hrp-logo-img--dark { display: none; }
body.hrp-front.hrp-scrolled .hrp-logo-img--light { display: none; }
body.hrp-front.hrp-scrolled .hrp-logo-img--dark { display: block; }
body.hrp-front .hrp-menu-toggle { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
body.hrp-front.hrp-scrolled .hrp-menu-toggle { color: var(--hrp-ink); border-color: var(--hrp-line); }
body.hrp-front .hrp-nav.is-open { background: var(--hrp-navy-dark); border-bottom-color: rgba(160, 177, 196, 0.2); }
body.hrp-front.hrp-scrolled .hrp-nav.is-open { background: #fff; border-bottom-color: var(--hrp-line); }

/* ---------- Scroll reveal ---------- */

.hrp-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.hrp-reveal.is-visible { opacity: 1; transform: none; }

/* Giant faint brand watermark behind a light section */
.hrp-watermark { position: relative; overflow: hidden; }
.hrp-watermark::before {
  content: "HRP";
  font-family: var(--hrp-font-head);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  font-size: clamp(260px, 36vw, 560px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--hrp-navy);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.hrp-watermark > .hrp-container { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .hrp-preloader { display: none; }
  .hrp-fade, .hrp-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hrp-hero__scroll::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */

.hrp-section { padding: 92px 0; }
.hrp-section--soft { background: var(--hrp-bg-soft); }

.hrp-section__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hrp-slate);
  margin-bottom: 14px;
}

.hrp-section h2 {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 0.9em;
}

.hrp-section__intro { max-width: 46em; }

/* Two-column "why" block */
.hrp-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Free text rendered from the page's own blocks */
.hrp-content-block { max-width: 62em; }
.hrp-content-block p { margin: 0 0 1em; }

/* Consecutive card rows rendered from page blocks */
.hrp-grid + .hrp-grid { margin-top: 28px; }

/* ---------- Property grid ---------- */

.hrp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.hrp-card {
  background: #fff;
  border: 1px solid var(--hrp-line);
  border-radius: var(--hrp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hrp-card:hover { box-shadow: 0 14px 34px rgba(46, 58, 78, 0.12); transform: translateY(-2px); }

.hrp-card__media { aspect-ratio: 3 / 2; background: var(--hrp-navy); position: relative; overflow: hidden; }
.hrp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hrp-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hrp-card__media--empty img { width: 42%; height: auto; object-fit: contain; opacity: 0.85; }

.hrp-card__body { padding: 22px 24px 26px; }
.hrp-card__body h3 { font-size: 24px; margin-bottom: 6px; }
.hrp-card__body h3 a { color: inherit; }
.hrp-card__body h3 a:hover { color: var(--hrp-navy); }
.hrp-card__meta { font-size: 14.5px; color: var(--hrp-body); margin: 0; }
.hrp-card__link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Team ---------- */

.hrp-team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.hrp-person {
  background: none;
  border: 0;
  text-align: center;
}
.hrp-person__photo {
  width: min(86%, 240px);
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--hrp-bg-soft);
}
.hrp-person__initials {
  width: 100%;
  aspect-ratio: 3 / 4;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hrp-navy);
  color: #fff;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.hrp-person h3 { font-size: 24px; font-weight: 400; margin-bottom: 4px; padding: 0 16px; }
.hrp-person p { font-size: 15px; color: var(--hrp-body); margin: 0; padding: 0 16px 24px; }

/* ---------- Newsroom ---------- */

.hrp-news {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.hrp-news .hrp-card__body h3 { font-size: 21px; line-height: 1.3; }
.hrp-news .hrp-card__body h3 a { color: var(--hrp-ink); }
.hrp-news .hrp-card__body h3 a:hover { color: var(--hrp-navy); }
.hrp-news__date {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hrp-slate);
  margin: 0 0 8px;
}

/* ---------- Full-width photo breaks between sections ---------- */

.hrp-break {
  height: 45vh;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hrp-break::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(56, 70, 94, 0.18);
}
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .hrp-break { background-attachment: fixed; }
}

/* ---------- Invest CTA ---------- */

.hrp-invest {
  background: linear-gradient(160deg, var(--hrp-navy) 0%, var(--hrp-navy-dark) 100%);
  background-size: cover;
  background-position: center;
  color: var(--hrp-slate-soft);
  text-align: center;
  padding: 100px 0;
}
.hrp-invest h2 { color: #fff; }
.hrp-invest p { max-width: 42em; margin: 0 auto 36px; font-size: 18px; }

/* ---------- Footer ---------- */

.hrp-footer {
  background: var(--hrp-navy-dark);
  color: var(--hrp-slate);
  padding: 64px 0 40px;
  font-size: 15px;
}

.hrp-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(160, 177, 196, 0.25);
}

.hrp-footer__logo img { height: 52px; width: auto; display: block; }
.hrp-footer address { font-style: normal; line-height: 1.8; margin-top: 18px; }

.hrp-footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; flex-wrap: wrap; }
.hrp-footer__nav a {
  color: var(--hrp-slate-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hrp-footer__nav a:hover { color: #fff; }

.hrp-footer__bottom { padding-top: 28px; font-size: 13.5px; }

/* ---------- Inner pages / posts ---------- */

.hrp-page { padding: 72px 0 96px; }
.hrp-page h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 0.4em; }
.hrp-entry-meta { color: var(--hrp-slate); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 36px; }
.hrp-content { max-width: 760px; }
.hrp-content img { border-radius: var(--hrp-radius); }
.hrp-content a { text-decoration: underline; text-underline-offset: 3px; }

.hrp-archive-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 28px; }
.hrp-archive-list article { border-bottom: 1px solid var(--hrp-line); padding-bottom: 28px; }
.hrp-archive-list h2 { font-size: 22px; margin-bottom: 6px; }
.hrp-archive-list h2 a { color: var(--hrp-ink); }
.hrp-archive-list h2 a:hover { color: var(--hrp-navy); }

/* WordPress core alignment classes */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 14px; color: var(--hrp-slate); }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px; width: 1px; overflow: hidden;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hrp-grid { grid-template-columns: repeat(2, 1fr); }
  .hrp-team { grid-template-columns: repeat(3, 1fr); }
  .hrp-news { grid-template-columns: repeat(2, 1fr); }
}

/* Collapse to the menu button as soon as the full nav would no longer fit
   on one line, so "Become an Investor" never wraps below the links. */
@media (max-width: 1100px) {
  .hrp-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--hrp-line);
    border-radius: 8px;
    padding: 9px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hrp-ink);
    cursor: pointer;
  }
  .hrp-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--hrp-line);
    padding: 18px 24px 26px;
  }
  .hrp-nav.is-open { display: block; }
  .hrp-nav ul { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hrp-nav .hrp-btn { margin-top: 18px; }
  .hrp-header__inner { position: relative; }
}

@media (max-width: 760px) {
  .hrp-cols { grid-template-columns: 1fr; gap: 24px; }
  .hrp-section { padding: 64px 0; }
  .hrp-hero { padding: 72px 0 80px; }
}

@media (max-width: 560px) {
  .hrp-grid, .hrp-news { grid-template-columns: 1fr; }
  .hrp-team { grid-template-columns: repeat(2, 1fr); }
}
