/* MeridCore™ V3.4 — brand lockup, fixed controls and product overview. */

/* The registered wordmark always keeps its official two-colour construction. */
.brand-name {
  display: inline-flex;
  align-items: flex-start;
  direction: ltr;
  unicode-bidi: isolate;
  color: #121c3a;
  font: inherit;
  line-height: 1;
  letter-spacing: -.035em;
}

.brand-merid {
  color: #121c3a;
}

.brand-core {
  color: #c94f00;
}

.brand-tm {
  margin-inline-start: .12em;
  color: #121c3a;
  font-size: .43em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  transform: translateY(-.2em);
}

.site-footer .footer-brand > .brand {
  width: fit-content;
  padding: 8px 12px 8px 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  background: #fffdf8;
}

.site-footer .footer-brand > .brand .brand-mark {
  filter: none;
}

/* Keep the assistant above the separate back-to-top control at every size. */
.assistant-launcher-v31 {
  inset-inline-end: max(18px, env(safe-area-inset-right)) !important;
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 64px) !important;
  z-index: 110 !important;
}

.assistant-dialog-v31,
.assistant-nudge-v31 {
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 126px) !important;
}

/* Keep the assistant prompts readable without a horizontal scrollbar. */
.assistant-suggestions-v31 {
  flex-wrap: wrap;
  overflow-x: hidden;
}

.assistant-suggestions-v31 button {
  flex: 1 1 145px;
  white-space: normal;
  line-height: 1.3;
}

/* Product overview. */
.products-overview-intro,
.products-overview-section,
.products-flow-section,
.products-scope-section {
  padding-block: clamp(64px, 8vw, 104px);
}

.products-overview-intro {
  background: #fffdf8;
}

.products-overview-intro .section-copy,
.products-overview-section .section-copy,
.products-flow-section .section-copy,
.products-scope-section .section-copy {
  max-width: 790px;
  margin-bottom: 38px;
}

.products-overview-intro h2,
.products-overview-section h2,
.products-flow-section h2,
.products-scope-section h2 {
  margin: 10px 0 18px;
  color: #092a46;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}

.products-overview-intro p,
.products-overview-section .section-copy p,
.products-flow-section .section-copy p,
.products-scope-section .section-copy p {
  max-width: 72ch;
  color: #526675;
  font-size: 1.08rem;
  line-height: 1.7;
}

.product-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.product-module-card {
  position: relative;
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 28px;
  overflow: hidden;
  border: 1px solid #d8ccbb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(9, 42, 70, .07);
  color: #092a46;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.product-module-card::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: #c94f00;
  content: "";
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .2s ease;
}

.product-module-card:hover,
.product-module-card:focus-visible {
  border-color: #c94f00;
  box-shadow: 0 22px 52px rgba(9, 42, 70, .13);
  outline: none;
  transform: translateY(-4px);
}

.product-module-card:hover::before,
.product-module-card:focus-visible::before {
  transform: scaleY(1);
}

.product-module-card .module-number {
  color: #c94f00;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .13em;
}

.product-module-card h3 {
  margin: 16px 0 10px;
  color: #092a46;
  font-size: 1.45rem;
  line-height: 1.16;
}

.product-module-card p {
  margin: 0;
  color: #526675;
  line-height: 1.62;
}

.product-module-card .module-relations {
  display: block;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e4dccf;
  color: #334b5c;
  font-size: .88rem;
  line-height: 1.5;
}

.product-module-card .module-relations strong {
  color: #092a46;
}

.product-module-card .module-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
  color: #c94f00;
  font-weight: 800;
}

.product-module-card .module-cta::after {
  content: "→";
  font-size: 1.35rem;
}

.product-module-card:last-child {
  grid-column: 2;
}

.products-flow-section {
  background: #092a46;
  color: #fff;
}

.products-flow-section h2,
.products-flow-section .section-copy p {
  color: #fff;
}

.product-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .2);
}

.product-flow-step {
  position: relative;
  min-height: 220px;
  padding: 27px;
  background: #0c3455;
}

.product-flow-step:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  inset-block-start: 50%;
  inset-inline-end: -13px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #c94f00;
  color: #fff;
  content: "→";
  font-weight: 800;
  transform: translateY(-50%);
}

[dir="rtl"] .product-flow-step:not(:last-child)::after {
  content: "←";
}

.product-flow-step > span {
  color: #f39a63;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.product-flow-step h3 {
  margin: 18px 0 10px;
  color: #fff;
  font-size: 1.3rem;
}

.product-flow-step p {
  margin: 0;
  color: #d5e0e7;
  line-height: 1.62;
}

.products-scope-section {
  background: #efe8da;
}

.products-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.products-scope-grid article {
  padding: 30px;
  border: 1px solid #d8ccbb;
  border-radius: 14px;
  background: #fffdf8;
}

.products-scope-grid h3 {
  margin: 0 0 12px;
  color: #092a46;
  font-size: 1.3rem;
}

.products-scope-grid p {
  margin: 0;
  color: #526675;
  line-height: 1.65;
}

/* Every page close is a distinct branded panel, not an extension of the footer. */
.page-final-cta {
  position: relative;
  overflow: hidden;
  border-top: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(83, 151, 196, .42), transparent 46%),
    linear-gradient(135deg, #174d73 0%, #103d60 52%, #0c3454 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .12);
}

.page-final-cta::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, .035) 50%, transparent 80%);
  content: "";
  pointer-events: none;
}

.page-final-cta > .site-shell {
  position: relative;
  z-index: 1;
}

.final-cta-brand {
  display: inline-flex;
  direction: ltr;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 9px 15px 9px 11px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
  unicode-bidi: isolate;
}

.final-cta-brand > img {
  width: 40px;
  height: auto;
}

.final-cta-brand .brand-name {
  font-size: 1.36rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .product-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-module-card:last-child {
    grid-column: auto;
  }

  .product-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-flow-step:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-footer .footer-brand > .brand {
    padding: 7px 10px 7px 8px;
  }

  .product-module-grid,
  .product-flow-grid,
  .products-scope-grid {
    grid-template-columns: 1fr;
  }

  .product-module-card {
    min-height: 0;
  }

  .product-flow-step {
    min-height: 0;
  }

  .product-flow-step:not(:last-child)::after {
    inset-block-start: auto;
    inset-block-end: -13px;
    inset-inline-end: 26px;
    content: "↓";
    transform: none;
  }

  [dir="rtl"] .product-flow-step:not(:last-child)::after {
    content: "↓";
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-module-card,
  .product-module-card::before {
    transition: none;
  }
}
