/* First screen, concept A "The Grand Circle". Uses only the tokens.
   Sizes follow the small viewport height (svh), so the whole screen fits with a phone's bars showing. */

#first-screen {
  position: relative;
  min-height: 100svh;
  padding: calc(3.25rem + env(safe-area-inset-top)) var(--gutter) max(1rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-areas: "mark" "who" "go";
  justify-items: center;
  align-content: center;
  gap: clamp(.4rem, 1.6svh, 1.1rem);
  text-align: center;
  overflow: clip;
}

/* his emblem on its own wine smoke */
.gc-mark {
  --size: min(74vw, 32svh, 26rem);
  grid-area: mark;
  position: relative;
  width: var(--size);
  aspect-ratio: 1;
  color: var(--white);
}
.gc-mark > * { position: absolute; }
.gc-disc { inset: 0; border-radius: 50%; overflow: hidden; background: var(--wine); }
.gc-disc > * { position: absolute; inset: 0; width: 100%; height: 100%; }

/* the drip: leaves the M, runs off the ring and down to the bottom of the screen,
   where the page's own line picks it up */
.gc-drip, .gc-drop { left: 49.8%; top: 70%; }
.gc-drip {
  width: 2px;
  margin-left: -1px;
  height: 200svh;
  background: linear-gradient(var(--white) 16svh, var(--thread) 40svh);
}
.gc-drop { display: none; width: .8rem; height: .8rem; margin: -.4rem 0 0 -.4rem; border-radius: 0 50% 50% 50%; rotate: 45deg; background: var(--white); }

/* his signature and his line; then what to do. Both sit on the drip, which runs on behind them. */
.gc-who, .gc-go { position: relative; z-index: 1; display: grid; justify-items: center; width: min(100%, 30rem); background: var(--bg); }
.gc-who { grid-area: who; gap: clamp(.2rem, 1svh, .6rem); }
.gc-go { grid-area: go; gap: clamp(.1rem, .7svh, .5rem); padding-bottom: .5rem; }

.gc-name { margin: 0; width: min(64vw, 26svh, 21rem); color: var(--white); }
.gc-script { display: block; width: 100%; height: auto; }
.gc-line { margin: 0; color: var(--ink-dim); font-size: 1.0625rem; text-wrap: balance; }

.gc-play {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 2.75rem;
  padding: .5rem 1.4rem;
  border: 1.5px solid var(--mulberry);
  border-radius: 99rem;
  background: var(--wine);
  color: var(--bone);
  font: 500 1rem/1.2 var(--font-head);
  letter-spacing: .06em;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.gc-play:hover { background: var(--mulberry); border-color: var(--bone); }

/* the next show: gold, and gone by itself once the day has passed */
.gc-next { display: grid; align-content: center; min-height: 2.75rem; color: var(--live); font: 500 1rem/1.3 var(--font-head); letter-spacing: .04em; text-decoration: none; text-wrap: balance; }
.gc-next span { font-size: .8rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; }
.gc-next:hover { text-decoration: underline; }
.gc-next ~ .gc-next { display: none; }

/* a short phone with its bars showing: everything a little smaller, nothing dropped */
@media (max-height: 34rem) and (max-aspect-ratio: 5/4) {
  #first-screen { padding-top: calc(3rem + env(safe-area-inset-top)); padding-bottom: .5rem; gap: .25rem; }
  .gc-mark { --size: min(74vw, 29svh); }
  .gc-name { width: min(64vw, 24svh); }
  .gc-line { font-size: .95rem; }
  .gc-go { padding-bottom: 0; }
}

/* a tablet held upright: room for a larger emblem and signature */
@media (min-width: 40rem) and (max-aspect-ratio: 5/4) {
  .gc-mark { --size: min(70vw, 44svh, 34rem); }
  .gc-name { width: min(56vw, 30svh, 26rem); }
  .gc-line { font-size: 1.25rem; }
}

/* wider than tall (a laptop, a desktop, a very wide screen, a phone on its side):
   the signature left of the emblem, the actions right of it, the drip free down the middle */
@media (min-aspect-ratio: 5/4) {
  #first-screen {
    grid-template-areas: "who mark go";
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: clamp(.75rem, 4vw, 5rem);
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  }
  .gc-mark { --size: min(36vw, 66svh, 46rem); }
  .gc-who, .gc-go { width: auto; max-width: 28rem; background: none; }
  .gc-who { justify-self: end; justify-items: end; text-align: right; }
  .gc-go { justify-self: start; justify-items: start; text-align: left; gap: clamp(.15rem, 1.2svh, .75rem); }
  .gc-name { width: min(26vw, 60svh, 24rem); }
  .gc-line { font-size: clamp(.95rem, 1.6vw, 1.25rem); }
  .gc-go .socials { justify-content: flex-start; margin-left: -.6rem; }
}

/* a phone on its side: the profile links move to a row along the bottom, either side of the drip */
@media (min-aspect-ratio: 5/4) and (max-height: 30rem) {
  #first-screen { padding-bottom: calc(2.75rem + env(safe-area-inset-bottom)); }
  .gc-mark { --size: min(36vw, calc(100svh - 7rem - env(safe-area-inset-top) - env(safe-area-inset-bottom))); }
  .gc-go { position: static; }
  .gc-go .socials { position: absolute; inset: auto 0 env(safe-area-inset-bottom); justify-content: center; gap: 0 1.5rem; margin: 0; }
}

/* the one motion on the site: his drip. It leaves the M when the page opens,
   and further down a drop rides the line as you scroll (site.css). */
@media (prefers-reduced-motion: no-preference) {
  .gc-drip { animation: gc-run 3.2s cubic-bezier(.5, 0, .85, .55) .6s both; }
  .gc-drop { display: block; animation: gc-fall 3.2s cubic-bezier(.5, 0, .85, .55) .6s both; }
}
@keyframes gc-run { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes gc-fall { from { translate: 0 0; } to { translate: 0 200svh; } }
