/* /welcome/: the intro slides students see after the homepage email box, modeled on Hack Club's
   slack.hackclub.com/slides in our blues and grays. Shantell Sans (OFL) is the handwritten font for the
   "you might ask" lines, the same one Hack Club uses there. Loaded after app.css. */
@font-face { font-family: "Shantell Sans"; src: url("/fonts/shantell-sans.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

body.deck {
  background-color: #FFFFFF;
  background-image: radial-gradient(#E6ECF4 22.8%, transparent 22.8%), radial-gradient(#E9EAEE 22.8%, transparent 22.8%);
  background-size: 64px 64px;
  background-position: 0 0, 32px 32px;
  min-height: 100vh;
}
.deck-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.deck-top .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.deck-top .brand img { display: block; height: 36px; width: auto; }
.deck-top .brand span { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1; }
.deck-top .skip { color: var(--muted); font-size: 16px; text-decoration: none; }
.deck-top .skip:hover { color: var(--text); }

.slide { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 96px 96px 112px; text-align: center; }
.js .slide { display: none; }
.js .slide.on { display: flex; }
.slide-in { width: 100%; max-width: 1320px; }
.slide h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 600; line-height: 1.1; margin: 0 0 18px; outline: none; }
.slide p { font-size: clamp(18px, 2vw, 24px); line-height: 1.5; max-width: 1060px; margin: 0 auto 18px; }
.slide p.quiet { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }
.slide p a { color: var(--green-dark); text-decoration-thickness: 2px; }
.slide .ask { margin-top: 26px; }
.say { font-family: "Shantell Sans", var(--font); font-size: clamp(26px, 3vw, 36px); color: var(--green); line-height: 1.3; }
.ask .say:first-child { margin-right: 2px; }
.slide h2 { font-family: var(--font); font-size: 22px; font-weight: 700; text-align: left; margin: 28px 0 14px; }

/* Slide 1: the three logo pieces snapping together, in place of Hack Club's GIF */
.hello { width: min(460px, 100%); aspect-ratio: 500 / 271; margin: 6px auto 22px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; overflow: hidden; }
.hello svg { width: 42%; height: auto; overflow: visible; }
.hello path { transform-box: fill-box; transform-origin: center; }
.on .hello .p1 { animation: snap1 .9s cubic-bezier(.2, .9, .3, 1.25) .15s both; }
.on .hello .p2 { animation: snap2 .9s cubic-bezier(.2, .9, .3, 1.25) .35s both; }
.on .hello .p3 { animation: snap3 .9s cubic-bezier(.2, .9, .3, 1.25) .55s both; }
.on .hello svg { animation: pop .35s ease-out 1.4s both; }
@keyframes snap1 { from { transform: translate(-46%, -40%) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes snap2 { from { transform: translate(-52%, 34%) rotate(10deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes snap3 { from { transform: translate(60%, 22%) rotate(16deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { 50% { transform: scale(1.06); } }

/* Card rows, like Hack Club's slides 1 and 3 */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 28px; text-align: center; }
.cards .card { background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 30px 24px 28px; box-shadow: 0 10px 30px rgba(36, 44, 56, .06); }
.cards .card h3 { font-family: var(--font); font-size: 24px; font-weight: 700; line-height: 1.3; margin: 18px 0 10px; }
.cards .card p { font-size: 17px; line-height: 1.5; color: var(--muted); margin: 0; }
.icon { width: 76px; height: 76px; border-radius: 22px; background: var(--tint); color: var(--green-dark); display: inline-grid; place-items: center; }
.icon svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Slide 4: real photos on top of each card, from Unsplash (credits in /img/README.md) */
.cards.photos .card { padding: 0 0 26px; overflow: hidden; }
.cards.photos .pic { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--tint); }
.cards.photos .card h3 { margin: 20px 22px 10px; }
.cards.photos .card p { margin: 0 22px; }
.cards .card:nth-child(2) .icon { background: #D3DCE9; }
.cards .card:nth-child(3) .icon { background: #C2CEE0; }
.cards .card:nth-child(4) .icon { background: #A5BBD3; }

/* Slide 3: a scrolling row of the guide's eight sections */
.rail-wrap { position: relative; }
.rail { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; text-align: left; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .mod { flex: 0 0 264px; scroll-snap-align: start; background: var(--raised); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(36, 44, 56, .06); display: flex; flex-direction: column; }
/* Each section is a video, so the top of each card is a play button on green */
.mod .top { background: var(--tint); height: 120px; display: flex; align-items: center; justify-content: center; }
.mod .top::after { content: ""; width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 6px 16px rgba(36, 44, 56, .14);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%23116632'/%3E%3C/svg%3E") 55% 50% / 26px no-repeat; }
.rail .mod:nth-child(even) .top { background: #D3DCE9; }
.mod h3 { font-family: var(--font); font-size: 20px; font-weight: 700; line-height: 1.3; margin: 18px 20px 22px; }
.mod p { font-size: 16px; color: var(--muted); margin: 0 20px 22px; text-align: left; }
.mod p b { color: var(--text); font-weight: 600; }
.rail-btn { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--green-dark); box-shadow: 0 6px 18px rgba(36, 44, 56, .14); font-size: 22px; }
.rail-btn:hover { background: #fff; color: var(--green-dark); border-color: var(--green); transform: translateY(-50%) scale(1.05); }
.rail-btn { transform: translateY(-50%); }
.rail-btn.left { left: -18px; }
.rail-btn.right { right: -18px; }
.rail-btn[hidden] { display: none; }
.rail-btn svg { width: 22px; height: 22px; fill: currentColor; }
.rail-btn.left svg { transform: scaleX(-1); }
.doors { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.doors div { background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 16px 22px; display: flex; align-items: center; gap: 14px; text-align: left; font-size: 18px; line-height: 1.4; max-width: 420px; }
.doors .icon { width: 52px; height: 52px; border-radius: 16px; flex: none; }
.doors .icon svg { width: 28px; height: 28px; }

/* Slide 5: the two checks before sign-up */
.ready-checks { display: grid; gap: 28px; justify-content: center; margin-top: 30px; }
.ready-checks p { font-size: 18px; margin: 0 0 8px; }
.ready-checks label { display: inline-flex; align-items: center; gap: 14px; font-size: clamp(20px, 2.2vw, 24px); font-weight: 400; cursor: pointer; }
.ready-checks input { width: 24px; height: 24px; min-height: 24px; margin: 0; accent-color: var(--green); flex: none; cursor: pointer; }
.ready-checks a { color: var(--green-dark); text-decoration-thickness: 2px; }
.hint { color: var(--green-dark); font-weight: 600; margin-top: 22px !important; }
.hint[hidden] { display: none; }
.slide .after { margin-top: 34px; }

/* Next and back buttons, at the right and left edges like Hack Club's */
.deck-nav { display: none; }
.js .deck-nav { display: block; }
.go { position: fixed; top: 50%; z-index: 6; width: 60px; height: 48px; margin-top: -24px; border-radius: 12px; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 8px 22px rgba(85, 118, 168, .3); transition: transform .15s ease, background-color .15s ease, opacity .15s ease; }
.go:hover { background: var(--green-dark); transform: scale(1.06); }
.go:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.go svg { width: 28px; height: 28px; fill: currentColor; }
.go.next { right: 16px; }
.go.prev { left: 16px; background: #fff; color: var(--green-dark); border: 1px solid var(--line-strong); box-shadow: 0 6px 18px rgba(36, 44, 56, .1); }
.go.prev svg { transform: scaleX(-1); }
.go.prev:hover { background: #fff; border-color: var(--green); }
.go[hidden] { display: none; }
.go.off { opacity: .45; box-shadow: none; }
.go.off:hover { background: var(--green); transform: none; }
.go.nudge { animation: nudge .4s ease; }
@keyframes nudge { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.dots { position: absolute; left: 50%; top: 31px; z-index: 6; transform: translateX(-50%); display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dots li { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); margin: 0; transition: width .2s ease, background-color .2s ease; }
.dots li[aria-current="step"] { width: 28px; border-radius: 6px; background: var(--green); }

@media (max-width: 1180px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .slide { align-items: flex-start; padding: 84px 20px 112px; }
  .slide p { line-height: 1.55; }
  .slide h2 { font-size: 19px; }
  .cards { grid-template-columns: 1fr; gap: 14px; margin-top: 20px; }
  .cards .card { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: start; padding: 18px; text-align: left; }
  .cards .card .icon { grid-row: span 2; width: 56px; height: 56px; border-radius: 16px; }
  .cards .card .icon svg { width: 28px; height: 28px; }
  .cards .card h3 { font-size: 19px; margin: 2px 0 0; }
  .cards .card p { font-size: 15.5px; }
  .cards.photos .card { grid-template-columns: 104px 1fr; padding: 12px 16px 12px 12px; }
  .cards.photos .pic { grid-row: span 2; width: 104px; height: 104px; aspect-ratio: auto; border-radius: 12px; }
  .cards.photos .card h3 { margin: 4px 0 0; }
  .cards.photos .card p { margin: 0; }
  .rail { margin: 0 -20px; padding: 4px 20px 18px; scroll-padding: 0 20px; }
  .rail .mod { flex-basis: 240px; }
  .rail-btn { display: none; }
  .mod .top { height: 96px; }
  .doors div { font-size: 16px; width: 100%; }
  /* On phones the buttons sit in a bar at the bottom, with the dots between them */
  .js .deck-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; height: 84px; background: linear-gradient(rgba(255, 255, 255, 0), #FFFFFF 30%); }
  .go { top: auto; bottom: 18px; margin-top: 0; }
  .dots { position: fixed; top: auto; bottom: 37px; }
}
@media (prefers-reduced-motion: reduce) {
  .on .hello path, .on .hello svg, .go.nudge { animation: none; }
}
