/*
 * The storefront page shell (layouts/site): a frosted card on a soft champagne-to-blue haze,
 * the logo in a notch let into the top of the card, and the footer below. Mobile-first.
 */

.mx-site {
  --px: 0;
  --py: 0;
  --site-border: 10px;
  --site-radius: 28px;
  --gold-light: color-mix(in oklab, var(--mx-color-gold) 55%, var(--mx-color-surface));
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--mx-space-lg);
  min-height: 100svh;
  padding: var(--mx-space-lg) 12px var(--mx-space-xl);
  overflow: hidden;
  background:
    radial-gradient(55% 45% at 8% 6%, color-mix(in srgb, var(--mx-color-gold-tint) 90%, transparent), transparent 70%),
    radial-gradient(50% 45% at 95% 95%, color-mix(in srgb, var(--mx-color-info) 26%, transparent), transparent 70%),
    linear-gradient(160deg,
      color-mix(in oklab, var(--mx-color-cream-alt), var(--mx-color-info) 10%),
      color-mix(in oklab, var(--mx-color-cream), var(--mx-color-info) 30%));
}

/* The card */

.mx-site__card {
  position: relative;
  isolation: isolate;
  width: min(1180px, 100%);
  padding: 124px var(--mx-space-md) 56px;
  border: var(--site-border) solid var(--mx-color-surface);
  border-radius: var(--site-radius);
  background: color-mix(in srgb, var(--mx-color-surface) 70%, transparent);
  box-shadow:
    0 50px 90px -40px color-mix(in srgb, var(--mx-color-navy) 40%, transparent),
    0 18px 36px -24px color-mix(in srgb, var(--mx-color-navy) 25%, transparent);
  backdrop-filter: blur(24px) saturate(1.15);
}

/* The home page's card fills the first screen and centres its message. */
.mx-site__card--hero {
  display: grid;
  place-items: center;
  min-height: min(760px, calc(100svh - 104px));
  padding-bottom: 72px;
}

/* Soft colour pooled in two corners of the card. */
.mx-site__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: calc(var(--site-radius) - var(--site-border));
  background:
    radial-gradient(40% 45% at 0% 0%, color-mix(in srgb, var(--mx-color-gold-tint) 85%, transparent), transparent 70%),
    radial-gradient(45% 50% at 100% 100%, color-mix(in srgb, var(--mx-color-info) 14%, transparent), transparent 70%);
  pointer-events: none;
}

/* The notch: a tab let into the top of the card, with curved shoulders. */
.mx-site__notch {
  position: absolute;
  top: calc(var(--site-border) * -1);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 22px 12px;
  border-radius: 0 0 24px 24px;
  background: var(--mx-color-surface);
  color: var(--mx-color-navy);
  text-decoration: none;
  translate: -50% 0;
}

.mx-site__notch::before,
.mx-site__notch::after {
  content: "";
  position: absolute;
  top: var(--site-border);
  width: 24px;
  height: 24px;
}

.mx-site__notch::before {
  left: -24px;
  background: radial-gradient(circle 24px at 0 100%, transparent 98%, var(--mx-color-surface) 100%);
}

.mx-site__notch::after {
  right: -24px;
  background: radial-gradient(circle 24px at 100% 100%, transparent 98%, var(--mx-color-surface) 100%);
}

.mx-site__mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mx-site__emblem {
  width: 32px;
  height: auto;
}

.mx-site__brand {
  font-family: var(--mx-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The footer under the card (shared/_footer). */
.mx-site .mx-footer {
  width: min(1180px, 100%);
  margin-top: var(--mx-space-lg);
}

@media (min-width: 768px) {
  .mx-site {
    --site-radius: 40px;
    padding: 40px 32px;
  }

  .mx-site__card {
    padding: 144px 48px 72px;
  }

  .mx-site__card--hero {
    padding-bottom: 72px;
  }

  .mx-site__notch {
    gap: 6px;
    padding: 16px 36px 16px;
  }

  .mx-site__mark {
    gap: 10px;
  }

  .mx-site__notch .mx-identity {
    font-size: 0.6875rem;
  }

  .mx-site__emblem {
    width: 44px;
  }
}

/* Every page: the card settles in and the notch drops into place. */

@media (prefers-reduced-motion: no-preference) {
  .mx-site__card {
    animation: mx-site-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .mx-site__notch {
    animation: mx-site-drop 700ms cubic-bezier(0.22, 1, 0.36, 1) 250ms both;
  }
}

@keyframes mx-site-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes mx-site-drop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
}
