/* wall-info.css : styles for know before you go and the morning after. Loaded after wall.css. */

/* how long each scene is travelled for. The notes are read column by column on an upright screen,
   so that takes longer there. Neither scene has a storyboard picture: the plain page builds its own
   from the art (the starry sky, the dawn sky, the string of prints), further down. */
#know { --screens: 3.4; --still: none; }
#gallery { --screens: 3.6; --still: none; }
#know .stick::before, #gallery .stick::before { content: none; }
@media (min-aspect-ratio: 1/1) {
  #know { --screens: 3.2; }
  #gallery { --screens: 3.3; }
}

/* ------------------------------------------------------------------ know before you go: the words
   On the plain page: a cork board in a wooden frame under the starry sky, the heading on a strip
   of cloth, each row a pinned paper note. While the 3D wall is on, all of it is lettered on the
   board in the scene and these words are hidden from sight (class "on-the-wall"). */

html:not(.wall-on) #know { background: #062a2c url(/assets/opening/s6-sky-1024.webp) center top / cover no-repeat; }
html:not(.wall-on) #know .stick,
html:not(.wall-on) #gallery .stick { min-height: 0; padding: clamp(44px, 10vw, 96px) var(--edge) clamp(52px, 11vw, 104px); }

html:not(.wall-on) .info-board {
  position: relative; z-index: 3; max-width: 66rem; margin: 0 auto;
  padding: clamp(16px, 4vw, 38px);
  background-color: #B27C42;
  background-image: radial-gradient(rgba(70, 36, 10, .3) 1px, transparent 1.6px), radial-gradient(rgba(255, 220, 160, .2) 1px, transparent 1.6px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px;
  border: clamp(10px, 2.4vw, 18px) solid #7B4A26; border-radius: 5px;
  box-shadow: inset 0 0 0 2px rgba(40, 18, 6, .5), inset 0 10px 30px rgba(40, 18, 6, .35), 0 18px 50px rgba(0, 0, 0, .5), 0 0 110px rgba(255, 160, 80, .2);
}

.info-head {
  margin: 0 0 clamp(18px, 3.6vw, 32px); padding: .17em .3em .09em;
  background: #E2CBA4; color: #3B1A5E;
  font: 900 clamp(2.2rem, 11.4vw, 5.4rem)/.9 "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  letter-spacing: .005em; text-transform: uppercase; text-align: center; text-wrap: balance;
  transform: rotate(-.6deg);
  box-shadow: 0 3px 0 rgba(40, 18, 6, .4), 0 10px 18px rgba(40, 18, 6, .25);
}

.info-notes { list-style: none; margin: 0; padding: 0; }
html:not(.wall-on) .info-notes { display: grid; grid-template-columns: 1fr; gap: clamp(16px, 3vw, 28px); }

html:not(.wall-on) .info-note {
  position: relative; padding: 2.5rem 1.3rem 1.35rem;
  background: #ECD8B1; color: #2E1650;
  box-shadow: 2px 4px 0 rgba(40, 18, 6, .32), 0 10px 18px rgba(40, 18, 6, .28);
  transform: rotate(-.7deg);
}
html:not(.wall-on) .info-note:nth-child(even) { transform: rotate(.6deg); }
/* the pin */
html:not(.wall-on) .info-note::before {
  content: ""; position: absolute; top: .72rem; left: 50%; width: 17px; height: 17px; margin-left: -8px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #ff9a8c, var(--pin, #D7322B) 58%, rgba(0, 0, 0, .45) 130%);
  box-shadow: 1px 3px 3px rgba(40, 18, 6, .45);
}
.info-note-doors { --pin: #E0B11E; }
.info-note-lights { --pin: #2B62A8; }
.info-note-photos { --pin: #1F8A5B; }
.info-note-recap { --pin: #E45C86; }

.info-lead, .info-fact {
  margin: 0;
  font-family: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif; font-weight: 900;
  letter-spacing: .005em; text-transform: uppercase; color: #3B1A5E;
}
.info-lead { margin-bottom: .32em; font-size: clamp(2.1rem, 10vw, 3rem); line-height: .9; }
.info-fact { font-size: clamp(2.3rem, 11vw, 3.2rem); line-height: .92; text-align: center; text-wrap: balance; }
.info-text { margin: 0; font: 600 1.0625rem/1.42 "Space Grotesk", "Helvetica Neue", Arial, sans-serif; }
.info-tel { color: #A3124F; font-weight: 700; white-space: nowrap; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .16em; }
.info-tel:focus-visible { outline: 3px solid #FF3D8E; outline-offset: 3px; border-radius: 6px; }

@media (min-width: 760px) {
  /* three columns, as on the board in the scene: ID over doors, the lights note down the middle, photos over the recap */
  html:not(.wall-on) .info-notes { grid-template-columns: repeat(3, 1fr); align-items: start; }
  html:not(.wall-on) .info-note-id { grid-column: 1; grid-row: 1; }
  html:not(.wall-on) .info-note-doors { grid-column: 1; grid-row: 2; }
  html:not(.wall-on) .info-note-lights { grid-column: 2; grid-row: 1 / span 2; }
  html:not(.wall-on) .info-note-photos { grid-column: 3; grid-row: 1; }
  html:not(.wall-on) .info-note-recap { grid-column: 3; grid-row: 2; }
}

/* Wall on. The phone number is lettered on its note, on a line of its own; the real link lies over
   it, unseen, for as long as the camera holds that note still (the engine switches it on and off
   with data-wall-show). The numbers below follow from scenes-info.js: on an upright screen the
   board is 3.05 screens wide (at most 1.14 screens tall, so --info-bw is its width) and the
   middle of its centre column sits in the middle of the screen; the number's line is 0.1349 of
   the board's width below that. On a wide one the board is 1.133 screens tall and its middle
   sits in the middle. */
.wall-on .info-text { margin: 0; }
.wall-on .info-tel {
  --info-bw: min(305vw, 141.07vh); --info-bw: min(305vw, 141.07lvh);
  position: absolute; z-index: 4; left: calc(50% + var(--info-bw) * .0006);
  top: calc(50vh + var(--info-bw) * .1349); top: calc(50lvh + var(--info-bw) * .1349);
  width: calc(var(--info-bw) * .2164); height: calc(var(--info-bw) * .0472);
  margin: calc(var(--info-bw) * -.0236) 0 0 calc(var(--info-bw) * -.1082);
  overflow: hidden; border-radius: 10px;
  color: transparent; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: rgba(255, 61, 142, .22);
}
.wall-on .info-tel:focus-visible { outline: 3px solid #FF3D8E; outline-offset: 2px; }

/* ------------------------------------------------------------------ the morning after: the words
   On the plain page: the poster, a sheet of cream paper under the string of prints, against the
   dawn sky. While the 3D wall is on, the heading and the sentence are lettered on the poster on
   the tree, and only the button shows: it sits on the poster's blank foot. */

html:not(.wall-on) #gallery { background: #2b2a60 url(/assets/opening/extra-dawn-1024.webp) center bottom / cover no-repeat; }
html:not(.wall-on) #gallery .stick { padding-top: calc(min(29.8vw, 16.7rem) + clamp(34px, 7vw, 64px)); }
html:not(.wall-on) #gallery .stick::before {
  content: ""; left: 0; right: 0; top: clamp(12px, 2.4vw, 28px); bottom: auto; margin: 0 auto;
  width: min(100%, 56rem); height: auto; aspect-ratio: 2688 / 801;
  background: url(/assets/opening/extra-photoline-1024.webp) center / contain no-repeat;
  -webkit-mask-image: none; mask-image: none;
}

html:not(.wall-on) .info-after {
  position: relative; z-index: 3; max-width: 27rem; margin: 0 auto;
  padding: clamp(28px, 7vw, 46px) clamp(22px, 6vw, 40px) clamp(32px, 8vw, 50px);
  background: #E5CFAC; color: #2E1650;
  transform: rotate(-1deg);
  box-shadow: 0 16px 40px rgba(20, 10, 30, .45);
}
/* two bits of tape */
html:not(.wall-on) .info-after::before,
html:not(.wall-on) .info-after::after {
  content: ""; position: absolute; top: -8px; width: 62px; height: 22px;
  background: rgba(246, 230, 196, .78); box-shadow: 0 1px 2px rgba(0, 0, 0, .22);
}
html:not(.wall-on) .info-after::before { left: -22px; transform: rotate(-38deg); }
html:not(.wall-on) .info-after::after { right: -22px; transform: rotate(38deg); }

.info-after-head {
  margin: 0 0 .26em;
  font: 900 clamp(3.3rem, 19vw, 6rem)/.86 "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  /* never wider than the paper, also when the browser's text size is doubled */
  font-size: min(clamp(3.3rem, 19vw, 6rem), 19vw); overflow-wrap: anywhere;
  letter-spacing: .005em; text-transform: uppercase; color: #3B1A5E;
  text-shadow: .05em .05em 0 #FF3D8E;      /* the one big headline here: ONE clean pink shadow, down and to the right */
}
.info-after-text { margin: 0 0 1.5em; font: 600 1.0625rem/1.45 "Space Grotesk", "Helvetica Neue", Arial, sans-serif; }
.info-after-go { margin: 0; }

/* the button: printed like the poster, deep purple with one hard pink shadow */
.info-open {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; max-width: 100%; padding: .2em 1.5em;
  font: 700 .84rem/1 "Unbounded", "Arial Black", Arial, sans-serif;
  /* stays inside the screen when the browser's text size is doubled: smaller, and free to wrap */
  font-size: min(.84rem, 3.9vw);
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none; text-align: center;
  color: #F6E3CB; background: #3B1A5E; border-radius: 3px;
  box-shadow: 5px 5px 0 #FF3D8E;
  transform: rotate(-1.5deg);
  transition: transform .15s ease, box-shadow .15s ease;
}
.info-open:hover { transform: rotate(-1.5deg) translate(-1px, -1px); box-shadow: 7px 7px 0 #FF3D8E; }
.info-open:active { transform: rotate(-1.5deg) translate(2px, 2px); box-shadow: 2px 2px 0 #FF3D8E; }
.info-open:focus-visible { outline: 3px solid #FF3D8E; outline-offset: 7px; }

/* Wall on: the button on the poster's foot while the camera reads the poster. Upright screens:
   the poster is 90% of the width and its middle sits 46% down. */
.wall-on .info-after-go {
  position: absolute; z-index: 4; left: 50%; top: calc(46vh + 39.1vw); top: calc(46lvh + 39.1vw);
  width: 74vw; margin: -26px 0 0 -37vw; text-align: center;
  will-change: opacity, transform;
}

@media (min-aspect-ratio: 1/1) {
  /* wide screens: the board fills the height; the number's line is 68.9% down, in the middle.
     (The link is a little larger than the number, because the picture drifts slightly with the mouse.) */
  .wall-on .info-tel { left: 50%; top: 68.9vh; width: 40vh; height: 9vh; margin: -4.5vh 0 0 -20vh; }
  /* the poster is 84% of the height, its middle 30% across and halfway down */
  .wall-on .info-after-go { left: 30vw; top: 77.2vh; width: 46vh; margin: -30px 0 0 -23vh; }
  .wall-on .info-open { min-height: 60px; font-size: clamp(.84rem, 2.1vh, 1.15rem); }
}

@media (min-width: 900px), (min-height: 900px) {
  html:not(.wall-on) #know { background-image: url(/assets/opening/s6-sky-1600.webp); }
  html:not(.wall-on) #gallery { background-image: url(/assets/opening/extra-dawn-1600.webp); }
  html:not(.wall-on) #gallery .stick::before { background-image: url(/assets/opening/extra-photoline-1600.webp); }
}

@media (prefers-reduced-motion: reduce) {
  .info-open { transition: none; }
}
