/* The look shared by Home, Sign Up and Deck Prep, matching the Squarespace site:
   Archivo Black headings, Space Grotesk text, the purple maze background and the white wave footer.
   The sign-up form, admin and posters (in /open-decks/) keep their own styles. */

:root {
  --purple: #2e045c;
  --text: #fafafa;
  /* The footer's icon colour. */
  --deep: #30004b;
  --font-head: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
  --font-text: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Room down the sides: 24px on phones, more on bigger screens. */
  --gutter: clamp(1.5rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  /* 19px on phones up to 21px on computers, like the Squarespace site. */
  font: 600 clamp(1.1875rem, 1.1rem + 0.25vw, 1.3125rem)/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; z-index: 30;
  padding: 1.2rem 2rem; border-radius: 300px; background: #fff; color: var(--deep);
  font-size: 1rem; text-transform: uppercase; text-decoration: none;
}
.skip:focus { left: 1rem; top: 1rem; }

/* The purple part of every page: the menu, the content, down to the wave. The maze pattern is pinned
   to the screen, like on the sign-up pages, so it stays the same small size however long the page is. */
.page {
  position: relative; isolation: isolate;
  padding-bottom: calc(6vw + 3rem);
}
.page::before {
  content: ''; position: fixed; z-index: -1; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh;
  background: var(--purple) url('background.jpg') center / cover no-repeat;
}

/* ---- Menu ---- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem var(--gutter);
}
.brand img { display: block; width: 4.5rem; height: auto; }
.menu { display: flex; align-items: center; gap: 1.75rem; font: 600 1rem/1.2 var(--font-text); }
.menu a { text-decoration: none; }
.menu a:hover, .menu a[aria-current='page'] { text-decoration: underline; text-underline-offset: 0.45em; }
.ig { display: inline-block; line-height: 0; }
.ig svg { width: 2rem; height: 2rem; }
.menu-toggle { display: none; }

/* Phones and tablets: a two-line button that opens the menu over the whole screen. */
@media (max-width: 860px) {
  .menu-toggle {
    position: relative; z-index: 21; display: block; width: 2.75rem; height: 2.75rem; margin-right: -0.375rem;
    padding: 0; border: 0; background: none; color: var(--text); cursor: pointer;
  }
  .menu-toggle span {
    position: absolute; left: 0.375rem; right: 0.375rem; height: 2px; background: currentColor;
    transition: transform 0.2s;
  }
  .menu-toggle span:first-child { top: calc(50% - 0.375rem); }
  .menu-toggle span:last-child { top: calc(50% + 0.375rem); }
  .menu-open .menu-toggle span:first-child { transform: translateY(0.375rem) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: translateY(-0.375rem) rotate(-45deg); }
  .menu {
    position: fixed; inset: 0; z-index: 20; display: none; flex-direction: column; justify-content: center; gap: 1.75rem;
    padding: 5rem var(--gutter); text-align: center; font-size: 1.625rem;
    background: var(--purple) url('background.jpg') center / cover no-repeat;
  }
  .menu-open .menu { display: flex; }
  .menu-open { overflow: hidden; }
  .menu .ig svg { width: 2.5rem; height: 2.5rem; }
}

/* ---- Content ---- */
main { padding: 0 var(--gutter); }
.hero-logo { display: block; width: min(34.375rem, 100%); margin: 0.5rem auto 1.25rem; }
.col { max-width: 52rem; margin: 0 auto; }
.col.wide { max-width: 55rem; }
.center { text-align: center; }
h1, h2 {
  margin: 2.5rem 0 1.25rem; color: var(--text); text-align: center; text-transform: uppercase;
  font: 400 clamp(1.75rem, 1.3rem + 1.4vw, 2.26rem)/1.15 var(--font-head); letter-spacing: -0.02em;
  text-wrap: balance;
}
h2.after { margin-top: 0; }
/* The smaller heading at the top of the Sign Up page. */
.lead-heading { max-width: 34rem; margin: 1.5rem auto 1.25rem; font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem); line-height: 1.2; }
p { margin: 0 0 1rem; }
.smaller { font-size: 0.85em; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25em; }
li { margin-bottom: 0.55em; padding-left: 0.15em; }
hr { width: min(100%, 31rem); margin: 1.75rem auto; border: 0; border-top: 1px solid rgba(250, 250, 250, 0.75); }

.follow { margin: 0 0 0.5rem; text-align: center; }
.ig-center { display: block; width: fit-content; margin: 0 auto; }

/* The events list and the sign-ups box, from the sign-up system. Their height is set by site.js. */
.embed { display: block; width: 100%; border: 0; }
.events-embed { max-width: 47rem; margin: 0 auto; height: 11.5rem; }
.status-embed { max-width: 48rem; margin: 0 auto; height: 15.625rem; }
/* Sign Up: the sign-up panel. A big box in the site's yellow outline that takes you through three
   steps: the Sign up button, the considerations (scrolled inside the box, read to the bottom), then
   the sign-up form. site.js moves between them with the flow-on-read and flow-on-form classes on <html>. */
