/* Ciao, Bambino: a long Italian lunch drawn in red felt pen. The page itself is hand-drawn stripes (paper.jpg), a
   striped awning runs along the top and bottom, and every section sits on its own cream card with a wobbly double pen
   edge and a little doodle over its title. When & Where is a postcard with a stamp and a postmark, the name ideas sit
   inside a checkered pizza box whose lid lifts as it comes into view (theme.js), and the wishes hang on a line with
   clothespins. Colors and fonts come from vars.css. */

body{background-size:300px}
main{overflow-x:clip}   /* the wash line reaches past the cards; the page never scrolls sideways */

/* ---------- header: the page's stripes run behind it too (the hill town is only lines), no fade at the foot since
   the stripes carry on below; the title wider (a long script line) with a cream glow to read over the stripes ---------- */
.hero.painted{background:var(--paper) var(--art-paper) repeat; background-size:300px}
.hero.painted .back{background-image:url(../art/hero-lines.webp)}   /* hero-back.webp has the stripes baked in, for the TV */
/* no drawing is ever cropped: every layer is shown full width from the bottom (the sky above is empty), and phones
   get their own narrower arrangement of the same drawings, all of them whole */
.hero.painted .layer{left:0; right:0; background-size:100% auto}
@media (max-width:899px){
  .hero.painted{height:clamp(430px, 60svh, 540px)}   /* the phone arrangement is shorter; no empty band under the title */
  .hero.painted .back{background-image:url(../art/hero-lines-phone.webp)}
  .hero.painted .mid{background-image:url(../art/hero-mid-phone.webp)}
  .hero.painted .front{background-image:url(../art/hero-front-phone.webp)}
}
.hero.painted::after{display:none}
.hero-title{width:min(80vw, 360px); filter:drop-shadow(0 0 10px rgba(var(--card-rgb),.95)) drop-shadow(0 0 22px rgba(var(--card-rgb),.9))}
@media (min-width:900px){.hero-title{width:min(36vw, 480px)}}

/* ---------- sections: cream linen cards with a hand-drawn edge (each corner a little different) ---------- */
.card, .invite, .pick, footer{background:var(--card) url(../art/linen.jpg) repeat; background-size:300px}
section{padding-block:26px 10px}
.card{padding:30px max(18px, 5vw) 30px; border:2px solid var(--ink);
  border-radius:22px 7px 26px 9px / 9px 24px 7px 22px;
  box-shadow:4px 5px 0 rgba(var(--ink-rgb),.13)}
.card::before{inset:6px; border:1.25px solid rgba(var(--ink-rgb),.4); border-radius:18px 5px 22px 7px / 7px 20px 5px 18px}
.col > section:nth-of-type(3n+2) > .card{border-radius:8px 24px 9px 20px / 22px 8px 26px 9px; box-shadow:-4px 5px 0 rgba(var(--ink-rgb),.13)}
.col > section:nth-of-type(3n+2) > .card::before{border-radius:6px 20px 7px 16px / 18px 6px 22px 7px}
.col > section:nth-of-type(3n) > .card{border-radius:14px 18px 8px 26px / 20px 10px 24px 8px}
.col > section:nth-of-type(3n) > .card::before{border-radius:10px 14px 6px 22px / 16px 8px 20px 6px}
.sec-title{font-size:clamp(44px, 12.5vw, 58px); line-height:1; margin-bottom:10px}
.sec-title::before{content:""; display:none; width:72px; height:72px; margin:0 auto 6px; background:var(--doodle) no-repeat center / contain;
  transform:rotate(-6deg)}
#rsvp{--doodle:url(../art/spaghetti.webp)}
#poll{--doodle:url(../art/bottle.webp)}
#pool{--doodle:url(../art/lemons.webp)}
#suggest{--doodle:url(../art/pizza.webp)}
#wishes{--doodle:url(../art/heart.webp)}
#registry{--doodle:url(../art/pram.webp)}
#checkin{--doodle:url(../art/tomatoes.webp)}
#raffle{--doodle:url(../art/moka.webp)}
#quiz{--doodle:url(../art/heart.webp)}
#match{--doodle:url(../art/pram.webp)}
#photos{--doodle:url(../art/farfalle.webp)}
:is(#rsvp, #poll, #pool, #suggest, #wishes, #registry, #checkin, #raffle, #photos, #quiz, #match) .sec-title::before{display:block}
.lede{color:var(--soft)}

/* the invitation wears the same card (it has no .card of its own) */
.invite{border:2px solid var(--ink); border-radius:9px 24px 7px 22px / 22px 7px 26px 9px;
  box-shadow:4px 5px 0 rgba(var(--ink-rgb),.13); outline:1.25px solid rgba(var(--ink-rgb),.4); outline-offset:-8px;
  padding:30px max(18px, 5vw) 30px; margin-top:18px}

/* the countdown: a little card drawn in dashes */
.log{border:2px dashed rgba(var(--ink-rgb),.55); border-radius:16px 6px 16px 6px; background:transparent}
.log::before{display:none}
.count div{border-left-style:dashed}

/* ---------- When & Where: a postcard. A stamp in the top corner with a postmark over its edge, the details
   written on lines; on a laptop the card splits down the middle like the back of a real postcard. ---------- */
#details > .card{padding-top:96px}
#details > .card > .sec-title::after{content:""; position:absolute; top:14px; right:14px; width:66px; height:53px;
  background:url(../art/stamp.webp) no-repeat center / contain; transform:rotate(4deg)}
