:root {
  --bg: #fff;
  --ink: #1a1a1a;
  --muted: #737373;
  --soft: #e8e8e8;
  --font-sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.55; }

.app {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(1100px, calc(100% - 8vw));
  margin: 0 auto;
  padding: 3.5rem 0 5.5rem;
  gap: 1.35rem;
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.8vw, 1.25rem);
  width: 100%;
  align-items: start;
}

.clip {
  margin: 0;
  width: 100%;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.clip:focus-visible .clip__frame {
  outline: 1px solid rgba(26, 26, 26, 0.35);
  outline-offset: 3px;
}

.clip.is-selected .clip__frame {
  outline: 1px solid rgba(26, 26, 26, 0.28);
  outline-offset: 3px;
}

.clip.is-selected {
  opacity: 1;
}

.trio:has(.clip.is-selected) .clip:not(.is-selected) {
  opacity: 0.62;
}

.clip__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--soft);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.clip__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
  pointer-events: none;
}

.clip__ph {
  position: relative;
  z-index: 1;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

.clip__frame:not([data-placeholder]) .clip__ph {
  display: none;
}

.reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: min(36rem, 100%);
  text-align: center;
}

.question {
  margin: 0;
  padding: 0.15rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
}

.result,
.coda {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.55;
  text-align: center;
  color: var(--ink);
  max-width: 34rem;
}

.coda {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.foot {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  justify-content: center;
  padding: 1rem 1.25rem 1.35rem;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  background: linear-gradient(to top, rgba(255,255,255,0.96), rgba(255,255,255,0));
}
.foot a { pointer-events: auto; color: var(--muted); }
.foot a:hover { color: var(--ink); opacity: 1; }
.foot__mail {
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
}
.foot__mail:hover { border-bottom-color: rgba(26,26,26,.22); }

.foot a.foot__home {
  font-family: Helvetica, Arial, sans-serif;
  font-size: inherit;
  font-weight: 300;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  border: none;
  padding: 0;
}
.foot a.foot__home:hover {
  color: rgba(0, 0, 0, 0.65);
  opacity: 1;
}

@media (max-width: 768px) {
  .stage {
    width: 100%;
    padding: 2rem 1rem 5.5rem;
  }
  .trio {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    max-width: 420px;
  }
  .question {
    font-size: 0.64rem;
  }
  .result {
    font-size: 0.68rem;
  }
  .coda {
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clip__video {
    /* keep muted still-capable; page won't force play beyond autoplay attr */
  }
}
