/*
 * Big Marlin Group canonical stylesheet entrypoint.
 * Import this file once; it loads the complete section library and its
 * canonical foundation rules.
 */
@import url("./sections.css");
@import url("./responsive.css");
@import url("./variants.css");

/* Exact guide typography: H1 84/84, H2 64/72, H3 48/54, H4 36/44,
   H5 20/24, large body 22/29, body and links 16/22. */
.bmg-type-h1,
.bmg-type-h2,
.bmg-type-h3,
.bmg-type-h4,
.bmg-type-h5 {
  margin: 0;
  font-weight: var(--bmg-weight-semibold);
  letter-spacing: 0;
  text-wrap: balance;
}

.bmg-type-h1 {
  font-size: var(--bmg-text-h1);
  line-height: 1;
}

.bmg-type-h2 {
  font-size: var(--bmg-text-h2);
  line-height: 1.125;
}

.bmg-type-h3 {
  font-size: var(--bmg-text-h3);
  line-height: var(--bmg-leading-h3);
}

.bmg-type-h4 {
  font-size: var(--bmg-text-h4);
  line-height: var(--bmg-leading-h4);
}

.bmg-type-h5 {
  font-size: var(--bmg-text-h5);
  line-height: var(--bmg-leading-h5);
  text-transform: uppercase;
}

.bmg-copy--large {
  font-size: var(--bmg-text-body-large);
  line-height: var(--bmg-leading-body-large);
}

.bmg-gradient-field {
  background: var(--bmg-gradient-accent);
}

.bmg-gradient-video {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bmg-gradient-accent);
}

.bmg-gradient-video > video {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bmg-gradient-video__content {
  position: relative;
  z-index: 1;
}

.bmg-radial-accent {
  background-image: var(--bmg-gradient-radial);
  background-position: var(--bmg-radial-position, center);
  background-repeat: no-repeat;
  background-size: var(--bmg-radial-size, min(42rem, 70vw));
}

/* Reference grid: 12 columns, 36px desktop gutters. */
.bmg-grid {
  display: grid;
  gap: var(--bmg-grid-gutter);
  grid-template-columns: repeat(var(--bmg-grid-columns), minmax(0, 1fr));
}

.bmg-col-3 { grid-column: span 3; }
.bmg-col-4 { grid-column: span 4; }
.bmg-col-6 { grid-column: span 6; }
.bmg-col-8 { grid-column: span 8; }
.bmg-col-9 { grid-column: span 9; }
.bmg-col-12 { grid-column: 1 / -1; }

/* Guide-defined button motion, with contrast-safe functional teal. */
.bmg-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(var(--bmg-color-action), var(--bmg-color-action)) padding-box,
    var(--bmg-gradient-accent) border-box;
  transition:
    background-position var(--bmg-duration-base) var(--bmg-ease),
    border-color var(--bmg-duration-base) var(--bmg-ease),
    color var(--bmg-duration-base) var(--bmg-ease);
}

.bmg-button::before {
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: inherit;
  background: var(--bmg-gradient-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--bmg-duration-base) var(--bmg-ease);
}

.bmg-button:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--bmg-color-action), var(--bmg-color-action)) padding-box,
    var(--bmg-gradient-accent) border-box;
  color: var(--bmg-ink);
}

.bmg-button:hover::before {
  transform: scaleX(1);
}

.bmg-button--outline {
  border-color: transparent;
  background:
    linear-gradient(var(--bmg-white), var(--bmg-white)) padding-box,
    linear-gradient(var(--bmg-teal-accessible), var(--bmg-teal-accessible)) border-box;
  color: var(--bmg-color-action);
}

.bmg-button--outline:hover {
  background:
    linear-gradient(var(--bmg-white), var(--bmg-white)) padding-box,
    var(--bmg-gradient-accent) border-box;
}

.bmg-button--on-dark,
.bmg-wave .bmg-button {
  border-color: transparent;
  background:
    linear-gradient(var(--bmg-white), var(--bmg-white)) padding-box,
    linear-gradient(var(--bmg-white), var(--bmg-white)) border-box;
  color: var(--bmg-color-action);
}

.bmg-button--on-dark:hover,
.bmg-wave .bmg-button:hover {
  background: var(--bmg-white);
  color: var(--bmg-ink);
}

.bmg-button--on-dark::before,
.bmg-wave .bmg-button::before {
  background: var(--bmg-gradient-accent);
}

.bmg-button__arrow,
.bmg-button > [aria-hidden="true"] {
  display: inline-block;
  transition: transform var(--bmg-duration-base) var(--bmg-ease);
}

.bmg-button:hover .bmg-button__arrow,
.bmg-button:hover > [aria-hidden="true"] {
  transform: translateX(3px);
}

.bmg-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: var(--bmg-space-2);
  color: var(--bmg-color-action);
  font-size: 1rem;
  font-weight: var(--bmg-weight-regular);
  line-height: 1.375;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-transform: uppercase;
}

.bmg-link:hover {
  color: var(--bmg-teal-deep);
}

.bmg-link__arrow {
  transition: transform var(--bmg-duration-base) var(--bmg-ease);
}

.bmg-link:hover .bmg-link__arrow {
  transform: translateX(3px);
}

