/* Homepage visual cleanup for Bay Area Push Hands */

/* Normalize button typography and geometry on the homepage. */
#main .button,
#footer .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: auto;
  line-height: 1.15;
  padding: 0.78rem 1.2rem;
  border-radius: 999px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: normal;
}

#main .button.primary,
#footer .button.primary {
  background: var(--gradient-primary);
  color: var(--surface-text) !important;
  border: 0;
  box-shadow: var(--shadow-md);
}

#main .button.primary:hover,
#footer .button.primary:hover {
  background: linear-gradient(135deg, #737cf6 0%, #8559b3 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* About section: equal-height cards and custom conceptual marks. */
#about .features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  width: 100%;
  margin: 0 0 var(--spacing-xl);
  padding: 0;
  align-items: stretch;
}

#about .features .feature-item,
#about .features .feature-item:nth-child(n) {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 1.45rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: linear-gradient(160deg, rgba(31, 41, 55, 0.92), rgba(15, 23, 42, 0.82));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

#about .feature-item h3 {
  margin: 0.9rem 0 0.7rem;
  font-size: 1.28rem;
}

#about .feature-item p {
  margin: 0 0 0.72rem;
  color: var(--surface-muted);
  line-height: 1.6;
}

#about .feature-item p:last-child {
  margin-bottom: 0;
}

.concept-mark {
  --mark-color: #a5b4fc;
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  border-radius: 1.3rem;
  color: var(--mark-color);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(99, 102, 241, 0.23), rgba(15, 23, 42, 0.8));
  border: 1px solid color-mix(in srgb, var(--mark-color) 45%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 26px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.feature-item:nth-child(1) .concept-mark { --mark-color: #5eead4; }
.feature-item:nth-child(2) .concept-mark { --mark-color: #fbbf24; }
.feature-item:nth-child(3) .concept-mark { --mark-color: #a5b4fc; }

.concept-mark svg {
  width: 2.85rem;
  height: 2.85rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-item:hover .concept-mark {
  transform: translateY(-3px) rotate(-1deg);
  border-color: color-mix(in srgb, var(--mark-color) 72%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 30px rgba(0, 0, 0, 0.28);
}

/* Compact, scan-friendly opportunity cards inspired by the SoCal site structure. */
.opportunities-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  text-align: left;
}

.opportunities-grid .opportunities-card {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.opportunities-grid .opportunity-media {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  padding: 0.55rem 0.55rem 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(31, 41, 55, 0.86));
}

.opportunities-grid .opportunity-media a {
  display: flex;
  justify-content: center;
  width: 100%;
  border: 0;
}

.opportunities-grid .opportunity-media img {
  display: block;
  width: 100%;
  max-height: 13rem;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center top;
  margin: 0 auto;
  border-radius: 0.85rem 0.85rem 0 0;
  box-shadow: none;
  transition: transform var(--transition-slow);
}

.opportunities-grid .opportunities-card:hover .opportunity-media img {
  transform: scale(1.025);
}

.opportunity-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.3rem 1.35rem;
}

.opportunity-label {
  margin: 0;
  color: #a5b4fc !important;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.opportunities-grid .opportunities-card h3 {
  margin: 0.45rem 0 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

.opportunity-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.9rem;
  margin: 0.95rem 0 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.48);
}

.opportunity-meta div {
  min-width: 0;
}

.opportunity-meta .meta-wide {
  grid-column: 1 / -1;
}

.opportunity-meta dt {
  margin: 0;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.opportunity-meta dd {
  margin: 0.2rem 0 0;
  color: var(--surface-text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.opportunity-summary {
  margin: 0.95rem 0 0 !important;
  color: var(--surface-muted) !important;
  line-height: 1.58 !important;
}

.opportunity-actions {
  margin: auto 0 0;
  padding-top: 1.05rem;
}

.opportunity-actions .button {
  margin: 0;
}

.opportunity-callout {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem 1.35rem;
  text-align: left;
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.38), rgba(15, 23, 42, 0.78));
}

.opportunity-callout-copy h3 {
  margin: 0 0 0.35rem;
}

.opportunity-callout-copy p {
  margin: 0;
  color: var(--surface-muted);
}

.opportunity-callout .actions {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 980px) {
  #about .features {
    grid-template-columns: 1fr;
  }

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

  .opportunity-callout {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  #about .features .feature-item {
    padding: 1.25rem;
  }

  .opportunities-grid .opportunity-media {
    padding: 0.45rem 0.45rem 0;
  }

  .opportunities-grid .opportunity-media img {
    max-height: 11rem;
  }

  .opportunity-meta {
    grid-template-columns: 1fr;
  }

  .opportunity-meta .meta-wide {
    grid-column: auto;
  }

  .opportunity-callout {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Keep full-width homepage bands clipped to the rounded main surface. */
#main {
  overflow: hidden;
}

/* Consolidated resource and footer treatment. */
#info.main.special {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem 2rem;
  padding-top: 2.1rem;
  padding-bottom: 2.1rem;
  text-align: left;
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.26), rgba(15, 23, 42, 0.5));
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

#info > header.major {
  margin: 0;
  text-align: left;
}

#info > header.major h2 {
  margin-bottom: 0.4rem;
}

#info > header.major .section-divider {
  display: none;
}

#info > header.major p {
  margin: 0;
  color: var(--surface-muted);
  max-width: 38rem;
}

#info > footer.major {
  margin: 0;
}

#info > footer.major .actions {
  margin: 0;
  justify-content: flex-end;
  gap: 0.7rem;
}

/* The Guides link already lives in Learn More; suppress the old duplicate footer block. */
#footer > section:nth-of-type(2) {
  display: none;
}

/* Make the page ending visually intentional rather than a same-color rectangle under #main. */
#footer {
  margin-top: 1rem;
  padding: 0;
  background: transparent;
  color: var(--surface-text);
}

#footer > section:first-of-type {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title action"
    "copy action";
  align-items: center;
  gap: 0.25rem 1.5rem;
  width: 100%;
  margin: 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.94));
  box-shadow: var(--shadow-md);
  text-align: left;
}

#footer > section:first-of-type h2 {
  grid-area: title;
  margin: 0;
  font-size: 1.25rem;
}

#footer > section:first-of-type p {
  grid-area: copy;
  margin: 0;
  color: var(--surface-muted);
}

#footer > section:first-of-type .actions {
  grid-area: action;
  margin: 0;
  align-self: center;
}

#footer > section:first-of-type .button {
  margin: 0;
}

@media (max-width: 980px) {
  #info.main.special {
    grid-template-columns: 1fr;
  }

  #info > footer.major .actions {
    justify-content: flex-start;
  }
}

@media (max-width: 736px) {
  #info.main.special {
    padding-top: 1.6rem;
    padding-bottom: 1.6rem;
  }

  #footer > section:first-of-type {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "copy"
      "action";
    gap: 0.45rem;
    padding: 1.15rem;
  }

  #footer > section:first-of-type .actions {
    margin-top: 0.6rem;
  }
}
