/* ==========================================================================
   The Poplar 1921 — 7934 Willow Street, New Orleans
   Base: tokens, type, header, drawer, buttons, footer, photo viewer.
   One per-template stylesheet loads on top of this; see inc/enqueue.php.
   Palette sampled from the building sign: espresso lettering on white, with
   Tulane green and light blue kept for accents deeper in the site.
   ========================================================================== */

:root{
  --espresso:#251A17;
  --green:#006747;
  --green-mid:#0e8a5f;
  --green-soft:#e6f2ed;
  --green-line:rgba(0,103,71,.18);

  --blue:#418fde;
  --blue-deep:#1b4f86;
  --blue-soft:#e9f2fc;
  --blue-line:rgba(65,143,222,.24);

  --white:#ffffff;
  --paper:#fbfcfa;
  --cream:#f6f4ec;
  --ink:#22303c;
  --muted:#5a6b78;
  --line:rgba(34,48,60,.12);

  --shadow-sm:0 4px 14px rgba(27,79,134,.07);
  --shadow:0 14px 38px rgba(27,79,134,.10);
  --shadow-lg:0 26px 64px rgba(27,79,134,.16);

  --radius:14px;
  --radius-lg:20px;

  --font-serif:'Playfair Display','Times New Roman',Georgia,serif;
  --font-sans:'Lato','Helvetica Neue',Arial,sans-serif;

  --header-h:104px;
}

*,*::before,*::after{box-sizing:border-box}

html{-webkit-text-size-adjust:100%}

body{
  margin:0;
  background:var(--white);
  color:var(--ink);
  font-family:var(--font-sans);
  font-size:17px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}

a{color:var(--green);text-decoration:none}
a:hover{color:var(--green-mid)}
img{max-width:100%;display:block}
button{font:inherit}

h1,h2,h3,h4{
  font-family:var(--font-serif);font-weight:600;color:var(--blue-deep);
  margin:0;line-height:1.13;letter-spacing:-.014em;
}

/* One size for every section heading below the banner, on every page, so the
   pages stay visually consistent. */
main h2{font-size:clamp(32px,3.7vw,50px)}

.container{width:min(1180px,calc(100% - 44px));margin-inline:auto}
.container-narrow{width:min(880px,calc(100% - 44px));margin-inline:auto}

.section{padding:84px 0}
.section-tight{padding:56px 0}

.visually-hidden{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

.skip-link{
  position:absolute;left:-9999px;top:0;z-index:300;
  background:var(--espresso);color:#fff;padding:12px 20px;
  font-size:14px;font-weight:700;
}
.skip-link:focus{left:0;color:#fff}

/* --------------------------------------------------------------- header -- */

/* Tulane's official blue (#418FDE) as the top rule — the "hint of blue" the
   client asked for, on every page, without disturbing the neutral palette. */
.brandbar{height:4px;background:var(--blue)}

/* Solid white, not a translucent blur: photographs scrolling underneath
   otherwise show through and wash out the espresso lockup. */
.site-header{
  position:sticky;top:0;z-index:60;
  background:#fff;
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 rgba(37,26,23,.10);
}

.nav{
  min-height:var(--header-h);
  display:flex;align-items:center;justify-content:space-between;gap:28px;
}

/* Lockup taken from the building sign: 7934 / THE POPLAR / EST. 1921.
   One colour, traditional serif letterforms, no boxed mark. */
/* The building's sign artwork used as the logo, top-left, at the client's
   request. The lockup text it replaces is kept for the footer and drawer. */
.brand-logo{display:flex;align-items:center;flex:0 0 auto;line-height:0}
.brand-logo img{height:76px;width:auto;display:block}
@media (max-width:900px){.brand-logo img{height:58px}}
@media (max-width:430px){.brand-logo img{height:50px}}

.wordmark{display:block;line-height:1;color:var(--espresso);text-align:left}
.wordmark:hover{color:var(--espresso)}
.wm-addr,.wm-est{display:block;font-family:var(--font-serif);color:var(--espresso);
  text-transform:uppercase;letter-spacing:.22em;font-weight:600;line-height:1}
.wm-addr{font-size:12.5px}
.wm-est{font-size:11.5px;letter-spacing:.26em}
.wm-name{display:block;font-family:var(--font-serif);color:var(--espresso);
  font-weight:600;font-size:42px;line-height:1.02;letter-spacing:.03em;
  text-transform:uppercase;margin:5px 0 5px}

.nav-links{display:flex;align-items:center;gap:36px}
.nav-links a{
  font-size:14px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--espresso);padding:6px 0;position:relative;
}
.nav-links a::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:2px;
  background:var(--espresso);transform:scaleX(0);transform-origin:left;
  transition:transform .28s ease;
}
.nav-links a:hover,.nav-links a.active{color:var(--espresso)}
.nav-links a:hover::after,.nav-links a.active::after{transform:scaleX(1)}

