/* ==========================================================================
   Community Properties Inc. — Raleigh, NC
   1:1 rebuild of the WordPress (Enfold) site
   ========================================================================== */

:root {
  --navy: #3a4d5c;
  --text: #333333;
  --text-dark: #222222;
  --muted: #666666;
  --off-white: #f8f8f8;
  --light-gray: #e2e2e2;
  --line-gray: #999999;
  --white: #ffffff;

  --font-heading: 'Julius Sans One', sans-serif;
  --font-body: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-nav: 'Raleway', sans-serif;

  --container: 1310px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { width: 100%; scroll-padding-top: 80px; }
body, h1, h2, h3, p, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

html, body {
  background: var(--navy);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 100;
  line-height: 1.1em;
  letter-spacing: normal;
  text-transform: uppercase;
  color: var(--text-dark);
}

.container {
  width: 80%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 50px;
}

/* ---------- Divider (line - CP icon - line), used in every section ---------- */
.cp-divider {
  display: block;
  position: relative;
  width: 100%;
  min-height: 21px;
  margin: 30px 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 17px;
  line-height: 25px;
  text-align: center;
}

.leadership-section .cp-divider { margin-bottom: 60px; }

.cp-divider-line {
  display: inline-block;
  position: relative;
  top: 50%;
  box-sizing: border-box;
  width: 36%;
  height: 1px;
  margin: -1px 10px 0;
  border-top: 1px solid var(--line-gray);
  vertical-align: middle;
  font-size: 17px;
  line-height: 25px;
}

.cp-divider-icon {
  display: inline-block;
  width: 40px;
  height: 50px;
  vertical-align: middle;
}

/* ---------- Section arrow notch ---------- */
.section-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -22.35px;
  border-left: 21.35px solid transparent;
  border-right: 21.35px solid transparent;
  border-top: 21.35px solid var(--arrow-color, transparent);
  z-index: 2;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  height: 80px;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  width: 96%;
  max-width: 100%;
  padding: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.site-header.is-scrolled .brand {
  opacity: 1;
  visibility: visible;
}

.brand img { height: 30px; width: auto; }

.brand span {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-size: 14px;
  letter-spacing: 2px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  padding: 0 13px;
  line-height: 80px;
  font-family: var(--font-nav);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.main-nav a span {
  display: inline;
  position: relative;
  top: 0.8px;
  padding-left: 13px;
  margin-left: -13px;
  border-left: 1px solid #e1e1e1;
}

.main-nav li:first-child a span { border-left: 0; }

.site-header.is-scrolled .main-nav a { color: #aaaaaa; }
.site-header.is-scrolled .main-nav a:hover,
.site-header.is-scrolled .main-nav a.is-active { color: var(--text-dark); }
.main-nav a:hover { opacity: 0.8; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1500 / 630;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  inset: 0;
  padding: 80px 0 50px;
}

.hero-caption-inner {
  width: 80%;
  max-width: 1310px;
  height: 100%;
  margin: 0 auto;
  padding: 0 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-caption h1 {
  color: var(--white);
  font-size: 80px;
  font-weight: 100;
  letter-spacing: 1px;
  line-height: 1.1;
  margin: 0 0 10px;
}

/* ---------- Welcome / intro section ---------- */
.welcome-section {
  position: relative;
  background: var(--off-white) url('../images/porch-bkgd.jpg') center center / cover no-repeat fixed;
  text-align: center;
  padding: 70px 0;
  --arrow-color: var(--off-white);
}

.welcome-col {
  display: flow-root;
  width: 47%;
  margin: 0 auto;
}

.welcome-spacer { display: none; }

.welcome-section p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0.85em 0;
}

/* ---------- Leadership section ---------- */
.leadership-section {
  position: relative;
  background: var(--light-gray);
  border-top: 1px solid #e1e1e1;
  text-align: center;
  padding: 70px 0 10px;
  --arrow-color: var(--light-gray);
}

.leadership-section h2,
.contact-section h2 {
  font-size: 60px;
  padding-bottom: 10px;
}

.leader-card {
  display: flow-root;
  text-align: left;
}

.leader-card h3 {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 1px;
  font-weight: 100;
  font-size: 28px;
  color: var(--text-dark);
  margin: 0 0 10px;
}

.leader-bio p {
  color: var(--muted);
  margin: 0.85em 0;
}

/* ---------- Contact section ---------- */
.contact-section {
  position: relative;
  background: url('../images/contact-bg.jpg') center center / cover no-repeat fixed;
  text-align: center;
  color: var(--white);
  padding: 130px 0;
}

.contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.contact-section .container { position: relative; }

.contact-spacer { display: none; }

.contact-box {
  display: flow-root;
  width: 57.6%;
  margin: 0 auto;
  padding: 50px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.contact-section h2 { color: var(--white); }

.contact-box p { margin: 0.85em 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  border-top: 1px solid var(--navy);
  color: var(--white);
  font-size: 11px;
}

.site-footer .container {
  padding: 15px 50px;
  text-align: left;
}

.site-footer a { color: var(--white); }

/* ---------- Scroll to top ---------- */
@font-face {
  font-family: 'entypo-fontello';
  src: url('../fonts/entypo-fontello.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

#scroll-top-link {
  position: fixed;
  right: 50px;
  bottom: 50px;
  z-index: 1030;
  width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 17px;
  color: var(--white);
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 2px;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease-out;
}

#scroll-top-link::before {
  content: '\e876';
  font-family: 'entypo-fontello';
  font-style: normal;
  font-weight: normal;
}

#scroll-top-link.is-visible {
  opacity: 0.7;
  visibility: visible;
}

#scroll-top-link:hover {
  background: var(--white);
  color: #6786a1;
  border: 1px solid #e1e1e1;
}

/* ---------- Nav toggle (mobile) ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #666;
  border-radius: 1px;
}

/* ---------- Responsive ---------- */
@media (max-width: 989px) {
  .hero-caption h1 { font-size: 60px; }

  .welcome-col {
    width: 100%;
    margin-bottom: 20px;
  }

  .welcome-spacer,
  .contact-spacer {
    display: block;
    height: 1px;
    margin-bottom: 20px;
  }

  .contact-box {
    width: 100%;
    margin-bottom: 20px;
  }

  .leader-card { margin-bottom: 20px; }
}

@media (max-width: 767px) {
  .site-header {
    position: relative;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }

  .site-header .brand { opacity: 1; visibility: visible; }

  .nav-toggle { display: flex; }

  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.08);
  }

  .main-nav ul.is-open { display: flex; }

  .site-header .container { width: 100%; padding: 0 24px; }

  .main-nav a {
    padding: 14px 24px;
    line-height: 1.7;
    color: var(--text-dark);
    border-top: 1px solid #eee;
  }

  .main-nav a span,
  .main-nav li:first-child a span {
    top: 0;
    padding-left: 0;
    margin-left: 0;
    border-left: 0;
  }

  html { scroll-padding-top: 0; }
  .container { width: 85%; padding: 0; }
  .welcome-spacer { margin-bottom: 0; }
  .contact-spacer { display: none; }
  .hero-caption { padding: 80px 0 0; }
  .hero-caption-inner { width: 85%; padding: 0; }
  .hero-caption h1 { font-size: 20px; }
  .leadership-section h2,
  .contact-section h2 { font-size: 48px; }
  .site-footer .container { padding: 15px 0; }
  #scroll-top-link { display: none; }
}
