/* ==========================================================================
   KOMA BUSINESS · Email Business Insights
   A product page inside the ecosystem. Type scale follows the live
   insidekoma.com/products/email-business-insights build.
   ========================================================================== */

.page-ebi {
  --ebi-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ebi-rise: 12px;
  --ebi-duration: 1750ms;
  --ebi-teal: #021e1c;
  --ebi-red: #911414;
  --ebi-muted: var(--text-muted);
}

/* Hero: near-black with a quiet teal breath in the upper right
   ========================================================================== */

.ebi-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: max(820px, 100svh);
  padding: 140px 31px 120px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 70%, #070d0c 88%, var(--ebi-teal) 100%);
}

.ebi-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 58% at 100% 0%, rgba(0, 72, 52, 0.42) 0%, rgba(0, 60, 44, 0.12) 45%, rgba(0, 43, 36, 0) 72%),
    radial-gradient(30% 50% at 100% 45%, rgba(0, 43, 36, 0.28) 0%, rgba(0, 43, 36, 0) 70%);
}

.ebi-hero__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.ebi-hero__eyebrow {
  color: var(--green-eyebrow);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
}

.ebi-hero__envelope {
  display: block;
  width: 150px;
  margin: 58px auto 26px;
}

.ebi-hero__title {
  margin-bottom: 44px;
  color: var(--text);
  font-size: 76px;
  font-weight: 600;
  line-height: 1.3;
}

.ebi-hero__lead {
  color: var(--ebi-muted);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.8;
}

/* Load-in: three slow, lightly staggered groups
   (eyebrow + envelope, headline, lead) */
@keyframes ebi-rise {
  from {
    opacity: 0;
    transform: translate3d(0, var(--ebi-rise), 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .ebi-in {
    animation: ebi-rise var(--ebi-duration) var(--ebi-ease) var(--d, 0ms) both;
  }
}

/* Be Ahead of Everyone: a deeper teal surface, no card
   ========================================================================== */

.ebi-ahead {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 720px;
  padding: 220px 31px;
  text-align: center;
  background: linear-gradient(
    180deg,
    var(--ebi-teal) 0%,
    #041614 22%,
    #070d0c 48%,
    #051412 76%,
    var(--ebi-teal) 100%
  );
}

.ebi-ahead__title {
  margin-bottom: 18px;
  color: var(--text);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.2;
}

.ebi-ahead__text {
  color: var(--ebi-muted);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.8;
}

/* Where it lives
   ========================================================================== */

.ebi-member {
  padding: 230px 31px 250px;
  background: linear-gradient(180deg, var(--ebi-teal) 0%, #04130f 7%, #080d0c 17%, var(--bg) 30%, var(--bg) 100%);
  text-align: center;
}

.ebi-member__head {
  margin-bottom: 110px;
}

.ebi-member__eyebrow {
  margin-bottom: 20px;
  color: var(--green-eyebrow);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
}

.ebi-member__title {
  margin-bottom: 26px;
  color: var(--text);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.2;
}

.ebi-member__text {
  color: var(--text);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
}

.ebi-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 350px));
  justify-content: center;
  gap: 30px;
  max-width: 730px;
  margin: 0 auto 64px;
  text-align: left;
}

.ebi-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 25px 24px 30px;
  background: var(--bg-card);
  border: 1px solid var(--line-card);
  border-radius: var(--radius-card);
}

/* Localised light (desktop hover only); position is set by the pointer */
.ebi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    300px circle at var(--mx, 50%) var(--my, 30%),
    var(--ebi-card-light),
    transparent 70%
  );
  transition: opacity 600ms var(--ebi-ease);
}

.ebi-card--operator {
  --ebi-card-light: rgba(10, 168, 89, 0.05);
  border-color: #24302a;
}

.ebi-card--inner {
  --ebi-card-light: rgba(145, 20, 20, 0.07);
  border-color: #2e2323;
}

