/* festcull waitlist page. Colour tokens from docs/landing-page.md; the layout departs from its
   one-column rules on purpose (see Build decisions). */

:root {
  --bg: #0E0E10;
  --surface: #18181B;
  --surface-2: #1F1F23;
  --text: #F2F2F2;
  --text-muted: #A1A1AA;
  --border: rgba(255, 255, 255, 0.1);
  /* The email field's edge must reach 3:1 against the page (WCAG 1.4.11); white at 10% is 1.3:1. */
  --field-border: #71717A;
  --accent: #DC2626;
  --accent-hover: #B91C1C;
  --error: #F87171;

  --gutter: 20px;
  --section-gap: 96px;
  --container: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --section-gap: 160px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text-muted);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2 {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  max-width: 15ch;
  font-size: clamp(42px, 22px + 5.6vw, 92px);
  letter-spacing: -0.035em;
  line-height: 0.98;
}

/* One sentence per line, so each beat of the headline reads whole. */
.hero h1 {
  max-width: none;
}

.hero h1 span {
  display: block;
}

h2 {
  font-size: clamp(28px, 20px + 2vw, 46px);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

p {
  margin: 0;
}

h1 + p,
h2 + p {
  margin-top: 20px;
}

.lede {
  max-width: 34em;
  color: var(--text);
  font-size: clamp(18px, 16px + 0.5vw, 21px);
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Shared widths */

.top,
.hero-text,
.app-shot,
.feature,
.proof,
.pair,
.editor,
.about,
.join-text,
.foot {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--gutter);
  padding-left: var(--gutter);
}

/* Top bar, over the hero photo */

.top {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  padding-top: 24px;
}

.wordmark,
.wordmark a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  text-decoration: none;
}

.wordmark {
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Hero: the whole stage behind the headline, the app rising out of it */

.hero {
  position: relative;
  isolation: isolate;
  padding-top: clamp(96px, 30vh, 260px);
}

.hero-bg {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: min(100%, 980px);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(14, 14, 16, 0.55) 0%, rgba(14, 14, 16, 0.2) 22%, rgba(14, 14, 16, 0.78) 48%, var(--bg) 82%),
    linear-gradient(to right, rgba(14, 14, 16, 0.7) 0%, rgba(14, 14, 16, 0) 70%);
}

.hero .signup {
  max-width: 600px;
}

.app-shot {
  display: block;
  margin-top: clamp(56px, 8vw, 96px);
}

