:root {
  --brand-primary: #1f6ae1;
  --brand-primary-dark: #1756b8;
  --brand-primary-soft: #eaf2ff;
  --brand-primary-muted: #d9e8ff;

  --text-primary: #27313d;
  --text-secondary: #6d7885;

  --background: #ffffff;
  --background-soft: #f6f8fb;

  --border: #e0e5eb;

  --shadow-soft: 0 10px 30px rgba(24, 33, 45, 0.08);

  --shadow-card: 0 18px 48px rgba(24, 33, 45, 0.12);

  --radius-medium: 14px;
  --radius-large: 22px;

  --container-width: 1180px;
}

/* ========================================
   GLOBAL
======================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  color: var(--text-primary);

  background: var(--background);

  font-family: 'Open Sans', sans-serif;

  font-size: 15px;

  line-height: 1.7;

  -webkit-font-smoothing: antialiased;
}

img {
  display: block;

  max-width: 100%;
}

a {
  color: inherit;

  text-decoration: none;

  transition: 220ms ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;

  color: var(--text-primary);

  font-family: 'Poppins', sans-serif;
}

h2 {
  font-weight: 600;
}

.container {
  width: 100%;

  max-width: var(--container-width);

  margin: 0 auto;

  padding-left: 24px;

  padding-right: 24px;
}

/* Primary site header/navigation lives in /css/site-navigation.css. */

/* ========================================
   HERO
======================================== */

.communities-hero {
  position: relative;

  min-height: 570px;

  display: flex;

  align-items: center;

  overflow: hidden;

  background-image: url('../img/heroes/oregon-hero.png');

  background-size: cover;

  background-position: center;
}

.communities-hero-overlay {
  position: absolute;

  inset: 0;

  background: linear-gradient(
    90deg,
    rgba(10, 20, 34, 0.84) 0%,

    rgba(10, 20, 34, 0.64) 45%,

    rgba(10, 20, 34, 0.24) 78%,

    rgba(10, 20, 34, 0.1) 100%
  );
}

.communities-hero-container {
  position: relative;

  z-index: 2;
}

.communities-hero-content {
  max-width: 750px;

  padding: 80px 0;
}

.eyebrow {
  margin-bottom: 12px;

  color: var(--brand-primary);

  font-family: 'Poppins', sans-serif;

  font-size: 12px;

  font-weight: 700;

  letter-spacing: 0.11em;

  text-transform: uppercase;
}

.hero-eyebrow,
.eyebrow-light {
  color: #a9caff;
}

.communities-hero h1 {
  margin: 0 0 20px;

  color: #ffffff;

  font-size: clamp(48px, 6vw, 72px);

  font-weight: 600;

  line-height: 1.04;

  letter-spacing: -0.04em;
}

.communities-hero h1 span {
  display: block;

  color: #9dc1ff;
}

.hero-lead {
  max-width: 690px;

  margin: 0 0 12px;

  color: rgba(255, 255, 255, 0.94);

  font-size: 19px;
}

.hero-subcopy {
  max-width: 640px;

  margin: 0;

  color: rgba(255, 255, 255, 0.75);

  font-size: 15px;
}

.hero-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 14px;

  margin-top: 28px;
}

/* ========================================
   BUTTONS
======================================== */

.hero-primary-button,
.hero-secondary-button,
.site-button {
  display: inline-flex;

  min-height: 52px;

  align-items: center;

  justify-content: center;

  padding: 13px 25px;

  border-radius: 999px;

  font-family: 'Poppins', sans-serif;

  font-size: 13px;

  font-weight: 600;

  text-transform: uppercase;

  transition: 220ms ease;
}

.hero-primary-button,
.site-button-primary {
  color: #ffffff;

  background: var(--brand-primary);

  border: 1px solid var(--brand-primary);
}

.hero-primary-button:hover,
.site-button-primary:hover {
  color: #ffffff;

  background: var(--brand-primary-dark);

  transform: translateY(-2px);
}

.hero-secondary-button,
.site-button-light {
  color: #ffffff;

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.65);
}

.hero-secondary-button:hover,
.site-button-light:hover {
  color: #ffffff;

  background: rgba(255, 255, 255, 0.16);

  border-color: #ffffff;
}

/* ========================================
   GENERAL SECTIONS
======================================== */

.section {
  padding: 90px 0;
}

.state-section {
  background: var(--background-soft);
}

.state-section-alt {
  background: #ffffff;
}

.section-heading {
  max-width: 780px;

  margin-bottom: 42px;
}

.section-heading.centered {
  margin-left: auto;

  margin-right: auto;

  text-align: center;
}

.section-heading h2 {
  margin: 0 0 14px;

  font-size: clamp(34px, 4vw, 48px);

  font-weight: 600;

  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 17px;
}

/* ========================================
   INTRO CARDS
======================================== */

.intro-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 22px;
}

