/* ==========================================================
   CORINTHIAN ESTATE GROUP — /projects page
   Page-specific rules only. Shared light-theme vars + header/nav
   overrides live in ../shared-light.css (loaded before this file).
   Grain texture utility (.bg-grain / .bg-grain--dark) lives in
   ../style.css as a shared primitive.
   ========================================================== */

:root{--header-h:105px;--stickybar-h:55px} /* measured against the real rendered header/bar; see build notes if this ever drifts */

@media not (prefers-reduced-motion: reduce) {
  html{scroll-behavior:smooth}
}

/* ── HERO (image, overridden from the original text-only spec at
   the requester's explicit instruction - see build notes) ──── */
.pr-hero{
  position:relative;height:clamp(640px,70svh,900px);overflow:hidden;
  display:flex;align-items:center;background:#1C1209;
  /* header height + 48px (32px on mobile, see the breakpoint below) of
     real breathing room above the vertically-centred content, not just
     enough to clear the header */
  padding-top:calc(var(--header-h) + 48px);
}
.pr-hero-media{position:absolute;inset:0;overflow:hidden}
.pr-hero-img{
  width:100%;height:100%;object-fit:cover;object-position:center 55%;
  transform:scale(1.08);
}
.pr-hero.go .pr-hero-img{transform:scale(1);transition:transform 10s cubic-bezier(.22,1,.36,1)}
.pr-hero-overlay{
  position:absolute;inset:0;
  background:linear-gradient(to right,rgba(28,18,9,.74) 0%,rgba(28,18,9,.4) 38%,rgba(28,18,9,.08) 60%,rgba(28,18,9,0) 75%);
}
.pr-hero-body{position:relative;z-index:1;width:100%;padding:0 4%}
.pr-hero-in{max-width:620px}
/* This page's headline is longer than Home's or About's (5 words
   wrapping to "Five locations. / Each chosen for a / reason you can
   check." or worse) - at very wide viewports --fs-display maxes out
   at 120px and the extra line count made the heading taller than the
   hero's own available height, clipping behind the header. A wider
   column wraps it into fewer, wider lines instead. */
@media(min-width:1440px){ .pr-hero-in{max-width:820px} }
.pr-hero-tag{color:var(--gold-lt);margin-bottom:16px}
.pr-hero-h{margin-bottom:24px}
.pr-hero-h .h-line{overflow:hidden;display:block}
.pr-hero-h .h-line-in{
  display:block;font-family:var(--serif);font-weight:600;
  font-size:var(--fs-display);line-height:1.05;letter-spacing:-0.01em;
  color:var(--ivory);max-width:900px;text-wrap:balance;
  transform:translateY(115%);transition:transform 900ms cubic-bezier(.22,1,.36,1);
}
.pr-hero.go .pr-hero-h .h-line-in{transform:none}
.pr-hero-h .h-line:nth-child(2) .h-line-in{transition-delay:150ms}
.pr-hero-sub{margin-bottom:40px}
.pr-hero-sub .hs-line{overflow:hidden;display:block}
.pr-hero-sub .hs-line span{
  display:block;font-family:var(--sans);font-weight:300;
  font-size:var(--fs-lead);color:rgba(251,250,245,.88);line-height:1.6;
  opacity:0;transition:opacity 900ms cubic-bezier(.22,1,.36,1) 900ms;
}
.pr-hero.go .pr-hero-sub .hs-line span{opacity:1}
.pr-hero-links{
  display:flex;flex-wrap:wrap;gap:1.6rem;
  opacity:0;transition:opacity 900ms cubic-bezier(.22,1,.36,1) 1500ms;
}
.pr-hero.go .pr-hero-links{opacity:1}
.pr-hero-links a{
  font-family:var(--sans);font-size:.72rem;font-weight:600;letter-spacing:.1em;
  color:rgba(251,250,245,.8);border-bottom:1px solid rgba(251,250,245,.25);
  padding-bottom:.3rem;transition:color .25s,border-color .25s;
}
.pr-hero-links a:hover{color:var(--gold-lt);border-color:var(--gold-lt)}

