/* Codegres.org page components (About, Contact) and the sitewide footer.
   Uses the tokens from codegres-brand.css. */
.cg-page { color: var(--cg-text); }
.cg-wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.cg-narrow { max-width: 820px; }
.cg-center { text-align: center; }
.cg-muted { color: var(--cg-muted); }

.cg-eyebrow {
  display: inline-block; margin: 0 0 12px; font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--cg-primary);
}
p.cg-eyebrow.cg-center { display: block; }

.cg-page h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; line-height: 1.12; margin: 0 0 18px; }
.cg-page h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.2; margin: 0 0 28px; }
.cg-page h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }
.cg-page p { line-height: 1.7; }

/* Buttons */
.cg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 50px; font-weight: 600; font-size: 16px;
  text-decoration: none !important; transition: transform .15s ease, box-shadow .2s ease, background-position .3s ease;
}
.cg-btn:hover { transform: translateY(-2px); }
.cg-btn-accent { background: var(--cg-gradient-accent); background-size: 200% 100%; color: #fff !important; box-shadow: 0 10px 24px rgba(240, 97, 0, .28); }
.cg-btn-accent:hover { background-position: 100% 0; }
.cg-btn-ghost { border: 2px solid rgba(255, 255, 255, .7); color: #fff !important; }
.cg-btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.cg-btn-light { background: #fff; color: var(--cg-primary) !important; }
.cg-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.cg-actions.cg-center { justify-content: center; }

/* Hero */
.cg-hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--cg-gradient); padding: 96px 0 110px;
}
.cg-hero::before, .cg-hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  border: 50px solid rgba(255, 255, 255, .07);
}
.cg-hero::before { width: 520px; height: 520px; right: -160px; bottom: -260px; }
.cg-hero::after { width: 300px; height: 300px; right: 12%; top: -170px; border-width: 34px; }
.cg-hero .cg-wrap { position: relative; z-index: 1; }
.cg-hero .cg-eyebrow { color: #fff; background: rgba(255, 255, 255, .16); padding: 6px 14px; border-radius: 50px; }
.cg-page .cg-hero h1 { color: #fff !important; max-width: 820px; }
.cg-hero h1 span { color: #FFC56B; }
.cg-lead { font-size: 1.2rem; max-width: 680px; color: rgba(255, 255, 255, .9); margin: 0; }
.cg-hero-compact { padding: 80px 0 140px; }

.cg-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  margin: 54px 0 0; max-width: 820px;
}
.cg-stats div { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); border-radius: 16px; padding: 18px 20px; }
.cg-stats dt { font-size: 2rem; font-weight: 700; line-height: 1; }
.cg-stats dd { margin: 6px 0 0; color: rgba(255, 255, 255, .85); }

/* Sections */
.cg-section { padding: 88px 0; }
.cg-section-tint { background: var(--cg-light); }
.cg-section-overlap { padding-top: 0; margin-top: -90px; position: relative; z-index: 2; }
.cg-split { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.cg-prose p { font-size: 1.08rem; color: var(--cg-text); margin: 0 0 16px; }
.cg-prose a { font-weight: 600; }

.cg-grid { display: grid; gap: 22px; }
.cg-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cg-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.cg-card {
  display: block; background: #fff; border: 1px solid var(--cg-border); border-radius: 18px;
  padding: 28px; box-shadow: 0 10px 30px rgba(15, 15, 53, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.cg-card { color: inherit; text-decoration: none !important; }
.cg-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(113, 20, 239, .12); border-color: rgba(113, 20, 239, .25); }
.cg-card p { color: var(--cg-muted); margin: 0; }
.cg-page .cg-card h2 { font-size: 1.15rem; margin: 0 0 8px; }

.cg-icon {
  display: inline-flex; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 18px;
  align-items: center; justify-content: center; background: var(--cg-gradient);
  box-shadow: 0 8px 18px rgba(113, 20, 239, .3);
}
.cg-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.cg-card-tools ul { list-style: none; padding: 0; margin: 14px 0 18px; }
.cg-card-tools li { padding: 7px 0; border-bottom: 1px dashed var(--cg-border); }
.cg-card-tools li a { color: var(--cg-text); }
.cg-card-tools li a:hover { color: var(--cg-primary); }
.cg-card-tools h3 a { color: var(--cg-navy); }

.cg-link-arrow { display: inline-block; margin-top: 16px; font-weight: 600; color: var(--cg-primary); }
.cg-link-arrow::after { content: " \2192"; transition: margin .2s ease; }
.cg-card:hover .cg-link-arrow::after, a.cg-link-arrow:hover::after { margin-left: 4px; }

.cg-contact address { color: var(--cg-muted); font-style: normal; margin: 0; line-height: 1.6; }
.cg-contact-featured { background: var(--cg-navy); border-color: var(--cg-navy); }
.cg-page .cg-contact-featured h2 { color: #fff !important; }
.cg-contact-featured p { color: rgba(255, 255, 255, .8); }
.cg-contact-featured .cg-icon { background: var(--cg-gradient-accent); }
.cg-contact-featured .cg-link-arrow { color: #FFC56B; }

/* Steps */
.cg-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cg-steps li { counter-increment: step; position: relative; padding: 30px 28px 28px 92px; background: #fff; border: 1px solid var(--cg-border); border-radius: 18px; }
.cg-steps li::before {
  content: counter(step); position: absolute; left: 28px; top: 28px; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem;
  color: #fff; background: var(--cg-gradient-accent);
}
.cg-steps p { margin: 0; color: var(--cg-muted); }

/* FAQ */
.cg-faq details { border: 1px solid var(--cg-border); border-radius: 14px; margin-bottom: 12px; background: #fff; }
.cg-faq summary {
  cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 600; font-size: 1.05rem; position: relative; color: var(--cg-navy);
}
.cg-faq summary::-webkit-details-marker { display: none; }
.cg-faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--cg-light); color: var(--cg-primary); font-size: 1.2rem;
}
.cg-faq details[open] summary::after { content: "\2212"; background: var(--cg-primary); color: #fff; }
.cg-faq details p { margin: 0; padding: 0 24px 22px; color: var(--cg-muted); }

/* Call to action band */
.cg-cta { background: var(--cg-navy); color: #fff; text-align: center; padding: 80px 0; position: relative; overflow: hidden; }
.cg-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 0%, rgba(113, 20, 239, .55), transparent 55%), radial-gradient(circle at 90% 100%, rgba(20, 117, 247, .45), transparent 50%); }
.cg-cta .cg-wrap { position: relative; }
.cg-page .cg-cta h2 { color: #fff !important; margin-bottom: 10px; }
.cg-cta p { color: rgba(255, 255, 255, .8); margin: 0; }

/* Sitewide footer */
.cg-footer { background: var(--cg-navy); color: rgba(255, 255, 255, .75); padding: 64px 0 0; font-size: 15px; }
.cg-footer-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 20px 48px;
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px;
}
.cg-footer-brand p { margin: 18px 0 22px; line-height: 1.6; max-width: 300px; }
.cg-footer-brand .cg-btn { padding: 10px 20px; font-size: 14px; }
.cg-footer h2, .cg-footer h2 a { color: #fff !important; font-size: 15px !important; font-weight: 700; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .08em; }
.cg-footer ul { list-style: none; padding: 0; margin: 0; }
.cg-footer li { margin: 0 0 9px; }
.cg-footer a { color: rgba(255, 255, 255, .75); }
.cg-footer a:hover { color: #FFC56B; text-decoration: none; }
.cg-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); max-width: 1140px; margin: 0 auto; padding: 22px 20px 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .6);
}

@media (max-width: 991px) {
  .cg-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-grid-3, .cg-steps { grid-template-columns: 1fr; }
  .cg-split { grid-template-columns: 1fr; gap: 8px; }
  .cg-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
  .cg-hero { padding: 64px 0 80px; }
  .cg-hero-compact { padding: 56px 0 120px; }
  .cg-section { padding: 60px 0; }
  .cg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-grid-4 { grid-template-columns: 1fr; }
}
