/**
 * components.css — Reusable UI pieces: buttons, cards, hero, CTA, etc.
 */

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--transition-ui), color var(--transition-ui), border-color var(--transition-ui);
  cursor: pointer;
  line-height: 1.25;
}

.btn:active {
  transform: scale(0.98);
}

/* White button — used on dark/gold backgrounds */
.btn--white {
  background: var(--color-white);
  color: var(--color-dark-blue);
  border-color: var(--color-white);
}

.btn--white:hover {
  background: transparent;
  color: var(--color-white);
}

/* Dark button — used on light backgrounds */
.btn--dark {
  background: var(--color-dark-blue);
  color: var(--color-white);
  border-color: var(--color-dark-blue);
}

.btn--dark:hover {
  background: transparent;
  color: var(--color-dark-blue);
}

/* Gold button */
.btn--gold {
  background: var(--color-gold);
  color: var(--color-dark-blue);
  border-color: var(--color-gold);
}

.btn--gold:hover {
  background: transparent;
  color: var(--color-gold);
}

/* ========== Image card with caption overlay ========== */
.card-overlay {
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.card-overlay__media {
  position: relative;
  overflow: hidden;
}

.card-overlay__media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform var(--transition-hover);
}

.card-overlay:hover .card-overlay__media img,
.card-overlay:focus-visible .card-overlay__media img {
  transform: scale(1.05);
}

.card-overlay__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  pointer-events: none;
}

.card-overlay__caption p {
  margin: 0;
  color: white;
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .card-overlay__caption p {
    font-size: 1rem;
  }
}

/* People / media: gradient always visible */
.card-overlay--people .card-overlay__caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 33%);
}

.card-overlay--media .card-overlay__caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 50%);
}

/* Partnership person photo: gradient on hover */
.card-overlay--partnerships .card-overlay__caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 33%);
  opacity: 0;
  transition: opacity var(--transition-hover);
}

.card-overlay--partnerships:hover .card-overlay__caption,
.group:hover .card-overlay--partnerships .card-overlay__caption {
  opacity: 1;
}

.card-overlay--partnerships .card-overlay__media img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

/* Aspect helpers */
.aspect-4-3 {
  aspect-ratio: 4 / 3;
}

.aspect-4-3 .card-overlay__media,
.aspect-4-3 img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.aspect-16-10 {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.aspect-16-10 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== Homepage hero slider ========== */
.hero-slider {
  display: flex;
  flex-direction: column;
  min-height: 50vh;
}

@media (min-width: 1024px) {
  .hero-slider {
    flex-direction: row;
    min-height: 66vh;
  }
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-gold);
  padding: 3rem 1.5rem;
}

@media (min-width: 1024px) {
  .hero-content {
    padding: 4rem;
  }
}

.hero-content h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  color: white;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-tagline {
  color: white;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  max-width: 42rem;
  margin-bottom: 2rem;
}

.hero-images {
  flex: 1;
  position: relative;
  min-height: 40vh;
}

@media (min-width: 1024px) {
  .hero-images {
    min-height: 66vh;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
  transition: opacity var(--transition-hover);
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 10;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 20;
}

.hero-dots button {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  transition: background var(--transition-ui);
}

.hero-dots button.is-active {
  background: white;
}

/* ========== Featured companies (home) ========== */
.featured-grid {
  display: grid;
}

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

.featured-image {
  position: relative;
  overflow: hidden;
  min-height: 300px;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-hover);
}

.featured-image:hover img {
  transform: scale(1.05);
}

.featured-copy {
  background: var(--color-dark-blue);
  color: white;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
  .featured-copy {
    padding: 3rem;
  }
}

.featured-copy .eyebrow {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: white;
}

.featured-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: white;
  margin-bottom: 1rem;
  font-weight: 400;
}

.featured-copy p {
  color: white;
  margin-bottom: 1.5rem;
}

/*
 * Kewazo: image first on mobile, text left / image right on desktop.
 * HTML order is copy then image.
 */
.featured-row--reverse .featured-copy {
  order: 2;
}
.featured-row--reverse .featured-image {
  order: 1;
}
@media (min-width: 768px) {
  .featured-row--reverse .featured-copy {
    order: 1;
  }
  .featured-row--reverse .featured-image {
    order: 2;
  }
}

