/* File: theme/css/humanspark-components.css
 * Purpose: All HumanSpark UI components - cards, quotes, buttons, nav, footer.
 * Project: HumanSpark | Date: 2026-03-20
 *
 * Overview: Implements the 30-component inventory from the design spec.
 * Uses .hs-{component}--{variant}__{element} naming. Relies on
 * Open Props tokens for spacing, shadows, easings, and radii.
 */

/* === CARDS === */

.hs-card {
  background: var(--hs-white);
  border-radius: var(--radius-3);
  padding: var(--size-fluid-4);
  box-shadow: var(--hs-card-shadow);
  border: 1px solid rgba(0, 8, 42, 0.08);
  border-top: 3px solid var(--hs-accent);
  transition: box-shadow 0.3s var(--ease-3), transform 0.3s var(--ease-3), border-color 0.3s var(--ease-3);
  display: flex;
  flex-direction: column;
}

.hs-card:hover {
  box-shadow: var(--hs-card-shadow-hover), var(--hs-glow-accent);
  transform: translateY(-6px);
}

/* Cycling hover glow colors */
.hs-grid--3col .hs-card:nth-child(1):hover {
  box-shadow: var(--hs-card-shadow-hover), 0 0 25px rgba(238, 186, 0, 0.3);
}
.hs-grid--3col .hs-card:nth-child(2):hover {
  box-shadow: var(--hs-card-shadow-hover), 0 0 25px rgba(0, 131, 132, 0.25);
}
.hs-grid--3col .hs-card:nth-child(3):hover {
  box-shadow: var(--hs-card-shadow-hover), 0 0 25px rgba(242, 41, 91, 0.2);
}

.hs-card__icon {
  font-size: 1.8rem;
  margin-bottom: var(--size-3);
  line-height: 1;
  width: 3.2rem;
  height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-2);
}

/* Cycling icon background colors */
.hs-grid--3col .hs-card:nth-child(1) .hs-card__icon {
  background: rgba(238, 186, 0, 0.1);
  border: 1px solid rgba(238, 186, 0, 0.2);
}
.hs-grid--3col .hs-card:nth-child(2) .hs-card__icon {
  background: rgba(0, 131, 132, 0.08);
  border: 1px solid rgba(0, 131, 132, 0.2);
}
.hs-grid--3col .hs-card:nth-child(3) .hs-card__icon {
  background: rgba(242, 41, 91, 0.06);
  border: 1px solid rgba(242, 41, 91, 0.15);
}

.hs-card__title {
  font-size: var(--font-size-3);
  font-weight: var(--hs-weight-heading);
  margin-bottom: var(--size-2);
  color: var(--hs-navy);
  line-height: 1.25;
}

.hs-card__meta {
  font-size: var(--font-size-0);
  color: var(--hs-navy);
  font-weight: 700;
  margin-bottom: var(--size-2);
  background: rgba(238, 186, 0, 0.12);
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: var(--radius-round);
}

.hs-card__body {
  font-size: var(--font-size-1);
  color: #4a4a4a;
  line-height: 1.7;
  flex: 1;
}

.hs-card .hs-btn {
  margin-top: auto;
  padding-top: var(--size-3);
  align-self: flex-start;
  font-weight: 700;
}

/* Card CTA as styled link with arrow */
.hs-card .hs-btn--primary {
  background: transparent;
  color: var(--hs-link);
  padding-left: 0;
  padding-right: 0;
  font-size: var(--font-size-1);
  position: relative;
}

.hs-card .hs-btn--primary::after {
  content: ' \2192';
  transition: transform 0.2s var(--ease-3);
  display: inline-block;
}

