/* === Single Portfolio Page ===
   Requires: global.css (tokens, resets, topbar, footer)
   ========================================================================== */

.cc-pf {
  /* One left edge at the gutter. No inset — visible side margins on the
     content read as the page being boxed in. */
  --cc-pf-inset: 0px;
  /* Small uppercase labels share one column; copy sits beside them. */
  --cc-pf-label-col: 280px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  position: relative;
  padding-top: 79px;
}

/* ── HEADER: TITLE ── */

.cc-pf-header {
  padding: 0 28px;
  margin-top: 147px;
  width: 100%;
  max-width: 1512px;
  margin-left: auto;
  margin-right: auto;
}

.cc-pf-header__title {
  font-family: var(--cc-font-heading);
  font-weight: 400;
  font-size: 44px;
  line-height: normal;
  color: var(--cc-ink);
  max-width: 964px;
}

/* ── OPPORTUNITY + DOWNLOAD ── */

.cc-pf-intro {
  padding: 0 28px;
  width: 100%;
  max-width: 1512px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 56px;
}

.cc-pf-intro__left {
  display: grid;
  grid-template-columns: var(--cc-pf-label-col) minmax(0, 1fr);
  gap: 0 40px;
}

.cc-pf-intro__label {
  display: block;
  font-family: var(--cc-font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cc-archive);
  padding-top: 8px;
}

.cc-pf-intro__text {
  font-family: var(--cc-font-heading);
  font-weight: 400;
  font-size: 25px;
  line-height: normal;
  color: var(--cc-archive);
  max-width: 1000px;
}

.cc-pf-intro__text p {
  margin-bottom: 16px;
}

.cc-pf-intro__text p:last-child {
  margin-bottom: 0;
}

/* ── TRANSACTION / CHALLENGES SECTIONS ── */

.cc-pf-section {
  padding: 0 28px;
  width: 100%;
  max-width: 1512px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 80px;
}

.cc-pf-section--challenges {
  margin-top: 60px;
}

.cc-pf-section__row {
  display: grid;
  grid-template-columns: var(--cc-pf-label-col) minmax(0, 620px) minmax(0, 1fr);
  gap: 0 40px;
}

.cc-pf-section__label {
  display: block;
  font-family: var(--cc-font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cc-archive);
  padding-top: 3px;
}

.cc-pf-section__text {
  font-family: var(--cc-font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.48;
  letter-spacing: 0.28px;
  color: var(--cc-ink);
}

/* Margin note in the third column, keeping the right side occupied. */
.cc-pf-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 380px;
  justify-self: end;
}

.cc-pf-note__arrow {
  flex-shrink: 0;
  color: var(--cc-archive);
  padding-top: 3px;
}

.cc-pf-note p {
  font-family: var(--cc-font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.55;
  color: var(--cc-archive);
}

.cc-pf-section__text p {
  margin-bottom: 14px;
}

.cc-pf-section__text p:last-child {
  margin-bottom: 0;
}

/* ── STATS: one prominent line, purchase price leading ── */

.cc-pf-stats {
  padding: 0 28px;
  width: 100%;
  max-width: 1512px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 56px;
}

.cc-pf-stats__rule {
  height: 0;
  border-top: 0.5px solid var(--cc-archive);
  margin: 0 var(--cc-pf-inset);
}

.cc-pf-stats__row {
  /* Flex, not grid: cells size to their own content and sit together,
     instead of stretching into equal fractional columns that leave a
     visible gap once a property has only 2-3 stats to show. Left-aligned
     to match the title/opportunity text below it, with the same 40px
     column rhythm used elsewhere on the page, rather than centered
     (which read as disconnected from the rest of the left-aligned page). */
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 28px 72px;
  padding: 44px 0 40px;
  margin: 0 var(--cc-pf-inset);
}

.cc-pf-stats__cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cc-pf-stats__number {
  font-family: 'Austin News Deck', var(--cc-font-heading);
  font-weight: 400;
  font-size: clamp(26px, 2.5vw, 40px);
  line-height: 1.1;
  color: var(--cc-ink-2);
  overflow-wrap: break-word;
}

/* Purchase price is the figure people look for first. It must never wrap. */
.cc-pf-stats__cell--lead .cc-pf-stats__number {
  font-size: clamp(34px, 3.9vw, 60px);
  color: var(--cc-ink);
  white-space: nowrap;
}

.cc-pf-stats__cell--lead .cc-pf-stats__desc {
  color: var(--cc-ink);
}

/* Word values ("Residential Development") would break mid-word at display size. */
.cc-pf-stats__number--text {
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.25;
}

.cc-pf-stats__cell--lead .cc-pf-stats__number--text {
  font-size: clamp(26px, 2.4vw, 38px);
}

.cc-pf-stats__desc {
  font-family: var(--cc-font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cc-archive);
  margin-top: 14px;
}

/* ── IMAGES: lead shot + up to three supporting shots, under the title ── */

.cc-pf-hero {
  padding: 0 28px;
  width: 100%;
  max-width: 1512px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 75px;
}

.cc-pf-hero__rule {
  height: 0;
  border-top: 0.5px solid var(--cc-archive);
  margin: 0 var(--cc-pf-inset) 24px;
}

/* Height is set directly rather than via aspect-ratio: with a max-height the
   ratio would drive the width and the image would stop filling the column. */
.cc-pf-hero__image {
  margin: 0 var(--cc-pf-inset);
  height: clamp(300px, 37vw, 560px);
  overflow: hidden;
}

.cc-pf-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cc-pf-hero__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px var(--cc-pf-inset) 0;
}