.bmg-link--on-dark {
  color: var(--bmg-white);
}

.bmg-link--on-dark:hover {
  color: var(--bmg-rose);
}

.bmg-arrow {
  border-color: transparent;
  background:
    linear-gradient(var(--bmg-color-action), var(--bmg-color-action)) padding-box,
    linear-gradient(var(--bmg-color-action), var(--bmg-color-action)) border-box;
  transform: none;
  transition:
    background var(--bmg-duration-base) var(--bmg-ease),
    color var(--bmg-duration-base) var(--bmg-ease);
}

.bmg-arrow:hover {
  background: var(--bmg-gradient-accent);
  color: var(--bmg-ink);
  transform: none;
}

.bmg-wave .bmg-arrow {
  background: var(--bmg-white);
  color: var(--bmg-color-action);
}

.bmg-wave .bmg-arrow:hover {
  background: var(--bmg-gradient-accent);
  color: var(--bmg-ink);
}

/* Glass is reserved for multicolor fields and expanded navigation surfaces. */
.bmg-glass {
  border: 1px solid rgb(255 255 255 / 28%);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 18%), rgb(255 255 255 / 7%));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 22%),
    0 1rem 2.5rem rgb(0 54 61 / 14%);
  backdrop-filter: blur(var(--bmg-glass-frost)) saturate(1.12);
}

/* Full-width, glass-backed mega menus from the navigation guide. */
.bmg-nav__group--mega {
  position: static;
}

.bmg-nav__group summary::after {
  content: "›";
  transform: rotate(90deg);
  transition: transform var(--bmg-duration-fast) var(--bmg-ease);
}

.bmg-nav__group[open] summary::after {
  content: "›";
  transform: rotate(-90deg);
}

.bmg-nav__mega {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--bmg-space-3));
  right: 0;
  left: 0;
  display: grid;
  max-height: min(42rem, calc(100vh - 7rem));
  overflow: auto;
  gap: var(--bmg-space-7);
  padding: var(--bmg-space-6);
  border-radius: var(--bmg-radius-card);
  background:
    linear-gradient(112deg, rgb(0 102 113 / 96%), rgb(0 122 134 / 94%));
  color: var(--bmg-white);
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.36fr);
}

.bmg-nav__group:not([open]) > .bmg-nav__mega {
  display: none;
}

.bmg-nav__mega-main {
  display: grid;
  min-width: 0;
  gap: var(--bmg-space-6);
  grid-template-columns: repeat(var(--bmg-mega-columns, 3), minmax(0, 1fr));
}

.bmg-nav__mega-column h2,
.bmg-nav__mega-column h3,
.bmg-nav__mega-feature h2,
.bmg-nav__mega-feature h3 {
  margin: 0 0 var(--bmg-space-3);
  color: inherit;
}

.bmg-nav__mega-column h2,
.bmg-nav__mega-feature h2 {
  font-size: var(--bmg-text-h4);
  line-height: var(--bmg-leading-h4);
}

.bmg-nav__mega-column h3,
.bmg-nav__mega-feature h3 {
  font-size: 0.875rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.bmg-nav__mega-column ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bmg-nav__mega-column a {
  width: fit-content;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0;
  color: var(--bmg-white);
  font-size: 0.875rem;
  text-transform: none;
}

.bmg-nav__mega-column a:hover {
  color: var(--bmg-rose);
}

.bmg-nav__mega-feature {
  align-self: stretch;
  padding: var(--bmg-space-5);
  border-left: 1px solid rgb(255 255 255 / 34%);
}

.bmg-nav__mega-feature p {
  margin: 0 0 var(--bmg-space-5);
}

.bmg-nav__mega-feature .bmg-button {
  width: fit-content;
  color: var(--bmg-color-action);
  font-size: 0.875rem;
}

.bmg-nav__mega-feature .bmg-button:hover {
  color: var(--bmg-ink);
}

/* Guide motion: subtle wave-like entrances; never hide content without JS. */
.bmg-motion-ready [data-bmg-reveal] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity var(--bmg-duration-reveal) var(--bmg-ease),
    transform var(--bmg-duration-reveal) var(--bmg-ease);
}

.bmg-motion-ready [data-bmg-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 59.99rem) {
  .bmg-col-3,
  .bmg-col-4,
  .bmg-col-6,
  .bmg-col-8,
  .bmg-col-9 {
    grid-column: span 6;
  }

  .bmg-nav__group--mega {
    position: relative;
  }

  .bmg-nav__mega {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: var(--bmg-space-2);
    grid-template-columns: 1fr;
  }

  .bmg-nav__mega-feature {
    border-top: 1px solid rgb(255 255 255 / 34%);
    border-left: 0;
  }
}

@media (max-width: 47.99rem) {
  .bmg-grid {
    grid-template-columns: 1fr;
  }

  .bmg-col-3,
  .bmg-col-4,
  .bmg-col-6,
  .bmg-col-8,
  .bmg-col-9,
  .bmg-col-12 {
    grid-column: 1;
  }

  .bmg-nav__mega,
  .bmg-nav__mega-main {
    grid-template-columns: 1fr;
  }
}

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

@media print {
  .bmg-motion-ready [data-bmg-reveal] {
    opacity: 1;
    transform: none;
  }
}
