/* ============================================================
   Servme · Company page-specific styles
   Built on top of shared tokens (--servme-*, --font-*, hp-*)
   ============================================================ */

/* Center the single remaining CTA card (Work with Us) */
.cp-ctacards-inner { grid-template-columns: 1fr !important; max-width: 720px !important; }
.cp-ctacards .cp-ctacard { text-align: center !important; }
.cp-ctacards .cp-ctacard-h { text-align: center !important; }
.cp-ctacards .cp-ctacard-p { text-align: center !important; margin-left: auto !important; margin-right: auto !important; max-width: 56ch !important; }
.cp-ctacards .cp-ctacard-link { justify-content: center !important; display: inline-flex !important; margin-left: auto !important; margin-right: auto !important; }
@media (min-width: 768px) {
  .cp-ctacards-inner { max-width: 720px !important; }
}

/* Bottom CTA — solid background instead of gradient */
.cp-cta { background: #fafaf9 !important; }
.cp-cta::after, .cp-cta::before { background: none !important; display: none !important; }
.cp-cta .cp-cta-h, .cp-cta h2, .cp-cta .hp-h2 { color: var(--servme-primary) !important; }
.cp-cta .cp-cta-h em, .cp-cta h2 em, .cp-cta .hp-h2 em { color: var(--servme-accent-deep) !important; }
.cp-cta p, .cp-cta .cp-cta-sub { color: var(--fg-2) !important; }

/* Tighten gap between Story and Values (Team section removed) */
.cp-story { padding-bottom: 48px !important; }
.cp-values { padding-top: 48px !important; }
@media (max-width: 767px) {
  .cp-story { padding-bottom: 32px !important; }
  .cp-values { padding-top: 32px !important; }
}

/* Story h2 — 3 lines on mobile, 2 lines on desktop */
.cp-story .hp-h2 .sep { white-space: pre; }
@media (max-width: 1023px) {
  .cp-story .hp-h2 .sep1::before { content: "\A"; }
  .cp-story .hp-h2 .sep2::before { content: " "; white-space: normal; }
  .cp-story .hp-h2 .sep3::before { content: "\A"; }
}
@media (min-width: 1024px) {
  .cp-story .hp-h2 .sep1::before { content: " "; white-space: normal; }
  .cp-story .hp-h2 .sep2::before { content: "\A"; }
  .cp-story .hp-h2 .sep3::before { content: " "; white-space: normal; }
}

/* Values h2 — one line on desktop */
@media (min-width: 1024px) {
  .cp-values .hp-h2 br { display: none; }
  .cp-values .hp-h2 { white-space: nowrap; }
  .cp-values .hp-h2 em { margin-left: 0.2em; }
}

/* Customer section hover */
.cp-cust-section .hp-logo-more:hover { background: #396465 !important; }


/* ============================================================
   Company page-specific layout
   ============================================================ */

/* === HERO === */
.cp-hero { padding: 24px 0 64px; background: var(--servme-bg); position: relative; overflow: hidden; }
.cp-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 8% 12%, rgba(219,172,107,0.10), transparent 45%);
  pointer-events: none;
}
.cp-hero-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px;
  align-items: center; position: relative;
}
.cp-hero-copy { max-width: 580px; }
.cp-hero-copy .eyebrow { display: inline-block; margin-bottom: 20px; }
.cp-hero-copy .hp-h1 {
  margin: 0 0 28px;
  font-size: clamp(48px, 5.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.cp-hero-copy .hp-h1 em { color: var(--servme-accent-deep); font-style: italic; }
.cp-hero-copy .hp-lead {
  max-width: 600px !important; margin: 0;
  font-size: 19px; line-height: 1.55;
  color: var(--fg-1);
  white-space: normal !important;
  text-wrap: balance;
}

.cp-collage {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(12, 1fr);
  gap: 14px;
}
.cp-tile { overflow: hidden; border-radius: 16px; box-shadow: 0 10px 30px rgba(29,64,68,0.12); }
.cp-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.cp-tile:hover img { transform: scale(1.04); }
.cp-tile-1 { grid-column: 1 / 8;  grid-row: 1 / 8;  }
.cp-tile-2 { grid-column: 8 / 13; grid-row: 1 / 6;  }
.cp-tile-3 { grid-column: 1 / 6;  grid-row: 8 / 13; }
.cp-tile-4 { grid-column: 6 / 13; grid-row: 6 / 13; }

/* === STATS === */
.cp-stats { padding: 0 0 40px; background: var(--servme-bg); }
.cp-stats-inner { max-width: 980px; margin: 0 auto; padding: 0 32px; }
.cp-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--servme-bg-warm);
  border-radius: 18px;
  padding: 48px 24px;
  gap: 12px;
}
.cp-stat { padding: 8px 16px; text-align: center; }
.cp-stat-v {
  font-family: var(--font-display); font-weight: 500; font-style: italic;
  font-size: 64px; line-height: 1.05; color: #1d4044;
  letter-spacing: -0.01em;
}
.cp-stat-v .unit { font-size: 0.7em; vertical-align: baseline; margin-left: 2px; }
.cp-stat-gold { color: #1d4044 !important; }
.cp-stat-l {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-2); margin-top: 12px;
}