.hs-card .hs-btn--primary:hover {
  color: var(--hs-accent);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.hs-card .hs-btn--primary:hover::after {
  transform: translateX(4px);
}

.hs-card--dark {
  background: var(--hs-navy-light);
  color: var(--hs-white);
  border: none;
  border-top: 3px solid transparent;
  border-image: var(--hs-gradient-line) 1;
}

.hs-card--dark:hover {
  box-shadow: var(--hs-glow-accent-strong);
  border-color: transparent;
}

.hs-card--dark .hs-card__title {
  color: var(--hs-white);
}

.hs-card--dark .hs-card__body {
  color: rgba(176, 184, 200, 0.9);
}

.hs-card--dark .hs-card__meta {
  color: var(--hs-accent);
}

/* Cycling border colors for visual variety */
.hs-grid--3col .hs-card:nth-child(1) { border-top-color: var(--hs-accent); }
.hs-grid--3col .hs-card:nth-child(2) { border-top-color: var(--hs-link); }
.hs-grid--3col .hs-card:nth-child(3) { border-top-color: var(--hs-red); }

.hs-card__image,
.hs-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-2);
  margin-bottom: var(--size-2);
}

/* === BUTTONS === */

.hs-btn {
  display: inline-block;
  padding: var(--size-2) var(--size-fluid-3);
  border-radius: var(--radius-2);
  font-weight: 600;
  font-size: var(--font-size-1);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: transform 0.2s var(--ease-3),
              box-shadow 0.2s var(--ease-3),
              background 0.2s var(--ease-3);
}

.hs-btn:hover {
  transform: translateY(-2px);
}

.hs-btn--primary {
  background: var(--hs-link);
  color: var(--hs-white);
}

.hs-btn--primary:hover {
  background: var(--hs-link-hover);
  color: var(--hs-white);
  box-shadow: var(--hs-glow-teal);
}

.hs-btn--gradient {
  background: var(--hs-gradient);
  color: var(--hs-navy);
  font-weight: var(--hs-weight-heading);
  padding: var(--size-3) var(--size-fluid-4);
  font-size: var(--font-size-2);
  border-radius: var(--radius-3);
  letter-spacing: -0.01em;
}

.hs-btn--gradient:hover {
  box-shadow: var(--hs-glow-accent-strong);
  color: var(--hs-navy);
  transform: translateY(-3px);
}

.hs-btn--outline {
  background: transparent;
  color: var(--hs-link);
  border: 2px solid var(--hs-link);
}

.hs-btn--outline:hover {
  background: var(--hs-link);
  color: var(--hs-white);
}

/* White outline variant for dark backgrounds */
.hs-btn--outline-light {
  background: transparent;
  color: var(--hs-white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.hs-btn--outline-light:hover {
  border-color: var(--hs-white);
  color: var(--hs-white);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* === BLOCKQUOTES === */

.hs-quote {
  margin-block: var(--size-fluid-3);
}

.hs-quote--border {
  border-left: 3px solid;
  border-image: var(--hs-gradient-line) 1;
  background: var(--hs-gradient-subtle);
  padding: var(--size-fluid-2) var(--size-fluid-3);
  border-radius: 0 var(--radius-2) var(--radius-2) 0;
}

.hs-quote--marks {
  position: relative;
  padding: var(--size-fluid-3) var(--size-fluid-4);
  font-style: italic;
}

.hs-quote--marks::before {
  content: '\201C';
  position: absolute;
  top: -0.2em;
  left: 0;
  font-size: var(--font-size-8);
  color: var(--hs-accent);
  opacity: 0.3;
  line-height: 1;
  font-family: Georgia, serif;
}

.hs-quote--dark {
  background: var(--hs-navy-light);
  color: var(--hs-white);
  padding: var(--size-fluid-3);
  border-radius: var(--radius-2);
}

.hs-quote footer,
.hs-quote cite {
  display: block;
  font-size: var(--font-size-0);
  color: var(--hs-text-muted);
  font-style: normal;
  margin-top: var(--size-1);
}

.hs-quote--dark footer,
.hs-quote--dark cite {
  color: #B0B8C8;
}

/* === CALLOUT BOX === */

.hs-callout {
  border: 1px solid var(--hs-accent);
  border-left-width: var(--border-size-3);
  border-radius: 0 var(--radius-2) var(--radius-2) 0;
  padding: var(--size-fluid-2) var(--size-fluid-3);
  background: rgba(238, 186, 0, 0.04);
}

/* === BADGE === */

.hs-badge {
  display: inline-block;
  font-size: var(--font-size-00);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--font-letterspacing-3);
  padding: 0.15em 0.6em;
  border-radius: var(--radius-round);
  background: var(--hs-grey);
  color: var(--hs-text-muted);
}

.hs-badge--accent {
  background: rgba(238, 186, 0, 0.15);
  color: #7a6200;
}

/* === METADATA GRID === */

.hs-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--size-2) var(--size-3);
  font-size: var(--font-size-1);
}

