/* ==========================================================================
   PRICING — portal plans, styled after the "dose" pricing reference
   Deliberately NOT the site's ocean-blue theme: soft lavender/peach
   neutrals, white rounded cards, violet accents, and a pink→violet→orange
   gradient frame (with integrated top banner) on the recommended card.
   pricing.js toggles .is-annual / .has-toggled on the section, slides the
   toggle thumb, counts the amounts, syncs the carousel dots and adds .is-in.
   ========================================================================== */

/* white background so the section blends seamlessly with the white
   sections above and below it — the "dose" identity lives in the cards */
.mia-pricing {
  position: relative;
  padding: clamp(70px, 9vh, 110px) clamp(16px, 4vw, 56px);
  background: #ffffff;
  overflow: hidden;
}

.mia-pricing__inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 3.6vh, 38px);
}

/* ---------------- centered heading ---------------- */

.mia-pricing__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(12px, 1.8vh, 20px);
}

/* heading matches the site's other marine sections (see faq/learning) */
.mia-pricing__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(74, 144, 194, 0.3);
  background: rgba(125, 184, 232, 0.12);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2b5f8f;
}

.mia-pricing__title {
  margin: 0;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #16324f;
}

.mia-pricing__title em {
  font-style: normal;
  color: #4a97d8;
}