/* ── STICKY LOCATION BAR ──────────────────────────────── */
.pr-stickybar{
  position:fixed;left:0;right:0;z-index:90;
  /* top is set inline by projects.js: the header's current rendered
     height while it's shown, or 0 once it hides on scroll-down, so the
     bar always sits flush under wherever the header actually is. */
  top:0;
  background:var(--pg-bg);border-bottom:1px solid var(--pg-line);
  /* Hidden state pushes up by its own height plus the header's full
     height plus a little margin, so it clears the viewport entirely no
     matter what "top" currently is (worst case: header fully shown). */
  transform:translateY(calc(-100% - var(--header-h, 88px) - 8px));
  transition:transform 400ms cubic-bezier(.22,1,.36,1), top .45s ease;
}
.pr-stickybar.show{transform:translateY(0)}
.pr-stickybar-track{
  max-width:1360px;margin:0 auto;padding:0 4%;
  display:flex;gap:2.4rem;overflow-x:auto;scrollbar-width:none;
}
.pr-stickybar-track::-webkit-scrollbar{display:none}
.pr-stickybar-track a{
  flex:none;padding:1rem 0;font-family:var(--sans);font-size:.76rem;font-weight:500;
  color:var(--pg-text-dim);border-bottom:2px solid transparent;white-space:nowrap;
  transition:color .25s,border-color .25s;
}
.pr-stickybar-track a.active{color:var(--pg-text);border-color:var(--pg-gold)}
.pr-stickybar-track a:hover{color:var(--pg-gold)}

/* ── LOCATION BLOCKS ──────────────────────── */
.loc-block{
  display:grid;grid-template-columns:55% 1fr;align-items:center;
  background:var(--pg-bg);
}
.loc-block--rev{direction:rtl}
.loc-block--rev .loc-info-in{direction:ltr}
.loc-block--alt{background:var(--pg-bg-alt)}

.loc-img{height:100%;min-height:480px;padding:3.5rem 0}
.loc-media{position:relative;overflow:hidden;aspect-ratio:16/9;background:var(--pg-champagne)}
/* .loc-caption's style now lives in ../style.css, shared with
   .spot-caption and .lc-caption (one caption style sitewide) */
/* Reveal once the block scrolls into view - standard image reveal */
.js-anim .loc-media{opacity:0;transform:translateY(24px);transition:opacity 900ms cubic-bezier(.22,1,.36,1),transform 900ms cubic-bezier(.22,1,.36,1)}
.js-anim .loc-block.in .loc-media{opacity:1;transform:translateY(0)}

.loc-info{padding:5rem 4%}
.loc-info-in{max-width:460px}
.loc-num{
  display:block;font-family:var(--serif);font-weight:600;
  font-size:calc(var(--fs-number) * .75);color:var(--pg-gold);line-height:1;
}
.loc-h2{
  font-family:var(--serif);font-weight:600;line-height:1.1;margin-top:.6rem;
  font-size:var(--fs-h2);color:var(--pg-text);text-wrap:balance;
}
.loc-state{
  font-family:var(--sans);font-size:var(--fs-label);font-weight:600;letter-spacing:.2em;
  text-transform:uppercase;color:var(--pg-text-faint);margin-top:.8rem;
}
.loc-sub-h{
  font-family:var(--serif);font-weight:500;font-style:italic;line-height:1.2;
  font-size:var(--fs-h3);color:var(--pg-text);margin-top:1.6rem;text-wrap:balance;
}
.loc-copy{
  font-family:var(--sans);font-weight:300;font-size:var(--fs-body);line-height:1.8;
  color:var(--pg-text-dim);margin-top:1rem;max-width:46ch;
}