.ebi-card__label {
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ebi-card--inner .ebi-card__label {
  color: var(--ebi-red);
}

.ebi-card__title {
  margin: 14px 0 12px;
  color: var(--text);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.3;
}

.ebi-card__body {
  color: var(--text);
  font-size: 15px;
  font-weight: 200;
  line-height: 1.8;
}

/* Final
   ========================================================================== */

.ebi-final {
  padding: 280px 31px 340px;
  background: var(--bg);
  text-align: center;
}

.ebi-final__eyebrow {
  margin-bottom: 20px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
}

.ebi-final__title {
  margin-bottom: 30px;
  color: var(--text);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.2;
}

.ebi-final__text {
  margin-bottom: 72px;
  color: var(--text);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.8;
}

.ebi-final__btn {
  padding: 12px 30px;
}

/* Section reveals: groups rise once, slowly
   ========================================================================== */

.js .ebi-reveal,
.js .ebi-card {
  opacity: 0;
  transform: translate3d(0, var(--ebi-rise), 0);
  transition:
    opacity var(--ebi-duration) var(--ebi-ease),
    transform var(--ebi-duration) var(--ebi-ease);
  transition-delay: var(--d, 0ms);
}

.js .ebi-card {
  transition-delay: calc(120ms + var(--i, 0) * 180ms);
}

.js .ebi-reveal.is-in,
.js .ebi-card.is-in {
  opacity: 1;
  transform: none;
}

/* Once settled, cards hand their transitions to the hover styles */
.js .ebi-card.is-settled {
  transition:
    border-color 600ms var(--ebi-ease),
    transform 600ms var(--ebi-ease);
  transition-delay: 0ms;
}

/* Hover (desktop pointers only)
   ========================================================================== */

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ebi-card--operator:hover {
    border-color: #2f4036;
  }

  .ebi-card--inner:hover {
    border-color: #3d2a2a;
  }

  .ebi-card:hover::before {
    opacity: 1;
  }

  .ebi-card.is-settled:hover {
    transform: translate3d(0, -1px, 0);
  }
}

/* Tablet / small laptop
   ========================================================================== */

@media (max-width: 1100px) {
  .ebi-hero__title {
    font-size: clamp(52px, 6.4vw, 76px);
  }

  .ebi-hero__lead,
  .ebi-ahead__text {
    font-size: 19px;
  }

  .ebi-ahead__title,
  .ebi-member__title,
  .ebi-final__title {
    font-size: clamp(42px, 4.6vw, 48px);
  }
}

@media (max-width: 900px) {
  .ebi-hero {
    min-height: max(760px, 100svh);
  }

  .ebi-hero__lead,
  .ebi-ahead__text {
    font-size: 17px;
  }

  .ebi-cards {
    gap: 20px;
  }
}

/* Mobile: large editorial type, long calm rhythm
   ========================================================================== */

@media (max-width: 767px) {
  .ebi-hero {
    min-height: max(720px, 100svh);
    padding: 150px 20px 110px;
  }

  .ebi-hero::before {
    background: radial-gradient(70% 38% at 100% 0%, rgba(0, 72, 52, 0.34) 0%, rgba(0, 43, 36, 0) 72%);
  }

  .ebi-hero__eyebrow {
    font-size: 15px;
  }

  /* The live mobile hero carries no envelope */
  .ebi-hero__envelope {
    display: none;
  }

  .ebi-hero__title {
    margin: 36px 0 26px;
    font-size: min(44px, 11.4vw);
  }

  .ebi-hero__lead {
    max-width: 290px;
    margin: 0 auto;
    font-size: 16px;
  }

  .ebi-hero__lead-strong {
    color: var(--text-bright);
  }

  .ebi-ahead {
    min-height: 0;
    padding: 260px 34px 300px;
  }

  .ebi-ahead__title {
    margin-bottom: 30px;
    font-size: min(41px, 10.5vw);
    line-height: 1.3;
  }

  .ebi-ahead__text {
    max-width: 290px;
    margin: 0 auto;
    font-size: 16px;
  }

  .ebi-member {
    padding: 220px 16px 200px;
  }

  .ebi-member__head {
    margin-bottom: 80px;
  }

  .ebi-member__eyebrow {
    font-size: 14px;
  }

  .ebi-member__title {
    margin-bottom: 24px;
    font-size: min(43px, 11vw);
    line-height: 1.3;
  }

  .ebi-member__text {
    font-size: 14px;
  }

  .ebi-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    margin-bottom: 60px;
  }

  .ebi-card {
    padding: 24px 17px 30px;
  }

  .ebi-card__label {
    font-size: 14px;
  }

  .ebi-card__title {
    margin: 10px 0 14px;
    font-size: min(41px, 10.5vw);
  }

  .ebi-card__body {
    font-size: 14px;
  }

  .ebi-final {
    padding: 260px 16px 300px;
  }

  .ebi-final__eyebrow {
    font-size: 15px;
  }

  .ebi-final__title {
    margin-bottom: 24px;
    font-size: min(39px, 10vw);
    line-height: 1.3;
  }

  .ebi-final__text {
    max-width: 290px;
    margin: 0 auto 56px;
    font-size: 17px;
  }

  /* Full-width CTA inside the 16px gutter; label stays on one line */
  .ebi-final__btn {
    width: 100%;
    max-width: 420px;
    padding: 12px 24px;
    white-space: nowrap;
  }
}

/* Reduced motion: everything present, nothing moves
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .js .ebi-in {
    animation: none;
  }

  .js .ebi-reveal,
  .js .ebi-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
