/* =========================================================================
   PULSE HOMEPAGE — page styles
   Builds on colors_and_type.css tokens. Desktop-only per scope.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Font tweak */
html[data-font="inter"] {
  --font-sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", Georgia, serif;
}

* { box-sizing: border-box; }

.wrap { max-width: 1600px; margin: 0 auto; padding: 0 40px; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink-50);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-out);
}
.nav.is-scrolled { border-bottom-color: var(--ink-150); }
.nav-inner {
  max-width: 1600px; margin: 0 auto; padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
/* Official Pulse lockup (heart + wordmark). Source asset is 320x132;
   render at a fixed height and let width scale to stay crisp on retina. */
.nav-logo img { height: 44px; width: auto; display: block; }
.footer .nav-logo img { height: 52px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-family: var(--font-sans); font-size: var(--text-base);
  font-weight: var(--weight-medium); color: var(--fg-2);
  text-decoration: none; transition: color var(--duration-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--fg-1); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: var(--weight-semibold);
  font-size: var(--text-sm); line-height: 1;
  padding: 14px 24px; border-radius: var(--radius-md);
  border: none; cursor: pointer; text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}
.btn-sm { padding: 10px 18px; }
.btn-primary { background: var(--coral-cta); color: #FFFFFF; box-shadow: var(--shadow-brand); }
a.btn-primary, a.btn-primary:visited { color: #FFFFFF; }
.btn-primary:hover { background: var(--coral-press); color: #FFFFFF; }
.btn-primary:active { background: var(--coral-deep); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--coral-press); border: 1px solid var(--coral-500); }
.btn-ghost:hover { background: var(--coral-50); color: var(--coral-deep); }
.btn-ghost-inverse { background: transparent; color: var(--ink-50); border: 1px solid var(--ink-500); }
.btn-ghost-inverse:hover { border-color: var(--ink-50); color: var(--ink-0); background: transparent; }

/* ---------------------------------------------------------------- hero */
.hero { display: none; }
html[data-hero="cream"] .hero--cream { display: block; }
html[data-hero="dark"]  .hero--dark  { display: block; }
html[data-hero="coral"] .hero--coral { display: block; }

.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  align-items: center; gap: 64px;
  padding-top: var(--space-20); padding-bottom: var(--space-24);
}
.hero h1 {
  font-size: var(--text-5xl); font-weight: var(--weight-black);
  line-height: 1.08; letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-6);
}
.hero .sub {
  font-size: var(--text-md); line-height: var(--leading-loose);
  margin: 0 0 var(--space-8); max-width: 54ch;
}
.hero .eyebrow { display: block; margin-bottom: var(--space-5); }
.hero-ctas { display: flex; align-items: center; gap: 14px; margin-bottom: var(--space-5); }
.hero .trust {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

/* cream variant (DS default) */
.hero--cream { background: var(--bg); }
.hero--cream h1 { color: var(--fg-1); }
.hero--cream .sub { color: var(--fg-2); }
.hero--cream .trust { color: var(--fg-3); }

/* dark variant */
.hero--dark { background: var(--ink-900); }
.hero--dark h1 { color: var(--ink-50); }
.hero--dark .sub { color: var(--ink-300); }
.hero--dark .trust { color: var(--ink-400); }

/* coral variant */
.hero--coral { background: var(--coral-500); }
.hero--coral .eyebrow { color: var(--coral-100); }
.hero--coral h1 { color: var(--ink-0); }
.hero--coral .sub { color: var(--coral-50); }
.hero--coral .trust { color: var(--coral-100); }
.hero--coral .btn-primary { background: var(--ink-900); color: var(--ink-50); box-shadow: none; }
.hero--coral .btn-primary:hover { background: var(--ink-800); }
.hero--coral .btn-ghost { color: var(--ink-0); border-color: var(--coral-200); }
.hero--coral .btn-ghost:hover { background: var(--coral-400); color: var(--ink-0); }

/* heartbeat accent under cream hero */
/* heartbeat accent under cream hero — full-width animated EKG */
.heartbeat-rule { max-width: 1600px; margin: 0 auto; padding: 0 40px var(--space-16); }
.hero--cream .hero-grid { padding-bottom: var(--space-16); }
.heartbeat-rule svg { display: block; width: 100%; height: 44px; }
.hb-base  { stroke: var(--coral-200); stroke-width: 2; }
.hb-sweep { stroke: var(--coral-500); stroke-width: 3; stroke-dasharray: 70 930; stroke-dashoffset: 70; }
@media (prefers-reduced-motion: no-preference) {
  .hb-sweep { animation: hb-sweep 3.6s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .hb-sweep { display: none; }
  .hb-base { stroke: var(--coral-400); }
}
@keyframes hb-sweep {
  from { stroke-dashoffset: 1070; }
  to   { stroke-dashoffset: 70; }
}

/* ---------------------------------------------------------------- cube */
.cube-scene {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  perspective: 1200px;
}
.cube {
  width: 230px; height: 230px; position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-26deg) rotateY(-38deg);
  margin-top: 64px;
}
@keyframes cube-spin {
  from { transform: rotateX(-26deg) rotateY(-38deg); }
  to   { transform: rotateX(-26deg) rotateY(-398deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .cube { animation: cube-spin var(--cube-duration, 27s) linear infinite; }
  html[data-cube-spin="off"] .cube { animation: none; }
}
/* cubelets — real 3x3x3 with slice turns (built by pulse-cube.js) */
.cubelet {
  position: absolute; left: 50%; top: 50%;
  width: 74px; height: 74px;
  margin: -37px 0 0 -37px;
  transform-style: preserve-3d;
}
.cf {
  position: absolute; inset: 0;
  background: var(--ink-900);
  border-radius: 10px;
}
.stk { position: absolute; inset: 4px; border-radius: 7px; }
.st-coral { background: var(--coral-500); }
.st-mid   { background: var(--coral-400); }
.st-light { background: var(--coral-300); }
.st-tint  { background: var(--coral-100); }
.st-white { background: var(--ink-0); }
.st-navy  { background: var(--navy-500); }
.cube-shadow {
  width: 250px; height: 36px; margin-top: 88px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(26,26,24,0.22) 0%, rgba(26,26,24,0) 70%);
}
.hero--dark .cube-shadow { background: radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 70%); }
.hero--coral .cube-shadow { background: radial-gradient(ellipse at center, rgba(160,44,36,0.45) 0%, rgba(160,44,36,0) 70%); }

/* ---------------------------------------------------------------- testimonials */
.testimonials { background: var(--ink-0); border-bottom: 1px solid var(--ink-150); padding: var(--space-20) 0; }
.testimonials .eyebrow { display: block; margin-bottom: var(--space-8); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.testimonial-card {
  margin: 0;
  border: 1px solid var(--ink-150); border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.tq-mark {
  font-family: var(--font-sans); font-weight: var(--weight-black);
  font-size: 52px; line-height: 0.55; color: var(--coral-300);
}
.testimonial-card blockquote {
  margin: 0; font-style: italic;
  font-size: var(--text-base); line-height: var(--leading-loose); color: var(--fg-2);
}
.testimonial-card figcaption { display: flex; flex-direction: column; gap: 2px; }
.t-name { font-weight: var(--weight-semibold); font-size: var(--text-sm); color: var(--fg-1); }
.t-org { font-size: var(--text-xs); color: var(--fg-3); }
.t-name a, .t-org a { color: inherit; text-decoration: underline; text-decoration-color: var(--coral-300); text-underline-offset: 3px; }
.t-name a:hover, .t-org a:hover { color: var(--coral-press); }
.t-metric {
  margin-top: auto; padding-top: var(--space-4);
  border-top: 1px solid var(--ink-150);
  font-family: var(--font-mono); font-size: var(--text-xs);
  font-weight: var(--weight-medium); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--coral-press);
}

/* ---------------------------------------------------------------- stat bar */
.stats { background: var(--ink-0); border-bottom: 1px solid var(--ink-150); }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
  padding-top: var(--space-16); padding-bottom: var(--space-16);
}
.stat .num {
  font-family: var(--font-sans); font-weight: var(--weight-black);
  font-size: var(--text-4xl); line-height: 1; letter-spacing: var(--tracking-tight);
  color: var(--coral-500); font-feature-settings: "tnum" 1;
  margin-bottom: var(--space-3);
}
.stat .label {
  font-size: var(--text-sm); line-height: var(--leading-normal);
  color: var(--fg-3); max-width: 24ch;
}

/* ---------------------------------------------------------------- sections */
.section { padding-top: var(--space-24); padding-bottom: var(--space-24); }
.section .eyebrow { display: block; margin-bottom: var(--space-4); }
.section h2 {
  font-size: var(--text-3xl); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-snug); margin: 0 0 var(--space-5);
}

/* problem */
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.problem-grid h2 { font-size: var(--text-3xl); line-height: var(--leading-snug); margin: 0; }
.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: var(--weight-semibold); font-size: var(--text-base);
  color: var(--coral-press); text-decoration: none;
}
.text-link:hover { color: var(--coral-deep); }
.text-link svg { transition: transform var(--duration-base) var(--ease-out); }
.text-link:hover svg { transform: translateX(3px); }

