/* Moons Media Group client portal: home page and error page.
   Mirrors the hero of moonsmediagroup.com: Off-white field, Navy type in
   Instrument Sans, and the aurora drawn from the logo's three strokes. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/_portal/mmg/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
}

:root {
  --navy: #04093f;
  --off-white: #f8f8f9;
  --cyan: #3fc0ef;
  --purple: #9e4c9d;
  --coral: #ee513b;

  --page: var(--off-white);
  --ink: var(--navy);
  --ink-soft: #3d4166;
  --button: var(--navy);
  --button-ink: var(--off-white);
  --button-hover: #1a1f5c;
  --aurora-strength: 1;
  --focus: var(--cyan);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: var(--navy);
    --ink: var(--off-white);
    --ink-soft: #c3c6dc;
    --button: var(--off-white);
    --button-ink: var(--navy);
    --button-hover: #ffffff;
    --aurora-strength: 0.85;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, 0.929rem + 0.149vw, 1.0625rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* The shell fills the screen and keeps the aurora from adding scroll space. */
.shell {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;
}

.frame {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 0.5rem + 3.5vw, 3.5rem);
}

/* Header */
.masthead {
  position: relative;
  z-index: 2;
  padding-block: clamp(1.5rem, 1rem + 1.6vw, 2.5rem) 0;
}

.masthead img {
  display: block;
  width: clamp(150px, 120px + 6vw, 196px);
  height: auto;
}

/* Hero */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 2rem + 6vh, 6rem) clamp(4rem, 3rem + 8vh, 8rem);
  isolation: isolate;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(3rem, 1.6rem + 5.6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lead {
  margin: clamp(1.25rem, 1rem + 1vw, 1.75rem) 0 0;
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 0.982rem + 0.298vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  align-items: center;
  margin-top: clamp(2rem, 1.6rem + 1.2vw, 2.5rem);
  padding: 0.9rem 1.5rem;
  border-radius: 3px;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.button:hover {
  background: var(--button-hover);
}

.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Footer: the legal line of moonsmediagroup.com */
.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.25rem clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Aurora: the logo's cyan, purple and coral strokes, blurred into light,
   as in the hero of moonsmediagroup.com. */
.aurora {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: clamp(-18rem, -10rem - 8vw, -6rem);
  width: clamp(26rem, 18rem + 34vw, 54rem);
  aspect-ratio: 1;
  translate: 0 -50%;
  pointer-events: none;
  opacity: var(--aurora-strength);
}

.aurora::before {
  content: "";
  position: absolute;
  inset: 4%;
  background:
    radial-gradient(closest-side circle at 30% 38%, var(--cyan), transparent),
    radial-gradient(closest-side circle at 52% 50%, var(--purple), transparent),
    radial-gradient(closest-side circle at 72% 60%, var(--coral), transparent);
  filter: blur(clamp(36px, 20px + 2.5vw, 56px));
  animation: aurora-drift 14s linear infinite;
}

@keyframes aurora-drift {
  0% {
    transform: rotate(0deg) translate(-3%, 2%) scale(1);
  }
  50% {
    transform: rotate(180deg) translate(4%, -3%) scale(1.12);
  }
  100% {
    transform: rotate(360deg) translate(-3%, 2%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora::before {
    animation: none;
  }
  .button {
    transition: none;
  }
}

/* Small screens: the aurora rises behind the heading instead of beside it */
@media (max-width: 47.99rem) {
  .hero {
    align-items: flex-end;
  }
  .aurora {
    top: 4.5rem;
    right: -42%;
    width: 120%;
    translate: 0 0;
    opacity: calc(var(--aurora-strength) * 0.9);
  }
}
