/* ─────────────────────────────────────────────────────────────
   Activity Visualizer — Homepage styles
   Extends /styles.css (PlanBoost global design system)
   ───────────────────────────────────────────────────────────── */

/* ── Shared utilities ──────────────────────────────────────── */
/* .inline-code is defined in the global /styles.css */

.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 36px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--dark-green);
  font-weight: 600;
  font-size: 1.1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.secondary-button:hover {
  border-color: var(--dark-green);
  background: rgba(15, 61, 46, 0.04);
}

/* ── Hero card (diagram preview) ───────────────────────────── */
.av-hero-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(15, 61, 46, 0.10), 0 4px 12px rgba(13, 108, 128, 0.08);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.av-hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 72px rgba(15, 61, 46, 0.14);
}

.av-hero-card__badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d6c80;
  background: rgba(13, 108, 128, 0.1);
  border: 1px solid rgba(13, 108, 128, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
  width: fit-content;
}

.av-hero-card__diagram {
  background: #f4f8fa;
  border: 1px solid #dde8ef;
  border-radius: 14px;
  padding: 24px 20px;
  overflow: hidden;
}

/* Mock decomposition tree diagram */
.av-demo-tree {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
}

.av-demo-node {
  border: 2px solid #14a86f;
  border-radius: 10px;
  background: #fff;
  width: 160px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.av-demo-node--root {
  border-color: #e85030;
}

.av-demo-node__bar {
  height: 7px;
}

.av-demo-node__bar--crit {
  background: #e85030;
}

.av-demo-node__bar--norm {
  background: #14a86f;
}

.av-demo-node__body {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px 10px;
  color: #1f2f44;
  font-family: "Space Grotesk", sans-serif;
  text-align: center;
}

.av-demo-branch {
  display: flex;
  align-items: flex-start;
  margin-left: 40px;
  margin-top: 8px;
  gap: 0;
}

.av-demo-connector {
  width: 2px;
  height: 24px;
  background: #b8c1cb;
  margin-right: 12px;
  flex-shrink: 0;
  align-self: stretch;
  margin-top: -4px;
}

.av-demo-children {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.av-hero-card__legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  color: #667789;
  font-family: "Space Grotesk", sans-serif;
}

.av-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.av-legend-dot--crit { background: #e85030; }
.av-legend-dot--norm { background: #14a86f; }

/* ── Feature cards ─────────────────────────────────────────── */
.av-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.av-feature-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.av-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 61, 46, 0.08);
  border-color: #b0c4bb;
}

.av-feature-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-green);
  margin: 0;
}

.av-feature-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.av-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.av-feature-icon--teal   { background: rgba(13, 108, 128, 0.1);  color: #0d6c80; }
.av-feature-icon--green  { background: rgba(20, 168, 111, 0.1);  color: #14a86f; }
.av-feature-icon--red    { background: rgba(232, 80, 48, 0.1);   color: #e85030; }
.av-feature-icon--blue   { background: rgba(37, 99, 235, 0.1);   color: #2563eb; }
.av-feature-icon--purple { background: rgba(124, 58, 237, 0.1);  color: #7c3aed; }
.av-feature-icon--orange { background: rgba(234, 88, 12, 0.1);   color: #ea580c; }

/* ── Section header ────────────────────────────────────────── */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}

.section-header h2 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--dark-green);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── Section background variants ───────────────────────────── */
.section-highlight {
  background: linear-gradient(135deg, #f5f9f7 0%, #eef5f0 100%);
  border-radius: 24px;
  padding: 56px clamp(24px, 4vw, 56px);
  margin: 0 calc(-1 * clamp(24px, 4vw, 64px));
  padding-left: clamp(24px, 4vw, 64px);
  padding-right: clamp(24px, 4vw, 64px);
}

.section.muted {
  background: var(--surface-muted);
  border-radius: 24px;
  padding: 56px clamp(24px, 4vw, 56px);
  margin: 0 calc(-1 * clamp(24px, 4vw, 64px));
  padding-left: clamp(24px, 4vw, 64px);
  padding-right: clamp(24px, 4vw, 64px);
}

/* ── How it works — steps ──────────────────────────────────── */
.av-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: wrap;
}

.av-step {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 8px;
}

.av-step__number {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #0d6c80;
  letter-spacing: -0.03em;
  line-height: 1;
}

.av-step h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-green);
}

.av-step p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.av-step__arrow {
  font-size: 1.5rem;
  color: #b8c8c0;
  padding-top: 10px;
  padding-left: 4px;
  padding-right: 4px;
  flex-shrink: 0;
  align-self: flex-start;
}

.av-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* ── Audience section (from root styles, overrides here) ───── */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.audience-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.audience-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 61, 46, 0.07);
}

.audience-icon {
  font-size: 2rem;
}

.audience-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-green);
}

.audience-description {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Footer extras ─────────────────────────────────────────── */
.site-footer {
  border-top: 1.5px solid var(--border);
  padding-top: 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-brand-column {
  gap: 6px;
}

.footer-logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark-green);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-column a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--dark-green);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.social-links {
  display: flex;
  gap: 14px;
}

.social-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--dark-green);
}

/* ── Accessibility ─────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  background: var(--dark-green);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 9999;
  font-weight: 600;
  width: auto;
  height: auto;
  clip: auto;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .av-steps {
    flex-direction: column;
    gap: 24px;
  }

  .av-step__arrow {
    display: none;
  }

  .secondary-button {
    padding: 14px 28px;
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .av-features-grid {
    grid-template-columns: 1fr;
  }

  .av-hero-card__diagram {
    padding: 16px 12px;
  }
}