.shot img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.app-shot img {
  border-radius: 12px;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Signup form: label above, field and button on one row from 480 px, both 48 px tall. */

.signup {
  margin-top: 36px;
}

.signup label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

.signup-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signup input,
.signup button {
  height: 48px;
  border-radius: 8px;
  font: inherit;
}

.signup input {
  width: 100%;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid var(--field-border);
  background: var(--surface);
  color: var(--text);
}

.signup input[aria-invalid="true"] {
  border: 2px solid var(--error);
  padding: 0 13px;
}

.signup button {
  padding: 0 24px;
  border: 0;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, transform 0.15s;
}

.signup button:hover {
  background: var(--accent-hover);
}

.signup button:active {
  transform: translateY(1px);
}

.signup-privacy {
  display: inline-block;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

.survey-privacy {
  color: var(--text-muted);
  font-size: 15px;
}

.signup-error {
  margin-top: 8px;
  color: var(--error);
  font-size: 15px;
  line-height: 1.4;
}

.signup-done {
  margin-top: 36px;
  color: var(--text);
  font-size: 20px;
}

@media (min-width: 480px) {
  .signup-row {
    flex-direction: row;
    align-items: center;
  }

  .signup input {
    flex: 1;
  }
}

/* Feature rows: text beside its demo on wide screens */

.feature,
.editor {
  margin-top: var(--section-gap);
}

.feature {
  display: grid;
  gap: 48px;
  align-items: center;
}

.feature-text {
  max-width: 560px;
}

@media (min-width: 960px) {
  .feature {
    grid-template-columns: 5fr 7fr;
    gap: 72px;
  }

  .feature.flip {
    grid-template-columns: 7fr 5fr;
  }

  .feature.flip .feature-text {
    order: 2;
  }
}

/* Grouping demo: one folder in, a folder per band out */

.grouping {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: radial-gradient(120% 140% at 0% 0%, #1D1D22 0%, var(--surface) 55%);
}

.folders {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  list-style: none;
}

.folder {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
  color: var(--text);
}

.after .folder + .folder {
  margin-top: 14px;
}

.folder-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.folder-name::before {
  content: "";
  flex: none;
  width: 18px;
  height: 14px;
  border-radius: 2px;
  background: var(--text-muted);
  clip-path: polygon(0 0, 40% 0, 50% 18%, 100% 18%, 100% 100%, 0 100%);
}

.count {
  margin-left: auto;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.bar {
  flex-basis: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--text) calc(var(--share) * 100%), rgba(255, 255, 255, 0.08) 0);
}

/* The names keep the muted colour; the fade is a mask over the list, so the first name reads at full contrast. */
.files {
  margin: 12px 0 0;
  padding: 0 0 0 28px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  list-style: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
}

.arrow {
  justify-self: center;
  width: 24px;
  height: 24px;
  background: var(--text-muted);
  clip-path: polygon(40% 0, 60% 0, 60% 62%, 85% 62%, 50% 100%, 15% 62%, 40% 62%);
}

/* Culling demo: a set's filmstrip, its red labels lighting up in turn */

.filmstrip {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.filmstrip ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 600px) {
  .filmstrip ol {
    grid-template-columns: repeat(5, 1fr);
  }
}

.frame {
  position: relative;
}

.frame img {
  width: 100%;
  border-radius: 6px;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.3s, opacity 0.5s var(--ease);
}

.frame span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

/* Final state: the picks wear the Select label, the rest step back. */
.frame.pick img {
  outline-color: var(--accent);
}

.frame.pick::after {
  opacity: 1;
  transform: none;
}

.filmstrip .frame:not(.pick) img {
  opacity: 0.5;
}

/* Proof: the number, big */

.proof {
  margin-top: var(--section-gap);
}

.proof-inner {
  max-width: 820px;
}

.proof h2 {
  font-size: clamp(28px, 20px + 2vw, 46px);
}

.big {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: clamp(96px, 40px + 14vw, 220px);
  letter-spacing: -0.05em;
  line-height: 0.85;
}

.dots {
  display: flex;
  gap: 8px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.dots li {
  width: clamp(18px, 4vw, 36px);
  aspect-ratio: 3 / 2;
  border-radius: 4px;
  background: var(--accent);
  transition: background-color 0.3s, transform 0.4s var(--ease);
}

.dots li.miss {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--field-border);
}

.proof p {
  max-width: 560px;
  margin-top: 28px;
}

/* Photo strip: the night itself */

.night {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78vw;
  gap: 8px;
  margin-top: var(--section-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.night::-webkit-scrollbar {
  display: none;
}

.night picture {
  scroll-snap-align: center;
}

.night img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .night {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
  }
}

/* Trust and status, side by side */

.pair {
  display: grid;
  gap: 16px;
  margin-top: var(--section-gap);
}

@media (min-width: 900px) {
  .pair {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 60%);
}

.card h2 {
  font-size: clamp(26px, 20px + 1.4vw, 36px);
}

.card p {
  color: var(--text-muted);
}

/* Editor: three photos in a row; on phones one shows and the others scroll sideways. */

.editor-photos {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 12px;
  margin-top: 48px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 10px;
}

.editor-photos img {
  width: 100%;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  border-radius: 10px;
}

@media (min-width: 768px) {
  .editor-photos {
    grid-auto-columns: 1fr;
    overflow-x: visible;
  }
}

/* About */

.about {
  margin-top: var(--section-gap);
}

.about-inner {
  max-width: 640px;
}

/* Final call to action, over a photo */

.join {
  position: relative;
  isolation: isolate;
  margin-top: var(--section-gap);
  padding: clamp(120px, 22vw, 260px) 0 clamp(72px, 10vw, 140px);
}

.join-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.join-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 30%;
}

.join-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(14, 14, 16, 0.35) 30%, rgba(14, 14, 16, 0.85) 62%, var(--bg) 100%),
    linear-gradient(to right, rgba(14, 14, 16, 0.92) 0%, rgba(14, 14, 16, 0.55) 55%, rgba(14, 14, 16, 0.1) 100%);
}

.join h2 {
  max-width: 14ch;
  font-size: clamp(40px, 22px + 4.6vw, 80px);
  letter-spacing: -0.035em;
  line-height: 1;
}

.join .signup {
  max-width: 600px;
}

/* Footer */

.foot {
  padding-top: 48px;
  padding-bottom: 48px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.4;
}

.foot p + p {
  margin-top: 8px;
}

/* Motion, on screen only, once the reveal script has started; everything above is the final state. */

