/**
 * IntegralDataServices.com - Site-Specific Styles
 * The base theme is provided by vendor/integralthemes/theme/theme.css
 * Override CSS variables here: :root { --primary: #custom-color; }
 */

/* Grey for de-emphasized "before" rules; glyphs themselves are always --primary (imperial purple) */
:root {
  --manual-grey: #a6a3ad;
}

/* ============================================
   TYPOGRAPHY + SECTION RHYTHM
   ============================================ */

/* h3s on this site are prose sub-headings, not decorative — keep dark */
h3 {
  color: var(--text-primary);
}

.section {
  padding: var(--spacing-3xl) 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--spacing-2xl) 0;
  }
}

.section.section-compact {
  padding: var(--spacing-xl) 0;
}

.section-lede {
  max-width: 720px;
  margin: 0 auto var(--spacing-lg);
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* ============================================
   HERO (copy on top, full-width pipeline art)
   ============================================ */

.hero-stack {
  /* theme .hero is display:flex; as a flex item .container would grow to the art's 900px min-width */
  display: block;
  min-height: auto;
  padding: calc(var(--spacing-3xl) + 40px) 0 var(--spacing-xl);
}

.hero-stack .container {
  min-width: 0;
}

.hero-stack .hero-copy {
  max-width: 820px;
  margin: 0 auto var(--spacing-xl);
  text-align: center;
}

.hero-stack .hero-subtitle {
  max-width: 40em;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .hero-stack {
    padding-top: calc(var(--spacing-2xl) + 40px);
  }
}

/* Pans horizontally on narrow screens; main.js centers it on the monitor */
.hero-art-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--spacing-sm));
  padding: 0 var(--spacing-sm);
}

.hero-art-scroll::-webkit-scrollbar {
  display: none;
}

