/* =========================================================
   ABOUT (page-scoped) — Premium dark refinements
   Profile: Proposal 3 | Logos: Proposal 3 | Testimonials: Proposal 2
   ========================================================= */

/* --- Tokens (black/white + brand red only) --- */
:root {
  --about-s-8: 8px;
  --about-s-12: 12px;
  --about-s-16: 16px;
  --about-s-24: 24px;
  --about-s-32: 32px;
  --about-s-48: 48px;
  --about-s-64: 64px;

  --about-r-16: 16px;

  --about-surface-1: rgba(255, 255, 255, 0.03);
  --about-surface-2: rgba(255, 255, 255, 0.06);

  --about-border-1: rgba(255, 255, 255, 0.1);
  --about-border-2: rgba(255, 255, 255, 0.16);

  --about-text-1: rgba(255, 255, 255, 0.92);
  --about-text-2: rgba(255, 255, 255, 0.72);

  /* Reuse existing brand token when available */
  --about-accent: var(--red-brand-color, #ce032c);
}

/* --- Wrapper scope (prevents regressions on other pages) --- */
.about-main {
  color: var(--about-text-1);
}

/* =========================================================
   About mobile width fix (keeps desktop intact)
   Reason: .services-main is a flex container with align-items:center,
   so the inner .about-main can become shrink-to-content and overflow on mobile.
   ========================================================= */

.services-main.about-main > .about-main {
  width: 100%;
  max-width: 100%;
  min-width: 0; /* critical: allows content to shrink within flex context */
}

/* Normalize the inner content container used across About sections */
.services-main.about-main > .about-main .main {
  width: 90%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
}

/* Safety: prevent grid/flex children from forcing horizontal overflow */
.about-main .about-section-head__text,
.about-main .about-profile-body,
.about-main .about-process-card,
.about-main .testimonial-card {
  min-width: 0;
}

.about-main img {
  max-width: 100%;
  height: auto;
}

/* --- Section system (About only) --- */
.about-main .about-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: var(--about-s-64) 0;
  position: relative;
}

.about-main .about-section + .about-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.about-main .about-section-head {
  width: 100%;
  max-width: 920px;
  margin: 0 auto var(--about-s-32);
}

.about-main .about-section-head--center {
  text-align: center;
}

.about-main .about-section-head--split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--about-s-24);
}

.about-main .about-section-head__text {
  max-width: 920px;
}

.about-main .about-section-head__cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .about-main .about-section-head--split {
    flex-direction: column;
    align-items: flex-start;
  }
  .about-main .about-section-head__cta {
    width: 100%;
    justify-content: flex-start;
    margin-top: var(--about-s-16);
  }
}

.about-main .about-eyebrow {
  margin: 0 0 10px;
  color: var(--about-text-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.about-main .about-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--about-accent);
  flex: 0 0 auto;
}

.about-main .about-section-title {
  margin: 0;
  color: var(--about-text-1);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-size: clamp(1.85rem, 2.6vw, 2.4rem);
}

.about-main .about-section-subtitle {
  margin: 12px 0 0;
  color: var(--about-text-2);
  font-size: 1.08rem;
  line-height: 1.65;
}

/* --- Ambient accent (subtle tech feel) --- */
.about-main .about-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      700px circle at 15% 0%,
      rgba(206, 3, 44, 0.14),
      transparent 55%
    ),
    radial-gradient(
      900px circle at 95% 40%,
      rgba(206, 3, 44, 0.1),
      transparent 60%
    );
}

/* --- Buttons (About only) --- */
.about-main .about-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
  will-change: transform;
}

.about-main .about-btn--primary {
  background: var(--about-accent);
  color: #ffffff;
}

.about-main .about-btn--primary:hover {
  transform: translateY(-1px);
}

.about-main .about-btn--secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--about-text-1);
}

.about-main .about-btn--secondary:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.about-main .about-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(206, 3, 44, 0.35);
}

/* =========================================================
   PROFILE (Proposal 3)
   ========================================================= */

.about-main .about-profile-card {
  width: 100%;
  max-width: 1120px;
  background: var(--about-surface-1);
  border: 1px solid var(--about-border-1);
  border-radius: var(--about-r-16);
  padding: var(--about-s-24);

  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--about-s-24);
  align-items: start;

  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
  position: relative;
  overflow: hidden;
}