/* draft-copy marker */
.draft-tag {
  display: inline-block; vertical-align: middle;
  font-family: var(--font-mono); font-size: 10px; font-weight: var(--weight-medium);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--amber-500); background: var(--amber-50);
  padding: 2px 8px; border-radius: var(--radius-pill);
  margin-left: 8px;
}

/* service cards */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.service-card {
  background: var(--ink-0); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: var(--space-10);
  display: flex; flex-direction: column; gap: var(--space-5);
  transition: box-shadow var(--duration-base) var(--ease-out);
}
.service-card:hover { box-shadow: var(--shadow-md); }
.service-card h3 { font-size: var(--text-xl); margin: 0; }
.service-card .desc { margin: 0; color: var(--fg-2); }
.service-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.service-card li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: var(--text-sm); color: var(--fg-2); line-height: 1.5;
}
.service-card li svg { flex: none; margin-top: 1px; color: var(--coral-500); }
.service-card .text-link { margin-top: auto; }

/* case study band */
.case-band { background: var(--ink-900); }
.case-band-inner {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 72px;
  padding-top: var(--space-24); padding-bottom: var(--space-24);
}
.case-band .eyebrow { color: var(--coral-400); }
.case-band h2 { color: var(--ink-50); font-size: var(--text-3xl); line-height: var(--leading-snug); }
.case-band p { color: var(--ink-300); }
.case-band .text-link { color: var(--coral-400); }
.case-band .text-link:hover { color: var(--coral-300); }
.pull-quote {
  border-left: 2px solid var(--coral-500);
  padding-left: var(--space-6);
  align-self: center;
}
.pull-quote .q {
  font-family: var(--font-sans); font-size: var(--text-lg);
  font-weight: var(--weight-medium); line-height: 1.5;
  color: var(--ink-200); font-style: italic; margin: 0 0 var(--space-3);
}
.pull-quote .attr { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.06em; color: var(--ink-400); }