/* line — anchor — line rule under the heading */
.mia-pricing__title::after {
  content: '';
  display: block;
  width: 190px;
  height: 16px;
  margin: 20px auto 0;
  background-color: #4a97d8;
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='3'/%3E%3Cline x1='12' y1='22' x2='12' y2='8'/%3E%3Cpath d='M5 12H2a10 10 0 0 0 20 0h-3'/%3E%3C/svg%3E") center / 15px 15px no-repeat,
    linear-gradient(#000, #000) left center / 70px 1.5px no-repeat,
    linear-gradient(#000, #000) right center / 70px 1.5px no-repeat;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='3'/%3E%3Cline x1='12' y1='22' x2='12' y2='8'/%3E%3Cpath d='M5 12H2a10 10 0 0 0 20 0h-3'/%3E%3C/svg%3E") center / 15px 15px no-repeat,
    linear-gradient(#000, #000) left center / 70px 1.5px no-repeat,
    linear-gradient(#000, #000) right center / 70px 1.5px no-repeat;
}


.mia-pricing__para {
  margin: 0;
  max-width: 560px;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.65;
  color: #45607a;
}

/* heading reveal — items rise one after another (pricing.js adds .is-in) */
.mia-pricing__copy > *,
.mia-pricing__toggle,
.mia-pricing__card {
  transition:
    opacity 0.7s ease,
    transform 0.85s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.mia-pricing:not(.is-in) .mia-pricing__copy > *,
.mia-pricing:not(.is-in) .mia-pricing__toggle,
.mia-pricing:not(.is-in) .mia-pricing__card {
  opacity: 0;
  transform: translateY(30px);
}

.mia-pricing.is-in .mia-pricing__copy > :nth-child(2) { transition-delay: 0.08s; }
.mia-pricing.is-in .mia-pricing__copy > :nth-child(3) { transition-delay: 0.16s; }
.mia-pricing.is-in .mia-pricing__toggle { transition-delay: 0.24s; }
.mia-pricing.is-in .mia-pricing__card--main { transition-delay: 0.3s; }
.mia-pricing.is-in .mia-pricing__card--ent { transition-delay: 0.38s; }

/* ---------------- billing toggle ---------------- */

.mia-pricing__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid #e7e8ef;
  background: #ffffff;
  box-shadow: 0 14px 30px -20px rgba(80, 70, 120, 0.35);
}

/* sliding pill behind the active option — moved by pricing.js */
.mia-pricing__toggle-thumb {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #8b7cf3 0%, #6a5ae8 100%);
  box-shadow:
    0 10px 22px -8px rgba(106, 90, 232, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition:
    transform 0.55s cubic-bezier(0.3, 1.25, 0.4, 1),
    width 0.55s cubic-bezier(0.3, 1.25, 0.4, 1);
  will-change: transform, width;
}

.mia-pricing__toggle-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(13px, 1.1vw, 15px);
  color: #6b7280;
  transition: color 0.3s ease 0.1s;
}

.mia-pricing__toggle-btn:hover { color: #232838; }

.mia-pricing__toggle-btn.is-active { color: #ffffff; }
.mia-pricing__toggle-btn.is-active:hover { color: #ffffff; }

.mia-pricing__toggle-btn:focus-visible {
  outline: 3px solid rgba(106, 90, 232, 0.4);
  outline-offset: 2px;
}

.mia-pricing__toggle-save {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #1f9d5f;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.28);
}

.mia-pricing__toggle-btn.is-active .mia-pricing__toggle-save {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

/* monthly/annual swap — pricing.js toggles .is-annual on the section */
.mia-pricing .mia-pricing__only-annual { display: none; }
.mia-pricing.is-annual .mia-pricing__only-annual { display: inline-flex; }
.mia-pricing.is-annual .mia-pricing__only-monthly { display: none; }
.mia-pricing.is-annual p.mia-pricing__only-annual { display: flex; }

/* swapped-in elements rise softly into place; .has-toggled is added on
   the first toggle so nothing animates on initial page load */
@keyframes mia-pricing-swap {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.mia-pricing.has-toggled:not(.is-annual) .mia-pricing__only-monthly,
.mia-pricing.has-toggled.is-annual .mia-pricing__only-annual {
  animation: mia-pricing-swap 0.5s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

/* ---------------- cards ---------------- */

.mia-pricing__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
  width: 100%;
  max-width: 820px;           /* two cards — keep them from stretching too wide */
  margin-inline: auto;
}

.mia-pricing__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(13px, 1.7vh, 17px);
  padding: clamp(20px, 2.4vw, 28px);
  border-radius: 26px;
  border: 1px solid rgba(35, 40, 56, 0.06);
  background: #ffffff;
  box-shadow: 0 26px 54px -34px rgba(80, 70, 120, 0.35);
}

/* main card — pink→violet→orange frame; the thick top border doubles
   as the banner band the ribbon text sits in, like the reference */
.mia-pricing__card--main {
  border: 7px solid transparent;
  border-top-width: 34px;
  border-radius: 30px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, #f2a3c5 0%, #8d7bf3 50%, #f4b78d 100%) border-box;
  box-shadow: 0 32px 64px -34px rgba(141, 123, 243, 0.55);
}

.mia-pricing__ribbon {
  position: absolute;
  top: -34px;
  left: -7px;
  right: -7px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(10.5px, 0.85vw, 12px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  pointer-events: none;
}

/* tiny label row — "01 Starter ···" */
.mia-pricing__tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #8a90a3;
}

.mia-pricing__tag-num {
  font-size: 10px;
  color: #b0b4c4;
}

.mia-pricing__tag-dots {
  margin-left: auto;
  letter-spacing: 2px;
  font-size: 15px;
  line-height: 1;
  color: #c2c5d1;
}

.mia-pricing__head { margin-top: 2px; }

.mia-pricing__plan {
  margin: 0;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(25px, 2.2vw, 31px);
  letter-spacing: -0.02em;
  color: #232838;
}

.mia-pricing__plan em {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 500;
  margin-left: 2px;
}

.mia-pricing__plan-sub {
  margin: 5px 0 0;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(12.5px, 1.05vw, 14px);
  color: #6b7280;
}

/* ---------------- buy row: pill button + price ---------------- */

.mia-pricing__buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.mia-pricing__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
}

.mia-pricing__price > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.mia-pricing__amount {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(27px, 2.4vw, 33px);
  letter-spacing: -0.02em;
  color: #232838;
}

.mia-pricing__amount--custom { font-size: clamp(24px, 2.1vw, 29px); }

.mia-pricing__per {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(11.5px, 1vw, 13px);
  color: #8a90a3;
}

.mia-pricing__cancel {
  margin-top: 6px;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10.5px;
  letter-spacing: 0.01em;
  color: #a3a8b8;
  text-align: right;
}

/* ---------------- CTAs ---------------- */

.mia-pricing__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  font-weight: 500;
  font-size: clamp(12.5px, 1.05vw, 14px);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  color: #232838;
  background: #ffffff;
  border: 1px solid #dcdfe9;
  box-shadow: 0 10px 22px -14px rgba(80, 70, 120, 0.35);
  transition:
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease;
  will-change: transform;
}

.mia-pricing__cta:hover {
  transform: translateY(-2px);
  border-color: #c6cad9;
  box-shadow: 0 16px 30px -14px rgba(80, 70, 120, 0.45);
}

.mia-pricing__cta:active { transform: scale(0.97); }

.mia-pricing__cta:focus-visible {
  outline: 3px solid rgba(106, 90, 232, 0.4);
  outline-offset: 3px;
}

.mia-pricing__cta--primary {
  color: #ffffff;
  background: linear-gradient(180deg, #8b7cf3 0%, #6a5ae8 100%);
  border-color: transparent;
  box-shadow:
    0 14px 30px -10px rgba(106, 90, 232, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mia-pricing__cta--primary:hover {
  background: linear-gradient(180deg, #978af5 0%, #7666ec 100%);
  border-color: transparent;
  box-shadow:
    0 20px 40px -12px rgba(106, 90, 232, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* "or contact sales →" under the enterprise buy row */
.mia-pricing__contact {
  margin: 0;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12.5px;
  color: #8a90a3;
}

.mia-pricing__contact a {
  color: #6a5ae8;
  font-weight: 400;
  text-decoration: none;
}

.mia-pricing__contact a:hover { text-decoration: underline; }

.mia-pricing__contact a:focus-visible {
  outline: 3px solid rgba(106, 90, 232, 0.4);
  outline-offset: 2px;
  border-radius: 4px;
}

/* green savings pill — annual view only */
.mia-pricing__save {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 13px;
  border-radius: 12px;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(12px, 1vw, 13.5px);
  color: #1f9d5f;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.25);
}

/* ---------------- feature lists ---------------- */

.mia-pricing__features {
  margin-top: 2px;
  padding-top: clamp(14px, 1.8vh, 18px);
  border-top: 1px solid #eceef4;
}

.mia-pricing__features-title {
  margin: 0 0 12px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(10.5px, 0.9vw, 12px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9aa0b2;
}

.mia-pricing__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.mia-pricing__list li {
  position: relative;
  padding-left: 24px;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(12.5px, 1.05vw, 14px);
  line-height: 1.45;
  color: #5b6472;
}

/* slim neutral check, like the reference lists */
.mia-pricing__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f96ab' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ---------------- carousel dots (phones only) ---------------- */

.mia-pricing__dots {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mia-pricing__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4d6e0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.mia-pricing__dot.is-active {
  background: #6a5ae8;
  transform: scale(1.25);
}

/* ---------------- responsive ---------------- */

/* phones/tablets — cards become a swipeable left/right carousel */
@media (max-width: 900px) {
  .mia-pricing__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    /* bleed to the section edges so half of the next card peeks in */
    margin: 0 calc(-1 * clamp(16px, 4vw, 56px));
    width: auto;
    align-self: stretch;
    padding: 16px clamp(16px, 4vw, 56px) 22px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mia-pricing__grid::-webkit-scrollbar { display: none; }

  .mia-pricing__card {
    flex: 0 0 min(84%, 340px);
    scroll-snap-align: center;
  }

  .mia-pricing__dots { display: flex; }
}

@media (max-width: 520px) {
  .mia-pricing__toggle-btn { padding: 9px 14px; }

  .mia-pricing__buy {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .mia-pricing__price { align-items: flex-start; }
  .mia-pricing__cancel { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .mia-pricing__copy > *,
  .mia-pricing:not(.is-in) .mia-pricing__copy > *,
  .mia-pricing__toggle,
  .mia-pricing:not(.is-in) .mia-pricing__toggle,
  .mia-pricing__card,
  .mia-pricing:not(.is-in) .mia-pricing__card,
  .mia-pricing__cta {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .mia-pricing__toggle-thumb { transition: none; }

  .mia-pricing__only-monthly,
  .mia-pricing__only-annual {
    animation: none !important;
  }
}

/* ---------------- dark theme ----------------
   Still the reference's violet identity, just on deep aubergine neutrals
   (not the site's navy) so the section holds together in dark mode. */

/* blend with the neighbouring dark sections (same navy as stats/faq) */
[data-theme="dark"] .mia-pricing { background: #04101d; }

[data-theme="dark"] .mia-pricing__eyebrow {
  background: rgba(13, 32, 52, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
  color: #7db8e8;
}

[data-theme="dark"] .mia-pricing__title { color: #e6eef7; }
[data-theme="dark"] .mia-pricing__title em { color: #7db8e8; }
[data-theme="dark"] .mia-pricing__title::after { background-color: #6fb1de; }

[data-theme="dark"] .mia-pricing__para { color: #9db4c9; }

[data-theme="dark"] .mia-pricing__toggle {
  background: #201c2c;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 30px -20px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .mia-pricing__toggle-btn { color: #a49fbb; }
[data-theme="dark"] .mia-pricing__toggle-btn:hover { color: #efecf8; }
[data-theme="dark"] .mia-pricing__toggle-btn.is-active,
[data-theme="dark"] .mia-pricing__toggle-btn.is-active:hover { color: #ffffff; }

[data-theme="dark"] .mia-pricing__card {
  background: #1d1927;
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 26px 54px -34px rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .mia-pricing__card--main {
  border-color: transparent;
  background:
    linear-gradient(#211c2e, #211c2e) padding-box,
    linear-gradient(90deg, #d66c9e 0%, #7c6cec 50%, #e29860 100%) border-box;
  box-shadow: 0 32px 64px -34px rgba(124, 108, 236, 0.45);
}

[data-theme="dark"] .mia-pricing__tag { color: #8b85a3; }
[data-theme="dark"] .mia-pricing__tag-num { color: #675f82; }
[data-theme="dark"] .mia-pricing__tag-dots { color: #554e6e; }

[data-theme="dark"] .mia-pricing__plan { color: #efecf8; }
[data-theme="dark"] .mia-pricing__plan-sub { color: #a49fbb; }
[data-theme="dark"] .mia-pricing__amount { color: #efecf8; }
[data-theme="dark"] .mia-pricing__per { color: #8b85a3; }
[data-theme="dark"] .mia-pricing__cancel { color: #6f6889; }

[data-theme="dark"] .mia-pricing__cta {
  color: #efecf8;
  background: #262134;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .mia-pricing__cta:hover { border-color: rgba(255, 255, 255, 0.22); }

[data-theme="dark"] .mia-pricing__cta--primary {
  color: #ffffff;
  background: linear-gradient(180deg, #8b7cf3 0%, #6a5ae8 100%);
  border-color: transparent;
}

[data-theme="dark"] .mia-pricing__contact { color: #8b85a3; }
[data-theme="dark"] .mia-pricing__contact a { color: #a99df6; }

[data-theme="dark"] .mia-pricing__save {
  color: #4fce8d;
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.28);
}

[data-theme="dark"] .mia-pricing__features { border-top-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .mia-pricing__features-title { color: #8b85a3; }
[data-theme="dark"] .mia-pricing__list li { color: #b4aecb; }

[data-theme="dark"] .mia-pricing__dot { background: rgba(239, 236, 248, 0.2); }
[data-theme="dark"] .mia-pricing__dot.is-active { background: #a99df6; }
