/* Homepage page base */

html {
  font-size: 16px;
  height: 100%;
}

body,
body.ch-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: normal;
  text-shadow: none;
}

body.ch-page h1,
body.ch-page h2,
body.ch-page h3,
body.ch-page h4,
body.ch-page h5,
body.ch-page h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  text-shadow: none;
}

body.ch-page {
  min-height: 100%;
  background: linear-gradient(180deg, #f2f5f9 0%, #eef2f7 100%);
  color: var(--text);
}

.ch-page {
  font-size: 18px;
  line-height: 1.6;
}

.ch-page a {
  text-decoration: none;
  color: inherit;
}

.ch-page a:focus,
.ch-page button:focus,
.ch-page input:focus {
  outline: 3px solid #7de8c8;
  outline-offset: 3px;
}

.ch-page a:focus:not(:focus-visible),
.ch-page button:focus:not(:focus-visible),
.ch-page input:focus:not(:focus-visible) {
  outline: none;
}

.ch-page a:focus-visible,
.ch-page button:focus-visible,
.ch-page input:focus-visible {
  outline: 3px solid #7de8c8;
  outline-offset: 3px;
}

/* Keep Community Login title and close button aligned on one row. */
#communityLoginModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#communityLoginModal .modal-header .modal-title {
  margin: 0;
  width: auto;
}

#communityLoginModal .modal-header .close {
  float: none;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.ch-skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: #ffffff;
  color: var(--primary-dk);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  z-index: 2000;
  box-shadow: var(--shadow);
}

.ch-skip-link:focus,
.ch-skip-link:focus-visible {
  top: 12px;
}

/* Homepage layout and section styles */
.ch-hero {
  background: linear-gradient(135deg, var(--primary-dk) 0%, #2a7db5 60%, #1a9e7a 100%);
  color: #fff;
  padding: 90px 5% 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 520px;
}

.ch-hero-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.ch-hero-text h1 span {
  color: #7de8c8;
}

.ch-hero-text h1 .ch-muted {
  display: block;
  color: inherit;
  opacity: 0.65;
  font-weight: 700;
  font-size: 0.9em;
  margin-top: -4px;
}

.ch-hero-text p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 550px;
  line-height: 1.7;
}

.ch-hero-text p.ch-section-label {
  margin-bottom: 10px;
}

.ch-hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.ch-hero-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 36px;
  backdrop-filter: blur(4px);
}

.ch-hero-card h3 {
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  margin-top: 0;
  margin-bottom: 16px;
}

.ch-org-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ch-org-type-item {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.ch-org-type-item .icon {
  font-size: 1.5rem;
}

.ch-trust {
  background: var(--light);
  border-bottom: 1px solid var(--mid);
  padding: 18px 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.ch-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

.ch-trust-item .tick {
  color: var(--green);
  font-size: 1.1rem;
}

.ch-section {
  padding: 80px 5%;
  background: #fff;
}

.ch-section-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.ch-section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.ch-section-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 50px;
  line-height: 1.7;
}

.ch-centered {
  text-align: center;
}

.ch-centered .ch-section-sub {
  margin-left: auto;
  margin-right: auto;
}

.ch-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.ch-feature-card {
  background: var(--light);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--mid);
  transition: transform 0.15s, box-shadow 0.15s;
}

.ch-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.ch-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
}

.icon-blue {
  background: #dbeafe;
}

.icon-green {
  background: #dcfce7;
}

.icon-orange {
  background: #ffedd5;
}

.icon-purple {
  background: #ede9fe;
}

.ch-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.ch-feature-card p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.65;
}

.ch-how {
  background: var(--light);
}

.ch-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
}

.ch-steps::before {
  content: "";
  position: absolute;
  top: 30px;
  left: calc(16.67% + 20px);
  right: calc(16.67% + 20px);
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--green));
}

.ch-step {
  text-align: center;
  padding: 0 10px;
}

.ch-step-num {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 14px rgba(29, 95, 138, 0.35);
  position: relative;
  z-index: 1;
}

.ch-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.ch-step p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.65;
}

.ch-audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.ch-audience-card {
  background: var(--light);
  border: 1px solid var(--mid);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ch-audience-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29, 95, 138, 0.08);
}

.ch-audience-card .big-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.ch-audience-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.ch-audience-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

.ch-member-panel {
  background: linear-gradient(120deg, #0f3d5e, #1d5f8a);
  color: #fff;
  padding: 70px 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.ch-member-panel h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.ch-member-panel > div > p {
  opacity: 0.85;
  margin-bottom: 28px;
  line-height: 1.7;
}

.ch-member-features {
  list-style: none;
}

.ch-member-features li {
  padding: 8px 0;
  display: flex;
  gap: 10px;
  font-size: 1rem;
  opacity: 0.9;
}

.ch-member-features li::before {
  content: "✓";
  color: #7de8c8;
  font-weight: 700;
  flex-shrink: 0;
}

.ch-login-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 36px;
}

.ch-login-box h3 {
  margin-bottom: 20px;
  font-size: 1.15rem;
}

.ch-login-box input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 12px;
  outline: none;
  font-family: inherit;
}

.password-field-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 12px;
}

.password-field-wrapper input {
  margin-bottom: 0;
  padding-right: 35px !important;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #666;
  user-select: none;
  z-index: 10;
  padding: 2px 4px 0 0;
  border-radius: 3px;
}

.ch-nav-actions .password-toggle {
  right: 4px;
}

.password-toggle:hover {
  color: #333;
}

.password-toggle i {
  font-size: 15px;
}

.ch-login-box .password-field-wrapper .password-toggle {
  color:#ddd;
}

.ch-login-box .password-field-wrapper .password-toggle:hover {
  color:#aaa;
}

.ch-login-box input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.ch-login-box .ch-btn-accent {
  width: 100%;
  padding: 13px;
  margin-top: 4px;
}

.ch-login-box .divider {
  text-align: center;
  margin: 16px 0;
  font-size: 0.85rem;
  opacity: 0.6;
}

.ch-login-box .ch-btn-ghost {
  width: 100%;
  padding: 12px;
}

.ch-forgot-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 0.85rem;
  opacity: 0.75;
  color: inherit;
}

.ch-cta-band {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 60px 5%;
}

.ch-cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.ch-cta-band p {
  opacity: 0.9;
  margin-bottom: 30px;
  font-size: 1.05rem;
}

.ch-cta-band-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.ch-btn-white.ch-btn-outline,
.ch-page a.ch-btn-white.ch-btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.ch-btn-white.ch-btn-outline:hover,
.ch-page a.ch-btn-white.ch-btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: #fff;
}

.ch-footer {
  background: var(--primary-dk);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 5% 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.ch-footer h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ch-footer ul {
  list-style: none;
}

.ch-footer ul li {
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.ch-footer ul li a:hover {
  color: #fff;
}

.ch-footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.ch-footer-tagline {
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 220px;
}

.ch-footer-bottom {
  background: var(--primary-dk);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 16px 5%;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 900px) {
  .ch-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ch-hero {
    grid-template-columns: 1fr;
    padding: 60px 5%;
  }

  .ch-hero-card {
    display: none;
  }

  .ch-member-panel {
    grid-template-columns: 1fr;
  }

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

  .ch-steps::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .ch-feature-grid {
    grid-template-columns: 1fr;
  }

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

  .ch-steps {
    grid-template-columns: 1fr;
  }

  .ch-trust {
    gap: 20px;
  }
}
