/* Musendo early access. One dark look, the brand's: an artist's photo in black and white, the m in its gradient. */

@font-face {
  font-family: "Instrument Sans";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/instrument-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-weight: 600;
  font-display: swap;
  src: url("fonts/instrument-sans-600.woff2") format("woff2");
}

:root {
  --ink: #03080F;                       /* Musendo's black */
  --fg: #F3F5F9;
  --muted: #A5AEBB;
  --line: rgba(243, 245, 249, 0.16);
  --field: rgba(243, 245, 249, 0.08);
  --focus: #2B86FF;                     /* the blue end of the m's gradient */
  --error: #FF9A9A;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--ink); }
body {
  position: relative;
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* The lockup, in the photo's top-left corner. */
.bar {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 3;
  padding: max(20px, env(safe-area-inset-top, 0px)) 0 0 var(--gutter);
}
/* Jon's full logo for dark grounds, all in the page's white (Brand/_Finals "Logo - Full White"). */
.brand { display: block; width: clamp(120px, 10vw, 140px); line-height: 0; }
.brand svg { width: 100%; height: auto; }

/* Two halves: the photo on the left, with the m and its waves centred on it, and the sign-up centred on black on the
   right. On a phone the photo comes first. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}

/* The focus point is where the photo's crop centres, chosen so the m lands between the microphone and the pop
   filter; the script reads it too, so the waves' photo lines up with this one. */
.visual {
  --focus-x: 0.65;
  --focus-y: 0.4;
  position: relative;
  display: grid;
  place-items: center;
  container-type: size;
  isolation: isolate;
  overflow: hidden;
  /* Until the waves draw (or without WebGL), the photo darkened about as the look's -3.4 EV does. */
  background-color: var(--ink);
  background-image: linear-gradient(rgba(3, 8, 15, 0.68), rgba(3, 8, 15, 0.68)), url("hero.jpg?v=3835805707");
  background-position: 0 0, calc(var(--focus-x) * 100%) calc(var(--focus-y) * 100%);
  background-size: auto, cover;
  background-repeat: no-repeat;
}
.visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(3, 8, 15, 0.5), rgba(3, 8, 15, 0) 22%);
  pointer-events: none;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* The m at 36% of the photo's short side, as in the Lens look. */
.hero-m { position: relative; z-index: 2; width: min(18vw, 340px); height: auto; }
@supports (width: 1cqmin) {
  .hero-m { width: min(36cqmin, 340px); }
}

.panel {
  display: grid;
  place-items: center;
  padding: 72px var(--gutter-r) 72px var(--gutter);
  background: var(--ink);
}
.signup-block { width: min(100%, 460px); display: grid; gap: 16px; justify-items: center; text-align: center; }

.eyebrow { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
h1 {
  margin: 0;
  font-size: clamp(36px, 3.6vw, 56px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* The form. */
.signup { width: 100%; display: grid; gap: 12px; margin-top: 8px; justify-items: center; }
.signup > .row { width: 100%; }
.label { font-size: 13px; font-weight: 500; color: var(--muted); }
.row { display: flex; gap: 8px; }
input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  color: var(--fg);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
input::placeholder { color: #7D8695; }
input[aria-invalid="true"] { border-color: var(--error); }
button[type="submit"] {
  flex: none;
  height: 48px;
  padding: 0 20px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--fg);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
button[type="submit"]:hover { background: #FFFFFF; }
button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 0; min-height: 1.5em; font-size: 14px; color: var(--error); }
.status:empty { display: none; }
.fine { margin: 0; font-size: 13px; color: var(--muted); }

.joined { width: 100%; display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.joined h2 { margin: 0; font-size: 22px; font-weight: 600; }
.joined p { margin: 0; }

/* The list's terms in the black half's bottom-right corner, on the copyright's baseline: one line where it fits,
   evenly balanced lines where it doesn't. */
.panel { position: relative; }
.terms {
  position: absolute;
  right: var(--gutter-r);
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 40px);
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
  text-wrap: balance;
}

/* The home page's corner: the copyright and Privacy, bottom left, over the photo. */
.corners {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 4;
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 0 var(--gutter-r) max(20px, env(safe-area-inset-bottom, 0px)) var(--gutter);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
.corners > * { margin: 0; pointer-events: auto; }
.corners .copy, .corners .privacy { color: #C9CFD8; }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px var(--gutter-r) max(32px, env(safe-area-inset-bottom, 0px)) var(--gutter);
  font-size: 13px;
  color: var(--muted);
}
.foot p { margin: 0; }

/* A plain page: privacy, thanks. */
.page { max-width: 680px; margin: 0 auto; padding: 120px var(--gutter-r) 56px var(--gutter); }
.page h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 20px; }
.page h2 { margin: 32px 0 8px; font-size: 18px; font-weight: 600; }
.page p, .page li { color: #D5DAE2; }
.page ul { padding-left: 20px; }
.page .meta { color: var(--muted); font-size: 14px; }

/* Stacked: the photo and its lockup on top, the sign-up below. */
@media (max-width: 860px) {
  /* The page fills the screen, however short the sign-up, so the corners sit at its foot. */
  .home { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
  .home main { flex: 1; display: flex; flex-direction: column; }
  .split { flex: 1; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 0; }
  /* Under the sign-up, centred: the terms, then the copyright and Privacy. */
  .panel { align-content: space-between; gap: 40px; }
  .terms { position: static; justify-self: stretch; max-width: none; text-align: center; }
  .corners { position: static; justify-content: center; padding: 0 var(--gutter-r) max(24px, env(safe-area-inset-bottom, 0px)) var(--gutter); }
  /* The photo takes what the sign-up leaves of the first screen (it needs 393px to the button, plus 17px clear of
     Safari's bar), so the email field and button show when the page opens: 286px of photo on an iPhone 14 Pro. */
  .visual { height: clamp(200px, calc(100vh - 410px), 620px); height: clamp(200px, calc(100svh - 410px), 620px); }
  .panel { padding: 48px var(--gutter-r) 56px var(--gutter); }
}

@media (max-width: 720px) {
  .row { flex-direction: column; }
  .row input { flex: none; }
  button[type="submit"] { width: 100%; }
}