.cc-pf-hero__thumbs[data-count="1"] {
  grid-template-columns: repeat(3, 1fr);
}

.cc-pf-hero__thumbs[data-count="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.cc-pf-hero__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.cc-pf-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── GALLERY ── */

.cc-pf-gallery {
  padding: 0 28px;
  width: 100%;
  max-width: 1512px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 46px;
}

.cc-pf-gallery__block {
  overflow: hidden;
}

.cc-pf-gallery__block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cc-pf-gallery__block--right {
  width: 716px;
  height: 901px;
  margin-left: auto;
}

.cc-pf-gallery__block--full {
  width: 100%;
  height: 853px;
  margin-top: 46px;
}

.cc-pf-gallery__block--left {
  width: 1085px;
  height: 851px;
  margin-top: 46px;
}

/* ── RELATED PORTFOLIO ── */

.cc-pf-related {
  padding: 0 28px;
  width: 100%;
  max-width: 1512px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 58px;
}

.cc-pf-related__rule {
  height: 0;
  border-top: 0.5px solid var(--cc-archive);
  margin-bottom: 35px;
}

.cc-pf-related__heading {
  font-family: var(--cc-font-heading);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  color: var(--cc-ink-2);
  margin-left: 2px;
}

.cc-pf-related__grid {
  display: grid;
  grid-template-columns: 472px 472px 472px;
  gap: 0 21px;
  margin-top: 86px;
}

.cc-pf-related__image {
  width: 472px;
  height: 352px;
  overflow: hidden;
}

.cc-pf-related__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cc-pf-related__name {
  font-family: var(--cc-font-heading);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.44;
  color: var(--cc-ink-2);
  margin-top: 25px;
}

.cc-pf-related__desc {
  font-family: var(--cc-font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.48;
  letter-spacing: 0.28px;
  color: var(--cc-ink-2);
  margin-top: 19px;
  max-width: 461px;
}

.cc-pf-related__more {
  display: inline-block;
  font-family: var(--cc-font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cc-dark-parchment);
  text-decoration: underline;
  text-decoration-skip-ink: none;
  margin-top: 35px;
}

.cc-pf-related__cta {
  display: flex;
  justify-content: center;
  margin-top: 136px;
}

.cc-pf-related__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 349px;
  height: 54px;
  border: 0.5px solid var(--cc-ink);
  background: none;
  font-family: var(--cc-font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 2.16px;
  text-transform: uppercase;
  color: var(--cc-ink);
  text-decoration: none;
  text-align: center;
  transition: background 0.3s, color 0.3s;
}

.cc-pf-related__btn:hover {
  background: var(--cc-dark-parchment);
  color: var(--cc-bg);
}

/* ── FOOTER OVERRIDE ── */

.cc-pf .cc-footer {
  margin-top: 110px;
}

/* ============================================================
   RESPONSIVE — Tablet (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .cc-pf-header {
    margin-top: 120px;
  }

  .cc-pf-header__title {
    margin-left: 0;
  }

  .cc-pf-intro__left {
    margin-left: 0;
  }

  .cc-pf {
    --cc-pf-inset: 0px;
  }

  .cc-pf-intro__left,
  .cc-pf-section__row {
    grid-template-columns: 1fr;
    gap: 16px 0;
  }

  .cc-pf-note {
    max-width: 100%;
    justify-self: start;
  }


  .cc-pf-stats__row {
    row-gap: 34px;
  }

  .cc-pf-hero__image {
    height: 400px;
  }

  .cc-pf-gallery__block--right {
    width: 100%;
    height: auto;
    aspect-ratio: 716 / 901;
  }

  .cc-pf-gallery__block--full {
    height: 500px;
  }

  .cc-pf-gallery__block--left {
    width: 100%;
    height: auto;
    aspect-ratio: 1085 / 851;
  }


  .cc-pf-related__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 21px;
  }

  .cc-pf-related__image {
    width: 100%;
    height: auto;
    aspect-ratio: 472 / 352;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  .cc-pf-header {
    margin-top: 80px;
  }

  .cc-pf-header__title {
    font-size: 32px;
  }

  .cc-pf-intro__text {
    font-size: 20px;
  }

  .cc-pf-stats {
    margin-top: 60px;
  }

  .cc-pf-stats__row {
    row-gap: 28px;
    column-gap: 40px;
    padding: 28px 0 24px;
  }

  .cc-pf-stats__number {
    font-size: 26px;
  }

  .cc-pf-stats__cell--lead {
    flex-basis: 100%;
  }

  .cc-pf-stats__cell--lead .cc-pf-stats__number {
    font-size: 40px;
  }

  .cc-pf-hero__image {
    height: 260px;
  }

  .cc-pf-hero__thumbs,
  .cc-pf-hero__thumbs[data-count="2"] {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .cc-pf-gallery__block--right {
    aspect-ratio: 3 / 4;
  }

  .cc-pf-gallery__block--full {
    height: 300px;
  }

  .cc-pf-gallery__block--left {
    aspect-ratio: 4 / 3;
  }

  .cc-pf-related__grid {
    grid-template-columns: 1fr;
    gap: 40px 0;
    margin-top: 40px;
  }

  .cc-pf-related__heading {
    font-size: 24px;
  }

  .cc-pf-related__name {
    font-size: 20px;
  }

  .cc-pf-related__cta {
    margin-top: 60px;
  }

  .cc-pf-related__btn {
    width: 100%;
    max-width: 349px;
  }

  .cc-pf .cc-footer {
    margin-top: 60px;
  }
}

/* ============================================================
   NEARBY AMENITIES
   Hand-picked places grouped into three distance bands, listed
   beside a map. Only rendered when amenities have been entered.
   ============================================================ */

.cc-amen {
  padding: 0 var(--cc-gutter);
  width: 100%;
  max-width: 1512px;
  margin: 110px auto 0;
}

.cc-amen__rule {
  height: 0;
  border-top: 0.5px solid var(--cc-archive);
  margin-bottom: 44px;
}

.cc-amen__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.cc-pf .cc-amen__heading {
  font-family: var(--cc-font-heading);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
  color: var(--cc-ink);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cc-amen__tabs {
  display: flex;
  gap: 26px;
}

.cc-pf .cc-amen__tab {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0 0 4px;
  box-shadow: none;
  cursor: pointer;
  font-family: var(--cc-font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cc-archive);
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.cc-pf .cc-amen__tab:hover,
.cc-pf .cc-amen__tab:focus {
  outline: none;
  color: var(--cc-ink);
  background: none;
}

.cc-pf .cc-amen__tab--active {
  color: var(--cc-ink);
  border-bottom-color: var(--cc-ink);
}

.cc-amen__grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 0 60px;
  align-items: start;
}

.cc-amen__group {
  margin-bottom: 34px;
}

.cc-amen__band {
  display: block;
  font-family: var(--cc-font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cc-archive);
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--cc-archive);
  margin-bottom: 14px;
}

.cc-pf .cc-amen__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cc-pf .cc-amen__item {
  font-family: var(--cc-font-heading);
  font-size: 18px;
  line-height: 1.45;
  color: var(--cc-ink-2);
  padding: 5px 0;
  margin: 0;
  transition: color 0.25s;
}

/* Locatable places are clickable — they take the map to that spot. */
.cc-pf .cc-amen__item--locatable {
  cursor: pointer;
  position: relative;
  padding-left: 0;
  transition: color 0.25s, padding-left 0.25s;
}

.cc-pf .cc-amen__item--locatable::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--cc-dark-parchment);
  transform: translateY(-50%);
  transition: width 0.25s;
}