.about-main .about-profile-card:hover {
  background: var(--about-surface-2);
  border-color: var(--about-border-2);
  transform: translateY(-2px);
}

.about-main .nikhil-about-img {
  width: 100%;
  max-width: 320px;
  border-radius: 14px;
  border: 1px solid var(--about-border-1);
}

.about-main .about-profile-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-main .nikhil-title-about {
  margin: 0;
  color: var(--about-text-1);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.about-main .nikhil-title-about a {
  color: var(--about-text-1);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.about-main .nikhil-title-about a:hover {
  border-bottom-color: rgba(206, 3, 44, 0.7);
}

.about-main .nikhil-title-about a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(206, 3, 44, 0.35);
  border-radius: 8px;
}

.about-main .nikhil-about-subtext {
  margin: 0;
  color: var(--about-text-2);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Chips */
.about-main .about-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.about-main .about-metric {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-main .about-metric__value {
  color: var(--about-text-1);
  font-weight: 700;
  font-size: 0.92rem;
}

.about-main .about-metric__label {
  color: var(--about-text-2);
  font-size: 0.86rem;
}

/* Actions */
.about-main .about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .about-main .about-profile-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-main .nikhil-about-img {
    max-width: 240px;
    margin: 0 auto;
  }

  .about-main .nikhil-about-subtext {
    text-align: center;
  }

  .about-main .about-metrics,
  .about-main .about-actions {
    justify-content: center;
  }
}

/* --- How we work (Proposal 3 extra) --- */
.about-main .about-process {
  max-width: 1120px;
  margin: var(--about-s-32) auto 0;
}

.about-main .about-subsection-head {
  max-width: 920px;
  margin: 0 auto var(--about-s-24);
}

.about-main .about-subsection-title {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--about-text-1);
}

.about-main .about-subsection-subtitle {
  margin: 8px 0 0;
  color: var(--about-text-2);
  line-height: 1.65;
}

.about-main .about-process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--about-s-16);
}

@media (max-width: 992px) {
  .about-main .about-process-grid {
    grid-template-columns: 1fr;
  }
}

.about-main .about-process-card {
  background: var(--about-surface-1);
  border: 1px solid var(--about-border-1);
  border-radius: var(--about-r-16);
  padding: var(--about-s-24);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.about-main .about-process-card:hover {
  background: var(--about-surface-2);
  border-color: var(--about-border-2);
  transform: translateY(-2px);
}

.about-main .about-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.about-main .about-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(206, 3, 44, 0.38);
  background: rgba(206, 3, 44, 0.1);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.about-main .about-step-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--about-text-1);
  letter-spacing: -0.01em;
}

.about-main .about-step-desc {
  margin: 0;
  color: var(--about-text-2);
  line-height: 1.7;
}

/* =========================================================
   LOGOS (Proposal 3)
   ========================================================= */

.about-main .aboutlogo-container {
  width: 100%;
  overflow: hidden;
  display: block;
  margin-top: var(--about-s-24);
}

.about-main .about-logos-section .marquee-wrapper {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--about-s-24) 0;
  border-radius: var(--about-r-16);
  background: var(--about-surface-1);
  border: 1px solid var(--about-border-1);
  position: relative;
  overflow: hidden;
}

/* Side fades */
.about-main .about-logos-section .marquee-wrapper::before,
.about-main .about-logos-section .marquee-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 110px;
  pointer-events: none;
  z-index: 2;
}

.about-main .about-logos-section .marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0) 100%);
}

.about-main .about-logos-section .marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0) 100%);
}

/* Logo micro interactions */
.about-main .about-logos-section .marqueelogo {
  height: 34px;
  opacity: 0.75;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
  will-change: transform;
}

.about-main .about-logos-section a:hover .marqueelogo {
  opacity: 1;
  transform: translateY(-1px) scale(1.03);
}

/* Pause marquee on hover */
.about-main .about-logos-section .marquee-wrapper:hover .marquee {
  animation-play-state: paused;
}

/* Industry chips (Proposal 3 extra) */
.about-main .about-industry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: var(--about-s-24);
}

.about-main .about-industry-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--about-text-2);
  font-size: 0.9rem;
}

/* =========================================================
   TESTIMONIALS (Proposal 2)
   ========================================================= */

