/* ==========================================================================
   Home page (index-new.html) — loaded before the shared etd.css.
   Section/card styles follow einvoicing.css so the light pages look alike.
   ========================================================================== */

body {
  font-family: 'Inter', sans-serif;
  color: #1a1229;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  text-wrap: balance;
}

.content-wrap { padding-top: 0; padding-bottom: 0; }
.section { margin-top: 0; margin-bottom: 0; }

/* ─ Section wrappers (same as einvoicing.css) ─ */
.cp-section { padding: 5rem 0; }
.cp-section-alt { background: #f7f9fc; }
.cp-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cnvs-themecolor);
  margin-bottom: 1rem;
}
.cp-headline {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.cp-lead {
  font-size: 1.1rem;
  color: var(--pulse-muted);
  line-height: 1.75;
  max-width: 62ch;
}

.btn-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--cnvs-themecolor);
  color: #fff;
  border-radius: 100px;
  padding: 0.85rem 1.8rem;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn-pulse:hover { color: #fff; opacity: 0.88; }
.btn-pulse:active { transform: scale(0.97); }
.btn-pulse-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 100px;
  padding: 0.8rem 1.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cnvs-themecolor);
  border: 1.5px solid rgba(var(--cnvs-themecolor-rgb), 0.35);
  text-decoration: none;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.btn-pulse-ghost:hover { background: rgba(var(--cnvs-themecolor-rgb), 0.06); border-color: var(--cnvs-themecolor); }

/* ─ Hero ─ */
/* Rebuilt from the old Revolution Slider slide: white background, title on
   the left, a large device mock-up that runs off the right edge, three
   drifting clouds and 3D mouse parallax (see the script in index-new.html). */
#home-hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 90px;
  background: #fff;
}
.hh-text-wrap { position: relative; z-index: 2; }
.hh-text { max-width: 580px; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
#home-hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.625rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #243b75;
  margin-bottom: 1.75rem;
  animation: hh-in-left 1s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#home-hero .hero-sub {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1.25;
  font-weight: 400;
  color: #2689ca;
  max-width: 520px;
  margin: 0;
  animation: hh-in-left 1s 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Stage: the whole device group, placed like the old slide (starts at ~37%
   of the width and bleeds past the right edge). */
.home-stage {
  position: absolute;
  left: 41%;
  top: 50%;
  width: 60%;
  max-width: 1200px;
  transform: translateY(-46%);
  perspective: 1400px;
  z-index: 1;
  pointer-events: none;
}
/* Smaller laptops: shift the group right so the iPhone clears the title. */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .home-stage { left: 45%; width: 56%; }
}
/* Positions below are percentages of a 1124x614 box (the layers' original
   pixel layout), so the composition scales as one piece. */
