/* Inner-page layouts: Team, agent bios, Testimonials, Contact */

.center-copy { max-width: 1300px; margin: 0 auto; text-align: center; }
.center-copy .cg-h2 { margin-bottom: 26px; }
.center-copy p { margin-bottom: 22px; }
.dre-lines { font-size: 14px; }
.btn-row { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 34px; }

/* Team */
.team-intro { background: var(--cream); }
.team-photo { width: 100%; max-height: 700px; object-fit: cover; margin-bottom: 56px; }

/* Agent bio */
.agent { background: var(--cream); }
.agent-top { display: grid; grid-template-columns: 390px 1fr; gap: 50px; align-items: start; margin-bottom: 50px; max-width: 1060px; }
.agent-photo { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 20%; }
.cg-h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.4; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 22px; }
.agent-details ul { list-style: none; display: grid; gap: 14px; margin-bottom: 28px; font-size: 14px; }
.agent-details b { font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-right: 4px; }
.agent-details a:hover { color: var(--sage); }
.agent-bio .cg-h2 { margin-bottom: 26px; }
.agent-bio p { margin-bottom: 22px; }

/* Testimonials */
.tm-list { max-width: 760px; margin: 0 auto; padding: 0 30px; scroll-margin-top: 110px; }
.tm-item { padding: 34px 0 60px; }
.tm-name { display: flex; align-items: baseline; gap: 34px; margin-bottom: 26px; font-family: var(--serif); font-size: 45px; line-height: 1.3; letter-spacing: 1px; text-transform: uppercase; }
.tm-name h3 { font: inherit; }
.tm-text { font-size: 14px; line-height: 1.7; }
.tm-text.clamp:not(.open) { display: -webkit-box; -webkit-line-clamp: 10; -webkit-box-orient: vertical; overflow: hidden; }
.tm-more { margin-top: 14px; background: none; border: 0; border-bottom: 1px solid currentColor; padding: 0 0 2px; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; color: var(--charcoal); }
.tm-pager { display: flex; justify-content: center; gap: 6px; padding-top: 10px; }
.tm-pager button { min-width: 36px; height: 36px; background: none; border: 0; cursor: pointer; font-size: 15px; color: var(--charcoal); }
.tm-pager button.on { background: var(--sage); color: var(--white); }

/* Contact */
.contact { background: var(--cream); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; margin-top: 40px; }
.contact-grid img { width: 100%; aspect-ratio: 5/4; object-fit: cover; }
.contact-grid .cg-form .cg-btn { padding: 16px 44px; }
.contact-tiles { background: var(--cream); padding: 0 0 96px; }
.contact-tiles .cg-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { position: relative; aspect-ratio: 4/5; overflow: hidden; color: var(--white); display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.45)); }
.tile:hover img { transform: scale(1.05); }
.tile span { position: absolute; left: 30px; bottom: 30px; z-index: 2; font-family: var(--serif); font-size: 26px; letter-spacing: 1px; text-transform: uppercase; }

/* Shared helpers */
.center { text-align: center; }
.cg-h2.center { margin-bottom: 50px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Communities overview */
.areas { background: var(--cream); }
.area-grid { display: grid; grid-template-columns: repeat(3, 325px); gap: 40px 40px; justify-content: center; }
.area-card { display: block; }
.area-card .ph { position: relative; aspect-ratio: 1; overflow: hidden; }
.area-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.area-card .ph span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); color: var(--white); font-size: 14px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; opacity: 0; transition: opacity .35s; }
.area-card:hover .ph img { transform: scale(1.05); }
.area-card:hover .ph span { opacity: 1; }
.area-card .name { position: relative; margin-left: 30px; padding: 46px 0 6px 22px; font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.area-card .name::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--charcoal); opacity: .5; }