.about-main .about-testimonial {
  width: 100%;
  margin-top: var(--about-s-24);
}

.about-main .testimonials-card-grid {
  grid-gap: 24px;
}

.about-main .testimonial-card {
  background: var(--about-surface-1);
  border: 1px solid var(--about-border-1);
  border-radius: var(--about-r-16);
  box-shadow: none;
  padding: var(--about-s-24);
  align-items: flex-start;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.about-main .testimonial-card:hover {
  background: var(--about-surface-2);
  border-color: var(--about-border-2);
  transform: translateY(-2px);
}

.about-main .testimonial-quote-card {
  color: var(--about-text-1);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 18px;
}

.about-main .testionial-card-person {
  color: var(--about-text-1);
  margin: 0 0 2px;
}

.about-main .testimonial-position-card {
  color: var(--about-text-2);
  margin: 0;
  font-size: 0.95rem;
}

.about-main .testimonial-person-img-card {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--about-border-1);
}

/* =========================================================
   Reduced motion support (also disables pgia hidden states)
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .about-main * {
    scroll-behavior: auto !important;
  }

  .about-main .about-btn,
  .about-main .about-profile-card,
  .about-main .about-process-card,
  .about-main .testimonial-card,
  .about-main .about-logos-section .marqueelogo {
    transition: none !important;
  }

  .about-main .about-profile-card:hover,
  .about-main .about-process-card:hover,
  .about-main .testimonial-card:hover,
  .about-main .about-btn:hover {
    transform: none !important;
  }

  /* Stop marquee */
  .about-main .about-logos-section .marquee {
    animation: none !important;
  }

  /* Ensure PGIA elements are visible without motion */
  .about-main [data-pg-ia-hide],
  .about-main [data-pg-ia-hide="desktop"],
  .about-main [data-pg-ia-hide="mobile"],
  .about-main [data-pg-ia-hide=""] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}

/* =========================================================
   Requested tweaks (minimal):
   - More breathing room in Profile section
   - Center the logos marquee band
   ========================================================= */

/* Profile: increase vertical rhythm between header, card and how-we-work */
.about-main .about-profile-section .about-section-head {
  margin-bottom: var(--about-s-48); /* was 32px via shared rule */
}

.about-main .about-profile-section .about-process {
  margin-top: var(--about-s-48); /* was 32px */
}

/* Keep spacing a bit tighter on mobile */
@media (max-width: 768px) {
  .about-main .about-profile-section .about-section-head {
    margin-bottom: var(--about-s-32);
  }

  .about-main .about-profile-section .about-process {
    margin-top: var(--about-s-32);
  }
}

/* =========================================================
   Requested tweaks (minimal):
   - More breathing room in Profile section
   - Center the logos marquee band
   ========================================================= */

/* Profile: increase vertical rhythm between header, card and how-we-work */
.about-main .about-profile-section .about-section-head {
  margin-bottom: var(--about-s-48); /* was 32px via shared rule */
}

.about-main .about-profile-section .about-process {
  margin-top: var(--about-s-48); /* was 32px */
}

/* Keep spacing a bit tighter on mobile */
@media (max-width: 768px) {
  .about-main .about-profile-section .about-section-head {
    margin-bottom: var(--about-s-32);
  }

  .about-main .about-profile-section .about-process {
    margin-top: var(--about-s-32);
  }
}

/* Logos: the HTML includes "inline-block" on .marquee-wrapper.
   Force it to behave like a centered block so margin: 0 auto works. */
.about-main .about-logos-section .marquee-wrapper {
  display: block; /* overrides inline-block */
}

/* =========================================================
   About — Mobile responsiveness fixes (desktop-safe)
   Only affects smaller viewports / touch devices.
   ========================================================= */