.intro-card {
  padding: 30px;

  background: var(--background-soft);

  border: 1px solid var(--border);

  border-radius: var(--radius-medium);
}

.intro-icon {
  display: flex;

  width: 50px;

  height: 50px;

  margin-bottom: 18px;

  align-items: center;

  justify-content: center;

  color: #ffffff;

  background: var(--brand-primary);

  border-radius: 50%;
}

.intro-card h3 {
  margin-bottom: 8px;

  font-size: 20px;
}

.intro-card p {
  margin: 0;

  color: var(--text-secondary);
}

/* ========================================
   CITY CARDS
======================================== */

.city-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 22px;
}

.city-card {
  min-height: 265px;

  display: flex;

  flex-direction: column;

  padding: 28px;

  background: #ffffff;

  border: 1px solid var(--border);

  border-radius: var(--radius-medium);

  box-shadow: 0 5px 18px rgba(24, 33, 45, 0.05);

  transition: 220ms ease;
}

.state-section-alt .city-card {
  background: var(--background-soft);
}

.city-card-published {
  cursor: pointer;
}

.city-card-published:hover {
  border-color: rgba(31, 106, 225, 0.38);

  box-shadow: var(--shadow-card);

  transform: translateY(-5px);
}

.city-card-top {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  margin-bottom: 30px;
}

.state-label {
  color: #87919d;

  font-family: 'Poppins', sans-serif;

  font-size: 10px;

  font-weight: 700;

  letter-spacing: 0.08em;

  text-transform: uppercase;
}

.guide-status,
.coming-soon {
  display: inline-flex;

  width: fit-content;

  padding: 5px 9px;

  border-radius: 999px;

  font-family: 'Poppins', sans-serif;

  font-size: 10px;

  font-weight: 700;

  text-transform: uppercase;
}

.guide-status {
  color: var(--brand-primary-dark);

  background: var(--brand-primary-soft);
}

.coming-soon {
  color: #78828d;

  background: #eceff3;
}

.city-card-eyebrow {
  display: block;

  margin-bottom: 7px;

  color: var(--brand-primary);

  font-family: 'Poppins', sans-serif;

  font-size: 10px;

  font-weight: 700;

  letter-spacing: 0.06em;

  text-transform: uppercase;
}

.city-card h3 {
  margin: 0 0 11px;

  color: var(--text-primary);

  font-size: 28px;

  font-weight: 700;

  letter-spacing: -0.02em;
}

.city-card p {
  margin: 0 0 22px;

  color: var(--text-secondary);

  font-size: 14px;
}

.city-card-link {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  margin-top: auto;

  color: var(--brand-primary);

  font-family: 'Poppins', sans-serif;

  font-size: 12px;

  font-weight: 700;

  text-transform: uppercase;
}

.city-card-link i {
  transition: transform 180ms ease;
}

.city-card-published:hover .city-card-link i {
  transform: translateX(4px);
}

/* ========================================
   CTA
======================================== */

.communities-cta {
  padding: 55px 0 90px;

  background: #ffffff;
}

.cta-box {
  display: grid;

  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(250px, 0.75fr);

  gap: 45px;

  align-items: center;

  padding: 50px;

  color: #ffffff;

  background: linear-gradient(135deg, #25354a 0%, #3e536d 100%);

  border-radius: var(--radius-large);

  box-shadow: var(--shadow-card);
}

.cta-box h2 {
  margin: 0 0 12px;

  color: #ffffff;

  font-size: clamp(30px, 4vw, 42px);

  font-weight: 800;
}

.cta-box p {
  margin: 0;

  color: rgba(255, 255, 255, 0.78);
}

.cta-actions {
  display: flex;

  flex-direction: column;

  gap: 12px;
}

/* ========================================
   FOOTER
======================================== */

.site-footer {
  padding: 64px 0 24px;

  color: #eef1f5;

  background: #465466;
}

.footer-grid {
  display: grid;

  grid-template-columns: 1.6fr 1fr 1fr;

  gap: 42px;
}

.footer-brand img {
  width: auto;

  max-width: 220px;

  max-height: 64px;

  margin-bottom: 17px;
}

.footer-brand p {
  max-width: 350px;

  color: #d9dee5;
}

.site-footer h3 {
  color: #ffffff;

  font-size: 15px;
}

.footer-links {
  margin: 0;

  padding: 0;

  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #e1e5ea;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;

  justify-content: space-between;

  gap: 20px;

  margin-top: 46px;

  padding-top: 20px;

  color: #c7cdd5;

  border-top: 1px solid rgba(255, 255, 255, 0.18);

  font-size: 12px;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 991.98px) {
  .communities-hero {
    min-height: 520px;

    background-position: 62% center;
  }

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

  .cta-box {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767.98px) {
  .communities-hero {
    min-height: 500px;

    background-position: 66% center;
  }

  .communities-hero-overlay {
    background: rgba(10, 20, 34, 0.72);
  }

  .communities-hero h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .section {
    padding: 68px 0;
  }

  .intro-grid,
  .city-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-primary-button,
  .hero-secondary-button,
  .site-button {
    width: 100%;
  }

  .city-card {
    min-height: 230px;
  }

  .cta-box {
    padding: 32px 25px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;

    gap: 6px;
  }
}

/* ========================================
   COMMUNITIES PAGED CAROUSEL
======================================== */

/* ========================================
   NEW CONSTRUCTION OPPORTUNITIES
======================================== */

.communities-new-construction-section {
  padding: 8px 0 34px;
}

.communities-new-construction-bar {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.3fr);
  gap: 28px;
  align-items: start;
  padding: 24px;
  background: var(--brand-primary-soft);
  border: 1px solid var(--brand-primary-muted);
  border-radius: 18px;
}

.communities-new-construction-copy .eyebrow {
  margin-bottom: 6px;
}

.communities-new-construction-copy h2 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.communities-new-construction-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.communities-new-construction-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.communities-new-construction-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  color: var(--text-primary);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  line-height: 1.3;
}

