/* Homepage sections. Tokens, font and footer live in brand.css. */

/* font.css forces Nunito with !important; the homepage uses only inline SVG icons. */
.home,
.home * {
  font-family: var(--brand-font) !important;
}

.home {
  color: var(--brand-ink);
}

.home a {
  color: var(--brand-ink);
  text-decoration: none;
}

.home a:hover {
  color: var(--brand-blue);
}

.home h1,
.home h2,
.home h3 {
  color: inherit;
  margin: 0;
  text-transform: none;
}

.home p {
  margin: 0;
}

.home-wrap {
  box-sizing: border-box;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.home-h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.home-lede {
  font-size: 16px;
  color: var(--brand-muted);
}

.home-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-blue) !important;
}

.home-button {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border: 1px solid var(--brand-field);
  border-radius: 12px;
  background: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
}

.latest .home-button {
  width: 280px;
  max-width: 100%;
}

/* Hero */

.home-hero {
  padding: 44px 20px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.home .home-hero__title {
  font-size: 52px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home-hero__subtitle {
  max-width: 720px;
  text-wrap: balance;
  font-size: 19px;
  line-height: 1.5;
  color: var(--brand-muted);
}

.home-hero__subtitle strong {
  color: var(--brand-ink);
  font-weight: 800;
}

.home-search {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin-top: 10px;
  text-align: left;
  z-index: 2;
}

.home-search__field,
.home-search form {
  position: relative;
}

.home-search__icon {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  color: var(--brand-muted);
  pointer-events: none;
}

.home .home-search input {
  width: 100%;
  height: 56px;
  padding: 0 18px 0 50px;
  border: 1px solid var(--brand-field);
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--brand-ink);
  font-size: 16px;
}

.home .home-search input:focus {
  border: 2px solid var(--brand-blue);
  outline: none !important;
  box-shadow: none;
}

.home-search__suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--brand-muted);
  font-size: 13px;
  line-height: 1.3;
}

.home .home-search__suggestion {
  padding: 5px 10px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--brand-ink);
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}

.home .home-search__suggestion:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.home .home-search__suggestion:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.home-search #results-container:not(:empty) {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgba(15, 20, 40, 0.14);
  list-style: none;
}

.home-search #results-container li {
  padding: 0;
  border: 0;
}

.home .home-search #results-container a {
  display: block;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--brand-ink);
  font-size: 15px;
  line-height: 1.35;
}

.home .home-search #results-container a:hover,
.home .home-search #results-container a:focus-visible {
  background: var(--brand-tint);
}

.home .home-search #results-container a:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
  outline-offset: -2px;
}

/* Pillars: desktop cards with a photo and three rows */

.pillars {
  box-sizing: border-box;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.pillar {
  border: 1px solid var(--brand-line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
}

.pillar__head {
  padding: 22px 24px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.home .pillar__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}

.pillar__more {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-blue) !important;
  white-space: nowrap;
}

.pillar__more-short {
  display: none;
}

.pillar__summary {
  padding: 5px 24px 20px;
  font-size: 15px;
  line-height: 1.3;
  color: var(--brand-muted);
}

.pillar__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px;
}

.pillar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-radius: 10px;
  transition: background-color 0.15s, box-shadow 0.15s;
}

/* Rows have no dividers; a tint ring outside the row marks the one under the pointer. */
.pillar-item:hover,
.pillar-item:focus-visible {
  background: var(--brand-tint);
  box-shadow: 0 0 0 6px var(--brand-tint);
}

.pillar-item__media {
  position: relative;
  display: block;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--brand-tint);
}

.pillar-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pillar-item__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-blue-tint);
  color: var(--brand-blue);
}

.pillar-item__icon--solid {
  background: var(--brand-blue);
  color: #FFFFFF;
}

.pillar-item.pillar-item--tile {
  display: none;
}

.pillar-item__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pillar-item__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.pillar-item__meta {
  font-size: 13px;
  line-height: 1.2;
  margin-top: 3px;
  color: var(--brand-muted);
}