/* Info row: Location / Configuration / Size·Units, thin gold icons */
.loc-cols{margin-top:2.2rem;padding-top:1.6rem;border-top:1px solid var(--pg-line);display:flex;gap:2.4rem;flex-wrap:wrap}
.loc-col{display:flex;flex-direction:column;gap:.4rem}
.loc-col-icon{color:var(--pg-gold)}
.loc-col-icon svg{width:22px;height:22px}
.loc-col-label{font-family:var(--sans);font-size:.6rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--pg-text-faint)}
.loc-col-value{font-family:var(--sans);font-weight:400;font-size:.86rem;color:var(--pg-text)}

/* Key facts: number + label, max 4 */
.loc-keyfacts{
  margin-top:1.8rem;padding-top:1.8rem;border-top:1px solid var(--pg-line);
  display:grid;grid-template-columns:repeat(4,1fr);gap:1.6rem 1.2rem;
}
.kf{display:flex;flex-direction:column;gap:.4rem}
.kf-n{font-family:var(--serif);font-weight:600;font-size:calc(var(--fs-number) * .75);color:var(--pg-gold);line-height:1.1}
.kf-l{font-family:var(--sans);font-size:.6rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--pg-text-faint)}

.loc-rera{font-family:var(--sans);font-weight:400;font-size:.76rem;color:var(--pg-text-dim);margin-top:1.4rem}

.loc-ctas{margin-top:2.4rem;display:flex;gap:1rem;flex-wrap:wrap}

.loc-sources{
  font-family:var(--sans);font-weight:300;font-size:.7rem;
  color:var(--pg-text-faint);margin-top:2rem;max-width:46ch;
}

/* Text-side reveal: elements stagger in 80ms apart once the block
   enters view (same .js-anim / IntersectionObserver pattern used
   site-wide; without JS or with reduced motion, everything is
   simply visible with no transform - nothing to opt out of). */
.js-anim .loc-info-in > *{opacity:0;transform:translateY(16px);transition:opacity 700ms cubic-bezier(.22,1,.36,1) calc(var(--i) * 80ms),transform 700ms cubic-bezier(.22,1,.36,1) calc(var(--i) * 80ms)}
.js-anim .loc-block.in .loc-info-in > *{opacity:1;transform:translateY(0)}

/* ── CLOSING CTA (reusing the visual language of the site's other
   closing-CTA sections: .s-closing on the homepage, .ab-closing on
   About - same values, own page-scoped class since there's no
   shared partial system in this static build) ──────────────── */
.loc-closing{background:var(--pg-champagne);padding:5rem 0;text-align:center}
.loc-closing-line{
  font-family:var(--serif);font-weight:500;font-size:var(--fs-lead);
  color:var(--pg-text);margin-bottom:1.8rem;
}

/* ── RESPONSIVE ───────────────────────────── */
@media(max-width:1024px){
  .loc-img{min-height:380px;padding:3rem 0}
  .loc-info{padding:3.5rem 4%}
  .loc-keyfacts{grid-template-columns:repeat(2,1fr)}
}

@media(max-width:768px){
  .pr-hero{height:clamp(480px,60svh,760px);padding-top:calc(var(--header-h) + 32px)}
  /* Dedicated 9:16 crop (projects-hero-mobile.webp, via <picture>)
     replaces the inherited desktop object-position - the crop is
     already centred on the circular garden, so plain center is right. */
  .pr-hero-img{object-position:center}
  .loc-block,.loc-block--rev{grid-template-columns:1fr;direction:ltr}
  .loc-img{min-height:0;padding:2rem 4% 0}
  .loc-info{padding:2.5rem 4%}
  .loc-info-in{max-width:100%}
  .loc-cols{gap:1.6rem}
  .pr-stickybar-track{gap:1.6rem}
}

@media(max-width:480px){
  .loc-keyfacts{grid-template-columns:repeat(2,1fr);gap:1.2rem}
}
