/* Reference motion only. Layout, typography, and the Figma palette stay shared. */
/* Scroll reveal: initial hidden state and staggered transitions */
.motion-ready .motion-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .7s ease var(--motion-delay, 0ms),
    transform .8s cubic-bezier(.22, 1, .36, 1) var(--motion-delay, 0ms);
}

/* Scroll reveal: visible state after entering the viewport */
.motion-ready .motion-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Button and navigation hover transition timing */
.button {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.button:hover {
  filter: none;
}

.theme-toggle {
  transition: border-color .2s ease;
}

.desktop-nav a,
.login-link,
.footer-links a,
.footer-contact a {
  transition: color .2s ease;
}

/* Brand card lift and revenue-link arrow movement */
.brand-card {
  transition: translate .35s cubic-bezier(.22, 1, .36, 1);
}

.growth-bottom>a img {
  transition: transform .25s ease;
}

/* Pointer hover effects: reuse existing Figma color tokens */
@media (hover:hover) and (pointer:fine) {
  .button:hover {
    background-color: var(--ink);
    color: var(--white);
  }

  .button-outline:hover,
  .button-white:hover {
    background-color: var(--green);
    border-color: var(--green);
    color: #201f1e;
  }

  .theme-toggle:hover {
    border-color: var(--ink);
  }

  .desktop-nav a:hover,
  .login-link:hover,
  .footer-links a:hover,
  .footer-contact a:hover {
    color: var(--red);
  }

  .brand-card:hover {
    translate: 0 -4px;
  }

  .growth-bottom>a:hover img {
    transform: translateX(6px);
  }
}

/* Reduced motion: disable decorative entrance and hover movement */
@media (prefers-reduced-motion:reduce) {
  .motion-ready .motion-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .brand-card:hover,
  .growth-bottom>a:hover img {
    translate: none;
    transform: none;
  }
}

/* Hero bars grow in height, moving their percentage labels as in the reference. */
.motion-ready .growth-card:not(.is-in) .growth-bar {
  height: 0;
}

/* Growth card sequence (motion.js): labels fade in with their bar, the last bar
   stays grey while growing and turns green when the sequence ends */
.motion-ready .growth-tier>span {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s ease, transform .8s cubic-bezier(.22, 1, .36, 1)
}

.motion-ready .growth-tier.is-grown>span {
  opacity: 1;
  transform: none
}

/* fade to green only at the end (no transition on load, so no green flash) */
.motion-ready .growth-card.is-played .bar-38 {
  transition: background-color .5s ease
}

.motion-ready .growth-card.is-played .growth-tier:last-child>span {
  transition: opacity .4s ease, transform .5s cubic-bezier(.22, 1, .36, 1), color .5s ease
}

.motion-ready .growth-card:not(.is-played) .bar-38 {
  background: var(--dark-border)
}

.motion-ready .growth-card:not(.is-played) .growth-tier:last-child>span {
  color: inherit
}

/* Match the reference: establish the hidden hero state before the first paint. */
/* Hero copy: explicit eyebrow, heading, paragraph, and button delays */
[data-hero-reveal="0"] {
  --motion-delay: 0ms;
}

[data-hero-reveal="100"] {
  --motion-delay: 100ms;
}

[data-hero-reveal="200"] {
  --motion-delay: 200ms;
}

[data-hero-reveal="300"] {
  --motion-delay: 300ms;
}

.hero-motion-ready [data-hero-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease var(--motion-delay, 0ms),
    transform .8s cubic-bezier(.22, 1, .36, 1) var(--motion-delay, 0ms);
}

.hero-motion-ready [data-hero-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media(prefers-reduced-motion:reduce) {
  .hero-motion-ready [data-hero-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Partner benefits: reference 350ms highlight transition, using only Figma colors. */
.benefit {
  cursor: default;
  transition: background-color .35s ease, color .35s ease;
}

.benefit .lead {
  transition: color .35s ease;
}

.benefit-icon {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background-color: var(--red);
  -webkit-mask: var(--benefit-icon) center / contain no-repeat;
  mask: var(--benefit-icon) center / contain no-repeat;
  transition: background-color .35s ease;
}

.benefit-icon img {
  visibility: hidden;
}

.benefit.featured .benefit-icon {
  background-color: #201f1e;
}

.benefit:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}

@media(prefers-reduced-motion:reduce) {

  .benefit,
  .benefit .lead,
  .benefit-icon {
    transition: none;
  }
}

/* Benefit rows share reveal and hover transitions on the same element. */
.motion-ready .benefit.motion-reveal {
  transition: opacity .7s ease var(--motion-delay, 0ms),
    transform .8s cubic-bezier(.22, 1, .36, 1) var(--motion-delay, 0ms),
    background-color .35s ease, color .35s ease;
}

/* Footer contact button: the original SVG shape follows the text color in every state. */
.footer-mail-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUgNS41SDE5QzIwLjEwNDYgNS41IDIxIDYuMzk1NDMgMjEgNy41VjE2LjVDMjEgMTcuNjA0NiAyMC4xMDQ2IDE4LjUgMTkgMTguNUg1QzMuODk1NDMgMTguNSAzIDE3LjYwNDYgMyAxNi41VjcuNUMzIDYuMzk1NDMgMy44OTU0MyA1LjUgNSA1LjVaIiBzdHJva2Utd2lkdGg9IjEuNzUiIHN0cm9rZT0id2hpdGUiLz4KPHBhdGggZD0iTTMuNSA3TDEyIDEzTDIwLjUgNyIgc3Ryb2tlLXdpZHRoPSIxLjc1IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZT0id2hpdGUiLz4KPC9zdmc+Cg==") center / contain no-repeat;
  mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUgNS41SDE5QzIwLjEwNDYgNS41IDIxIDYuMzk1NDMgMjEgNy41VjE2LjVDMjEgMTcuNjA0NiAyMC4xMDQ2IDE4LjUgMTkgMTguNUg1QzMuODk1NDMgMTguNSAzIDE3LjYwNDYgMyAxNi41VjcuNUMzIDYuMzk1NDMgMy44OTU0MyA1LjUgNSA1LjVaIiBzdHJva2Utd2lkdGg9IjEuNzUiIHN0cm9rZT0id2hpdGUiLz4KPHBhdGggZD0iTTMuNSA3TDEyIDEzTDIwLjUgNyIgc3Ryb2tlLXdpZHRoPSIxLjc1IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZT0id2hpdGUiLz4KPC9zdmc+Cg==") center / contain no-repeat;
}

/* Footer primary CTA: hover becomes the same outline style as Talk to us. */
@media (hover:hover) and (pointer:fine) {
  .footer-buttons .button:not(.button-outline):hover {
    background-color: transparent;
    color: inherit;
    border-color: currentColor;
  }
}