/* ========== Above-footer CTA ========== */
.approach-cta {
  border-top: 1px solid rgba(12, 42, 57, 0.1);
  background: white;
  padding: 4rem 0;
  text-align: center;
}

.approach-cta h2 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 3rem);
  color: var(--color-orange);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.approach-cta p {
  color: var(--color-dark-blue);
  font-size: 1.125rem;
  max-width: 42rem;
  margin: 0 auto 3rem;
}

/* ========== Blog / insight cards ========== */
.blog-card {
  display: block;
  text-decoration: none;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  transition: background var(--transition-hover);
}

.blog-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Light variant for insights index (white page) */
.blog-card--light {
  background: white;
  border: 1px solid rgba(12, 42, 57, 0.1);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-hover), box-shadow var(--transition-hover);
}

.blog-card--light:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-card-hover);
  background: white;
}

.blog-card__body {
  padding: 1.5rem;
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-orange);
  margin-bottom: 0.5rem;
  font-weight: 400;
  transition: color var(--transition-ui);
}

.blog-card--light:hover .blog-card__title {
  color: var(--color-gold);
}

.blog-card__desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.blog-card--light .blog-card__desc {
  color: rgba(12, 42, 57, 0.8);
}

.blog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover img {
  transform: scale(1.05);
}

/* ========== Portfolio company list cards ========== */
.portfolio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  background: white;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: box-shadow var(--transition-hover);
}

.portfolio-card:hover {
  box-shadow: var(--shadow-card-hover);
}

@media (min-width: 768px) {
  .portfolio-card {
    flex-direction: row;
    gap: 2rem;
    align-items: stretch;
  }
}

.portfolio-card__photo {
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .portfolio-card__photo {
    width: 50%;
  }
}

.portfolio-card__logo {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .portfolio-card__logo {
    width: 50%;
  }
}

.portfolio-card__logo img {
  max-height: 6rem;
  width: auto;
  object-fit: contain;
}

/* Skip-to chips on portfolio index */
.skip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.skip-links__label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(12, 42, 57, 0.7);
  margin-bottom: 0.75rem;
}

.skip-links a {
  display: inline-flex;
  padding: 0.5rem 1rem;
  background: rgba(12, 42, 57, 0.05);
  font-weight: 700;
  color: var(--color-dark-blue);
  text-decoration: none;
  transition: background var(--transition-ui), color var(--transition-ui);
}

.skip-links a:hover {
  background: rgba(12, 42, 57, 0.1);
  color: var(--color-gold);
}

/* ========== Contact cards ========== */
.contact-card {
  background: var(--color-dark-blue);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
}

.contact-card h3 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  color: white;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

/* ========== Location switcher (contact) ========== */
.location-switcher {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .location-switcher {
    grid-template-columns: 2fr 7fr 3fr;
    align-items: start;
  }
}

.location-switcher h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-dark-blue);
  margin-bottom: 1rem;
  font-weight: 400;
}

.location-tab {
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-dark-blue);
  transition: color var(--transition-ui);
}

.location-tab:hover {
  color: var(--color-gold);
}

.location-tab.is-active {
  font-weight: 700;
  color: var(--color-gold);
}

@media (min-width: 768px) {
  .location-tab {
    padding: 0.5rem 0;
    min-height: 0;
  }
}

.location-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ========== Prose (long-form body text) ========== */
.prose {
  color: var(--color-dark-blue);
  max-width: none;
}

.prose p {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  line-height: 1.75;
}

.prose p:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--color-dark-blue);
  text-decoration: underline;
  transition: color var(--transition-ui);
}

.prose a:hover {
  color: var(--color-gold);
}

.prose strong {
  font-weight: 700;
}

.prose em {
  font-style: italic;
}

.prose ul,
.prose ol {
  margin: 1.25em 0;
  padding-left: 1.5em;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin: 0.5em 0;
  line-height: 1.75;
}

.prose blockquote {
  margin: 1.5em 0;
  padding-left: 1rem;
  border-left: 4px solid var(--color-orange);
  color: var(--color-dark-blue);
  font-style: italic;
}

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  color: var(--color-dark-blue);
  margin-top: 2em;
  margin-bottom: 0.75em;
  font-weight: 400;
}

.prose--invert {
  color: white;
}

.prose--invert p,
.prose--invert strong,
.prose--invert a {
  color: white;
}

.prose--invert a:hover {
  color: var(--color-gold);
}