.hs-meta-grid dt {
  font-size: var(--font-size-00);
  text-transform: uppercase;
  letter-spacing: var(--font-letterspacing-3);
  color: var(--hs-text-muted);
  font-weight: 600;
}

.hs-meta-grid dd {
  margin: 0;
  font-weight: var(--hs-weight-body);
}

/* === AUTHOR BYLINE === */

.hs-byline {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  font-size: var(--font-size-1);
  margin-bottom: var(--size-fluid-3);
}

.hs-byline img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-round);
  object-fit: cover;
}

.hs-byline__name {
  font-weight: 600;
}

.hs-byline__date {
  color: var(--hs-text-muted);
  font-size: var(--font-size-0);
}

/* === STATS HIGHLIGHT === */

.hs-stat {
  text-align: center;
  padding: var(--size-fluid-3);
}

.hs-stat__number {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: var(--hs-weight-logo);
  color: var(--hs-accent);
  line-height: 1;
  text-shadow: 0 0 30px rgba(238, 186, 0, 0.5), 0 0 60px rgba(238, 186, 0, 0.2);
}

.hs-stat__label {
  font-size: var(--font-size-2);
  color: rgba(220, 225, 235, 0.9);
  margin-top: var(--size-3);
  font-weight: 500;
}

/* === PRICING CARD === */

.hs-pricing {
  text-align: center;
  padding: var(--size-fluid-4);
  background: var(--hs-white);
  border-radius: var(--radius-3);
  box-shadow: var(--hs-card-shadow);
  border: 1px solid rgba(0, 8, 42, 0.06);
  transition: box-shadow 0.3s var(--ease-3), transform 0.3s var(--ease-3);
}

.hs-pricing:hover {
  box-shadow: var(--hs-card-shadow-hover), var(--hs-glow-accent);
  transform: translateY(-4px);
}

.hs-pricing__price {
  font-size: var(--font-size-fluid-3);
  font-weight: var(--hs-weight-logo);
  color: var(--hs-navy);
  margin-bottom: var(--size-1);
}

.hs-pricing__features {
  list-style: none;
  padding: 0;
  margin: var(--size-3) 0;
  text-align: left;
}

.hs-pricing__features li {
  padding: var(--size-1) 0;
  border-bottom: 1px solid var(--hs-grey);
}

.hs-pricing__features li::before {
  content: '\2713 ';
  color: var(--hs-link);
  font-weight: 700;
}

.hs-pricing__guarantee {
  font-size: var(--font-size-0);
  color: var(--hs-text-muted);
  font-style: italic;
  margin-top: var(--size-2);
  margin-bottom: var(--size-3);
}

/* === TESTIMONIAL === */

.hs-testimonial {
  padding: var(--size-fluid-4) var(--size-fluid-5);
  background: linear-gradient(135deg, var(--hs-navy) 0%, var(--hs-navy-light) 100%);
  color: var(--hs-white);
  border-radius: var(--radius-3);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 8, 42, 0.25), var(--hs-glow-accent-soft);
  max-width: 800px;
  margin-inline: auto;
}

/* Subtle dot pattern on testimonial */
.hs-testimonial::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hs-dot-pattern);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.3;
}

.hs-testimonial > * {
  position: relative;
  z-index: 1;
}

/* Large decorative quotation mark */
.hs-testimonial__quote {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: var(--size-4);
  position: relative;
  padding-top: var(--size-5);
  max-width: 650px;
  margin-inline: auto;
}

.hs-testimonial__quote::before {
  content: '\201C';
  position: absolute;
  top: -0.15em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8rem;
  color: var(--hs-accent);
  opacity: 0.35;
  line-height: 1;
  font-family: Georgia, serif;
  pointer-events: none;
}

.hs-testimonial__avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-round);
  object-fit: cover;
  margin-inline: auto;
  margin-bottom: var(--size-1);
  border: 2px solid var(--hs-accent);
}

.hs-testimonial__name {
  font-weight: 600;
  font-size: var(--font-size-1);
  color: var(--hs-white);
}