/* Neighborhood pages */
.nb-listings { background: var(--cream); }
.lede-sm { margin: -30px auto 30px; max-width: 640px; }
.nb-search { max-width: 620px; margin: 0 auto 30px; }
.nb-overview { background: var(--sage-light); color: var(--white); padding: 96px 0; }
.intro { max-width: 900px; margin: 18px 0 36px; }
.nb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.nb-stat { display: flex; gap: 14px; align-items: center; }
.nb-stat .ic { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 1px solid currentColor; display: flex; align-items: center; justify-content: center; }
.nb-stat svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.nb-stat b { display: block; font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.nb-stat small { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; opacity: .8; }
.nb-around, .nb-demo, .nb-schools { background: var(--cream); }
.nb-demo, .nb-schools { padding-top: 0; }
.map { height: 500px; border: 1px solid var(--greige); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 10px; }
.pills button { border: 1px solid var(--sage); background: transparent; color: var(--sage); padding: 9px 18px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; }
.pills button.on { background: var(--sage); color: var(--white); }
.nb-demo .nb-stats { color: var(--charcoal); margin-bottom: 44px; }
.nb-demo .nb-stat .ic { color: var(--sage); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.sub { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 18px; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 110px; gap: 14px; align-items: center; font-size: 13px; }
.bar-row .track { height: 10px; background: var(--greige); }
.bar-row .track i { display: block; height: 100%; background: var(--terracotta); }
.bar-row .val { text-align: right; font-weight: 500; }
.school-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.school-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 12px 10px; border-bottom: 1px solid var(--greige); }
.school-table td { padding: 16px 10px; border-bottom: 1px solid var(--greige); vertical-align: middle; }
.school-table b { display: block; font-weight: 600; }
.school-table small { display: block; font-size: 12px; opacity: .7; margin-top: 2px; }
.pill-tag { display: inline-block; background: var(--terracotta); color: var(--white); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 10px; }
.nb-schools a { text-decoration: underline; text-underline-offset: 3px; }
.nb-photo { height: 800px; background: center/cover no-repeat fixed; }
.nb-others { background: var(--cream); }
.other-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.other-tile { position: relative; height: 420px; overflow: hidden; color: var(--white); display: block; }
.other-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s; }
.other-tile::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0,0,0,.3); }
.other-tile div { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.other-tile h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: 1px; text-transform: uppercase; text-align: center; }
.other-tile:hover img { transform: scale(1.05); }
.other-tile .cg-btn { padding: 14px 30px; }

@media (max-width: 1180px) {
  .area-grid { grid-template-columns: repeat(2, minmax(0, 325px)); }
  .nb-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .area-grid, .other-grid, .two { grid-template-columns: 1fr; }
  .area-grid { justify-items: center; }
  .area-card { width: 100%; max-width: 420px; }
  .nb-stats { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 110px 1fr 90px; font-size: 12px; }
  .nb-photo { height: 360px; background-attachment: scroll; }
  .other-tile { height: 300px; }
  .map { height: 360px; }
  .school-table th:nth-child(3), .school-table td:nth-child(3) { display: none; }
}
@media (max-width: 860px) {
  .agent-top, .contact-grid, .contact-tiles .cg-wrap { grid-template-columns: 1fr; }
  .tm-name { font-size: 30px; gap: 18px; }
  .team-photo { margin-bottom: 36px; }
}