@media screen {

  .motion .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }

  .motion .reveal.in {
    opacity: 1;
    transform: none;
  }

  .motion .grouping .after .folder {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  }

  .motion .grouping.in .after .folder {
    opacity: 1;
    transform: none;
  }

  .motion .grouping.in .after .folder:nth-child(2) { transition-delay: 0.15s; }
  .motion .grouping.in .after .folder:nth-child(3) { transition-delay: 0.3s; }
  .motion .grouping.in .after .folder:nth-child(4) { transition-delay: 0.45s; }

  .motion .grouping .bar {
    background-size: 0 100%;
    background-repeat: no-repeat;
    background-image: linear-gradient(to right, var(--text), var(--text));
    background-color: rgba(255, 255, 255, 0.08);
    transition: background-size 1.4s var(--ease) 0.3s;
  }

  .motion .grouping.in .bar {
    background-size: calc(var(--share) * 100%) 100%;
  }

  .motion .filmstrip .frame:not(.pick) img {
    opacity: 1;
  }

  .motion .filmstrip .frame.pick img {
    outline-color: transparent;
  }

  .motion .filmstrip .frame.pick::after {
    opacity: 0;
    transform: scale(0.4);
  }

  .motion .filmstrip.in .frame:not(.pick) img {
    opacity: 0.5;
    transition-delay: 2s;
  }

  .motion .filmstrip.in .frame.pick img {
    outline-color: var(--accent);
  }

  .motion .filmstrip.in .frame.pick::after {
    opacity: 1;
    transform: none;
  }

  .motion .filmstrip.in .frame:nth-child(4) img,
  .motion .filmstrip.in .frame:nth-child(4)::after { transition-delay: 0.5s; }
  .motion .filmstrip.in .frame:nth-child(9) img,
  .motion .filmstrip.in .frame:nth-child(9)::after { transition-delay: 1.1s; }
  .motion .filmstrip.in .frame:nth-child(12) img,
  .motion .filmstrip.in .frame:nth-child(12)::after { transition-delay: 1.6s; }

  .motion .proof .dots li {
    transform: scale(0.6);
    background: rgba(255, 255, 255, 0.08);
  }

  .motion .proof .in .dots li {
    transform: none;
    background: var(--accent);
  }

  .motion .proof .in .dots li.miss {
    background: transparent;
  }

  .motion .proof .in .dots li:nth-child(1) { transition-delay: 0.2s; }
  .motion .proof .in .dots li:nth-child(2) { transition-delay: 0.3s; }
  .motion .proof .in .dots li:nth-child(3) { transition-delay: 0.4s; }
  .motion .proof .in .dots li:nth-child(4) { transition-delay: 0.5s; }
  .motion .proof .in .dots li:nth-child(5) { transition-delay: 0.6s; }
  .motion .proof .in .dots li:nth-child(6) { transition-delay: 0.7s; }
  .motion .proof .in .dots li:nth-child(7) { transition-delay: 0.8s; }
  .motion .proof .in .dots li:nth-child(8) { transition-delay: 0.9s; }
  .motion .proof .in .dots li:nth-child(9) { transition-delay: 1s; }
  .motion .proof .in .dots li:nth-child(10) { transition-delay: 1.1s; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* 404 and privacy */

.plain .top {
  position: static;
}

.notfound,
.page {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 96px auto 0;
  padding: 0 var(--gutter);
}

.notfound .text,
.page .text {
  max-width: 640px;
}

.notfound h1 {
  font-size: clamp(36px, 24px + 3vw, 56px);
}

.notfound p + p {
  margin-top: 16px;
}

.page h1 {
  font-size: clamp(32px, 24px + 2vw, 44px);
}

.page h2 {
  margin-top: 40px;
  font-size: 22px;
}

.page p,
.page ul {
  margin-top: 16px;
}

.page ul {
  padding-left: 20px;
}

.page li + li {
  margin-top: 10px;
}

/* The privacy page's way back home, above the heading and after the last section. */
.page .back {
  margin: 0 0 24px;
  font-size: 15px;
}

.page .back-end {
  margin: 48px 0 0;
}

.plain .foot {
  margin-top: var(--section-gap);
}

.todo {
  padding: 12px 16px;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  color: var(--text);
}

/* Survey */

.survey form {
  max-width: 640px;
  margin-top: 40px;
}

.question {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.question legend,
.ask {
  display: block;
  margin-bottom: 12px;
  padding: 0;
  color: var(--text);
  font-weight: 600;
}

.ask.small {
  margin: 12px 0 8px;
  font-size: 15px;
  font-weight: 400;
}

.qn {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}

.choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.survey textarea,
.survey input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.survey textarea {
  resize: vertical;
}

.send {
  height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #FFFFFF;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.send:hover {
  background: var(--accent-hover);
}

/* The confirm page's one button, under its heading. */
.page .text form {
  margin-top: 28px;
}

/* A field only bots fill in. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