/* ------------------------------------------------- burger + off-canvas -- */

/* Square button carrying the word "Menu" beside the bars — not a circular
   icon, per the client. Sharp corners, so it reads as a deliberate control. */
.menu-btn{
  display:none;position:relative;z-index:130;
  align-items:center;gap:10px;
  height:44px;padding:0 15px;
  background:#fff;border:1.5px solid rgba(37,26,23,.28);border-radius:0;
  cursor:pointer;
  transition:border-color .25s ease;
}
.menu-btn__bars{position:relative;display:block;width:19px;height:14px;flex:0 0 19px}
.menu-btn__bars i{
  position:absolute;left:0;width:100%;height:2px;
  background:var(--espresso);
  transition:transform .34s cubic-bezier(.76,0,.24,1),opacity .2s ease;
}
.menu-btn__bars i:nth-child(1){top:0}
.menu-btn__bars i:nth-child(2){top:6px}
.menu-btn__bars i:nth-child(3){top:12px}
.menu-btn.is-open .menu-btn__bars i:nth-child(1){transform:translateY(6px) rotate(45deg)}
.menu-btn.is-open .menu-btn__bars i:nth-child(2){opacity:0}
.menu-btn.is-open .menu-btn__bars i:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
.menu-btn__text{
  font-family:var(--font-sans);font-weight:700;font-size:12.5px;line-height:1;
  letter-spacing:.14em;text-transform:uppercase;color:var(--espresso);
}
.menu-btn:hover{border-color:var(--espresso)}
.menu-btn:focus-visible{outline:3px solid var(--espresso);outline-offset:3px}

.mobile-backdrop{
  position:fixed;inset:0;z-index:110;
  background:rgba(37,26,23,.52);backdrop-filter:blur(2px);
  opacity:0;visibility:hidden;transition:opacity .4s ease,visibility .4s ease;
}
.mobile-backdrop.is-open{opacity:1;visibility:visible}

.mobile-menu{
  position:fixed;top:0;right:0;bottom:0;z-index:120;
  width:min(340px,86vw);
  background:#fff;color:var(--ink);
  display:flex;flex-direction:column;
  transform:translateX(100%);visibility:hidden;
  transition:transform .45s cubic-bezier(.76,0,.24,1),visibility .45s;
  box-shadow:-24px 0 60px -24px rgba(0,0,0,.35);
  overflow-y:auto;overscroll-behavior:contain;
}
.mobile-menu.is-open{transform:none;visibility:visible}

.mobile-menu__head{
  position:sticky;top:0;z-index:2;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:18px 22px;background:#fff;
  border-bottom:1px solid var(--line);
}
.mobile-menu__brand{
  display:block;line-height:1;color:var(--espresso);
  font-family:var(--font-serif);font-size:20px;font-weight:600;
}
.mobile-menu__brand .wm-name{font-size:22px;margin:3px 0}