.hs-testimonial__role {
  font-size: var(--font-size-0);
  color: rgba(176, 184, 200, 0.8);
}

/* Gradient accent line at bottom */
.hs-testimonial::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--hs-gradient-line);
  z-index: 1;
  box-shadow: 0 0 15px rgba(238, 186, 0, 0.2);
}

.hs-testimonial--dark {
  background: var(--hs-navy-light);
  color: var(--hs-white);
}

.hs-testimonial--dark .hs-testimonial__role {
  color: rgba(176, 184, 200, 0.8);
}

/* === CARD VARIANTS === */

.hs-card--workshop .hs-card__audience,
.hs-card--workshop .hs-card__duration {
  font-size: var(--font-size-0);
  color: var(--hs-text-muted);
  margin-bottom: var(--size-1);
}

.hs-card--workshop .hs-card__outline {
  list-style: none;
  padding: 0;
  margin-top: var(--size-2);
}

.hs-card--workshop .hs-card__outline li {
  padding: var(--size-1) 0;
  border-bottom: 1px solid var(--hs-grey);
  font-size: var(--font-size-1);
}

.hs-card--workshop .hs-card__outline li::before {
  content: '\2713 ';
  color: var(--hs-link);
  font-weight: 700;
}

.hs-card--whitepaper {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--size-3);
  align-items: start;
}

.hs-card--whitepaper .hs-card__cover {
  width: 100%;
  border-radius: var(--radius-2);
}

.hs-card--whitepaper .hs-card__bullets {
  list-style: disc;
  padding-left: var(--size-3);
  font-size: var(--font-size-1);
  color: var(--hs-text);
}

/* === EMAIL FORM === */

.hs-form {
  max-width: 520px;
  margin-inline: auto;
  margin-top: var(--size-4);
}

.hs-form__group {
  display: flex;
  gap: var(--size-2);
}

.hs-form__group input[type="email"] {
  flex: 1;
  padding: var(--size-3) var(--size-3);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-2);
  font-size: var(--font-size-2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--hs-white);
}

.hs-form__group input[type="email"]::placeholder {
  color: rgba(176, 184, 200, 0.6);
}

.hs-form__group input[type="email"]:focus {
  outline: none;
  border-color: var(--hs-accent);
  box-shadow: var(--hs-glow-accent);
}

.hs-form__group button {
  white-space: nowrap;
  padding: var(--size-3) var(--size-4);
  font-size: var(--font-size-1);
}

.hs-form__hint {
  font-size: var(--font-size-00);
  color: rgba(200, 210, 225, 0.6);
  text-align: center;
  margin-top: var(--size-2);
  letter-spacing: 0.01em;
}

@media (max-width: 480px) {
  .hs-form__group {
    flex-direction: column;
  }
}

/* === NAVIGATION === */

.hs-site-header {
  background: var(--hs-navy);
  border-bottom: 2px solid transparent;
  border-image: var(--hs-gradient-line) 1;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hs-site-header .hs-logo {
  color: var(--hs-white);
}

.hs-site-header .hs-nav__list a {
  color: rgba(200, 210, 225, 0.9);
}

.hs-site-header .hs-nav__list a:hover {
  color: var(--hs-accent);
}

.hs-site-header .hs-nav__toggle span {
  background: var(--hs-white);
}

.hs-site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--size-2);
}

.hs-logo {
  font-size: var(--font-size-3);
  font-weight: var(--hs-weight-logo);
  color: var(--hs-navy);
  text-decoration: none;
}

.hs-logo:hover {
  color: var(--hs-navy);
}

.hs-nav__list {
  display: flex;
  align-items: center;
  gap: var(--size-3);
  list-style: none;
  padding: 0;
  margin: 0;
}

.hs-nav__list a {
  font-size: var(--font-size-1);
  font-weight: 500;
  color: var(--hs-text);
  text-decoration: none;
  transition: color 0.15s var(--ease-3);
}

.hs-nav__list a:hover {
  color: var(--hs-accent);
}

.hs-nav__list .current-menu-item a {
  color: var(--hs-link);
}

/* Dropdown */
.hs-nav__list .menu-item-has-children {
  position: relative;
}

