/* home.css - opiumpuppets.com home page and 404. Builds on styles.css (top bar, plain background, fonts, yellow text boxes) */

/* Centers a block at its own width (used by the 404 page's image) */
.opiumCentered {
width: fit-content;
max-width: 100%;
margin: 0 auto;
}

/* Stage: everything between the top bar and the footer. The puppet parade fills it from behind and the
   content column (video, button, yellow boxes) floats on top */
.homeStage {
position: relative;
padding: 31px 0 56px;
flex: 1;
}

/* The stage takes the spare height on tall screens (body is a flex column, see styles.css) so the footer sits at the bottom.
   The puppet parade behind it is shared by every page now (parade.js, styles.css) */

/* Main column */
.home {
max-width: 1100px;
margin: 0 auto;
padding: 0 16px;
}

/* Clicks pass through the stage and column to the puppet parade behind; the visible things take them */
.homeStage, .home {
pointer-events: none;
}

.homeVideo, .homeCta a, .homeIntro > * {
pointer-events: auto;
}

/* The video: yellow border and a soft shadow like the top bar's */
.homeVideo {
display: block;
width: 100%;
max-width: 777px;
height: auto;
margin: 0 auto;
border: solid 6px #FFFF00;
box-shadow: 0 8px 18px rgba(0,0,0,0.6);
background: #000;
box-sizing: border-box;
}

.home h2 {
text-align: center;
margin: 0 0 18px;
}

/* Lead copy in the house yellow + hot pink style (.text p in styles.css) */
.homeIntro p {
margin: 0 0 14px;
text-align: center;
border: solid 5px black;
}

/* First box: a centered opening line, then two left-aligned paragraphs with a blank line between each */
.homeIntro p.homeStory {
text-align: left;
}

.homeStory span {
display: block;
}

.homeStory span + span {
margin-top: 1.5em; /* one line, the box's line-height */
}

.homeStory .homeStoryLead {
text-align: center;
}

.homeIntro p.homeLoud {
font-size: 40px;
color: #1c14ff;
transform: rotate(-1deg);
}

/* Signs page: one yellow box with every sign as a picture and its words underneath */
.signsBox {
pointer-events: auto;
background-color: #FFFF00;
border: solid 5px black;
box-shadow: 0 8px 18px rgba(0,0,0,0.6);
padding: 18px 20px 26px;
text-align: center;
font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt';
font-weight: bold;
color: #FF69B4;
text-shadow: 2px 2px black;
}

h1.signsTitle {
margin: 0 0 14px;
padding: 0;
background: none;
border: none;
box-shadow: none;
font-size: 44px;
color: #1c14ff;
transform: rotate(-1deg);
}

/* Wider column than the home page so five signs fit across */
.signsHome {
max-width: 1300px;
}

/* Image gallery of the 63 signs: rows fill left to right, centered, and wrap to fewer columns on smaller screens */
.signsGrid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 30px 24px;
margin-top: 8px;
}

/* --s is the zoom on the sign. The sign is a 92 x 150 pixel area of each 256px puppet image (the same
   crop as the Signs share card), so 2.174 makes it 200px wide. No separate image files: the picture
   is the puppet's gallery image, moved and clipped so only the sign shows */
.signTile {
--s: 2.174;
margin: 0;
width: calc(92px * var(--s) + 8px);
}

.signCrop {
position: relative;
overflow: hidden;
width: calc(92px * var(--s));
height: calc(150px * var(--s));
border: solid 4px black;
box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
background: #fff;
}

.signCrop img {
position: absolute;
left: calc(-164px * var(--s));
top: calc(-44px * var(--s));
width: calc(256px * var(--s));
height: auto;
max-width: none;
image-rendering: pixelated;
}

.signTile figcaption {
margin-top: 10px;
font-size: 21px;
line-height: 1.3;
overflow-wrap: break-word;
}

/* The one big button */
.homeCta {
text-align: center;
margin: 30px 0;
}

.homeCta a:link, .homeCta a:visited {
display: inline-block;
color: #1c14ff;
background-color: aquamarine;
border: solid 5px black;
border-radius: 8px;
box-shadow: 6px 6px 0 #000;
font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt';
font-size: 44px;
font-weight: bold;
padding: 12px 36px;
text-decoration: none;
transition: color 0.3s ease, transform 0.2s ease;
}

.homeCta a:hover {
color: #00FF00;
transform: scale(1.12) rotate(-2deg);
}


@media only screen and (max-width: 820px) {

.homeStage {
padding-top: 24px;
}

/* Smaller video on phones so more of the parade shows around it */
.homeVideo {
width: 78%;
}

.homeIntro p.homeLoud {
font-size: 30px;
}

h1.signsTitle {
font-size: 32px;
}

.signsBox {
padding: 14px 12px 22px;
}

/* Smaller signs on phones: two across on most of them */
.signsGrid {
gap: 22px 12px;
}

.signTile {
--s: 1.4;
}

.signTile figcaption {
font-size: 16px;
}

.homeCta a:link, .homeCta a:visited {
font-size: 30px;
padding: 10px 22px;
}

}