.hero-art {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-art svg {
  width: 100%;
  min-width: 900px;
  height: auto;
  display: block;
}

/* Hero art: SVG parts */
.hero-art .src-label {
  font: 600 12px/1 var(--font-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--text-tertiary);
}

.hero-art .chip rect {
  fill: #fff;
  stroke: var(--primary-light);
  stroke-width: 1.5;
}

.hero-art .chip text {
  font: 500 14px/1 var(--font-primary);
  fill: var(--primary-dark);
  text-anchor: middle;
}

.hero-art .pipes path {
  fill: none;
  stroke: var(--bg-secondary);
  stroke-width: 7;
  stroke-linecap: round;
}

.hero-art .pipes .trunk {
  stroke-width: 10;
}

.hero-art .flow path {
  fill: none;
  stroke: var(--accent-teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 3 15;
  animation: flow 1.2s linear infinite;
}

.hero-art .junction circle {
  fill: var(--primary);
}

.hero-art .junction path {
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-art .bezel {
  fill: #2b2b2e;
}

.hero-art .screen {
  fill: #fff;
}

.hero-art .stand-neck {
  fill: #3a3a3e;
}

.hero-art .stand-base {
  fill: #2b2b2e;
}

.hero-art .kpi-tile rect {
  fill: var(--bg-tertiary);
}

.hero-art .kpi {
  font: 700 14px/1 var(--font-primary);
  fill: var(--primary);
}

.hero-art .kpi-label {
  font: 500 8px/1 var(--font-primary);
  fill: var(--text-tertiary);
}

.hero-art .panel-title {
  font: 600 9px/1 var(--font-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--text-tertiary);
}

.hero-art .panel {
  fill: #fff;
  stroke: var(--border-light);
  stroke-width: 1.5;
}

.hero-art .grid line {
  stroke: var(--bg-secondary);
  stroke-width: 1;
}

.hero-art .bars rect {
  fill: var(--primary);
  transform-box: fill-box;
  transform-origin: bottom;
  animation: grow 7s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.hero-art .bars rect:nth-child(2n) {
  fill: var(--accent-blue);
}

.hero-art .bars rect.hi {
  fill: var(--accent-magenta);
}

.hero-art .map {
  color: var(--primary-light);
  fill: currentColor;
  opacity: 0.8;
}

.hero-art .markers circle {
  fill: var(--primary);
  opacity: 0.85;
}

.hero-art .markers .pulse {
  fill: var(--accent-magenta);
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.6s ease-out infinite;
  animation-delay: var(--d, 0s);
}

.hero-art .after-captions text {
  font: 600 12px/1 var(--font-primary);
  fill: var(--text-secondary);
  text-anchor: middle;
}

.hero-art .after-captions circle {
  fill: var(--accent-teal);
}

@keyframes flow {
  to { stroke-dashoffset: -18; }
}

@keyframes grow {
  0% { transform: scaleY(0); }
  16% { transform: scaleY(1); }
  86% { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  60% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art .flow path,
  .hero-art .bars rect,
  .hero-art .markers .pulse {
    animation: none;
  }
}

/* ============================================
   PLUM "WE GET IT" SECTION: BEFORE / AFTER CARDS
   ============================================ */

.photo-background-section {
  /* Swap in a background image when one is ready: */
  /* background-image: url('/assets/your-background.png'); */
  background-color: var(--primary-dark);
  background-size: cover;
  background-position: top right;
  background-repeat: no-repeat;
  padding: var(--spacing-2xl) 0;
}

.photo-background-section .content {
  max-width: 820px;
}

.photo-background-section h2,
.photo-background-section .content p {
  color: white;
  text-align: left;
  max-width: none;
}

.photo-background-section h2 {
  margin-bottom: var(--spacing-sm);
}

.plum-question {
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: var(--spacing-md);
}

.ba-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

/* White cards on the plum block */
.ba-col {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}

.ba-col h3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

.ba-col-after h3 {
  color: var(--primary);
}

.ba-col-icon {
  width: 80px;
  height: 80px;
  flex: none;
  color: var(--primary);
  fill: currentColor;
}

.ba-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ba-col li {
  padding: 0.4rem 0 0.4rem 1rem;
  border-left: 3px solid var(--manual-grey);
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.5;
}

.ba-col-after li {
  border-left-color: var(--accent-teal);
  color: var(--text-primary);
}

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

/* ============================================
   BEFORE → AFTER, BY THE NUMBERS (grey strip)
   Columns use the same grid as .ba-columns so
   "before" sits under the Before card, "after" under After.
   ============================================ */

.ba-rows ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ba-rows-head,
.ba-rows li {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  gap: var(--spacing-md);
  align-items: center;
}

.ba-rows-head {
  margin-bottom: var(--spacing-sm);
}

.ba-head {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--manual-grey);
}

.ba-head svg {
  width: 72px;
  height: 72px;
  color: var(--primary);
  fill: currentColor;
}

.ba-head-after {
  color: var(--primary);
}

.ba-rows li {
  padding: var(--spacing-sm) 0;
  border-top: 1px solid var(--border-medium);
  font-size: 0.98rem;
  line-height: 1.45;
}

.ba-from {
  color: var(--text-tertiary);
}

.ba-from strong {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.ba-to {
  color: var(--text-secondary);
  text-align: right;
}

.ba-to strong {
  color: var(--primary);
  font-size: 1.25rem;
}

.ba-arrow {
  justify-self: center;
  width: 44px;
  height: 2px;
  background: var(--accent-teal);
  position: relative;
}

.ba-arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -5px;
  border: 6px solid transparent;
  border-left-color: var(--accent-teal);
}

@media (max-width: 760px) {
  .ba-rows-head,
  .ba-rows li {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .ba-rows-head span:nth-child(2) {
    display: none;
  }

  .ba-rows-head {
    grid-template-columns: 1fr 1fr;
  }

  .ba-to {
    text-align: left;
  }

  /* vertical arrow between the stacked before/after lines */
  .ba-arrow {
    justify-self: start;
    width: 2px;
    height: 22px;
    margin: 0.35rem 0 0.35rem 0.6rem;
  }

  .ba-arrow::after {
    right: auto;
    left: -5px;
    top: auto;
    bottom: -3px;
    border: 6px solid transparent;
    border-top-color: var(--accent-teal);
  }
}

/* ============================================
   CARD LAYOUT FIXES (shared with sibling sites)
   ============================================ */

.process-card h3,
.process-card .card-title {
  text-align: center;
}

.process-card .card-description,
.service-content p,
.about-content p {
  max-width: none;
}

/* Six service cards: 3 × 2 on desktop */
#services .process-cards {
  grid-template-columns: repeat(3, 1fr);
}

#services .service-content {
  max-width: 1100px;
}

@media (max-width: 960px) {
  #services .process-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  #services .process-cards {
    grid-template-columns: 1fr;
  }
}

.why-cards {
  grid-template-columns: repeat(3, 1fr);
}

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

.why-cards .service-card h3 {
  color: var(--primary);
}

/* Related-service cards are links */
.related-cards a.service-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.related-cards a.service-card:hover {
  border-color: var(--primary-light);
}

.related-cards .external-link {
  margin-top: var(--spacing-xs);
}

/* ============================================
   TEAM TEASER (home)
   ============================================ */

.team-teaser {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--spacing-lg);
  align-items: center;
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.team-teaser img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.team-teaser-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-magenta);
  margin-bottom: 0.25rem;
}

