/* ============================================
   Page-Specific Styles
   ============================================ */

/* --- Pricing Page — Simplified Cards --- */

.pricing-scale-note {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-2xl);
  line-height: var(--leading-relaxed);
}

.pricing-simple {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding-top: 16px; /* room for "Most Popular" badge above card */
}

.pricing-scard {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.pricing-scard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.pricing-scard--featured {
  border-color: var(--spotlight);
  box-shadow: var(--shadow-md);
  position: relative;
  background: rgba(232, 168, 56, 0.04);
}

.pricing-scard--featured:hover {
  box-shadow: var(--shadow-lg);
}

.pricing-scard__header {
  text-align: center;
  min-height: 130px; /* align headers across cards (name + price + range) */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.pricing-scard__price {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--text-primary);
  line-height: 1;
  margin-top: var(--space-sm);
}

.pricing-scard__range {
  font-size: var(--text-xs);
  color: var(--text-light);
  margin-top: var(--space-xs);
  font-style: italic;
}

.pricing-scard__who {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
  min-height: 120px; /* align border-bottom across cards */
  display: flex;
  align-items: flex-start;
}

.pricing-scard__includes {
  font-size: var(--text-xs);
  color: var(--text-light);
  line-height: var(--leading-relaxed);
  min-height: 48px; /* align includes text across cards */
}

.pc-stat {
  white-space: nowrap;
}

.pc-note {
  display: block;
  font-size: var(--text-sm);
  font-style: italic;
  opacity: 0.7;
  margin-top: 4px;
}

.pricing-scard .pc-annual {
  margin-top: auto; /* push annual + button to bottom of card */
}

.pricing-scard:not(:has(.pc-annual)) > .btn {
  margin-top: auto; /* pin button to bottom only when no .pc-annual */
}

/* --- Detail Toggle --- */

.pricing-detail-toggle {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.pricing-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pricing-detail-btn:hover {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border-color: var(--spotlight);
  color: var(--curtain);
}

.pricing-detail-btn__icon {
  font-size: var(--text-xs);
  transition: transform var(--transition-fast);
}

.pricing-detail-btn.is-open .pricing-detail-btn__icon {
  transform: rotate(180deg);
}

/* --- Collapsible Detail Section --- */

.pricing-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.pricing-details.is-open {
  max-height: 800px;
  margin-bottom: var(--space-lg);
}

/* --- Pricing Page — Comparison Table --- */

.pricing-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-lg);
}

.currency-toggle {
  display: flex;
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.currency-btn {
  padding: 6px 18px;
  border: none;
  border-radius: var(--radius-full);
  background: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.currency-btn.is-active {
  background: var(--white);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.pricing-comparison {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pricing-row {
  display: grid;
  grid-template-columns: 210px repeat(4, 1fr);
  border-bottom: 1px solid var(--border-light);
}

.pricing-row--last {
  border-bottom: none;
}

.pricing-row__label {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--mist);
  border-right: 1px solid var(--border-light);
}

.pricing-row__label--header {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pricing-row--header {
  border-bottom: 2px solid var(--border);
}

.pricing-row--header .pricing-row__label {
  background: var(--mist);
}

.pricing-row__cell {
  padding: var(--space-md) var(--space-lg);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pricing-row--header .pricing-row__cell {
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-md);
}

.pricing-row__cell--featured {
  background: rgba(232, 168, 56, 0.06);
  border-left: 2px solid rgba(232, 168, 56, 0.35);
  border-right: 2px solid rgba(232, 168, 56, 0.35);
}

/* Plan header elements */
.pc-badge {
  background: var(--spotlight);
  color: var(--text-on-spotlight);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.pc-name {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--curtain);
  letter-spacing: 0.03em;
  padding-bottom: var(--space-xs);
  display: inline-block;
  position: relative;
}

.pc-name::after {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: var(--spotlight);
  border-radius: 2px;
  margin: var(--space-xs) auto 0;
  transition: width var(--transition-base);
}

.pricing-scard--featured .pc-name::after {
  width: 48px;
}

.pricing-scard:hover .pc-name::after {
  width: 125px;
}

.pc-target {
  font-size: var(--text-xs);
  color: var(--text-light);
  line-height: 1.4;
  max-width: 160px;
  text-align: center;
}

.pc-price {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--text-primary);
  line-height: 1;
}

.pc-period {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-light);
}

.pc-annual {
  font-size: var(--text-xs);
  color: var(--spotlight);
  font-weight: 500;
  min-height: 1em;
}

.pc-max {
  color: var(--text-light);
  font-size: var(--text-xs);
}

/* Currency switching */
.price-usd { display: none; }
.pricing-comparison.show-usd .price-usd { display: inline; }
.pricing-comparison.show-usd .price-cad { display: none; }
.pricing-simple.show-usd .price-usd { display: inline; }
.pricing-simple.show-usd .price-cad { display: none; }

/* Tooltip button */
.tooltip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--text-light);
  background: none;
  color: var(--text-light);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.tooltip-btn:hover,
.tooltip-btn:focus {
  border-color: var(--charcoal);
  color: var(--charcoal);
  outline: none;
}

.tooltip-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--charcoal);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 400;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  width: 220px;
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: 20;
  white-space: normal;
}

.tooltip-btn--wide::after {
  width: 280px;
}

.tooltip-btn:hover::after,
.tooltip-btn:focus::after {
  opacity: 1;
}