/* ---------- Phase 3 ---------- */
.cg-h2.tight { margin-bottom: 10px; }
.cg-btn.ghost { background: transparent; color: var(--sage); }
.cg-btn.ghost:hover { background: var(--sage); color: var(--white); }
.cg-hero.dark { background: #111; height: 600px; }
.cg-hero.dark::before { display: none; }

/* Home Valuation */
.val-hero { position: relative; min-height: 640px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); background: #333 center/cover no-repeat; padding: 130px 24px 70px; }
.val-hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.val-hero .in { position: relative; width: 100%; max-width: 880px; }
.val-hero h1 { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1.25; letter-spacing: 1px; text-transform: uppercase; }
.checks { list-style: none; display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; margin: 18px 0 34px; font-size: 13px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; }
.checks li::before { content: "✓"; margin-right: 10px; }
.val-widget { max-width: 640px; margin: 0 auto; background: var(--white); color: var(--charcoal); padding: 18px; text-align: left; }
.val-intro { background: var(--cream); }
.val-two { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center; }
.val-two .cg-h2 { margin-bottom: 26px; }
.val-two p { margin-bottom: 20px; }
.val-two img { width: 100%; aspect-ratio: 650/514; object-fit: cover; }
.val-cards-sec { background: var(--cream); padding: 0 0 96px; }
.val-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.val-card { border: 2px solid var(--terracotta); padding: 32px 48px 40px; text-align: center; }
.val-card .cg-h4 { font-size: 20px; margin-bottom: 18px; }
.val-card p { font-size: 15px; }

/* Zig-zag explainer rows */
.zz { background: var(--cream); }
.zz-sub { text-align: center; font-family: var(--serif); font-size: 21px; margin-bottom: 70px; }
.zz-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 128px; align-items: start; padding: 40px 0; }
.zz-row::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--greige); }
.zz-label { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.25; letter-spacing: 1px; text-transform: uppercase; text-align: right; color: var(--sage); }
.zz-body .cg-h4 { margin-bottom: 14px; }
.zz-body p { font-size: 15px; }
.zz-more { display: inline-block; margin-top: 16px; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.zz-row.flip .zz-label { order: 2; text-align: left; }
.zz-row.flip .zz-body { order: 1; text-align: right; }

/* Sign-up card (Private Listings, Newsletter) */
.signup { background: var(--sage-light); padding: 96px 0; }
.signup-card { max-width: 1160px; margin: 0 auto; background: var(--cream); padding: 64px 96px; }
.signup-card > p { margin-bottom: 36px; }
.signup-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.signup-form input[type=text], .signup-form input[type=email], .signup-form input[type=tel] { border-bottom-color: #999; }
.blog-empty { background: var(--cream); padding: 60px 0; }

/* Home Search + portal */
.search-app { background: var(--cream); }
.search-box { background: var(--white); padding: 24px; margin-bottom: 30px; }
.search-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 70px; }
.live-wrap { background: var(--white); padding: 50px 40px; }
.live-wrap .cg-h2 { margin-bottom: 30px; }
.portal { background: var(--cream); }
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; max-width: 1060px; }
.portal-card { background: var(--white); padding: 50px; text-align: center; }
.portal-card p { margin: 0 auto 30px; max-width: 380px; }

/* Privacy policy */
.legal { background: var(--white); }
.legal-wrap { max-width: 900px; margin: 0 auto; padding: 0 30px; font-size: 15px; }
.legal-wrap h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: 1px; text-transform: uppercase; margin: 34px 0 14px; }
.legal-wrap p { margin-bottom: 14px; }
.legal-wrap ol, .legal-wrap ul { padding-left: 24px; margin-bottom: 14px; }
.legal-wrap li { margin-bottom: 10px; }
.legal-wrap a { text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }

/* Sitemap */
.sitemap-list { background: var(--white); }
.sm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.sm-h { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 18px; }
.sm-grid ul { list-style: none; display: grid; gap: 10px; font-size: 15px; }
.sm-grid a:hover { color: var(--sage); text-decoration: underline; }

@media (max-width: 1180px) {
  .val-cards, .sm-grid { grid-template-columns: 1fr 1fr; }
  .val-two { gap: 50px; }
}
@media (max-width: 860px) {
  .val-hero h1 { font-size: 34px; }
  .val-two, .val-cards, .portal-grid, .sm-grid, .signup-form .row2 { grid-template-columns: 1fr; }
  .val-card { padding: 28px 24px; }
  .zz-row, .zz-row.flip { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .zz-row::before { display: none; }
  .zz-label, .zz-row.flip .zz-label { order: 0; text-align: left; font-size: 26px; }
  .zz-row.flip .zz-body { order: 1; text-align: left; }
  .signup-card { padding: 40px 22px; }
  .live-wrap { padding: 30px 14px; }
  .cg-hero.dark { height: 420px; }
}

/* ---------- Portfolio (Phase 4) ---------- */
.tm-page[hidden] { display: none !important; }
.pf-page { background: var(--cream); }
.pf-sold { padding-top: 0; }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.pf-grid.featured { display: flex; justify-content: center; flex-wrap: wrap; } .pf-grid.featured .pf-card { width: 400px; max-width: 100%; }
.pf-grid .pf-card { display: block; }
.pf-count { margin: 0 0 40px; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; }
.pf-sold .tm-pager { margin-top: 40px; }
.pf-cta { margin-top: 18px; padding: 14px 28px; font-size: 12px; }
@media (max-width: 1180px) { .pf-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .pf-grid, .pf-grid.featured { grid-template-columns: 1fr; } }
.pf-sold .cg-wrap.tm-list { max-width: 1380px; padding: 0 40px; }
@media (max-width: 860px) { .pf-sold .cg-wrap.tm-list { padding: 0 20px; } }
.pf-card .pf-cta + .pf-cta { margin-left: 8px; }