/* differentiators */
.diff-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px 48px; margin-top: var(--space-10);
}
.diff-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: var(--space-5) 0; border-top: 1px solid var(--ink-150);
}
.diff-row svg { flex: none; margin-top: 3px; color: var(--coral-500); }
.diff-row .no { font-weight: var(--weight-bold); color: var(--fg-1); }
.strike {
  color: var(--fg-4);
  text-decoration: line-through;
  text-decoration-color: var(--coral-500);
  text-decoration-thickness: 3px;
}
.diff-row p { margin: 0; font-size: var(--text-base); }

/* differentiators — "versus" variant */
html[data-diff="versus"] .diff-grid { display: none; }
html[data-diff="list"] .diff-versus { display: none; }
.diff-versus { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: var(--space-10); }
.vs-col { border-radius: var(--radius-lg); padding: var(--space-8); }
.vs-them { border: 1px solid var(--ink-150); }
.vs-us { background: var(--ink-0); box-shadow: var(--shadow-md); }
.vs-head {
  font-family: var(--font-mono); font-size: var(--text-xs);
  font-weight: var(--weight-medium); letter-spacing: var(--tracking-mono-label);
  text-transform: uppercase; margin-bottom: var(--space-4);
}
.vs-them .vs-head { color: var(--fg-4); }
.vs-us .vs-head { color: var(--coral-500); }
.vs-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: var(--space-4) 0; border-top: 1px solid var(--ink-150);
}
.vs-row p { margin: 0; font-size: var(--text-base); line-height: 1.5; }
.vs-row svg { flex: none; margin-top: 3px; }
.vs-them .vs-row { color: var(--fg-3); }
.vs-them .vs-row p { color: var(--fg-3); }
.vs-them .vs-row svg { color: var(--ink-300); }
.vs-us .vs-row p { color: var(--fg-1); }
.vs-us .vs-row svg { color: var(--coral-500); }

/* industries */
.industries { background: var(--bg-brand-soft); }
.section-sub { font-size: var(--text-md); color: var(--fg-2); margin: 0; max-width: 60ch; }
.industry-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: var(--space-10); }
.industry-tile {
  background: var(--ink-0); border: 1px solid var(--coral-200);
  border-radius: var(--radius-lg); padding: var(--space-6) var(--space-5);
  display: flex; flex-direction: column; gap: 12px;
}
.industry-tile svg { color: var(--coral-500); }
.industry-tile span { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--fg-1); line-height: 1.3; }