.communities-new-construction-links a:hover,
.communities-new-construction-links a:focus {
  color: var(--brand-primary);
  border-color: var(--brand-primary-muted);
  box-shadow: 0 6px 18px rgba(31, 106, 225, 0.08);
}

.communities-new-construction-links strong {
  font-weight: 600;
}

.communities-new-construction-links span {
  color: var(--brand-primary-dark);
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .communities-new-construction-bar {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 575.98px) {
  .communities-new-construction-section {
    padding-bottom: 24px;
  }

  .communities-new-construction-bar {
    padding: 20px;
  }

  .communities-new-construction-links a {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
  }
}

.communities-carousel-section {
  overflow: hidden;
}

.communities-carousel {
  position: relative;

  width: 100%;

  max-width: 1320px;

  margin: 0 auto;

  padding: 0 62px;
}

.communities-carousel-viewport {
  width: 100%;

  overflow: hidden;
}

.communities-carousel-track {
  display: flex;

  width: 100%;

  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);

  touch-action: pan-y;
}

.communities-carousel-page {
  flex: 0 0 100%;

  min-width: 100%;

  padding: 4px 2px 16px;
}

/*
 * Six cities per page:
 *
 * 3 columns
 * ×
 * 2 rows
 */

.communities-carousel-page .city-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 22px;
}

/* ========================================
   CAROUSEL BUTTONS
======================================== */

.communities-carousel-button {
  position: absolute;

  top: 50%;

  z-index: 5;

  display: flex;

  width: 46px;
  height: 46px;

  align-items: center;
  justify-content: center;

  color: var(--text-primary);

  background: #ffffff;

  border: 1px solid var(--border);

  border-radius: 50%;

  box-shadow: 0 8px 24px rgba(24, 33, 45, 0.12);

  cursor: pointer;

  transform: translateY(-50%);

  transition: 180ms ease;
}

.communities-carousel-button:hover {
  color: #ffffff;

  background: var(--brand-primary);

  border-color: var(--brand-primary);
}

.communities-carousel-prev {
  left: 8px;
}

.communities-carousel-next {
  right: 8px;
}

.communities-carousel-button:disabled {
  opacity: 0.3;

  cursor: default;
}

.communities-carousel-button:disabled:hover {
  color: var(--text-primary);

  background: #ffffff;

  border-color: var(--border);
}

/* ========================================
   CAROUSEL DOTS
======================================== */

.communities-carousel-dots {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 8px;

  margin-top: 18px;
}

.communities-carousel-dot {
  width: 8px;
  height: 8px;

  padding: 0;

  background: #cbd2da;

  border: 0;

  border-radius: 999px;

  cursor: pointer;

  transition: 180ms ease;
}

.communities-carousel-dot.is-active {
  width: 24px;

  background: var(--brand-primary);
}

/* ========================================
   TABLET
======================================== */

@media (max-width: 991.98px) {
  .communities-carousel {
    padding: 0 54px;
  }

  /*
   * Still six cities,
   * now 2 columns × 3 rows.
   */

  .communities-carousel-page .city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 767.98px) {
  .communities-carousel {
    padding: 0 18px;
  }

  .communities-carousel-button {
    display: none;
  }

  /*
   * Keep two columns where possible.
   * This keeps all six cities visible
   * without creating an enormous page.
   */

  .communities-carousel-page .city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;
  }

  .communities-carousel-page .city-card {
    padding: 18px 15px;
  }

  .communities-carousel-page .city-card h3 {
    font-size: 20px;
  }

  .communities-carousel-page .city-card p {
    font-size: 13px;

    line-height: 1.55;
  }
}

@media (max-width: 480px) {
  /*
   * Very narrow phones get one column.
   */

  .communities-carousel-page .city-grid {
    grid-template-columns: 1fr;
  }
}