#details > .card > .sec-title::before{content:""; display:block; position:absolute; top:12px; right:56px; width:86px; height:60px;
  margin:0; background:url(../art/postmark.webp) no-repeat center / contain; opacity:.7; transform:rotate(-8deg)}
.detail-grid h3{display:inline-block; padding:0 6px 3px; border-bottom:2px solid rgba(var(--ink-rgb),.35); letter-spacing:.14em}
.detail-grid .addr{border-bottom:1.5px dashed rgba(var(--ink-rgb),.28); padding-bottom:8px}
@media (min-width:900px){
  .col{max-width:680px}
  .detail-grid{grid-template-columns:1fr 1fr; gap:22px 40px; position:relative}
  .detail-grid > .span{grid-column:auto}
  .detail-grid::before{content:""; position:absolute; top:4px; bottom:4px; left:50%; border-left:2px solid rgba(var(--ink-rgb),.3)}
}

/* ---------- the vote: two picks, then the scooters race ---------- */
.pick{border-radius:18px 6px 18px 6px; border-width:2px}
.pick .script{font-size:44px; line-height:1.1; margin-bottom:4px}
.lane{border-bottom:2px dashed rgba(var(--ink-rgb),.3)}
:root{--racer-size:64px}

/* ---------- name ideas: inside a pizza box. Aaron's hand-drawn checkered frame is its rim: the four corners exactly as
   drawn, and along each side its checks repeat whole as the list grows (the slices fall on check edges, ten checks a
   run, so the red and cream keep alternating). The lid is the same frame with the pizza on it: shut until the box
   comes into view, then it lifts open (theme.js adds lid-ready, then peek). With no script or reduce motion it's open. ---------- */
.name-lists{position:relative; perspective:900px; border-radius:0; padding:14px 10px;
  border:46px solid transparent; border-image:url(../art/frame.webp) 134 138 136 134 / 46px round;
  background:var(--card) url(../art/linen.jpg) repeat padding-box; background-size:300px;
  filter:drop-shadow(0 12px 12px rgba(var(--shadow-rgb),.28))}
.name-lists::before{content:""; display:none; position:absolute; inset:-46px; z-index:2; pointer-events:none; transform-origin:50% 0;
  border:46px solid transparent; border-image:url(../art/frame.webp) 134 138 136 134 / 46px round;
  background:url(../art/pizza.webp) no-repeat center / min(56%, 220px) auto padding-box, var(--card) url(../art/linen.jpg) repeat padding-box;
  background-size:min(56%, 220px) auto, 300px}
.lid-ready .name-lists::before{display:block}
.lid-ready .peek .name-lists::before{animation:lid-open 1.3s cubic-bezier(.45,.05,.3,1) .15s forwards}
@keyframes lid-open{
  0%{transform:rotateX(0)}
  15%{transform:rotateX(-12deg)}
  25%{transform:rotateX(-6deg)}
  80%{transform:rotateX(-104deg); opacity:1}
  100%{transform:rotateX(-110deg); opacity:0; visibility:hidden}
}
.name-list li{border-bottom-style:dashed}
.name-list .nm{font-size:30px; overflow-wrap:break-word}

/* ---------- wishes: hung on a wash line with clothespins ---------- */
.note{border-radius:4px; background-image:none}
#wishes > .card{overflow:hidden}   /* the wash line stops at the card's edge */
.note::before{content:""; position:absolute; top:7px; left:-60vw; right:-60vw; border-top:2px solid rgba(var(--ink-rgb),.5); pointer-events:none}
.note .by{font-size:30px}

/* ---------- the footer: on a cream band, so its lines read over the stripes; the script line kept to the width ---------- */
footer{border-top:2px solid var(--ink); box-shadow:inset 0 6px 0 -4px rgba(var(--ink-rgb),.25); padding-inline:16px}
/* the one line still in Homemade Apple, the header title's hand (Aaron: easier-to-read Caveat everywhere else) */
.foot-line{font-family:"Homemade Apple", cursive; font-size:clamp(26px, 7.6vw, 40px); line-height:1.3; overflow-wrap:anywhere}

/* ---------- small things ---------- */
.yourpart li a{border-style:dashed}
.yourpart li.done a{background:rgba(var(--wash-rgb),.45)}

@media (prefers-reduced-motion: reduce){.lid-ready .name-lists::before{display:none}}
/* on the big screen the boxes stand open: the names are the point there */
.lid-ready #tv .name-lists::before{display:none}
/* the wash line stops at the notes' edges on the big screen, so the notes keep their full size */
#tv .tv-notes{overflow-x:clip}