/* final CTA — faded checker, a nod to the cube */
.cta-band {
  text-align: center;
  background-color: var(--ink-50);
  background-image:
    radial-gradient(ellipse 75% 90% at 50% 50%, var(--ink-50) 28%, rgba(250, 250, 248, 0.88) 58%, rgba(250, 250, 248, 0) 100%),
    repeating-conic-gradient(rgba(252, 201, 191, 0.45) 0% 25%, rgba(250, 250, 248, 0) 0% 50%);
  background-size: auto, 72px 72px;
  border-top: 1px solid var(--ink-150);
}
.cta-band-inner { padding-top: var(--space-24); padding-bottom: var(--space-24); }
.cta-band h2 {
  color: var(--fg-1); font-size: var(--text-3xl);
  font-weight: var(--weight-black); letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-6);
}
.cta-sub {
  color: var(--fg-2); font-size: var(--text-md);
  line-height: var(--leading-loose);
  max-width: 64ch; margin: 0 auto var(--space-8);
}
.cta-band .trust { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.04em; color: var(--fg-3); margin-top: var(--space-5); }

/* footer */
.footer { background: var(--ink-900); border-top: 1px solid var(--ink-800); }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 64px; padding-top: var(--space-20); padding-bottom: var(--space-16);
}
.footer .tagline { color: var(--ink-400); font-size: var(--text-sm); margin-top: var(--space-4); max-width: 32ch; }
.footer .footer-col-title {
  font-family: var(--font-mono); font-size: var(--text-2xs);
  font-weight: var(--weight-medium); letter-spacing: var(--tracking-mono-label);
  text-transform: uppercase; color: var(--ink-500); margin: 0 0 var(--space-4);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-300); font-size: var(--text-sm); text-decoration: none; }
.footer-col a:hover { color: var(--ink-50); }
.footer-col .addr { color: var(--ink-300); font-size: var(--text-sm); line-height: 1.6; font-style: normal; }
.footer-icons { display: flex; gap: 14px; margin-top: var(--space-2); }
.footer-icons a { color: var(--ink-400); }
.footer-icons a:hover { color: var(--coral-400); }
.footer-base {
  border-top: 1px solid var(--ink-800);
  padding-top: var(--space-6); padding-bottom: var(--space-8);
  display: flex; justify-content: space-between;
  font-size: var(--text-xs); color: var(--ink-500);
}

/* ================================================================ mobile */
.nav-burger { display: none; background: none; border: none; color: var(--fg-1); cursor: pointer; padding: 8px; margin-left: auto; }

@media (max-width: 900px) {
  .nav-burger { display: block; }
  .nav-links { display: none; }
  .nav.nav-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink-50); padding: 8px 20px 20px;
    border-bottom: 1px solid var(--ink-150); box-shadow: var(--shadow-md);
  }
  .nav.nav-open .nav-links a { font-size: var(--text-md); padding: 10px 0; }
  .nav.nav-open .nav-links .btn { margin-top: 10px; padding: 14px 24px; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 20px; }
  .nav-inner { padding: 12px 20px; }

  /* heroes */
  .hero-grid { grid-template-columns: 1fr; gap: 16px; padding-top: var(--space-12); padding-bottom: var(--space-16); }
  .hero h1 { font-size: var(--text-3xl); }
  .hero .sub { font-size: var(--text-base); }
  .hero-ctas { flex-wrap: wrap; }
  .cube-scene { transform: scale(0.8); transform-origin: top center; margin-top: -12px; }
  .cube { margin-top: 40px; }
  .cube-shadow { margin-top: 64px; }
  .heartbeat-rule { padding: 0 20px var(--space-10); }

  /* sections */
  .section { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .section h2 { font-size: var(--text-2xl); }
  .testimonial-grid { grid-template-columns: 1fr; }
  .testimonials { padding: var(--space-16) 0; }
  .problem-grid { grid-template-columns: 1fr; gap: 24px; }
  .problem-grid h2 { font-size: var(--text-2xl); }
  .services-grid { grid-template-columns: 1fr; gap: 20px; }
  .service-card { padding: var(--space-6); }
  .case-band-inner { grid-template-columns: 1fr; gap: 40px; padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .case-band h2 { font-size: var(--text-2xl); }
  .diff-grid { grid-template-columns: 1fr; gap: 0; }
  .diff-versus { grid-template-columns: 1fr; gap: 20px; }
  .industry-tiles { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }

  /* CTA + footer */
  .cta-band h2 { font-size: var(--text-2xl); }
  .cta-band-inner { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .cta-band-inner > div { flex-wrap: wrap; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; padding-top: var(--space-16); padding-bottom: var(--space-12); }
  .footer-base { flex-direction: column; gap: 6px; }
}