.home-devices {
  position: relative;
  width: 100%;
  aspect-ratio: 1124 / 614;
  container-type: inline-size;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hd-layer {
  position: absolute;
  inset: 0;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hd-layer > * { position: absolute; display: block; }
.home-devices img { max-width: none; height: auto; }
.hd-macbook       { left: 11.03%; top: 0;      width: 88.97%; }
.hd-video         { left: 26.6%;  top: 13.52%; width: 58.1%;  height: 66.45%; object-fit: cover; background: #0b1b33; }
.hd-ipad          { left: 5.6%;   top: 11.24%; width: 38.26%; }
.hd-ipad-screen   { left: 11.83%; top: 25.57%; width: 25.8%;  height: 60.91% !important; object-fit: cover; }
.hd-iphone        { left: 0;      top: 26.71%; width: 23.13%; }
.hd-iphone-screen { left: 4.09%;  top: 40.07%; width: 15.12%; height: 46.58% !important; object-fit: cover; }

/* Clouds: the old slide looped them left and right (600 / 400 / 200 px on
   the 1124px layout) over 30s. cqw = % of the device box width. */
.hd-cloud { opacity: 0.9; will-change: transform; }
.hd-cloud-1 { left: 1.16%;   top: -15.8%; width: 44.48%; animation: hd-loop-1 30s linear -15s infinite alternate; }
.hd-cloud-2 { left: -21%;    top: 68.08%; width: 53.38%; animation: hd-loop-2 30s linear -15s infinite alternate; }
.hd-cloud-3 { left: -22.24%; top: 17.75%; width: 53.38%; height: 45.28% !important; animation: hd-loop-3 30s linear -15s infinite alternate; }
@keyframes hd-loop-1 { from { transform: translateX(-53.4cqw); } to { transform: translateX(53.4cqw); } }
@keyframes hd-loop-2 { from { transform: translateX(-35.6cqw); } to { transform: translateX(35.6cqw); } }
@keyframes hd-loop-3 { from { transform: translateX(-17.8cqw); } to { transform: translateX(17.8cqw); } }

/* Entrance, in the old slide order: title, subtitle, MacBook, iPad, iPhone,
   then the screens zoom in and the clouds fade in. */
.hd-macbook       { animation: hd-in-right 1.4s 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hd-ipad          { animation: hd-in-right 1.4s 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hd-iphone        { animation: hd-in-right 1.4s 1.1s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hd-video         { animation: hd-zoom-in 1.2s 1.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hd-ipad-screen   { animation: hd-zoom-in 1.2s 1.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hd-iphone-screen { animation: hd-zoom-in 1.2s 2s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hd-clouds        { animation: hd-fade 1.5s 2s ease-out both; }
@keyframes hd-in-right { from { opacity: 0; transform: translateX(35%); } to { opacity: 1; transform: none; } }
@keyframes hd-zoom-in  { from { opacity: 0; transform: scale(1.5); } to { opacity: 1; transform: none; } }
@keyframes hd-fade     { from { opacity: 0; } to { opacity: 1; } }
@keyframes hh-in-left  { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: none; } }

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(36,59,117,0.35);
  border-radius: 14px;
  z-index: 3;
}
.hero-scroll::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #243b75;
  animation: hero-scroll 1.6s ease-in-out infinite;
}
@keyframes hero-scroll { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }

/* Tablet/mobile: devices sit under the text, like the old slide did. */
@media (max-width: 991.98px) {
  #home-hero { min-height: auto; flex-direction: column; align-items: stretch; padding: 7.5rem 0 3rem; }
  .hh-text { max-width: none; }
  .home-stage { position: relative; left: auto; top: auto; width: 100%; transform: none; margin-top: 3rem; }
  .hero-scroll { display: none; }
}

/* White instead of the template's default grey .section background */
#partners, #why-etd { background-color: #fff; }

/* ─ Partner logos ─ */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
}
.partner-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid #eef1f6;
  border-radius: 16px;
  padding: 1.5rem 1rem;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.partner-card img { width: 100%; max-width: 180px; height: auto; filter: grayscale(1); opacity: 0.75; transition: filter 220ms, opacity 220ms; }
.partner-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(var(--cnvs-themecolor-rgb), 0.12); }
.partner-card:hover img { filter: none; opacity: 1; }
@media (max-width: 767.98px) {
  .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-grid > :last-child { grid-column: 1 / -1; max-width: 50%; justify-self: center; width: 100%; }
}

/* ─ Our Solutions: the old flip-card design, ported from css/custom.css ─ */
.sol-section { background: #fff url('../../images/solutions-slider.png') no-repeat center center / 75%; }
.sol-text { font-size: 16px; line-height: 1.7; color: #6c757d; max-width: 1080px; margin: 0 auto 1rem; }

.flip-card {
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
}
.flip-card .front,
.flip-card .back {
  width: 100%;
  height: 350px;
  border-radius: 6px;
  color: #fff;
  background-size: cover;
  background-position: center;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip-card .front { position: relative; background-color: #E9E9E9; transform: rotateY(0deg); }
.flip-card .back  { position: absolute; top: 0; left: 0; background-color: #666; transform: rotateY(180deg); }
.flip-card:hover .front { transform: rotateY(-180deg); }
.flip-card:hover .back  { transform: rotateY(0deg); }
.flip-card .back::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 6px;
  background-color: #000;
  opacity: 0.5;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip-card .inner {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  padding: 2rem;
  transform: translateY(-50%) translateZ(60px) scale(0.94);
  perspective: inherit;
  outline: 1px solid transparent;
  z-index: 2;
}
.sol-icon { width: 80px; height: 80px; margin-bottom: 1.25rem; }
.sol-icon img { width: 80px; height: 80px; }
.sol-title {
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: #243b75;
  text-wrap: wrap;
  margin-bottom: 1.25rem;
}
.sol-desc { font-size: 13px; font-weight: 500; line-height: 1.55; color: #555; margin: 0; }
.flip-card .back h4 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; color: #fff; margin-bottom: 1.5rem; }
.sol-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Old "button-change" button: the label slides up on hover. */
.button-change {
  position: relative;
  display: inline-block;
  height: 40px;
  line-height: 40px;
  padding: 0 22px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--cnvs-themecolor);
  color: #fff;
  font-size: 14px;
  font-weight: 300;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 28px 32px -22px rgba(0,0,0,0.75);
}
.button-change:hover { color: #fff; }
.button-change span { display: block; text-align: center; opacity: 1; transform: translateY(0); transition: all 0.3s ease; }
.button-change span:last-child,
.button-change:hover span:first-child { opacity: 0; transform: translateY(-50%); }
.button-change:hover span:last-child { opacity: 1; transform: translateY(-100%); }

/* Capabilities strip under the cards: scrolling cards, pauses on hover */
.cap-strip { max-width: 1080px; margin: 3rem auto 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cap-track { display: flex; gap: 1rem; width: max-content; animation: cap-scroll 45s linear infinite; }
.cap-strip:hover .cap-track { animation-play-state: paused; }
.cap-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 130px;
  padding: 1rem 0.5rem;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid #eef1f6;
  font-size: 0.8rem;
  font-weight: 600;
  color: #243b75;
  text-align: center;
}
.cap-item img { width: 48px; height: 48px; object-fit: contain; }
@keyframes cap-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (min-width: 768px) and (max-width: 1199.98px) {
  .flip-card .front, .flip-card .back { height: 380px; }
  .sol-title { font-size: 1.6rem; }
}

/* ─ Why partner ─ */
.why-card {
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1.5px solid #eef1f6;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.why-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(var(--cnvs-themecolor-rgb), 0.12); }
.why-card img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; display: block; }
.why-card .why-body { padding: 1.75rem; }
.why-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--cnvs-themecolor); margin-bottom: 0.6rem; }
.why-card p { font-size: 0.95rem; color: var(--pulse-muted); line-height: 1.65; margin: 0; }

/* ─ Stats band ─ */
.stats-band {
  position: relative;
  padding: 5rem 0;
  background: #0f2344 url('../../images/parallax-bg.png') center / cover no-repeat;
  color: #fff;
}
.stats-band::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(27,66,121,0.92), rgba(61,164,220,0.78)); }
.stats-band .container { position: relative; }
.stat { text-align: center; padding: 1rem; }
.stat i { font-size: 2.2rem; color: rgba(255,255,255,0.85); }
.stat .counter { font-size: clamp(2.8rem, 5vw, 4rem); font-weight: 700; line-height: 1.1; margin: 0.6rem 0 0.4rem; color: #fff; }
.stat h4 { font-size: 1rem; font-weight: 500; color: rgba(255,255,255,0.85); margin: 0 auto; max-width: 26ch; }

/* ─ Wall posts ─ */
.post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1.5px solid #eef1f6;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(var(--cnvs-themecolor-rgb), 0.12); }
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.post-card .post-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin-bottom: 0.6rem; }
.post-card h3 a { color: var(--pulse-ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--cnvs-themecolor); }
.post-card p {
  font-size: 0.88rem;
  color: var(--pulse-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .post-more { margin-top: auto; font-size: 0.85rem; font-weight: 600; color: var(--cnvs-themecolor); text-decoration: none; }

/* ─ Call to action: new section, old heading/description style ─ */
.home-cta .co-section-heading-white {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #243b75;
  margin-bottom: 1rem;
}
.home-cta-desc { font-size: 1.15rem; font-weight: 300; line-height: 1.6; color: #555; margin: 0 auto 2rem; }

@media (max-width: 991.98px) {
  .cp-section { padding: 3.5rem 0; }
  .stats-band { padding: 3.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cap-track, .hd-cloud, .hd-layer > *, .hd-clouds, #home-hero h1, #home-hero .hero-sub, .hero-scroll::after { animation: none !important; }
}
