/* funnyfacefilters.com — one stylesheet, no framework. Brand: the app's yellow wall (#FFCC00) and black UI. */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/fredoka-latin.woff2") format("woff2");
}

:root {
  --yellow: #ffcc00;
  --yellow-soft: #ffe066;
  --ink: #17130e;
  --ink-soft: #4a4234;
  --paper: #fff8e1;
  --white: #ffffff;
  --sky: #4cc3f4;
  --ring: rgba(23, 19, 14, 0.14);
  --display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1180px;
}

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

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

body {
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 10;
}

.skip:focus {
  left: 8px;
}

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 600 1.15rem/1 var(--display);
  white-space: nowrap;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 2px 0 var(--ring);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: 600 1rem/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
}

.pill:hover {
  background: #000;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    "copy stage"
    "get  stage";
  column-gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(20px, 4vw, 48px);
  padding-bottom: clamp(36px, 6vw, 80px);
}

.hero-copy {
  grid-area: copy;
  align-self: end;
}

.hero-get {
  grid-area: get;
  align-self: start;
  margin-top: 28px;
}

.stage-col {
  grid-area: stage;
}

.kicker {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font: 600 0.95rem/1.2 var(--display);
}

.kicker li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kicker li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

h1 {
  font-size: clamp(2.7rem, 6.4vw, 5.2rem);
  letter-spacing: -0.015em;
}

h1 em {
  font-style: normal;
  position: relative;
  white-space: nowrap;
  z-index: 0;
}

/* a white marker swipe behind "live" */
h1 em::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.12em;
  right: -0.12em;
  top: 0.16em;
  bottom: 0.02em;
  background: var(--white);
  border-radius: 0.22em 0.32em 0.2em 0.3em;
  transform: rotate(-2deg);
}

.lede {
  margin-top: 20px;
  max-width: 34ch;
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  line-height: 1.45;
  color: var(--ink);
}

.hero-get p {
  font: 600 1rem/1.3 var(--display);
  margin-bottom: 10px;
}

/* ---------- store badges ---------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badges a {
  display: block;
  border-radius: 9px;
  transition: transform 0.15s ease;
}

.badges a:hover {
  transform: translateY(-2px);
}

.badges img {
  height: 48px;
  width: auto;
}

/* the visitor's own platform goes first and a little bigger */
.badges li.is-mine {
  order: -1;
}

.badges li.is-mine img {
  height: 58px;
}

/* ---------- the live stage ---------- */

.stage {
  position: relative;
  width: min(100%, 440px);
  margin: 0 auto;
}

.screen {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #0b0a08;
  border: 10px solid var(--ink);
  border-radius: 44px;
  overflow: hidden;
  box-shadow:
    0 18px 0 -6px rgba(23, 19, 14, 0.16),
    0 30px 60px -20px rgba(23, 19, 14, 0.45);
  isolation: isolate;
}

.screen canvas,
.poster,
.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.screen canvas {
  object-fit: cover;
  background: #0b0a08;
}

.poster {
  background: var(--yellow);
}

.poster img {
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.poster img.is-on {
  opacity: 1;
}

.stage[data-phase="running"] .poster {
  display: none;
}

.chip {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: 600 0.9rem/1 var(--display);
}

.chip::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--yellow);
}

.stage[data-phase="running"] .chip::before {
  background: #ff4d4d;
  animation: blink 1.4s steps(2, start) infinite;
}

.chip.is-loading::before {
  background: var(--yellow) !important;
  animation: blink 0.5s steps(2, start) infinite;
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

.x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 19, 14, 0.72);
  color: var(--white);
  font: 600 1.3rem/1 var(--display);
  cursor: pointer;
}

.cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 24px 110px;
  text-align: center;
}

.stage[data-phase="idle"] .cover.idle,
.stage[data-phase="loading"] .cover.loading,
.stage[data-phase="error"] .cover.error {
  display: flex;
}

.cover.idle {
  justify-content: flex-end;
  padding-bottom: 122px;
  background: linear-gradient(to top, rgba(23, 19, 14, 0.55), rgba(23, 19, 14, 0) 46%);
}

.cover.loading,
.cover.error {
  background: rgba(23, 19, 14, 0.82);
  color: var(--white);
}

.cover.error p {
  max-width: 26ch;
  font-size: 1.02rem;
  line-height: 1.4;
}

.cover small {
  color: var(--white);
  font-size: 0.86rem;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font: 700 1.25rem/1 var(--display);
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(23, 19, 14, 0.9);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

.go:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 0 rgba(23, 19, 14, 0.9);
}

.go:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(23, 19, 14, 0.9);
}

.go svg {
  width: 24px;
  height: 24px;
}

.go.small {
  min-height: 48px;
  padding: 0 22px;
  font-size: 1.05rem;
}

.spin {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--yellow);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hint {
  position: absolute;
  left: 50%;
  top: 64px;
  z-index: 3;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(23, 19, 14, 0.78);
  color: var(--white);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* the filter reel: circles along the bottom of the screen, like the app */
.reel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 26px 14px 12px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  background: linear-gradient(to top, rgba(23, 19, 14, 0.7), rgba(23, 19, 14, 0));
}

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

.reel li {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.reel button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 68px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--white);
  font: 500 0.72rem/1.1 var(--body);
  cursor: pointer;
}