.hs-nav__list .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--hs-white);
  border: 1px solid var(--hs-grey);
  border-radius: var(--radius-2);
  padding: var(--size-1) 0;
  min-width: 200px;
  box-shadow: var(--shadow-3);
  list-style: none;
}

.hs-nav__list .menu-item-has-children:hover .sub-menu {
  display: block;
}

.hs-nav__list .sub-menu a {
  display: block;
  padding: var(--size-1) var(--size-3);
}

/* Mobile toggle */
.hs-nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--size-1);
  flex-direction: column;
  gap: 5px;
}

.hs-nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--hs-navy);
  transition: transform 0.2s var(--ease-3);
}

@media (max-width: 768px) {
  .hs-nav__toggle {
    display: flex;
  }

  .hs-nav__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--hs-white);
    flex-direction: column;
    padding: var(--size-3);
    border-bottom: 1px solid var(--hs-grey);
    box-shadow: var(--shadow-2);
  }

  .hs-nav__list.is-open {
    display: flex;
  }

  .hs-nav__list .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: var(--size-3);
    display: block;
  }
}

/* === FOOTER === */

.hs-site-footer {
  background: linear-gradient(180deg, var(--hs-navy) 0%, #000620 100%);
  color: rgba(176, 184, 200, 0.8);
  padding-block: var(--size-fluid-5);
  border-top: 3px solid transparent;
  border-image: var(--hs-gradient-line) 1;
  position: relative;
  max-width: none;
}

/* Subtle grid on footer */
.hs-site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, var(--hs-grid-line) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(90deg, var(--hs-grid-line) 0 1px, transparent 1px 100%);
  background-size: 60px 60px;
  pointer-events: none;
}

.hs-site-footer > * {
  position: relative;
  z-index: 1;
}

.hs-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--size-fluid-3);
}

.hs-footer__brand .hs-logo {
  color: var(--hs-white);
}

.hs-footer__nav {
  list-style: none;
  padding: 0;
}

.hs-footer__nav li {
  padding: var(--size-1) 0;
}

.hs-footer__nav a {
  color: rgba(176, 184, 200, 0.8);
  text-decoration: none;
  transition: color 0.15s var(--ease-3);
}

.hs-footer__nav a:hover {
  color: var(--hs-accent);
}

.hs-footer__legal {
  font-size: var(--font-size-0);
}

.hs-footer__legal a {
  color: var(--hs-link);
}

@media (max-width: 768px) {
  .hs-footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* === ACCORDION === */

.hs-accordion details {
  border-bottom: 1px solid var(--hs-grey);
}

.hs-accordion summary {
  padding: var(--size-2) 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hs-accordion summary::after {
  content: '+';
  font-size: var(--font-size-3);
  color: var(--hs-accent);
  transition: transform 0.2s var(--ease-3);
}

.hs-accordion details[open] summary::after {
  content: '\2212';
}

.hs-accordion details > div {
  padding-bottom: var(--size-3);
}

/* === PAGINATION === */

.hs-pagination {
  display: flex;
  justify-content: center;
  gap: var(--size-1);
  padding-block: var(--size-fluid-3);
}

.hs-pagination a,
.hs-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: var(--size-2);
  border-radius: var(--radius-2);
  font-size: var(--font-size-1);
  font-weight: 600;
  text-decoration: none;
  color: var(--hs-text);
  border: 1px solid var(--hs-grey);
  transition: all 0.15s var(--ease-3);
}

.hs-pagination a:hover {
  background: var(--hs-link);
  color: var(--hs-white);
  border-color: var(--hs-link);
}

.hs-pagination .current {
  background: var(--hs-navy);
  color: var(--hs-white);
  border-color: var(--hs-navy);
}

/* === TABLE OF CONTENTS === */

.hs-toc {
  background: var(--hs-grey);
  border-radius: var(--radius-2);
  padding: var(--size-fluid-2) var(--size-fluid-3);
  margin-bottom: var(--size-fluid-3);
}

.hs-toc h4 {
  font-size: var(--font-size-1);
  margin-bottom: var(--size-2);
}

.hs-toc ol {
  padding-left: var(--size-3);
}

.hs-toc li {
  padding: var(--size-1) 0;
  font-size: var(--font-size-1);
}
