/* Muhjee public-website stylesheet.
   Logo + tagline centered above a paper-textured viewport, with a
   decorative scattered-notes overlay between paper and hero.
   Pure CSS, no framework. */

/* Fonts — same set + names as the portal (see portal/index.html
   @font-face). Default is the house sans, Handwrite is the script
   font for decorative text such as the tagline. */
@font-face {
  font-family: 'Default';
  src: url('/fonts/default.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'Handwrite';
  src: url('/fonts/handwrite.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'MuhjeeLogo';
  src: url('/fonts/logo.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --muh-blue: #008cd2;
  --muh-white: #ffffff;
  --muh-dark:  #0d1620;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Default', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--muh-dark);
  background: var(--muh-dark);
}

body {
  /* Paper texture tiles at its natural size — the image is designed
     as a seamless 256×256 tile. Fixed so it doesn't scroll. */
  background-image: url('/img/paper.jpg');
  background-repeat: repeat;
  background-attachment: fixed;

  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
   Scattered-notes overlay.

   Sits between the body's paper background and the centered hero.
   Notes are absolute-positioned inside the overlay; JS sets per-element
   left/top in vw/vh + width/height + transform. pointer-events off so
   clicks reach the hero underneath. Initial opacity is set inline by
   the script (OPACITY constant); 0 here so notes don't flash in at full
   strength before the script runs.
   --------------------------------------------------------------------------- */
.muh-notes-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 220ms ease-out;
  /* Desaturate the blue glyph stroke/fill to neutral grey, so the
     notes read as black-on-paper without changing every per-element
     fill. Combined with the lower OPACITY in notes-scatter.js. */
  filter: grayscale(1);
}

.muh-note {
  position: absolute;
  /* width/height/left/top/transform are set per-element by the script. */
  /* transform-origin centered so rotate() pivots around the glyph
     center even after the translate(-50%, -50%) centering trick. */
  transform-origin: 50% 50%;
  line-height: 0;
}

.muh-note svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------------------------------------------------------------------------
   Skip link — keyboard a11y, visible only on focus.
   --------------------------------------------------------------------------- */
.muh-skip {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--muh-white);
  color: var(--muh-dark);
  padding: 6px 12px;
  z-index: 100;
}
.muh-skip:focus { top: 0; }

/* ---------------------------------------------------------------------------
   Hero — logo + tagline, centered in viewport. Sits above notes.
   --------------------------------------------------------------------------- */
.muh-hero {
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
  color: var(--muh-white);
}

.muh-tagline {
  margin: 0;
  font-family: 'Default', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  letter-spacing: 0.01em;
  color: var(--muh-blue);
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.6);
}

/* ---------------------------------------------------------------------------
   Muhjee logo — copied from portal/MuhjeeLogo.css.
   Blue box with 3 white diagonal stripes (rotate 34deg) of
   decreasing heights. CSS only — no bitmap asset.
   --------------------------------------------------------------------------- */
.muh-logo-container {
  position: relative;
  color: var(--muh-white);
  width: 21em;
  height: 21em;
  border-radius: 3.5em;
  /* Scale the whole logo via font-size — smaller viewport = smaller
     logo. ~210px on desktop, ~140px on mobile. */
  font-size: clamp(8px, 2vw, 20px);
  margin: 0 auto;
}

.muh-logo-stripe {
  width: 9em;
  height: 30em;
  position: absolute;
  background-color: var(--muh-white);
  transform-origin: bottom right;
  transform: rotate(34deg);
  bottom: 11.5em;
  margin-left: 3.5em;
  border-radius: 6em;
  font-size: 0.4em;
  z-index: 2;
  box-shadow: 1.4em 0.8em 4em rgba(0, 0, 0, 0.2);
}

.muh-logo-stripe.muh-logo-stripe-2 {
  left: 12.1em;
  height: 24.6em;
}

.muh-logo-stripe.muh-logo-stripe-3 {
  left: 24em;
  height: 19.2em;
}

/* Avoid horizontal scroll on narrow screens — the logo is wide. */
@media (max-width: 480px) {
  .muh-logo-container {
    font-size: 7px;
  }
}