.mobile-menu__close{
  width:42px;height:42px;flex:0 0 42px;border-radius:50%;cursor:pointer;
  border:1.5px solid rgba(37,26,23,.26);background:none;color:var(--espresso);
  display:grid;place-items:center;
  transition:background-color .3s ease,border-color .3s ease,transform .35s cubic-bezier(.76,0,.24,1);
}
.mobile-menu__close:hover{background:var(--espresso);border-color:var(--espresso);color:#fff}
.mobile-menu__close svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.mobile-menu__close:focus-visible{outline:3px solid var(--espresso);outline-offset:3px}

.mobile-nav{flex:1;padding:6px 22px}
.mobile-nav__list,.mobile-nav__sub{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.mobile-nav__list>li{border-bottom:1px solid var(--line)}
.mobile-nav__row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.mobile-nav a{
  display:block;padding:15px 0;flex:1;
  font-family:var(--font-sans);font-size:15px;font-weight:700;
  letter-spacing:.06em;color:var(--espresso);
}
.mobile-nav a:hover,.mobile-nav a.active{color:var(--espresso);text-decoration:underline}

.mobile-nav__toggle{
  width:34px;height:34px;flex:0 0 34px;border-radius:50%;cursor:pointer;
  border:1px solid rgba(37,26,23,.24);background:none;color:var(--espresso);
  display:grid;place-items:center;transition:transform .3s ease,background-color .3s ease;
}
.mobile-nav__toggle svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.mobile-nav__toggle:hover{background:rgba(37,26,23,.07)}
.mobile-nav__toggle:focus-visible{outline:3px solid var(--espresso);outline-offset:2px}
.has-sub.is-open>.mobile-nav__row>.mobile-nav__toggle{transform:rotate(180deg);background:var(--espresso);color:#fff}

/* Nested levels animate open with no inline styles and no fixed max-height. */
.mobile-nav__subwrap{display:grid;grid-template-rows:0fr;transition:grid-template-rows .38s cubic-bezier(.76,0,.24,1)}
.has-sub.is-open>.mobile-nav__subwrap{grid-template-rows:1fr}
.mobile-nav__sub{overflow:hidden;min-height:0;padding-left:14px}
.mobile-nav__sub a{font-size:14px;font-weight:600;color:var(--muted);padding:12px 0}
.mobile-nav__sub li:not(:last-child){border-bottom:1px solid var(--line)}

.mobile-menu__cta{
  display:flex;flex-direction:column;gap:12px;
  padding:18px 22px calc(22px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);
}
.mobile-menu__cta .btn{width:100%}
.mobile-menu__cta .mm-mail{
  text-align:center;font-size:14px;font-weight:700;color:var(--espresso);padding:4px 0;
}
.mobile-menu__cta .mm-mail:hover{color:var(--espresso);text-decoration:underline}

body.menu-open{overflow:hidden}

/* -------------------------------------------------------------- buttons -- */

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-height:50px;padding:13px 26px;border-radius:999px;border:1.5px solid transparent;
  font-family:var(--font-sans);font-size:13.5px;font-weight:900;
  letter-spacing:.12em;text-transform:uppercase;cursor:pointer;
  transition:background-color .25s ease,color .25s ease,border-color .25s ease,transform .25s ease;
}
.btn:hover{transform:translateY(-2px)}
.btn-primary{background:var(--green);color:var(--white);box-shadow:0 10px 24px rgba(0,103,71,.22)}
.btn-primary:hover{background:var(--green-mid);color:var(--white)}
.btn-outline{background:var(--white);color:var(--green);border-color:var(--green-line)}
.btn-outline:hover{background:var(--green-soft);color:var(--green);border-color:var(--green)}
.btn-row{display:flex;flex-wrap:wrap;gap:14px;margin-top:26px}

/* Tap-to-call link in body copy and in the footer. */
.tel-link{color:var(--espresso);font-weight:700;text-decoration:underline}
.tel-link:hover{color:var(--espresso)}

/* --------------------------------------------------------------- badges -- */

.badge{
  display:inline-block;border-radius:999px;padding:6px 13px;
  font-size:11px;font-weight:900;letter-spacing:.11em;text-transform:uppercase;white-space:nowrap;
}
.badge-available{background:var(--green-soft);color:var(--green)}
.badge-new{background:#fff2d6;color:#8a5a00}
.badge-rented{background:#eef1f4;color:var(--muted)}
.badge-soon{background:var(--blue-soft);color:var(--blue-deep)}

/* --------------------------------------------- shared apartment copy ----- */
/* The page heading and the description block are used by both the homepage
   feature and the apartments page, so they live here rather than in either. */

.d-title{
  margin:0 0 26px;text-align:center;
  font-family:var(--font-serif);font-weight:600;color:var(--espresso);
  font-size:clamp(30px,4vw,46px);letter-spacing:.01em;
}
.d-title--left{text-align:left;margin-bottom:18px}

.d-copy{margin-top:40px}
.d-copy--flush{margin-top:0}
.d-price{
  margin:0;font-family:var(--font-serif);font-weight:600;color:var(--espresso);
  font-size:clamp(23px,2.8vw,31px);
}
.d-sub{margin:6px 0 0;font-weight:700;color:var(--espresso)}
.d-features{margin:14px 0 26px;color:var(--ink)}
.d-copy p + p{margin-top:18px}
.d-cta{margin-top:32px}
.d-cta--center{text-align:center}

.lead{font-size:18px;color:var(--muted)}

/* ------------------------------------------------------------ lightbox -- */

.lightbox{
  position:fixed;inset:0;z-index:200;
  background:rgba(12,32,26,.94);
  /* Four in-flow children: bar, stage, caption, thumbs. The stage track uses
     minmax(0,1fr) so it can shrink instead of being pushed past the viewport. */
  display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;
  opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease;
}
.lightbox.is-open{opacity:1;visibility:visible}
body.lightbox-open{overflow:hidden}

/* Chrome is kept tight: every pixel here is height taken away from the photo,
   which matters most for portrait shots. */
.lightbox-bar{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:10px 20px;color:var(--white);
}
.lightbox-title{font-family:var(--font-serif);font-size:20px;color:var(--white);font-weight:500}
.lightbox-counter{
  font-size:12px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;
  color:rgba(255,255,255,.72);
}
.lightbox-close{
  background:none;border:1.5px solid rgba(255,255,255,.4);color:var(--white);
  border-radius:999px;width:38px;height:38px;flex:0 0 38px;cursor:pointer;
  font-size:19px;line-height:1;
  transition:background-color .22s ease,border-color .22s ease;
}
.lightbox-close:hover{background:rgba(255,255,255,.16);border-color:var(--white)}

.lightbox-stage{position:relative;min-height:0;overflow:hidden}
/* Flex centring, not grid: a percentage max-height on a grid item did not
   resolve here and the photo rendered at natural size, overflowing the screen. */
.lightbox-slide{
  position:absolute;inset:0;
  display:flex;align-items:center;justify-content:center;
  padding:8px 74px;
  opacity:0;visibility:hidden;transition:opacity .35s ease,visibility .35s ease;
}
.lightbox-slide.is-active{opacity:1;visibility:visible}
.lightbox-slide img{
  display:block;
  max-width:100%;max-height:100%;width:auto;height:auto;
  object-fit:contain;
  border-radius:8px;box-shadow:0 30px 80px rgba(0,0,0,.5);
}
.lightbox-caption{
  padding:6px 20px;text-align:center;color:rgba(255,255,255,.86);
  font-size:14px;line-height:1.4;margin:0;
}

.lightbox-nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:52px;height:52px;border-radius:50%;cursor:pointer;
  background:rgba(255,255,255,.14);border:1.5px solid rgba(255,255,255,.34);
  color:var(--white);font-size:24px;line-height:1;
  transition:background-color .22s ease,border-color .22s ease;
}
.lightbox-nav:hover{background:rgba(255,255,255,.3);border-color:var(--white)}
.lightbox-prev{left:14px}
.lightbox-next{right:14px}

.lightbox-thumbs{
  display:flex;gap:8px;overflow-x:auto;padding:6px 20px 12px;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent;
}
.lightbox-thumbs button{
  flex:0 0 62px;width:62px;height:46px;padding:0;cursor:pointer;
  border:2px solid transparent;border-radius:7px;overflow:hidden;background:none;
  opacity:.5;transition:opacity .22s ease,border-color .22s ease;
}
.lightbox-thumbs button img{width:100%;height:100%;object-fit:cover}
.lightbox-thumbs button:hover{opacity:.85}
.lightbox-thumbs button.is-active{opacity:1;border-color:var(--green-mid)}

/* Desktop and laptop: thumbnails become a vertical rail down the right side.
   A portrait photo is height-limited and leaves width unused, so the rail is
   effectively free, and the photo reclaims the height the bottom strip took. */
@media (min-width:1025px){
  .lightbox{
    grid-template-columns:minmax(0,1fr) 124px;
    grid-template-rows:auto minmax(0,1fr) auto;
    grid-template-areas:
      "bar bar"
      "stage thumbs"
      "caption caption";
  }
  .lightbox-bar{grid-area:bar}
  .lightbox-stage{grid-area:stage}
  .lightbox-caption{grid-area:caption}
  .lightbox-thumbs{
    grid-area:thumbs;
    flex-direction:column;flex-wrap:nowrap;
    overflow-x:hidden;overflow-y:auto;
    padding:2px 18px 2px 0;gap:8px;
  }
  .lightbox-thumbs button{flex:0 0 76px;width:100%;height:76px}
  /* Keep the next arrow over the photo rather than under the rail. */
  .lightbox-next{right:140px}
}

/* iPad and below: no thumbnails at all, so the photo gets the full height. */
@media (max-width:1024px){
  .lightbox-thumbs{display:none}
}

/* -------------------------------------------------------------- footer -- */

.site-footer{background:#0d2b22;color:rgba(255,255,255,.76);padding:56px 0 0}
.site-footer h3{color:var(--white);font-size:20px;margin-bottom:14px}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:44px;padding-bottom:44px}
.footer-brand .wm-name{color:var(--white)}
.footer-brand .wm-addr,.footer-brand .wm-est{color:rgba(255,255,255,.72)}
.footer-links{list-style:none;margin:0;padding:0;display:grid;gap:11px}
.footer-links a{color:rgba(255,255,255,.76);font-size:15px}
.footer-links a:hover{color:var(--white)}
.footer-links .tel-link{color:rgba(255,255,255,.76)}
.footer-links .tel-link:hover{color:var(--white)}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.14);padding:20px 0;
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;font-size:13.5px;
}
.footer-bottom p{margin:0}

/* ---------------------------------------------------------- back to top -- */

.to-top{
  position:fixed;right:18px;bottom:22px;z-index:95;
  width:48px;height:48px;border-radius:50%;cursor:pointer;
  display:grid;place-items:center;
  background:var(--green);color:#fff;border:0;
  box-shadow:0 12px 28px rgba(0,103,71,.32);
  opacity:0;visibility:hidden;transform:translateY(12px);
  transition:opacity .32s ease,visibility .32s ease,transform .32s ease,background-color .25s ease;
}
.to-top.is-visible{opacity:1;visibility:visible;transform:none}
.to-top:hover{background:var(--green-mid)}
.to-top:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.to-top svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

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

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

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms !important;transition-duration:.001ms !important}
  .reveal{opacity:1;transform:none}
}

/* ---------------------------------------------------------- responsive -- */

/* Keep the wordmark legible and the nav from crowding on tablet/laptop. */
@media (max-width:1180px) and (min-width:901px){
  .nav-links{gap:26px}
  .nav-links a{font-size:13px;letter-spacing:.07em}
}

@media (max-width:1024px){
  :root{--header-h:88px}
  .wm-name{font-size:34px}
}

@media (max-width:900px){
  .nav{min-height:74px}
  .menu-btn{display:inline-flex}
  .nav-links{display:none}
}

@media (max-width:860px){
  body{font-size:16px}
  .to-top{right:14px;width:44px;height:44px}

  .section{padding:58px 0}
  .section-tight{padding:40px 0}
  .footer-grid{grid-template-columns:1fr;gap:32px}

  .lightbox-stage,.lightbox-slide{padding:0 14px}
  .lightbox-nav{width:44px;height:44px;font-size:20px}
  .lightbox-prev{left:6px}
  .lightbox-next{right:6px}
  .lightbox-title{font-size:17px}
}

@media (max-width:520px){
  .wm-name{font-size:29px}
  .wm-addr{font-size:11px}
  .wm-est{font-size:10px}
  .btn{width:100%}
}