.team-teaser h3 {
  margin-bottom: var(--spacing-xs);
}

.team-teaser p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
}

@media (max-width: 560px) {
  .team-teaser {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .team-teaser img {
    margin: 0 auto;
  }
}

/* ============================================
   SELECTED WORK
   ============================================ */

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.case-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
}

.case-client {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-magenta);
  margin-bottom: var(--spacing-xs);
}

.case-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
}

.case-card dl {
  margin: 0;
}

.case-card dt {
  font-weight: 600;
  color: var(--primary);
  margin-top: var(--spacing-sm);
}

.case-card dd {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
}

.case-head {
  margin-bottom: var(--spacing-sm);
}

.case-label {
  display: inline-block;
  min-width: 3.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.case-client {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-magenta);
  margin-bottom: 0.3rem;
}

.case-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
}

.case-card dt {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  margin-top: var(--spacing-lg);
}

.case-card dt:first-of-type {
  margin-top: var(--spacing-md);
}

/* Icon row above each label: 3x the inline size so the glyphs read */
.dt-icon {
  width: 66px;
  height: 66px;
  color: var(--primary);
  fill: currentColor;
  flex: none;
}

/* Poster/video slot added by the video session; keeps the card's top rounded */
.case-card .case-media {
  margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-md);
  border-radius: calc(var(--radius-md) - 2px) calc(var(--radius-md) - 2px) 0 0;
  overflow: hidden;
  background: var(--bg-secondary);
}

.case-card .case-media img,
.case-card .case-media video {
  display: block;
  width: 100%;
  height: auto;
}

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

.testimonial {
  max-width: 800px;
  margin: var(--spacing-xl) auto 0;
  padding: var(--spacing-lg);
  border-left: 4px solid var(--accent-magenta);
  background: var(--bg-tertiary);
  font-size: 1.125rem;
}

.testimonial footer {
  margin-top: var(--spacing-sm);
  font-size: 0.95rem;
  color: var(--text-tertiary);
}

/* ============================================
   AUDIENCE STRIP
   ============================================ */

.audience-strip {
  list-style: none;
  margin: var(--spacing-lg) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-md);
}

.audience-strip li {
  border-top: 3px solid var(--primary);
  padding-top: var(--spacing-sm);
}

.audience-strip strong {
  display: block;
  margin-bottom: 0.25rem;
}

.audience-strip span {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

@media (max-width: 1024px) {
  .audience-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

/* ============================================
   TOOLS
   ============================================ */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.tool-group {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.tool-group h3 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: var(--spacing-xs);
}

.tool-group p {
  margin: 0;
  color: var(--text-secondary);
}

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

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

/* FAQ questions are h3 here (h4 in the theme template) — match theme color */
.faq-question {
  font-size: 1.125rem;
  color: var(--primary);
}

/* ============================================
   TEAM PAGE
   ============================================ */

.team-hero {
  padding: calc(var(--spacing-3xl) + 40px) 0 var(--spacing-2xl);
  background: var(--bg-tertiary);
}

.team-hero-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.team-portrait {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.team-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-magenta);
  margin-bottom: var(--spacing-xs);
}

.team-hero h1 {
  text-align: left;
  margin-bottom: var(--spacing-xs);
}

.team-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--spacing-md);
}

.team-hero .hero-subtitle {
  text-align: left;
  margin-left: 0;
  max-width: 36em;
}

.team-hero .hero-buttons {
  justify-content: flex-start;
}

@media (max-width: 800px) {
  .team-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .team-portrait {
    margin: 0 auto;
    width: 200px;
    height: 200px;
  }

  .team-hero h1,
  .team-hero .hero-subtitle {
    text-align: center;
  }

  .team-hero .hero-subtitle {
    margin: 0 auto var(--spacing-lg);
  }

  .team-hero .hero-buttons {
    justify-content: center;
  }
}

.narrative {
  max-width: 760px;
}

.narrative section + section {
  margin-top: var(--spacing-2xl);
}

.narrative h2 {
  text-align: left;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--spacing-md);
}

.narrative p {
  max-width: none;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.narrative .pull {
  border-left: 4px solid var(--accent-teal);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.belief-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.belief-list li {
  padding: var(--spacing-sm) 0 var(--spacing-sm) var(--spacing-md);
  border-left: 3px solid var(--primary);
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.belief-list strong {
  color: var(--text-primary);
}
