/* Colors are pulled from the album cover. */
:root {
  --bg: #090a1a;          /* the cover's night sky, sampled from its edges */
  --text: #f0e8d8;        /* lamp-lit chapel siding */
  --muted: rgba(240, 232, 216, 0.55);
  --line: rgba(240, 232, 216, 0.22);

  --cover-size: min(100vw, 74svh);

  /* Visible text is drawn from the handwriting shapes in assets/glyphs.js
     (see .hand below). This font stack only covers text that isn't drawn,
     like when scripts are turned off. */
  --hand: "FF", "Chalkboard SE", "Marker Felt",
          "Segoe Print", "Comic Sans MS", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--hand);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Text drawn from the handwriting shapes. Sized in em so it scales
   with font-size like real text; the negative margins keep each line
   as tall as it was with line-height: 1. */
.hand {
  display: inline-block;
  vertical-align: -0.333em;
  margin-block: -0.225em;
  fill: currentColor;
  overflow: visible;
}

/* Hidden until drawn, so the backup font never flashes on screen */
[data-hand]:not([data-drawn]) { visibility: hidden; }

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 0 16px max(40px, env(safe-area-inset-bottom));
}

/* The cover, with its edges faded out so it melts into the page */
.stage {
  position: relative;
  width: var(--cover-size);
  aspect-ratio: 1;
  margin-inline: -16px;  /* let it run edge to edge on phones */
  flex-shrink: 0;
}

.cover {
  --fade-x: linear-gradient(to right, transparent, rgba(0,0,0,.03) 2%, rgba(0,0,0,.12) 4.5%, rgba(0,0,0,.3) 7%, rgba(0,0,0,.55) 9.5%, rgba(0,0,0,.78) 12%, rgba(0,0,0,.93) 14.5%, #000 17%, #000 83%, rgba(0,0,0,.93) 85.5%, rgba(0,0,0,.78) 88%, rgba(0,0,0,.55) 90.5%, rgba(0,0,0,.3) 93%, rgba(0,0,0,.12) 95.5%, rgba(0,0,0,.03) 98%, transparent);
  --fade-y: linear-gradient(to bottom, transparent, rgba(0,0,0,.03) 1.5%, rgba(0,0,0,.12) 3.5%, rgba(0,0,0,.3) 5.5%, rgba(0,0,0,.55) 7.5%, rgba(0,0,0,.78) 9.5%, rgba(0,0,0,.93) 11.5%, #000 13.5%, #000 72%, rgba(0,0,0,.93) 75%, rgba(0,0,0,.78) 78.5%, rgba(0,0,0,.55) 82%, rgba(0,0,0,.3) 86%, rgba(0,0,0,.12) 90.5%, rgba(0,0,0,.03) 95%, transparent);
  display: block;
  width: 100%;
  height: 100%;
  -webkit-mask-image: var(--fade-x), var(--fade-y);
  -webkit-mask-composite: source-in;
          mask-image: var(--fade-x), var(--fade-y);
          mask-composite: intersect;
}

/* Small band name in the top-left corner */
.tag {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  z-index: 1;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1;
}

/* "Out now" line, tucked up into the cover's faded bottom edge */
.headline {
  position: relative;
  margin: calc(var(--cover-size) * -0.06) 0 0;
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  line-height: 1.2;
  text-align: center;
}

/* Rows of service and social icons */
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.listen { margin-top: 24px; }

/* Socials sit in the top-right corner, across from the tag. The negative
   margins line the icons up with the tag's text while keeping the full
   48px tap targets. */
.socials {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 1;
  gap: 0;
  margin: -11px -14px 0 0;
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: var(--text);
  transition: color 0.15s, background-color 0.15s;
}

/* Logos are drawn as lines, not filled shapes, to match the handwriting */
.icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Socials are a step quieter than the places to listen */
.socials .icon { color: var(--muted); }
.socials .icon svg { width: 22px; height: 22px; stroke-width: 1.8; }

.icon:hover { background: rgba(240, 232, 216, 0.08); color: var(--text); }

.icon:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