.signup-flow {
  width: min(100%, 58rem); margin: 1.5rem auto 0; scroll-margin: 0.75rem 0;
  border: 1px solid #ffde00; border-radius: 1rem; background: rgba(22, 4, 46, 0.45); overflow: hidden;
}
.flow-step { display: none; }
.flow-start { display: block; padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2rem); }
.flow-on-read .flow-start, .flow-on-form .flow-start { display: none; }
.flow-on-read .flow-read, .flow-on-form .flow-form { display: flex; flex-direction: column; height: clamp(26rem, 78svh, 56rem); }
.flow-start .lead-heading { margin-top: 0.5rem; }
.flow-start .status-embed { margin-top: 1rem; }
/* "Read the considerations", only while sign-ups aren't open. */
.flow-peek { display: none; margin: 0.75rem 0 0; text-align: center; font-size: 0.85em; }
.flow-closed .flow-peek { display: block; }
.flow-link { padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.flow-bar {
  position: relative; display: flex; align-items: center; gap: 0.75rem; flex: none;
  padding: 0.75rem clamp(0.75rem, 3vw, 1.5rem); border-bottom: 1px solid rgba(255, 222, 0, 0.45);
  font-size: 0.8em; background: rgba(22, 4, 46, 0.55);
}
.flow-back {
  flex: none; padding: 0.375rem 0.875rem; border: 1px solid rgba(250, 250, 250, 0.5); border-radius: 62.4375rem;
  background: none; color: var(--text); font: inherit; cursor: pointer;
}
.flow-back:hover { border-color: #fafafa; background: rgba(250, 250, 250, 0.08); }
.flow-steps { flex: 1; text-align: right; }
.flow-all { display: none; color: #9be3b8; }
.flow-done-reading .flow-left { display: none; }
.flow-done-reading .flow-all { display: inline; }
/* How far down the considerations you've read. */
.flow-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.flow-progress span { display: block; width: var(--read, 0%); height: 100%; background: #c4adff; transition: width 0.15s; }
.flow-pane { position: relative; flex: 1; min-height: 0; }
.flow-scroll {
  height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
  scrollbar-width: none;
}
.flow-scroll::-webkit-scrollbar { display: none; }
/* Its scrollbar: purple and always showing while there's more to read, like the events list's,
   since phones hide their own. site.js sets where the thumb is. */
.flow-scrollbar {
  display: none; position: absolute; top: 0.375rem; bottom: 0.375rem; right: 0.25rem; width: 0.625rem;
  border-radius: 99rem; background: rgba(196, 173, 255, 0.25); cursor: pointer; touch-action: none;
}
.flow-more .flow-scrollbar { display: block; }
.flow-scrollbar div {
  position: absolute; left: 0; right: 0; top: var(--flow-thumb-top, 0); height: var(--flow-thumb-size, 2rem); border-radius: 99rem;
  background: #a47cf5; box-shadow: 0 0 0 1px rgba(26, 20, 36, 0.6), 0 0 0.5rem rgba(164, 124, 245, 0.6);
}
/* The panel's outline already shows where it is, so no extra ring when it's focused for the keyboard. */
.flow-scroll:focus { outline: none; }
.flow-done { padding: 1.5rem 0 0.5rem; text-align: center; }
.flow-btn {
  max-width: 100%; padding: 0.875rem 2rem; border: 0; border-radius: 62.4375rem;
  background: #c4adff; color: #1a1424; font: 600 1rem/1.3 'Space Grotesk', sans-serif; cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
}
.flow-btn:hover { background: #ddd0ff; }
/* Until you've scrolled to the bottom it doesn't do anything (it scrolls you down instead). */
.flow-unread .flow-btn { opacity: 0.45; cursor: not-allowed; }
.flow-frame { flex: 1; display: block; width: 100%; border: 0; }
@media (max-width: 47.5rem) {
  /* On phones the box reaches nearly to the screen's edges, so the form has room. */
  .signup-flow { width: auto; margin-left: calc(0.5rem - var(--gutter)); margin-right: calc(0.5rem - var(--gutter)); }
  .flow-steps { font-size: 0.9em; }
}

/* Blocks placed side by side in the page editor. They stack again on phones and small tablets. */
.side-by-side { display: flex; align-items: flex-start; gap: clamp(1rem, 3vw, 2.5rem); }
.side-by-side > * { flex: 1 1 0; min-width: 0; }
/* Side by side, their tops line up. */
@media (min-width: 47.5625rem) {
  .side-by-side.side-by-side > * { margin-top: 0; }
}
@media (max-width: 47.5rem) {
  .side-by-side { display: block; }
}

/* The mailing list box: an email box and a Join button. */
.mailing-embed { max-width: 48rem; margin: 1.5rem auto; height: 13.5rem; }
/* This month's poster, 4:5 like an Instagram post, so the whole poster always shows. */
.poster-embed {
  max-width: 30rem; margin: 0 auto; height: auto; aspect-ratio: 4 / 5;
  border-radius: 0.5rem; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.45);
}

/* Deck Prep: the video and the step pictures. */
.video { position: relative; aspect-ratio: 16 / 9; margin: 1.5rem 0 1rem; border-radius: 0.5rem; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 1.75rem; }
.steps img { display: block; margin: 1rem auto 0; border-radius: 0.25rem; }
.caps { text-transform: uppercase; }

/* ---- Footer: a white band under a curved edge, with the Instagram icon. ---- */
.site-footer { position: relative; padding: 1.5rem 1rem 3.5rem; background: #fff; color: var(--deep); text-align: center; }
.wave { position: absolute; left: 0; bottom: calc(100% - 1px); display: block; width: 100%; height: 6vw; min-height: 1.75rem; }
