/* Phones: one section to a screen. This file is loaded with a media query in each page's head (touch input and a
   narrow or short screen), so a larger screen, and a narrow window with a mouse, never see it. The rules it follows,
   and where they come from, are in notes/phone-sections.md. Nothing here moves: the one motion is still his drip.

   Each .screen is one snap point of the page's own scroll. js/site.js adds .snap to <html> only while every screen
   is exactly one screen tall; until then, and on a phone held sideways, snapping is the gentle kind. */

html { scroll-snap-type: y proximity; scroll-padding-top: 0; }
html.snap { scroll-snap-type: y mandatory; }
.screen { scroll-snap-align: start; }
html.snap .screen { scroll-snap-stop: always; }

/* Held upright: every screen is composed to fit the page area with the browser's bars showing (the small viewport).
   What does not fit is one sideways swipe (a strip) or one tap (a fold) away. */
@media (orientation: portrait) and (max-width: 39.99em) {
  :root {
    --top: max(1.25rem, calc(env(safe-area-inset-top) + .5rem));
    --bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + .75rem));
    --rule: color-mix(in srgb, var(--mulberry) 55%, var(--bg));
  }
  .screen { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: var(--top); padding-bottom: var(--bottom); }
  .thread { padding-bottom: 0; }
  .thread::before, .trail { bottom: 1.5rem; } /* the line ends, with its last drop, inside the last year's screen */
  .thread::after { bottom: .9rem; }
  .btn { align-self: center; }

  /* a fold: its line opens it and closes it, and the plus turns to a cross */
  .more > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; padding: .35rem 0; border-top: 1px solid var(--rule); color: var(--bone); font: 500 .85rem/1.35 var(--font-head); letter-spacing: .18em; text-transform: uppercase; text-align: left; cursor: pointer; }
  .more > summary::-webkit-details-marker { display: none; }
  .more > summary::after { content: "+"; flex: none; font: 300 1.6rem/1 var(--font-head); letter-spacing: 0; }
  .more[open] > summary::after { rotate: 45deg; }
  .more + .more > summary, .more:last-child > summary { border-bottom: 1px solid var(--rule); }

  /* a strip: many things of one kind, side by side. The next one shows at the edge; the swipe stays in the strip. */
  .year .stops, .about-grid, .pk-numbers, .pk .stops, .pk-high, .pk-tiles {
    display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: flex-start; gap: 0 .9rem;
    width: auto; max-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  }
  .about-grid > *, .pk-numbers > *, .pk-high > *, .pk-tiles > * { flex: 0 0 86%; scroll-snap-align: start; }

  /* --- home: the next show -------------------------------------------------- */
  #live { padding-top: var(--top); }
  .label { padding: .5rem 1.25rem; }
  #live .label { padding-bottom: 1.1rem; } /* clear of the date's outer ring */
  .stop.big { margin-block: 0; gap: .9rem; }
  .sun-disc { width: clamp(7rem, min(56vw, 25svh), 17rem); border-width: clamp(.6rem, 2.6svh, 1.1rem); }
  .sun-disc time { font-size: clamp(.8rem, 2.6svh, .95rem); }
  .sun-disc b { font-size: clamp(2.5rem, min(19vw, 10svh), 6rem); }
  .stop.big .text { padding: 0 1rem; }
  .stop h3 { font-size: 1.35rem; }
  .bill { margin-top: .4rem; font-size: 1.0625rem; }
  .sun .note { margin-top: .25rem; }

  /* --- home: music. First the line's own map: where to stream, and every year on it --- */
  #music { padding-top: 0; }

  .years { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .25rem; width: min(100% - 2 * var(--gutter), 19rem); margin: 1rem auto 0; background: var(--bg); }
  .years a { display: inline-flex; align-items: center; justify-content: center; min-width: 3.25rem; min-height: 2.75rem; color: var(--bone); font: 300 1.25rem/1 var(--font-head); letter-spacing: .08em; text-decoration: none; }

  /* then one year to a screen: its number on the line, its covers side by side, the one in front hanging on the line */
  .year h3 { margin: 0 auto .6rem; font-size: 3.25rem; }
  .year .stops { flex: none; margin: 0; padding-inline: 14vw; scroll-padding-inline: 0; }
  .year .stop { flex: 0 0 72vw; scroll-snap-align: center; gap: .6rem; margin: 0; padding: 0; background: none; box-shadow: none; }
  .year .stop .cover { width: clamp(7.5rem, calc(100svh - 17rem), 100%); box-shadow: 0 0 0 .5rem var(--bg); }
  .year .stop .badge { width: 2.5rem; height: 2.5rem; right: .5rem; bottom: .5rem; }
  .year .stop .badge svg { width: 1rem; height: 1rem; }
  .year .stop .text { max-width: none; padding: 0 .25rem .25rem; }
  .year .stop h4 { font-size: 1.2rem; font-weight: 300; letter-spacing: .14em; }
  .year .stop .by { margin-top: .25rem; font-size: .95rem; line-height: 1.4; }
  .year .stop blockquote { margin-top: .4rem; font-size: 1rem; line-height: 1.45; }
  .year .stop .note { margin-top: .3rem; font-size: 1rem; line-height: 1.45; }
  .stop .more > summary { justify-content: center; margin-top: .3rem; border: 0; }

  /* --- home: about. His photo over the first lines; the rest of the story one swipe along --- */
  .about h2, .contact h2, .pk-sec h2 { font-size: 1.75rem; }
  #about .about-grid { flex: 1 0 auto; display: grid; grid-template-rows: minmax(7rem, 1fr) auto; grid-auto-flow: column; grid-auto-columns: 88%; align-items: start; gap: .75rem .9rem; margin-top: .75rem; margin-bottom: .75rem; }
  #about .about-grid > div { display: contents; }
  #about .about-grid > *, #about .about-grid > div > * { grid-row: 1 / -1; scroll-snap-align: start; max-width: none; margin: 0; }
  #about .portrait { grid-area: 1 / 1; align-self: stretch; position: relative; overflow: hidden; }
  #about .portrait img { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: 50% 28%; }
  #about .about-grid p:first-child { grid-area: 2 / 1; }
  .about-grid p { font-size: 1.0625rem; }
  .pull blockquote { font-size: 1.125rem; }
  .pull figcaption { margin-top: .6rem; }
  .about h3 { margin: 1.25rem 0 .5rem; }

  /* --- home: bookings, and the sign-off as the last screen ------------------- */
  .contact > p { margin: 1rem auto; font-size: 1.0625rem; }
  .contact h3 { margin: 1.5rem 0 0; font-size: 1.0625rem; }
  .contact .more { margin-top: 1rem; }
  .facts { margin-top: .5rem; gap: 1rem; }
  .foot { align-items: center; }

  /* --- the press kit --------------------------------------------------------- */
  .pk-nav { position: absolute; flex-wrap: nowrap; }
  .pk-nav a { padding: 0 .4rem; }
  .pk-top { display: grid; grid-template-columns: auto auto; justify-content: center; align-content: center; align-items: center; gap: 1rem 1.1rem; padding-top: calc(3rem + env(safe-area-inset-top)); text-align: left; }
  .pk-who { display: contents; }
  .pk-top .gc-mark { --size: min(28vw, 9rem); }
  .pk-who h1 { justify-items: start; gap: .5rem; }
  .pk-who h1 svg { width: min(46vw, 14rem); }
  .pk-who h1 span { font-size: 1.35rem; }
  .pk-line, .pk-go { grid-column: 1 / -1; text-align: center; }
  .pk-line { font-size: 1.0625rem; line-height: 1.45; }
  .pk-go { flex-direction: column; align-items: center; gap: .6rem; }
  .pk-go .btn { flex-wrap: wrap; justify-content: center; gap: .2rem 0; }

  .pk-sec .about-grid, .pk-numbers, .pk .stops, .pk-high, .pk-tiles { margin-top: .9rem; }
  .pk-sec .about-grid > * { flex-basis: 90%; }
  .pk-numbers > * { flex-basis: 64%; }
  .pk-numbers b { font-size: 2.75rem; }
  .pk-facts { margin-top: .5rem; }
  .pk-sec .more { margin-top: .9rem; }
  .pk-intro { margin-top: .5rem; font-size: 1.0625rem; }
  .pk .stops { align-items: flex-start; }
  .pk .stop.small { flex: 0 0 auto; width: clamp(7.5rem, calc(100svh - 24rem), 72vw); scroll-snap-align: start; padding: 0; background: none; box-shadow: none; }
  #music .pk-src { margin-top: .6rem; }
  #music .pk-src a { display: inline; }
  .pk .stream { margin-top: .25rem; }
  .pk-high p { font-size: 1.0625rem; }
  .pk-tiles > * { flex-basis: 70%; }
  .pk-sec > .more > h3, .pk-sec .about-lists h3 { margin-top: 1.25rem; }
}

/* a short upright phone (the page area of an iPhone SE or 8): one step tighter, nothing dropped */
@media (orientation: portrait) and (max-width: 39.99em) and (max-height: 35em) {
  .about h2, .contact h2, .pk-sec h2 { font-size: 1.4rem; }
  .about-grid p, .pk-line, .pk-high p, .pk-intro, .contact > p, .bill { font-size: 1rem; line-height: 1.5; }
  .pull blockquote { font-size: 1.0625rem; }
  .year h3 { font-size: 2.75rem; }
}