/* Mobile: responsive layout */
@media (max-width: 768px) {
  .pricing-simple {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .pricing-comparison {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pricing-row {
    min-width: 620px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .pricing-simple {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Home Page — Audience Cards --- */

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
}

.audience-card {
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--border-light);
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.audience-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.audience-card__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-lg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.audience-card--schools .audience-card__icon {
  background: #FFF3E0;
  color: #E65100;
}

.audience-card--community .audience-card__icon {
  background: #E8F5E9;
  color: #2E7D32;
}

.audience-card--commercial .audience-card__icon {
  background: #E3F2FD;
  color: #1565C0;
}

.audience-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.audience-card__text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-lg);
}

/* --- Solutions Pages --- */

.solution-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2xl);
}

.solution-benefit {
  display: flex;
  gap: var(--space-lg);
}

.solution-benefit__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--spotlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.solution-benefit__title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.solution-benefit__text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* --- Platform Overview — Module Grid --- */

.modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.module-card {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none;
  color: inherit;
}

.module-card:hover {
  border-color: var(--spotlight);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.module-card__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--curtain);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.module-card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.module-card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* --- Contact Page --- */

.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-4xl);
}

.contact-info__item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.contact-info__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--curtain);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: var(--space-xs);
}

.contact-info__value {
  font-size: var(--text-base);
  color: var(--text-primary);
}

.contact-info__value a {
  color: var(--curtain);
}

/* --- About Page --- */

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
}

.team-card {
  text-align: center;
}

.team-card__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--mist);
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: var(--text-sm);
  border: 3px solid var(--border-light);
  overflow: hidden;
}

.team-card__name {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.team-card__role {
  color: var(--spotlight);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-lg);
}

.team-card__bio {
  text-align: left;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  max-width: 720px;
  margin: 0 auto var(--space-md);
}

/* --- Legal / Support — Prose --- */

.prose {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.prose h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
}

.prose h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.prose p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.prose ul {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.prose ul li {
  list-style: disc;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.prose a {
  color: var(--curtain);
  text-decoration: underline;
}

.prose h4 {
  font-size: var(--text-lg);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.prose ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.prose ol li {
  list-style: decimal;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.prose .legal-caps {
  text-transform: uppercase;
  font-weight: 600;
  font-size: var(--text-sm);
}

/* --- Legal Page — Sidebar Layout --- */

.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: var(--space-xl);
  padding: var(--space-lg) 0;
}

.legal-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-sidebar li {
  margin-bottom: var(--space-xs);
}

.legal-sidebar a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.legal-sidebar a:hover,
.legal-sidebar a.active {
  color: var(--curtain);
  background: rgba(139, 26, 43, 0.06);
}

.legal-sidebar .sidebar-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  padding: var(--space-md) var(--space-md) var(--space-xs);
}

.legal-content .prose {
  max-width: none;
}

.legal-doc {
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-3xl);
}

.legal-doc:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.legal-updated {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-bottom: var(--space-xl);
}

@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: relative;
    top: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-xl);
  }
}

/* --- Legal Hub — Intro --- */

.legal-hub__intro {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3xl);
}

.legal-hub__inline-icon {
  font-size: 20px;
  color: var(--curtain);
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin-right: 4px;
}

/* --- Legal Hub — Card Grid --- */

.legal-hub__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-3xl);
}

.legal-hub__card {
  display: block;
  padding: 0 0 15px 0;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: opacity 0.2s;
}

.legal-hub__card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-hub__card:hover {
  opacity: 0.8;
}

.legal-hub__icon {
  font-size: 20px;
  color: var(--curtain);
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}

.legal-hub__card h3 {
  font-size: var(--text-lg);
  color: var(--text-primary);
  margin: 0 0 var(--space-xs);
  display: flex;
  align-items: center;
}

.legal-hub__card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-sm);
  padding-left: 26px;
  line-height: var(--leading-normal);
}

.legal-hub__card .legal-hub__date {
  padding-left: 26px;
}

.legal-hub__date {
  font-size: var(--text-xs);
  color: var(--text-light);
}

/* --- Legal Hub — Contact --- */

.legal-hub__contact {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: var(--space-xl);
}

.legal-hub__contact a {
  color: var(--curtain);
  text-decoration: underline;
}


/* --- Responsive Pages --- */

@media (max-width: 1024px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .audience-grid {
    grid-template-columns: 1fr;
  }

  .solution-benefits {
    grid-template-columns: 1fr;
  }

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

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


/* --- Cookie Banner --- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--charcoal);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 200;
  padding: var(--space-md) 0;
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.cookie-banner__text {
  font-size: var(--text-sm);
  color: var(--text-on-dark);
  opacity: 0.85;
  margin: 0;
}

.cookie-banner__text a {
  color: var(--teal);
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
}

/* --- Blog --- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

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

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

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.blog-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.blog-card__date {
  font-size: var(--text-xs);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.blog-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.blog-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  flex: 1;
}

.blog-card__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--spotlight);
  margin-top: var(--space-lg);
}

/* --- Blog Post --- */

.blog-post {
  max-width: 720px;
  margin: 0 auto;
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
}

.blog-post h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
}

.blog-post h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.blog-post p {
  margin-bottom: var(--space-lg);
}

.blog-post ul,
.blog-post ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.blog-post li {
  margin-bottom: var(--space-sm);
}

.blog-post a {
  color: var(--spotlight);
  text-decoration: underline;
}

.blog-post img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.blog-post blockquote {
  border-left: 3px solid var(--spotlight);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  color: var(--text-secondary);
  font-style: italic;
}