.cc-pf .cc-amen__item--locatable:hover,
.cc-pf .cc-amen__item--locatable:focus-visible,
.cc-pf .cc-amen__item--active {
  color: var(--cc-ink);
  padding-left: 22px;
  outline: none;
}

.cc-pf .cc-amen__item--locatable:hover::before,
.cc-pf .cc-amen__item--locatable:focus-visible::before,
.cc-pf .cc-amen__item--active::before {
  width: 14px;
}

.cc-pf .cc-amen__item--active {
  color: var(--cc-dark-parchment);
}

.cc-amen__map-wrap {
  width: 100%;
}

#cc-amenities-map {
  width: 100%;
  height: 520px;
  background: #eceae5;
}

/* Leaflet controls inherit the global reset otherwise. */
#cc-amenities-map .leaflet-control-zoom a {
  color: var(--cc-ink);
  text-decoration: none;
  font-family: var(--cc-font-body);
}

@media (max-width: 1024px) {
  .cc-amen__grid {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 0 34px;
  }
  #cc-amenities-map { height: 460px; }
}

@media (max-width: 768px) {
  .cc-amen { margin-top: 70px; }
  .cc-amen__grid {
    grid-template-columns: 1fr;
    gap: 30px 0;
  }
  .cc-pf .cc-amen__heading { font-size: 26px; }
  .cc-amen__tabs { gap: 18px; flex-wrap: wrap; }
  #cc-amenities-map { height: 360px; }
}