@media (max-width: 992px) {
  /* Prevent any accidental horizontal scroll (marquee + gradients). */
  .services-main.about-main {
    width: 100%;
    overflow-x: visible;
  }

  /* Reduce vertical padding a bit (keeps rhythm, feels less "bloated" on mobile). */
  .about-main .about-section {
    padding: var(--about-s-48) 0;
  }

  /* PROFILE: collapse earlier (tablet) to avoid cramped 2-col layout. */
  .about-main .about-profile-card {
    grid-template-columns: 1fr;
    gap: var(--about-s-16);
    padding: var(--about-s-16);
    text-align: center; /* keeps the premium centered feel */
  }

  .about-main .nikhil-about-img {
    max-width: 240px;
    margin: 0 auto;
  }

  .about-main .about-profile-body {
    gap: 10px;
  }

  /* HOW WE WORK: keep spacing tighter */
  .about-main .about-process {
    margin-top: var(--about-s-32);
  }

  /* LOGOS: reduce internal padding so the band doesn't feel off-screen on mobile */
  .about-main .about-logos-section .marquee-wrapper {
    padding: var(--about-s-16) 0;
  }

  /* TESTIMONIALS: on mobile, your HTML currently has an empty mobile container.
     So we show the "desktop" grid as a single column, and hide the empty mobile block. */
  .about-main .testimonials-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: var(--about-s-16);
  }

  .about-main .tesimonial-card-grid-about {
    display: none;
  }
}

@media (max-width: 576px) {
  /* Tighter overall vertical rhythm */
  .about-main .about-section {
    padding: var(--about-s-32) 0;
  }

  .about-main .about-section-subtitle {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Buttons: stack and full width (better tap targets) */
  .about-main .about-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .about-main .about-actions .about-btn {
    width: 100%;
  }

  /* LOGOS: fades were too wide for small screens (they "eat" the logo area). */
  .about-main .about-logos-section .marquee-wrapper::before,
  .about-main .about-logos-section .marquee-wrapper::after {
    width: 56px;
  }

  .about-main .about-logos-section .marqueelogo {
    height: 28px;
  }

  /* Chips: slightly smaller so they wrap nicely */
  .about-main .about-industry-chip {
    padding: 9px 10px;
    font-size: 0.86rem;
  }

  /* Testimonials text: reduce a touch for legibility on small screens */
  .about-main .testimonial-quote-card {
    font-size: 1rem;
    line-height: 1.65;
  }
}

/* Touch devices: avoid hover "stuck" transforms (keeps mobile feel stable). */
@media (hover: none) {
  .about-main .about-profile-card:hover,
  .about-main .about-process-card:hover,
  .about-main .testimonial-card:hover,
  .about-main .about-btn:hover {
    transform: none;
  }
}

/* =========================================================
   About — Testimonials (Desktop-only polish)
   Goal: better hierarchy + cleaner person block layout
   Scope: About page only, does NOT affect mobile
   ========================================================= */

@media (min-width: 993px) {
  /* Slightly tighter, more "premium" rhythm on desktop */
  .about-main .about-testimonial .testimonials-card-grid {
    grid-gap: 28px;
  }

  /* Card layout: let content span full width (not "centered block") */
  .about-main .about-testimonial .testimonial-card {
    align-items: stretch; /* was flex-start; ensures footer divider spans */
    padding: 28px; /* slightly more premium spacing */
  }

  /* Quote: left align + subtle brand accent bar */
  .about-main .about-testimonial .testimonial-quote-card {
    text-align: left;
    margin: 0 0 20px;
    padding-left: 16px;
    position: relative;
  }

  .about-main .about-testimonial .testimonial-quote-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35em;
    bottom: 0.35em;
    width: 3px;
    border-radius: 999px;
    background: rgba(206, 3, 44, 0.75); /* brand red, subtle */
  }

  /* Person block: avatar + text in a clean row with divider */
  .about-main .about-testimonial .testimonial-centre-hold {
    width: 100%;
    display: grid; /* overrides global flex column ONLY on desktop */
    grid-template-columns: 64px 1fr;
    gap: 14px;
    align-items: center;
    justify-items: start;
    text-align: left;

    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* Avatar: slightly larger on desktop for better balance */
  .about-main .about-testimonial .testimonial-person-img-card {
    width: 64px;
    height: 64px;
    margin: 0; /* removes the "stacked" spacing feel */
  }

  /* Name/role: left aligned, cleaner density */
  .about-main .about-testimonial .testionial-card-person {
    text-align: left;
    margin: 0;
    line-height: 1.2;
  }

  /* Inline styles exist in HTML (font-size/color). Override ONLY on desktop. */
  .about-main .about-testimonial .testimonial-position-card {
    text-align: left;
    margin: 4px 0 0;
    font-size: 0.95rem !important;
    color: var(--about-text-2) !important;
    line-height: 1.35;
  }
}