/* === Shared section head === */
.cp-section-head { margin-bottom: 56px; }
.cp-section-head .eyebrow { display: inline-block; margin-bottom: 16px; }
.cp-section-head .hp-h2 { margin: 0; max-width: 900px; }
.cp-section-head .hp-h2 em { color: var(--servme-accent-deep); font-style: italic; }

/* === STORY === */
.cp-story { padding: 60px 0 120px; background: var(--servme-bg); }
.cp-story-inner { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

.cp-story-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
}
.cp-story-q-av {
  width: 320px; aspect-ratio: 4 / 5;
  border-radius: 16px; overflow: hidden;
  border: 3px solid var(--servme-accent);
  box-shadow: 0 12px 32px rgba(29,64,68,0.12);
  position: sticky; top: 24px;
}
.cp-story-q-av img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.cp-story-right { display: flex; flex-direction: column; }
.cp-story-bq {
  font-family: var(--font-display);
  font-weight: 400; font-style: normal;
  font-size: 28px; line-height: 1.32;
  letter-spacing: -0.005em;
  color: var(--servme-primary);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.cp-story-bq em { font-style: italic; color: var(--servme-accent-deep); }
.cp-story-q-name { font-family: var(--font-sans); font-weight: 600; font-size: 16px; color: var(--servme-primary); }
.cp-story-q-role { font-family: var(--font-sans); font-size: 13px; color: var(--fg-3); margin-top: 2px; }

.cp-story-body {
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}
.cp-story-body p {
  font-family: var(--font-sans);
  font-size: 16px; line-height: 1.6;
  color: var(--fg-1);
  margin: 0;
  text-wrap: pretty;
}

/* === TEAM === */
.cp-team { padding: 96px 0; background: var(--servme-bg-warm); }
.cp-team-inner { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.cp-team-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px 18px; }
.cp-team-card {
  display: flex; flex-direction: column;
  background: #fafaf9; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.cp-team-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(29,64,68,0.10); }
.cp-team-img { aspect-ratio: 4 / 5; overflow: hidden; }
.cp-team-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.cp-team-card:hover .cp-team-img img { transform: scale(1.04); }
.cp-team-body { padding: 14px 16px; }
.cp-team-name {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 17px; line-height: 1.2; color: var(--servme-primary);
  letter-spacing: -0.005em;
}
.cp-team-role {
  font-family: var(--font-sans); font-size: 12px;
  color: var(--fg-2); margin-top: 4px;
}

/* === VALUES === */
.cp-values { padding: 120px 0; background: var(--servme-bg); }
.cp-values-inner { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.cp-values .cp-section-head { text-align: center; }
.cp-values .cp-section-head .hp-h2 { margin-left: auto; margin-right: auto; }
.cp-story .cp-section-head,
.cp-team .cp-section-head,
.cp-offices .cp-section-head { text-align: center; }
.cp-story .cp-section-head .hp-h2,
.cp-team .cp-section-head .hp-h2,
.cp-offices .cp-section-head .hp-h2 { margin-left: auto; margin-right: auto; }
.cp-values-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.cp-value {
  background: var(--servme-bg-warm);
  border-radius: 20px;
  padding: 40px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  transition: background .25s ease, color .25s ease, transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.cp-value:hover {
  background: #1d4044;
  color: #fafaf9;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(29,64,68,0.18);
}
.cp-value:hover .cp-value-n { color: #dbac6b; }
.cp-value:hover .cp-value-t { color: #dbac6b; }
.cp-value:hover .cp-value-b { color: #fafaf9; }
.cp-value-wide { grid-column: 1 / -1; max-width: calc(50% - 12px); justify-self: center; width: 100%; }
.cp-value-n {
  font-family: var(--font-display); font-weight: 500; font-style: italic;
  font-size: 38px; line-height: 1;
  letter-spacing: 0; color: var(--servme-accent-deep);
  transition: color .25s ease;
}
.cp-value-t {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 32px; line-height: 1.15; color: var(--servme-primary);
  margin: 0; letter-spacing: -0.005em;
  transition: color .25s ease;
}
.cp-value-b {
  font-family: var(--font-sans); font-size: 15px; line-height: 1.6;
  color: var(--fg-1); margin: 0;
  text-wrap: pretty;
  max-width: 56ch;
  transition: color .25s ease;
}

/* === CUSTOMERS === */
.cp-cust { padding: 96px 0; background: var(--servme-bg-warm); }
.cp-cust-inner { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.cp-cust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cp-cust-card {
  background: #fafaf9; border: 1px solid var(--border-soft);
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s;
}
.cp-cust-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(29,64,68,0.10); }
.cp-cust-img { aspect-ratio: 16 / 9; overflow: hidden; }
.cp-cust-img img { width: 100%; height: 100%; object-fit: cover; }
.cp-cust-head {
  padding: 18px 20px 8px;
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 22px; color: var(--servme-primary);
}
.cp-cust-logos { display: grid; grid-template-columns: 1fr 1fr; padding: 8px 16px 20px; gap: 8px; }
.cp-cust-chip {
  display: flex; align-items: center; justify-content: center;
  height: 64px; padding: 8px 10px;
  background: #fafaf9;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cp-cust-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(29,64,68,0.08); }
.cp-cust-chip img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(1) brightness(0.95);
  opacity: 0.85;
  transition: filter .3s ease, opacity .3s ease;
}
.cp-cust-chip:hover img { filter: grayscale(0); opacity: 1; }

/* === CTA CARDS === */
.cp-ctacards { padding: 80px 0; background: var(--servme-bg); }
.cp-ctacards-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.cp-ctacard {
  background: var(--servme-primary); color: #fafaf9;
  border-radius: 18px; padding: 48px 40px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative; overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.cp-ctacard::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(219,172,107,0.18), transparent 60%);
  pointer-events: none;
}
.cp-ctacard:hover { transform: translateY(-3px); }
.cp-ctacard-h {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 36px; line-height: 1.1; color: #fafaf9; margin: 0;
  letter-spacing: -0.01em;
  position: relative;
}
.cp-ctacard-p {
  font-family: var(--font-sans); font-size: 17px; line-height: 1.55;
  color: #c9d6d7; margin: 0; max-width: 38ch;
  position: relative;
}
.cp-ctacard-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  color: #dbac6b; text-decoration: none;
  margin-top: 8px; position: relative;
  transition: gap .25s ease, color .2s ease;
  background: none; border: none; cursor: pointer; padding: 0;
}
.cp-ctacard-link:hover { gap: 14px; color: #b6853f; }
.cp-ctacard-link i { width: 16px; height: 16px; }

/* === OFFICES === */
.cp-offices { padding: 96px 0; background: var(--servme-bg-warm); }
.cp-offices-inner { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.cp-offices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cp-office {
  background: #fafaf9; border: 1px solid var(--border-soft);
  border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
}
.cp-office-img {
  width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
}
.cp-office-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.cp-office:hover .cp-office-img img { transform: scale(1.04); }
.cp-office > h3,
.cp-office > .cp-office-addr,
.cp-office > .cp-office-emails,
.cp-office > .cp-office-hours { padding-left: 32px; padding-right: 32px; }
.cp-office > h3 { padding-top: 28px; padding-bottom: 4px; }
.cp-office > .cp-office-hours { padding-bottom: 28px; padding-top: 12px; }
.cp-office > .cp-office-emails { padding-bottom: 28px; }
.cp-office > .cp-office-addr { padding-bottom: 4px; }
.cp-office { gap: 14px; }
.cp-office-city {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 36px; line-height: 1.1; color: var(--servme-primary);
  margin: 0; letter-spacing: -0.01em;
}
.cp-office-addr {
  font-family: var(--font-sans); font-size: 15px; line-height: 1.55;
  color: var(--fg-1);
}
.cp-office-emails { display: flex; flex-direction: column; gap: 4px; }
.cp-office-emails a {
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  color: var(--servme-accent-deep); text-decoration: none;
}
.cp-office-emails a:hover { text-decoration: underline; }
.cp-office-hours {
  font-family: var(--font-sans); font-size: 13px;
  color: var(--fg-3);
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
  letter-spacing: 0.02em;
}

/* === Final CTA === */
.cp-cta { padding: 120px 0; background: #fafaf9; color: var(--servme-primary); text-align: center; position: relative; overflow: hidden; }
.cp-cta::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(219,172,107,0.18), transparent 60%);
  pointer-events: none;
}
.cp-cta-inner { max-width: 880px; margin: 0 auto; padding: 0 32px; position: relative; }
.cp-cta .hp-h2 { color: var(--servme-primary); margin: 0 0 20px; }
.cp-cta .hp-h2 em { color: var(--servme-accent-deep); font-style: italic; }
.cp-cta-p {
  font-family: var(--font-sans); font-size: 19px; line-height: 1.55;
  color: var(--fg-1); max-width: 580px; margin: 0 auto 36px;
}
.cp-cta-btns { display: flex; justify-content: center; }

/* === MOBILE (≤960px) === */
@media (max-width: 960px) {
  /* Hero */
  .cp-hero { padding: 32px 0 56px; }
  .cp-hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 0 20px; }
  .cp-hero-copy { text-align: center; margin: 0 auto; max-width: none; }
  .cp-hero-copy .eyebrow { display: block; text-align: center; }
  .cp-hero-copy .hp-h1 {
    font-size: 40px !important; line-height: 44px !important;
    text-align: center;
    text-wrap: balance;
  }
  .cp-hero-copy .hp-lead {
    font-size: 17px !important; line-height: 1.55 !important;
    text-align: center !important;
    max-width: 100% !important;
    margin-left: auto !important; margin-right: auto !important;
  }
  .cp-collage { gap: 10px; }

  /* Stats */
  .cp-stats { padding: 0 0 28px; }
  .cp-stats-inner { padding: 0 20px; }
  .cp-stats-grid { grid-template-columns: 1fr; padding: 32px 16px; gap: 16px; }
  .cp-stat { padding: 12px 8px; }
  .cp-stat-v { font-size: 52px; }
  .cp-stat-l { font-size: 11px; }

  /* Story */
  .cp-story { padding: 32px 0 64px; }
  .cp-story-inner { padding: 0 20px; }
  .cp-section-head { margin-bottom: 32px; }
  .cp-section-head .hp-h2 { font-size: 40px; line-height: 44px; letter-spacing: -0.01em; }
  .cp-line-nowrap { display: inline-block; white-space: nowrap; }
  .cp-story-body p { font-size: 17px; line-height: 1.6; }
  .cp-story-grid { grid-template-columns: 1fr; gap: 24px; }
  .cp-story-q-av { width: 100%; max-width: 280px; margin: 0 auto; position: static; }
  .cp-story-bq { font-size: 22px; line-height: 1.35; margin-bottom: 14px; }
  .cp-story-body { margin-top: 20px; padding-top: 20px; gap: 14px; }
  .cp-story-body p { font-size: 15px; line-height: 1.6; }

  /* Team */
  .cp-team { padding: 64px 0; }
  .cp-team-inner { padding: 0 20px; }
  .cp-team-grid { grid-template-columns: 1fr 1fr 1fr; gap: 14px 10px; }
  .cp-team-body { padding: 10px 12px; }
  .cp-team-name { font-size: 14px; }
  .cp-team-role { font-size: 11px; }

  /* Values */
  .cp-values { padding: 64px 0; }
  .cp-values-inner { padding: 0 20px; }
  .cp-values-grid { grid-template-columns: 1fr; gap: 14px; }
  .cp-value { padding: 28px 24px; border-radius: 16px; }
  .cp-value-wide { grid-column: auto; }
  .cp-value-n { font-size: 30px; }
  .cp-value-t { font-size: 26px; }
  .cp-value-b { font-size: 15px; }

  /* Customers */
  .cp-cust { padding: 64px 0; }
  .cp-cust-inner { padding: 0 20px; }
  .cp-cust-grid { grid-template-columns: 1fr; gap: 18px; }

  /* CTA Cards */
  .cp-ctacards { padding: 56px 0; }
  .cp-ctacards-inner { grid-template-columns: 1fr; gap: 16px; padding: 0 20px; }
  .cp-ctacard { padding: 32px 24px; }
  .cp-ctacard-h { font-size: 28px; }

  /* Offices */
  .cp-offices { padding: 64px 0; }
  .cp-offices-inner { padding: 0 20px; }
  .cp-offices-grid { grid-template-columns: 1fr; gap: 14px; }
  .cp-office > h3,
  .cp-office > .cp-office-addr,
  .cp-office > .cp-office-emails,
  .cp-office > .cp-office-hours { padding-left: 24px !important; padding-right: 24px !important; }
  .cp-office > h3 { padding-top: 24px !important; }
  .cp-office > .cp-office-hours { padding-bottom: 24px !important; }
  .cp-office-city { font-size: 28px; }

  /* Final CTA */
  .cp-cta { padding: 72px 0; }
  .cp-cta-inner { padding: 0 20px; }
  .cp-cta .hp-h2 { font-size: 40px; line-height: 44px; }
  .cp-cta-p { font-size: 16px; margin-bottom: 24px; }
  .cp-cta-btns .sm-btn { width: 100%; max-width: 320px; justify-content: center; }
}

/* === WORK WITH US MODAL === */
.cp-ww-modal-inner {
  background: #fafaf9;
  border-radius: 16px;
  max-width: 520px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 44px;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.25);
}
.cp-ww-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--fg-2);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.cp-ww-close:hover { background: var(--servme-bg-warm); color: var(--servme-primary); }
.cp-ww-head { margin-bottom: 28px; text-align: center; }
.cp-ww-head .eyebrow {
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--servme-accent-deep);
  margin-bottom: 12px;
  display: block;
}
.cp-ww-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 36px;
  line-height: 1.1;
  color: var(--servme-primary);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.cp-ww-sub {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
}

/* HubSpot form — styles are inline in the template for specificity */

@media (max-width: 600px) {
  .cp-ww-modal-inner {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding: 24px 20px;
  }
  .cp-ww-title { font-size: 28px; }
  .cp-ww-sub { font-size: 15px; }
}
