/* Melly Labs — for you
 * ====================
 *
 * The page for work that is not on the shelf. Same language as the rest: ruled
 * writing, one line marked, a frame waiting for a picture, and each piece
 * arriving as it is reached.
 */

/* start3.css holds the start page to one screen; this one runs on. */
body { height: auto; overflow-y: auto; overflow-x: hidden; }

main {
  height: auto; align-content: start; justify-items: stretch;
  position: relative; z-index: 10;
  padding: clamp(150px, 26vh, 280px) var(--edge) clamp(90px, 18vh, 220px);
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(16px, 2vw, 34px);
  row-gap: clamp(50px, 10vh, 120px);
  align-items: start;
}

.lede {
  grid-column: 1 / -1; text-align: center; margin-inline: auto;
  font-size: clamp(1.5rem, 2.6vw, 2.6rem); font-weight: 400;
  line-height: 1.15; letter-spacing: -0.02em;
  max-width: 22ch;
}

/* Ruled writing, as everywhere else. */
.says p {
  line-height: var(--lh); --lh: 1.55em;
  padding-bottom: 3px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--lh) - 2px),
    currentColor calc(var(--lh) - 2px),
    currentColor var(--lh)
  );
  font-size: clamp(1.2rem, 1.55vw, 1.6rem);
  max-width: 34ch;
}
.says p + p { margin-top: 1.55em; }

/* The line that is marked rather than said. */
.ask {
  font-size: clamp(1.45rem, 1.95vw, 2.05rem); line-height: 1.45;
}
.ask .marker {
  display: inline-block;
  background-color: var(--green);
  padding: 0 .16em;
}
body.on-green .ask .marker { background-color: #fff; }
body.on-blue .ask .marker { background-color: #6a6aff; }

.ask a {
  display: inline-block; margin-top: .9em;
  font-size: clamp(1.05rem, 1.3vw, 1.3rem);
  border-bottom: 2px solid currentColor; padding-bottom: 2px;
  transition: opacity .2s ease;
}
.ask a:hover { opacity: .55; }

/* Where things sit. */
.first-words { grid-column: 2 / span 5; }
.frame { grid-column: 8 / span 5; height: 34vw; margin-right: calc(var(--edge) * -1); }
.second-words { grid-column: 3 / span 5; }
.ask { grid-column: 7 / span 5; }

.shot { width: 100%; position: relative; background: #e6e2dd; overflow: hidden; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Arriving on the way past. */
[data-reveal] { opacity: 0; transform: translateY(28px); }
[data-reveal].seen {
  opacity: 1; transform: none;
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .3, 1);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 760px) {
  main { grid-template-columns: repeat(6, 1fr); row-gap: clamp(40px, 9vh, 80px);
         padding-top: clamp(90px, 16vh, 140px); }
  .first-words { grid-column: 1 / span 6; }
  .frame { grid-column: 2 / span 5; height: 62vw; }
  .second-words { grid-column: 1 / span 6; }
  .ask { grid-column: 1 / span 6; }
  .says p { max-width: none; }
}