.pillar-item--lead {
  order: -1;
  display: block;
  min-height: 0;
  border-radius: 0;
}

.pillar-item--lead:hover,
.pillar-item--lead:focus-visible {
  background: none;
  box-shadow: none;
}

.pillar-item--lead .pillar-item__media {
  width: 100%;
  height: 180px;
  border-radius: 0;
}

/* Lead caption: dark fade at the bottom of the photo, eyebrow line above the name.
   A condo's district (detail) is moved above its name as the eyebrow. */
.pillar-item__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 64px 20px 16px;
  background: linear-gradient(to top, rgba(15, 20, 40, 0.78), rgba(15, 20, 40, 0));
  color: #FFFFFF;
}

.pillar-item__eyebrow,
.pillar-item__detail {
  order: -1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  opacity: 0.88;
}

.pillar-item__name {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}

/* Latest posts */

.home-band {
  padding: 80px 0;
}

.home-band--tint {
  margin-top: 96px;
  padding: 72px 0;
  background: var(--brand-tint);
}

.latest {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.latest__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card--lead {
  grid-row: span 2;
  gap: 14px;
}

.home .post-card__image {
  width: 100%;
  height: 150px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.home .post-card--lead .post-card__image {
  height: 340px;
  border-radius: 16px;
}

.post-card__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-card__kicker {
  font-size: 0.65rem;
  line-height: 1.05rem;
  font-weight: 500;
  color: #999;
  text-transform: uppercase;
}

.post-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
}

.post-card--lead .post-card__title {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.post-card__summary {
  font-size: 16px;
  line-height: 1.55;
  color: var(--brand-muted);
}

/* TOP years */

.top-years {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.home-section-head > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.top-years__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.top-year {
  padding: 22px;
  border: 1px solid var(--brand-line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-year__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-muted);
}

.top-year__year {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.top-year__count {
  font-size: 14px;
  color: var(--brand-muted);
}

.home .top-year--current {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: #FFFFFF;
}

.top-year--current .top-year__label,
.top-year--current .top-year__count {
  color: inherit;
  opacity: 0.88;
}

/* Sun-study spotlight */

.spotlight {
  margin-bottom: 80px;
  padding: 80px 0;
  background: var(--brand-ink);
  color: #FFFFFF;
}

.spotlight__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}

.home .spotlight__image {
  width: 100%;
  height: 420px;
  border-radius: 20px;
  object-fit: cover;
  display: block;
  background: var(--brand-tint);
}

.spotlight__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.spotlight__kicker {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A9C1EA;
}

.home .spotlight__title {
  font-size: 38px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.spotlight__summary {
  font-size: 17px;
  line-height: 1.6;
  color: #D5D8E6;
}

.spotlight__studies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.home .spotlight__studies a {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
}

.home .spotlight__studies a:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Newsletter */

.newsletter {
  padding: 40px 48px;
  border-radius: 24px;
  background: var(--brand-blue-tint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.newsletter__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home .newsletter__title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
}

.newsletter__contact {
  font-size: 15px;
  line-height: 1.5;
  color: var(--brand-muted);
}

.home .newsletter__contact a {
  color: var(--brand-blue);
  font-weight: 700;
}

.newsletter__form {
  display: flex;
  gap: 10px;
}

.newsletter__form input {
  width: 300px;
  height: 50px;
  box-sizing: border-box;
  border: 1px solid var(--brand-field);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 16px;
  background: #FFFFFF;
  color: var(--brand-ink);
}

.newsletter__form input:focus {
  border: 2px solid var(--brand-blue);
  outline: none !important;
  box-shadow: none;
  background: #FFFFFF;
}

.newsletter__form button {
  height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-blue);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* Tablet */

@media (max-width: 991px) {
  .pillars {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .latest__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-card--lead {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .top-years__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .newsletter {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .spotlight__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

/* Mobile: pillars become swipeable photo strips */

@media (max-width: 767px) {
  .home-wrap {
    padding: 0 20px;
  }

  .home-h2 {
    font-size: 24px;
  }

  .home-lede {
    font-size: 15px;
  }

  .home-hero {
    padding: 12px 20px 4px;
    align-items: center;
    gap: 6px;
    text-align: center;
  }

  .home .home-hero__title {
    font-size: 28px;
    line-height: 1.1;
  }

  .home-hero__subtitle {
    font-size: 15px;
    line-height: 1.4;
  }

  .pillars {
    padding: 0;
    gap: 0;
  }

  .pillar {
    border: 0;
    border-bottom: 1px solid var(--brand-line-soft);
    border-radius: 0;
    padding: 6px 0;
    gap: 6px;
  }

  .pillar:last-child {
    border-bottom: 0;
  }

  .pillar__head {
    padding: 0 20px;
  }

  .home .pillar__title {
    font-size: 18px;
  }

  .pillar__more-full,
  .pillar__summary {
    display: none;
  }

  .pillar__more-short {
    display: inline;
  }

  .pillar__items {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 0 20px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding: 0 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .pillar__items::-webkit-scrollbar {
    display: none;
  }

  .pillar-item,
  .pillar-item.pillar-item--tile {
    flex: 0 0 104px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-height: 0;
    border-radius: 0;
    scroll-snap-align: start;
  }

  .pillar-item:hover,
  .pillar-item:focus-visible {
    background: none;
    box-shadow: none;
  }

  .pillar-item.pillar-item--lead,
  .pillar-item.pillar-item--row {
    display: none;
  }

  .pillar-item__media {
    flex: 0 0 66px;
    width: 100%;
    height: 66px;
    border-radius: 10px;
  }

  .pillar-item__icon svg {
    width: 26px;
    height: 26px;
  }

  .pillar-item__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    overflow: hidden;
  }

  .pillar-item__meta {
    display: none;
  }

  .home-band {
    padding: 40px 0;
  }

  .home-band--tint {
    margin-top: 16px;
    padding: 36px 0;
  }

  .latest {
    gap: 18px;
  }

  .latest__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .post-card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .home .post-card__image {
    flex: 0 0 92px;
    width: 92px;
    height: 68px;
    border-radius: 10px;
  }

  .post-card__title {
    font-size: 15px;
  }

  .post-card--lead {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .home .post-card--lead .post-card__image {
    width: 100%;
    height: 196px;
    border-radius: 14px;
  }

  .post-card--lead .post-card__title {
    font-size: 21px;
    line-height: 1.25;
  }

  .post-card__summary {
    display: none;
  }

  .latest .home-button {
    align-self: stretch;
    width: 100%;
  }

  .top-years {
    gap: 16px;
  }

  .home-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-section-head .home-link {
    display: none;
  }

  .top-years__grid {
    gap: 10px;
  }

  .top-year {
    padding: 14px;
    border-radius: 14px;
    gap: 2px;
  }

  .top-year__label {
    display: none;
  }

  .top-year__year {
    font-size: 22px;
  }

  .top-year__count {
    font-size: 11px;
    white-space: nowrap;
  }

  .spotlight {
    margin-bottom: 40px;
    padding: 40px 0;
  }

  .spotlight__inner {
    gap: 22px;
  }

  .home .spotlight__image {
    height: 210px;
    border-radius: 16px;
  }

  .spotlight__text {
    gap: 14px;
  }

  .spotlight__kicker {
    font-size: 12px;
  }

  .home .spotlight__title {
    font-size: 28px;
    line-height: 1.15;
  }

  .spotlight__summary {
    font-size: 15px;
  }

  .home .spotlight__studies a {
    font-size: 13px;
  }

  .newsletter {
    padding: 24px;
    border-radius: 18px;
    gap: 12px;
  }

  .home .newsletter__title {
    font-size: 20px;
  }

  .newsletter__text {
    display: contents;
  }

  .newsletter__contact {
    order: 2;
    font-size: 14px;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .newsletter__form input {
    width: 100%;
    height: 48px;
  }

  .newsletter__form button {
    height: 48px;
  }

}

@media (max-width: 359px) {
  .top-year {
    padding: 10px;
  }
}