.reel img,
.reel .orig {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: var(--yellow);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.reel .orig {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.reel .orig svg {
  width: 24px;
  height: 24px;
}

.reel button[aria-pressed="true"] img,
.reel button[aria-pressed="true"] .orig {
  border-color: var(--white);
  transform: scale(1.12);
}

.reel button[aria-pressed="true"] {
  font-weight: 700;
}

.under {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 18px;
}

.under .note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.93rem;
  line-height: 1.3;
}

.under .note svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: 600 1.05rem/1 var(--display);
  text-decoration: none;
  cursor: pointer;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn:hover {
  background: #000;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: default;
}

.toast {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--white);
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;
}

.toast a {
  font-weight: 700;
}

/* ---------- the wall of filters ---------- */

.wall {
  padding-bottom: clamp(48px, 7vw, 96px);
}

.sec-head {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin-bottom: clamp(22px, 3vw, 36px);
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  letter-spacing: -0.01em;
}

.sec-head p {
  font-size: 1.1rem;
  max-width: 52ch;
}

.faces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: clamp(14px, 2.2vw, 28px) clamp(10px, 1.6vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.faces button,
.faces .more a {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 0.98rem/1.15 var(--display);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.faces img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  background: var(--yellow-soft);
  box-shadow: 0 4px 0 var(--ring);
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.faces li:hover img {
  transform: scale(1.08) rotate(-4deg);
}

.faces li:nth-child(even):hover img {
  transform: scale(1.08) rotate(4deg);
}

.faces .more a {
  aspect-ratio: 1;
  align-content: center;
  gap: 2px;
  padding: 10px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-weight: 500;
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.faces .more b {
  color: var(--yellow);
  font-size: 1.15rem;
  font-weight: 700;
}

.faces .more a:hover {
  transform: scale(1.08) rotate(4deg);
}

/* ---------- features + screenshots ---------- */

.band {
  background: var(--paper);
  padding: clamp(48px, 7vw, 96px) 0;
}

.feats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 36px);
  margin: 0 0 clamp(32px, 5vw, 56px);
  padding: 0;
  list-style: none;
}

.feats h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.feats p {
  color: var(--ink-soft);
}

.feats li {
  padding-top: 16px;
  border-top: 4px solid var(--ink);
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(10px, 1.6vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.shots img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 16px 34px -18px rgba(23, 19, 14, 0.5);
}

.shots li:nth-child(odd) {
  transform: rotate(-1.5deg);
}

.shots li:nth-child(even) {
  transform: translateY(14px) rotate(1.5deg);
}

/* ---------- FAQ ---------- */

.faq {
  background: var(--white);
  padding: clamp(48px, 7vw, 96px) 0;
}

.faq .wrap {
  max-width: 860px;
}

.faq details {
  border-bottom: 2px solid var(--ink);
}

.faq details:first-of-type {
  border-top: 2px solid var(--ink);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font: 600 1.2rem/1.25 var(--display);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 0 20px;
  max-width: 64ch;
  color: var(--ink-soft);
}

/* ---------- get the app ---------- */

.get {
  background: var(--ink);
  color: var(--white);
  padding: clamp(48px, 7vw, 96px) 0;
}

.get .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.get h2 {
  color: var(--yellow);
}

.get p {
  margin: 14px 0 24px;
  max-width: 44ch;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.86);
}

.get .badges img {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: -1px;
  border-radius: 9px;
}

.qr {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
  font: 600 0.95rem/1.2 var(--display);
  text-align: center;
}

.qr img {
  width: 168px;
  height: 168px;
  padding: 12px;
  border-radius: 20px;
  background: var(--white);
}

/* ---------- footer ---------- */

.foot {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding: 28px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.86rem;
  line-height: 1.5;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: var(--white);
}

.foot nav a {
  padding: 6px 0;
}

.foot small {
  display: block;
  max-width: 90ch;
  font-size: inherit;
}

/* ---------- plain text pages (privacy, 404, get) ---------- */

.doc {
  background: var(--white);
  padding: clamp(32px, 6vw, 72px) 0;
}

.doc .wrap {
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin-bottom: 10px;
}

.doc h2 {
  font-size: 1.45rem;
  margin: 34px 0 10px;
}

.doc p,
.doc li {
  color: var(--ink-soft);
}

.doc p + p {
  margin-top: 12px;
}

.doc ul {
  padding-left: 22px;
}

.doc .when {
  font-size: 0.95rem;
}

.center {
  min-height: 70vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
  padding: 48px var(--gutter);
}

.center h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
}

.center .badges {
  justify-content: center;
}

/* ---------- small screens ---------- */

@media (max-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "stage"
      "get";
    row-gap: 26px;
  }

  .hero-get {
    margin-top: 6px;
    text-align: center;
  }

  .hero-get .badges {
    justify-content: center;
  }

  .lede {
    max-width: 40ch;
  }

  .feats {
    grid-template-columns: minmax(0, 1fr);
  }

  .shots {
    grid-auto-columns: 62%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1);
    padding: 8px var(--gutter) 28px;
    scrollbar-width: none;
  }

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

  .shots li {
    scroll-snap-align: center;
  }

  .shots li:nth-child(n) {
    transform: none;
  }

  .get .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .qr {
    display: none;
  }
}

@media (max-width: 420px) {
  .brand span {
    font-size: 1rem;
  }

  .pill {
    padding: 0 14px;
  }

  .screen {
    border-width: 8px;
    border-radius: 36px;
  }

  .faces {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
